Guest User

Untitled

a guest
Nov 15th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. select output.acad_year, output.class_name, count(output.exam_invite),count(output.interview_invite)
  2. FROM
  3. (select
  4. acad.acad_year,
  5. cls.class_name,
  6. addr.exam_invite,
  7. addr.app_status_stage,
  8. addr.interview_invite
  9.  
  10. FROM
  11. tbl_admission_status AS addr
  12. INNER JOIN tbl_stu_application AS app
  13. ON
  14. app.fk_stu_id = addr.fk_stu_id
  15. INNER JOIN list_acad_years AS acad
  16. ON
  17. app.fk_acad_year = acad.pk_acad_year_id
  18. INNER JOIN list_class AS cls
  19. ON
  20. app.fk_class_id = cls.pk_class_id
  21. WHERE
  22. acad_year = '2022' AND (addr.interview_invite = 'Y'or addr.exam_invite ='Y')) as output
  23. where output.exam_invite ='Y' and output.interview_invite ='Y'
  24.  
  25. SELECT COUNT(condition1) AS Col_Result_1, COUNT(condition2) AS Col_Result_2
  26. FROM table1
  27. JOIN table2 ON table1.col = table2.col
Add Comment
Please, Sign In to add comment