mercredi 3 décembre 2014

Select Top Ten Each Group


This my table and and my query


! MyTable


This is My query


"select CellId, PathId, channel, sum(Duration) as min_duration from HourlySummary group by CellId, PathId, Channel order by cellid, pathid, sum(Duration) desc "


in my table i have 50+ cellid and each cellid have four pathid(i.e, 0,1,2,3)


Now i want to display top 10 records(each pathId) for each cellid order by Duaration


Please help me





Aucun commentaire:

Enregistrer un commentaire