Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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');
- +----+---------------------+------------+
- | id | email | birthdate |
- +----+---------------------+------------+
- | 1 | mikkel@mikjaer.com | 1983-05-17 |
- | 12 | a@a.a | 1980-03-03 |
- | 16 | toby_uknow@yahoo.dk | 1988-04-06 |
- +----+---------------------+------------+
- 3 rows in set (0.00 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement