var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: select top 3
I have a table that holds comment records. The columns are :
user_id, comment, date
How can I write a select statement that returns the 3 most recent comment records for each user, all in one recordset.
thanks for any help.
from yourtable zzz
where ( select count(*)
where user_id = zzz.user_id
and thedate > zzz.thedate ) < 3
, thedate desc
thanks r937, did the trick.