ػѹѺ ­ҧ ʾ. ࢵ 34 (§,ͧ͹) [ ʾ.§ 4]
ç¹ ͧ ͧ ͧ Թ ͧᴧ
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=14 AND im_school.area_type_id=2 AND im_school.zone_num=4 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 ѹҵͧԷҤ 44 31 17 92 79 22 6 3 107
2 վԷҤ 26 20 7 53 46 16 10 5 72
3 ҧѰɮػ 19 9 12 40 39 24 7 5 70
4 ͧҫԹԧҳԪا 11 8 9 28 26 15 4 1 45
5 ѹآ 10 11 5 26 27 13 4 8 44
6 ෾Թ § 10 9 7 26 27 12 7 8 46
7 ͧԷҤ 9 19 11 39 34 24 5 6 63
8 ҹҴԷҤ 9 7 12 28 27 25 6 9 58
9 DZٵ֡ҾѲ 9 6 4 19 11 6 7 4 24
10 Ǫ 3 3 4 10 7 10 1 3 18
11 ѲԷ֡ 3 1 8 12 6 6 5 5 17
12 ҧѧɮػ 3 1 2 6 8 13 3 2 24
13 ׺ո 2 0 0 2 5 2 3 4 10
14 ջѵ֡ 1 1 1 3 3 5 6 4 14
15 ԹѤ 1 0 3 4 1 6 1 0 8
16 ҸԵԷѧԵ 0 0 0 0 0 0 2 0 2
17 ѹҵͧ֡ 0 0 0 0 0 0 1 1 1
160 126 102 388 346 199 78 68 623