ػѹѺ ­ҧ ʾ. ࢵ 6 (ԧ,طûҡ) [ ʾ.ԧ 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=8 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 19 17 85 78 16 3 2 97
2 Ѵس 31 31 8 70 57 16 5 6 78
3 ອҪѧɮ 2 25 19 11 55 51 20 2 7 73
4 Ѵʸ 19 10 10 39 42 8 8 15 58
5 ӾԷҤ Ѫѧɡ 8 2 0 10 10 1 0 6 11
6 ôҹ 5 14 10 29 30 21 6 5 57
7 طѧվԺ 5 5 9 19 13 11 7 8 31
8 ҧС "Է¹" 4 11 7 22 22 7 4 11 33
9 ҧԷ 4 9 8 21 22 15 5 14 42
10 ش֡ҾѲҡ Թǧ 4 3 4 11 11 11 4 15 26
11 ອҪѧɮ 3 ʧԷ 4 3 1 8 12 3 3 8 18
12 ͹ͧԷ 3 2 1 6 8 2 1 6 11
13 ૹ ԧ 2 4 2 8 9 7 3 2 19
14 ͹վԷҤ 2 3 6 11 15 17 4 5 36
15 ش֡طҸԺ 2 1 7 10 7 10 4 4 21
16 Էɮѧä 2 0 1 3 2 0 3 2 5
17 á 1 0 0 1 2 0 1 2 3
18 ૹ͹ⷹ 0 2 6 8 5 5 2 1 12
19 ÷ҡԹ Ѵ⾸ѡ (͹óѹ觪ҵ 2537) 0 1 0 1 0 3 1 3 4
20 ອҪѧɮ 5 0 0 2 2 3 5 3 11 11
21 ҳԵԷ 0 0 2 2 3 3 0 3 6
170 139 112 421 402 181 69 136 652