Created
September 17, 2015 06:37
-
-
Save shishircse06/02db9f9262449c6169f4 to your computer and use it in GitHub Desktop.
find age from date and then query users
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT first_name from users where created_at > | |
( | |
select TIMESTAMPDIFF(YEAR, created_at, CURDATE()) | |
AS age from users where id=1 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment