ػѹѺ ­ҧ ʾ. ࢵ 39 (ɳš,صôԵ) [ ʾ.صôԵ 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=74 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 ӻҴٻ 59 24 13 96 90 5 2 1 97
2 һһЪط 23 16 13 52 49 5 6 0 60
3 ҹ⤡ԷҤ 23 16 7 46 41 8 1 0 50
4 ҡԷ 21 15 4 40 38 3 0 0 41
5 ˤ¹ 10 0 0 10 7 3 0 0 10
136 71 37 244 225 24 9 1 258