|
Posted by Ewoud Dronkert on 11/29/05 19:49
bettina@coaster.ch wrote:
> coasters (ID,BREWERY_CODE, etc)
> breweries (BREWERY_CODE, BREWERY)
>
> For each brewery I want to count how many coasters are there in table
> "coasters" (up to here it works fine) and then I want to show them
> ordered by quantity (that's my problem):
Better ask database questions in comp.databases.mysql
select brewery, count(coasters.id) as cid from breweries inner join
coasters using(brewery_code) group by brewery order by cid
--
E. Dronkert
Navigation:
[Reply to this message]
|