Advertisement
mikjaer

Untitled

Apr 4th, 2017
732
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.51 KB | None | 0 0
  1. mysql> SELECT  id, email, str_to_date(concat(birthmonth,"/",birthday,"/",birthyear), '%m/%d/%Y') AS birthdate FROM users WHERE birthyear != 0 HAVING birthdate < str_to_date('00/00/1990','%m/%d/%Y');
  2. +----+---------------------+------------+
  3. | id | email               | birthdate  |
  4. +----+---------------------+------------+
  5. |  1 | [email protected]  | 1983-05-17 |
  6. | 12 | [email protected]               | 1980-03-03 |
  7. | 16 | [email protected] | 1988-04-06 |
  8. +----+---------------------+------------+
  9. 3 rows in set (0.00 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement