You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
500 B

SELECT
u.id user_id,
u.lastname user_name,
e.gender,
e.school_id,
s.name school_name,
e.location,
e.location_city,
e.occupation,
e.identity,
e.technical_title,
e.edu_background,
e.edu_entry_year,
u.gid,
u.visits,
u.grade,
u.experience,
u.last_login_on
FROM users u
LEFT JOIN user_extensions e
ON u.id = e.user_id
LEFT JOIN schools s
ON e.school_id = s.id
WHERE u.TYPE = 'User' AND last_login_on >= 'LAST_LOGIN_TIME'