I need some help whith an sql query.
the query "select date, user, location, ip from myTable"
returns this
Now I want a query that filter out the last place an user where (location).
So the result whould be like this:
Any idea of query to fix this?
Thanks
the query "select date, user, location, ip from myTable"
returns this
Code:
date user location ip
-----------------------------------------------------
2003-11-08 23:32:12.000 bob Uptime 1.2.3.4
2003-11-08 23:31:52.000 guest Forum 1.2.3.99
2003-11-08 23:31:49.000 bob Forum 1.2.3.4
2003-11-08 23:25:23.000 john Guestbook 1.2.3.10
2003-11-08 23:25:20.000 guest Guestbook 1.2.3.99
2003-11-08 23:25:17.000 john Forum 1.2.3.10
2003-11-08 23:25:07.000 john Uptime 1.2.3.10
2003-11-08 23:23:12.000 guest Forum 1.2.3.88
2003-11-08 23:24:52.000 bob Forum 1.2.3.4
Now I want a query that filter out the last place an user where (location).
So the result whould be like this:
Code:
date user location ip
-----------------------------------------------------
2003-11-08 23:32:12.000 bob Uptime 1.2.3.4
2003-11-08 23:31:52.000 guest Forum 1.2.3.99
2003-11-08 23:25:23.000 john Guestbook 1.2.3.10
2003-11-08 23:23:12.000 guest Forum 1.2.3.88
Any idea of query to fix this?
Thanks