ࢵ鹷֡ ͧ ͧ ͧ Թ ͧᴧ
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 ʾ. ͧ ࢵ 2 2 0 0 2 2 0 1 1 3
2 ʾ. ͧ ࢵ 1 1 1 1 3 3 0 3 2 6
3 ʾ. طҤ 1 0 1 2 2 0 0 5 2
4 ʾ. û ࢵ 1 1 0 0 1 2 0 1 2 3
5 ʾ. ا෾ҹ 1 0 0 1 1 1 0 4 2
6 ʾ. ҭ ࢵ 3 1 0 0 1 1 0 0 1 1
7 ʾ. ҭ ࢵ 2 1 0 0 1 0 4 3 1 7
8 ʾ. ž ࢵ 2 0 1 2 3 2 2 3 1 7
9 ʾ. ྪú ࢵ 1 0 1 1 2 2 1 0 1 3
10 ʾ. طûҡ ࢵ 1 0 1 0 1 2 2 0 2 4
11 ʾ. ࢵ 1 0 1 0 1 2 2 0 0 4
12 ʾ. ؾó ࢵ 1 0 1 0 1 2 1 1 3 4
13 ʾ. Ҫ ࢵ 1 0 1 0 1 2 0 1 5 3
14 ʾ. ҧͧ 0 1 0 1 1 1 2 3 4
15 ʾ. ҹ ࢵ 1 0 0 2 2 1 1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