I have a table of user access sessions which records website visitor activity:
accessid, userid, date, time, url
I\'m trying to retrieve all dis
Try this
SELECT accessid, date, time FROM accesslog WHERE userid = '1234' GROUP BY accessid HAVING MIN(date)
It will return all unique accesses with minimum time for each for userid = '1234'.