ػѹѺ ­ҧ ʾ. ࢵ 7 (Ҩչ,ù¡,) [ ʾ.Ҩչ 1]
ç¹ ͧ ͧ ͧ Թ ͧᴧ
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=30 AND im_school.area_type_id=2 AND im_school.zone_num=1 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 ҨԳɮا 46 20 14 80 75 15 6 10 96
2 Ҩչҳ 32 18 19 69 70 15 6 12 91
3 Шѹɮا 29 24 10 63 54 11 8 12 73
4 ѸѴçͧ 13 17 12 42 39 8 6 4 53
5 ͡óԷҤ 11 11 4 26 29 14 4 5 47
6 ԷһҨչ 11 6 5 22 19 12 4 11 35
7 10 7 13 30 30 15 6 13 51
8 ʶ 8 15 9 32 28 18 6 8 52
9 Էʶ 2 2 1 5 4 2 5 3 11
10 ͧѾػѡþԷ 2 1 0 3 5 6 2 11 13
11 ѰԷ 7 1 3 2 6 7 4 2 9 13
12 Ե㨪 1 2 3 6 6 9 5 12 20
13 ЪѰѲ 0 3 5 8 2 5 6 4 13
14 óԷ 0 1 2 3 4 7 3 6 14
15 ѸѴ 0 1 2 3 1 6 4 5 11
16 ѡ 0 1 1 2 4 3 4 1 11
17 ѴԷ 0 1 1 2 2 1 0 0 3
18 ҨԳɮا 2 "ʹʹԨ֡" 0 1 0 1 2 0 0 0 2
19 зԷ 0 0 8 8 4 9 6 5 19
166 134 111 411 385 160 83 131 628