ػѹѺ ­ҧ ʾ. ࢵ 18 (ź,ͧ) [ ʾ.ͧ 2]
ç¹ ͧ ͧ ͧ Թ ͧᴧ
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=49 AND im_school.area_type_id=2 AND im_school.zone_num=2 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 ŧ"Էʶ" 53 31 16 100 105 5 3 2 113
2 ӹҭѤԷ 27 27 20 74 86 7 6 2 99
3 خͧҪԷ 27 19 13 59 70 6 6 1 82
4 ѧѹԷ 18 20 21 59 69 12 3 1 84
5 ҪԷ 9 6 8 23 29 9 13 0 51
6 عԷ 8 14 12 34 41 11 2 1 54
7 Ӧ;ԷҤ 5 6 3 14 22 5 2 1 29
8 ҧ֡ 4 4 17 25 32 13 3 4 48
9 觹ҾԷ 1 0 1 2 4 1 1 0 6
152 127 111 390 458 69 39 12 566