jeniferfleurant

cdc query

Aug 31st, 2017
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.34 KB | None | 0 0
  1. select year(date_blood_taken),
  2. count(id) as total,
  3. sum(which_pcr=1) as pcr_1,
  4. sum(which_pcr=5) as pcr_n,
  5. sum(timestampdiff(week, date_of_birth, date_blood_taken)<=8) as under_8_weeks,
  6. sum(pcr_result=1) as positif
  7.  from testing_specimen where year(date_blood_taken)>=2015 and date_blood_taken<='2017-06-30'
  8.  group by year(date_blood_taken)
Advertisement
Add Comment
Please, Sign In to add comment