This seems like something I've done several times a year for years, but I can't seem to get it. I can't find a solution on Google that works, although the question was asked many times and answered, too. Also, I'm low on sleep right now.
Let's say I have two tables:
USERS
USERS_LOGINS
I want to join the tables and get one row per user, with only the latest login row. Assume "UserId" is the pk/fk and there's some sort of LoginTime in the USERS_LOGINS table.
So I will get results like:
- Brian 8/4
- Mitch 8/3
- Jerry 8/2
I appreciate the help.