ػѹѺ ­ҧ ʾ. ࢵ 15 (Ҹ,ѵҹ,)
ç¹ ͧ ͧ ͧ Թ ͧᴧ
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=31 AND im_school.area_type_id=2 AND im_school.zone_num=15 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 ອҪٷ ѧѴѵҹ 63 0 0 63 63 0 0 0 63
2 പлѵҹء 42 0 0 42 42 0 0 0 42
3 º "駻ЪҤ" 36 0 0 36 36 0 0 0 36
4 ⾸Ҫ֡ 34 0 0 34 34 0 0 0 34
5 ҧᴧԷҤ 22 0 0 22 22 0 0 0 22
6 蹡ԵԷ 18 0 0 18 18 0 0 0 18
7 ѧо;ԷҤ 12 0 0 12 12 0 0 0 12
8 ҢԷҤ 10 0 0 10 10 0 0 0 10
9 ҹԷ 10 0 0 10 10 0 0 0 10
10 ɯѤ 9 0 0 9 9 0 0 0 9
11 е⾸Է 8 0 0 8 8 0 0 0 8
12 й;ԷҤ 8 0 0 8 8 0 0 0 8
13 ó侺 7 0 0 7 7 0 0 0 7
14 ҪЪҹ ѧѴѵҹ 6 0 0 6 6 0 0 0 6
15 Ҫعѧɯ 6 0 0 6 6 0 0 0 6
16 زԪԷ 2 0 0 2 2 0 0 0 2
17 ºԷ 2 0 0 2 2 0 0 0 2
295 0 0 295 295 0 0 0 295