MySQL Forums
Forum List  »  Newbie

Re: query data from 2 tables with MAX(datetime)
Posted by: Peter Brawley
Date: March 06, 2015 05:49PM

Is this what you mean?

select a.lastname, a.firstname, max(b.datetime) as 'Last login'
from members a
join logins b using(username)
group by a.lastname, a.firstname;

Options: ReplyQuote


Subject
Written By
Posted
Re: query data from 2 tables with MAX(datetime)
March 06, 2015 05:49PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.