User
user_id
name
city
UserHistory
user_id
date
action
Your SQL should be compatible with MySQL 4.0. Please avoid using subqueries.
1. Given the tables above, write an SQL query that returns the name, city and most recent date for any user that has logged in over the last 30 days (you can tell a user has logged in if the action field in UserHistory is set to “logged_on”)....