Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT risk.user_id, (case when bp.user_id is null then 'n' else 'y' end) as bp_test,
- (case when risk.user_id is null then 'n' else 'y' end) as hiv_test
- FROM `risk_Assessment_questions_2016` as risk
- left join `bp_a1c_risk_ques_2016` as bp on bp.user_id = risk.user_id
- left join test_type_verification as test on risk.user_id = test.user_id
- where (risk.__posted__ like '%2017-08%' or bp.__posted__ like '%2017-08%')
- and test.user_id is null
- GROUP by risk.user_id
Add Comment
Please, Sign In to add comment