Posts Tagged ‘top n of group’
MySQL – Get the Top N of a Group
Friday, March 26, 2010 11:43 No CommentsGetting Top N of a group would be very easy if there just wasn’t that ‘LIMIT & IN/ALL/ANY/SOME subquery’ restriction. But there’s always some way around. Thx to Jon Armstrong from A little Noise for the code hint. MYSQL table ‘measurements’ | Id | Freq | Level | DateM ## Gets the last 2 measurements [...]