ػѹѺ ­ҧ ʾ. ࢵ 35 (ӻҧ,Ӿٹ) [ ʾ.ӻҧ 3]
ç¹ ͧ ͧ ͧ Թ ͧᴧ
SELECT im_school.school_id AS s_id,im_school.school_name AS s_name, COUNT(*) AS NUB , COUNT(IF(im_team.award='ͧ',award,NULL)) AS gold_medal, COUNT(IF(im_team.award='Թ',award,NULL)) AS silver_medal, COUNT(IF(im_team.award='ͧᴧ',award,NULL)) AS bronze_medal, COUNT(IF(im_team.award='',award,NULL)) AS join_medal, COUNT(IF(im_team.rank='',rank,NULL)) AS winner, COUNT(IF(im_team.rank='ͧѹѺ ',rank,NULL)) AS two_rank, COUNT(IF(im_team.rank='ͧѹѺ ',rank,NULL)) AS three_rank FROM im_school,im_team WHERE im_school.province_id=52 AND im_school.area_type_id=2 AND im_school.zone_num=3 AND im_team.confirm_status=1 AND im_school.school_id=im_team.school_id GROUP BY im_team.school_id ORDER BY winner DESC, two_rank DESC, three_rank DESC, gold_medal DESC, silver_medal DESC,bronze_medal DESC,join_medal DESC, NUB DESC, s_name ASC
1 Է 74 36 10 120 118 5 0 0 123
2 ѧ˹Է 27 39 28 94 82 20 6 1 108
3 觡ԷҤ 23 12 10 45 51 13 5 0 69
4 ͧҹѲԷ 13 5 17 35 42 10 7 1 59
5 شԷ 11 16 12 39 44 15 7 0 66
6 ͧҹԷ 9 19 27 55 57 18 6 1 81
7 ҹԷ 2 3 8 13 19 7 8 0 34
8 ء֡ 0 0 0 0 1 4 0 0 5
159 130 112 401 414 92 39 3 545