ػѹѺ ­ҧ ʾ. ࢵ 8 (Ҫ,ҭ) [ ʾ.ҭ 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=3 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 ҭҹ 49 35 18 102 98 13 5 11 116
2 طѧ 41 36 17 94 92 22 4 6 118
3 õ稾չԹ ҭ 22 25 27 74 61 16 10 10 87
4 ෾ѧ 21 11 12 44 50 14 6 11 70
5 ǧɮا 15 8 9 32 38 12 12 9 62
6 ͧúǹѧѴҭ (ҹԷ) 6 5 4 15 16 9 8 9 33
7 ෾ԹҴ˭ҡҭ 5 6 8 19 20 13 9 10 42
8 Ż 5 3 6 14 14 6 3 6 23
9 ҹТԷҤ 4 13 16 33 38 18 5 12 61
10 ʴԷҤ 4 6 2 12 17 7 5 9 29
11 ˹ͧҡҵɮا 2 2 0 4 9 6 3 11 18
12 ˹ͧԷԷҤ 2 1 6 9 8 14 4 7 26
13 ѧɮѧä 1 4 1 6 6 4 1 5 11
14 سҡҭ 0 3 2 5 5 6 0 3 11
177 158 128 463 472 160 75 119 707