Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select output.acad_year, output.class_name, count(output.exam_invite),count(output.interview_invite)
- FROM
- (select
- acad.acad_year,
- cls.class_name,
- addr.exam_invite,
- addr.app_status_stage,
- addr.interview_invite
- FROM
- tbl_admission_status AS addr
- INNER JOIN tbl_stu_application AS app
- ON
- app.fk_stu_id = addr.fk_stu_id
- INNER JOIN list_acad_years AS acad
- ON
- app.fk_acad_year = acad.pk_acad_year_id
- INNER JOIN list_class AS cls
- ON
- app.fk_class_id = cls.pk_class_id
- WHERE
- acad_year = '2022' AND (addr.interview_invite = 'Y'or addr.exam_invite ='Y')) as output
- where output.exam_invite ='Y' and output.interview_invite ='Y'
- SELECT COUNT(condition1) AS Col_Result_1, COUNT(condition2) AS Col_Result_2
- FROM table1
- JOIN table2 ON table1.col = table2.col
Add Comment
Please, Sign In to add comment