Hi,
I have a user table like this
user_id | community_id | registration_date
--------------------------------------------
1 | 1 | 2008-01-01
2 | 1 | 2008-05-01
3 | 2 | 2008-01-28
4 | 2 | 2008-07-22
5 | 3 | 2008-01-11
For each community, I would like to get the time that the 3rd user registered. I can easily do this for a single community using MySql's 'limit' SQL extension. For example, for community with ID=2
select registration_date
from user
order by registration_date
where community_id = 2
limit 2, 1
Alternatively, I can get the date that the first user registered for all communities via:
select community_id, min(registration_date)
from user
group by 1
But I can't figure out how to get the registration date of the 3rd user for all communities in a single SQL statement.
Cheers, Don