Login Statistics
USE CASE:
- Retrieve a list of Users since last login time
- Show User information, last login time, and the count of days since that time until now
- Recommendation: use to build a Report
SELECT username, first_name, last_name,
IFNULL(last_login_time, 'Not Available') AS Last_login_date,
DATEDIFF(CURDATE(),last_login_time) AS Days_since_last_login
FROM user
Click to copy