ػѹѺ ­ҧ ʾ. ࢵ 9 (ؾó,û) [ ʾ.ؾó 3]
ç¹ ͧ ͧ ͧ Թ ͧᴧ
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=66 AND im_school.area_type_id=2 AND im_school.zone_num=3 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 ءѵ 38 17 20 75 68 20 15 5 103
2 ˹ͧ˭Է 37 22 19 78 71 21 11 11 103
3 ⪵֡ 34 29 20 83 77 17 11 5 105
4 Է 3 32 29 14 75 68 13 9 0 90
5 ὡԷҤ 9 4 6 19 23 14 9 8 46
6 ͡Է 6 8 10 24 27 14 16 6 57
7 Է 6 5 12 13 30 30 20 12 9 62
8 ҹҧԷ 5 9 12 26 27 18 8 9 53
9 觤⤡ҧԷ 4 6 6 16 14 9 11 6 34
10 Է 7 3 1 1 5 4 3 10 6 17
173 137 121 431 409 149 112 65 670