ػѹѺ ­ҧ ʾ. ࢵ 5 (ԧ,ž,¹ҷ,ҧͧ) [ ʾ.ԧ 1]
ç¹ ͧ ͧ ͧ Թ ͧᴧ
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=64 AND im_school.area_type_id=2 AND im_school.zone_num=1 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 ԧ 70 28 9 107 100 9 3 3 112
2 ҧШѹԷ 19 14 13 46 45 14 8 1 67
3 Թ 15 21 17 53 48 23 8 3 79
4 ºҧШѹԷҤ 10 9 7 26 28 10 5 8 43
5 ԧ˾"ҹԵػ" 9 11 9 29 29 12 3 6 44
6 Թջзҹ 9 4 6 19 23 7 2 2 32
7 ѸȺ 8 5 6 19 22 7 6 6 35
8 ͧ͹Է 7 2 4 13 14 7 4 1 25
9 ҪҧԷҤ 6 6 4 16 20 8 5 4 33
10 ѡóԷ 4 6 9 19 17 17 10 11 44
11 ԹԵԷҤ 3 14 3 20 19 11 7 7 37
12 ҹԷ 2 6 6 14 13 17 5 1 35
13 С« ԧ 2 3 3 8 6 7 6 1 19
14 Ѫɡ 2 1 3 6 7 3 4 3 14
15 ԷҤ 1 4 1 6 10 5 2 1 17
167 134 100 401 401 157 78 58 636