sql - mysql count return multiple rows in DESC order -
i have read count returns 1 row, if use group can multiple rows returned such
the code returned result above is
select event_id, count( event_id ) nr
picks
group event_id desc limit 0 , 30
however need find way order desc
order. have tried order by
1 row , looks cant use desc
group by. looking advice
update
the following give me result displayed in image below
select event_id, count( event_id ) nr picks group event_id order event_id desc limit 0 , 30
descending order
select event_id, count( event_id ) nr picks group event_id order event_id desc limit 0 , 30
ascending order //this default sort order
select event_id, count( event_id ) nr picks group event_id order event_id limit 0 , 30
Comments
Post a Comment