Hello. Please help, just can’t figure out how to approach the task.

There is a users sign, it has two columns:

  • last_login last login time activated_users
  • whether the user has activated an account or not: activated = 1, not activated = 0.

How to make a request to line up activated users by the date of authorization, from the closest to the oldest.

Thank you.

  • one
    SELECT * FROM users WHERE activated_users = 1 ORDER BY last_login DESC not? - etki
  • higher mathematics, not otherwise. - Yura Ivanov
  • Everything comes with experience, thank you. - Ruslan1987

1 answer 1

The response from the comments given by Etki

 SELECT * FROM users WHERE activated_users = 1 ORDER BY last_login DESC