Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. select month(postulationdate), count(idpostulant) from postulations
  2. where postulationdate >= '2014-01-01'
  3. and idpostulant = (select count(idpostulant) >= 3)
  4. group by 1
  5.  
  6. SELECT month(postulationdate), count(idpostulant)
  7. FROM postulations
  8. WHERE postulationdate >= '2014-01-01'
  9. GROUP BY month(postulationdate)
  10. HAVING count(idpostulant) >= 3
  11.  
  12. SELECT month(postulationdate), count(idpostulant)
  13. FROM postulations AS a
  14. WHERE postulationdate >= '2014-01-01'
  15. AND EXISTS(SELECT idpostulant
  16. FROM postulations AS b
  17. WHERE postulationdate >= '2014-01-01'
  18. AND a.idpostulent = b.idpostulent
  19. GROUP BY idpostulant
  20. HAVING count(idpostulant) >= 3)
  21. GROUP BY month(postulationdate)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement