Advertisement
mikjaer

Untitled

Apr 4th, 2017
717
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 | mikkel@mikjaer.com  | 1983-05-17 |
  6. | 12 | a@a.a               | 1980-03-03 |
  7. | 16 | toby_uknow@yahoo.dk | 1988-04-06 |
  8. +----+---------------------+------------+
  9. 3 rows in set (0.00 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement