jeniferfleurant

mereenfant by month

Sep 7th, 2018
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.40 KB | None | 0 0
  1. select concat(mother_city_code,'/',mother_hospital_code) as hospital, count(id_patient) as nbr, concat(month(infant_dob),'-',year(infant_dob)) as month_year_dob
  2. from testing_mereenfant
  3. where infant_dob between '2017-08-01' and '2018-08-31'
  4. GROUP BY concat(month(infant_dob),'-',year(infant_dob)), concat(mother_city_code,'/',mother_hospital_code)
  5. order by concat(mother_city_code,'/',mother_hospital_code)
Advertisement
Add Comment
Please, Sign In to add comment