Problem med nested select i query
Den sidste nesting outputter: No column was specified for column 1 of 'numBottles'.Jeg har prøvet alt muligt, men synes ikke at kan lokalisere problemet. En af jer som kan sige hvad jeg gør forkert?
select
category.category_id,category.name,
(select count(1) from star_to_category where star_to_category.category_id = category.category_id) as antal,
[section].name as CatName from [section], category,
(select count(1) from used_bottles, bottle WHERE used_bottles.bottle_id = bottle.bottle_id AND bottle.category_id = 7 GROUP BY bottle.category_id) as numBottles
where [section].section_id = category.section_id;