ػѹѺ ­ҧ ʾ. ࢵ 3 (,йظ) [ ʾ. 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=24 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 ش֡ҾѲҡ 38 33 23 94 81 33 10 12 124
2 Ѵõ 31 22 21 74 66 38 15 8 119
3 ʵչ 29 22 22 73 65 27 14 8 106
4 ෾Թ 21 26 10 57 51 22 15 10 88
5 պسҹ 15 20 12 47 54 18 18 12 90
6 ѵҸ 14 12 7 33 36 24 7 12 67
7 Թപ (ԧ ԧʹ) 11 6 5 22 28 13 17 13 58
8 ອҪҹó 10 19 20 49 39 38 9 9 86
9 վԷҤ 9 7 10 26 29 20 15 13 64
10 ͹ҪԷ 8 9 9 26 23 25 9 10 57
11 ֡ʧҧ 5 0 0 5 7 4 5 2 16
12 ҹùԷ 6 0 0 0 0 0 0 0 0 0
191 176 139 506 479 262 134 109 875