ࢵ鹷֡ ͧ ͧ ͧ Թ ͧᴧ
SELECT im_school.area_type_id AS area_type_id,im_school.province_id AS province_id, im_school.zone_num AS zone_num, im_school.area_sm AS area_sm, 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_team.confirm_status=1 AND im_school.school_id=im_team.school_id GROUP BY im_school.province_id, im_school.zone_num , im_school.area_sm ORDER BY winner DESC, two_rank DESC, three_rank DESC, gold_medal DESC, silver_medal DESC,bronze_medal DESC,join_medal DESC, NUB DESC
1 ʾ. ࢵ 16 (ʧ,ʵ) [ ʾ.ʵ 1] 3 0 1 4 5 1 0 0 6
2 ʾ. ࢵ 16 (ʧ,ʵ) [ ʾ.ʧ 2] 1 2 0 3 3 3 1 0 7
3 ʾ. ࢵ 11 (ɮҹ,) [ ʾ. 1] 1 1 0 2 3 3 1 1 7
4 ʾ. ࢵ 13 (ѧ,к) [ ʾ.ѧ 1] 1 1 0 2 2 2 2 1 6
5 ʾ. ࢵ 13 (ѧ,к) [ ʾ.к 1] 1 0 1 2 6 1 1 0 8
6 ʾ. ࢵ 12 (ոҪ,ѷا) [ ʾ.ѷا 1] 1 0 1 2 3 3 0 0 6
7 ʾ. ࢵ 16 (ʧ,ʵ) [ ʾ.ʧ 1] 0 2 0 2 3 4 1 0 8
8 ʾ. ࢵ 14 (ѧ,,йͧ) [ ʾ. 1] 0 1 1 2 2 1 1 0 4
9 ʾ. ࢵ 11 (ɮҹ,) [ ʾ. 2] 0 1 0 1 2 5 0 1 7
10 ʾ. ࢵ 11 (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