5 pts.
 Finding nth most recent action with SQL
I am trying to determine the date on which a certain number of things have happened cumulatively, eg I have a varying number of buyers each month. I want to find out on what date of that month, those buyers make their 3rd purchase. My SQL doesn't seem to support TOP or ROWCOUNT so I would appreciate alternatives

Software/Hardware used:
ASKED: May 18, 2009  10:11 PM
UPDATED: May 19, 2009  8:29 PM

Answer Wiki:
In MySql, you could use the LIMIT clause to get something similar to the TOP clause. LIMIT's example: SELECT * FROM yourTable LIMIT 10 You could also generate a row number, this way: select @rownum:=@rownum+1 ‘row_number’, y.* FROM YourTable y, (SELECT @rownum:=0) r LIMIT 10; ---------------------------------------------
Last Wiki Answer Submitted:  May 19, 2009  8:29 pm  by  carlosdl   63,535 pts.
All Answer Wiki Contributors:  carlosdl   63,535 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _