ࢵ鹷֡ ͧ ͧ ͧ Թ ͧᴧ
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 3 0 1 4 5 2 1 0 8
2 ʾ. ոҪ ࢵ 3 1 1 1 3 3 1 1 0 5
3 ʾ. ѧ ࢵ 1 1 1 0 2 3 1 0 0 4
4 ʾ. ࢵ 1 1 0 2 3 5 1 0 2 6
5 ʾ. ࢵ 1 1 0 0 1 1 0 0 0 1
6 ʾ. ࢵ 3 1 0 0 1 1 0 0 0 1
7 ʾ. к 0 3 0 3 3 2 0 0 5
8 ʾ. ࢵ 2 0 2 1 3 4 0 1 1 5
9 ʾ. ɮҹ ࢵ 3 0 1 1 2 5 1 2 0 8
10 ʾ. ѵҹ ࢵ 1 0 0 1 1 3 1 0 0 4
11 ʾ. ʧ ࢵ 3 0 0 1 1 1 4 2 0 7
12 ʾ. ѷا ࢵ 1 0 0 0 0 0 4 0 1 4
13 ʾ. йͧ 0 0 0 0 0 2 0 0 2
14 ʾ. ʧ ࢵ 1 0 0 0 0 0 0 1 0 1
15 ʾ. ѷا ࢵ 2 0 0 0 0 0 0 0 0 0
16 ʾ. ʵ 0 0 0 0 0 0 0 0 0
17 ʾ. Ҹ ࢵ 3 0 0 0 0 0 0 0 0 0
18 ʾ. ࢵ 2 0 0 0 0 0 0 0 0 0
8 8 8 24 34 19 8 4 61