Created
February 13, 2016 02:58
-
-
Save eezhal92/2d8c6b334e403089e756 to your computer and use it in GitHub Desktop.
sql sleekr
This file contains 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 c.name, count(u.name) as co from company c | |
join users u on c.id = u.company | |
where datediff(now(), u.join_date) >= 365 | |
and u.gender = 'male' group by c.name; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment