ػѹѺ ­ҧ ʾ. ࢵ 4 (ҹ,к) [ ʾ.к 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=63 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 кԷҤ 58 25 14 97 87 13 5 2 105
2 ෾Թ 28 19 18 65 55 18 6 7 79
3 "Էҹء" 26 31 12 69 61 13 5 6 79
4 ǹҺԷ к 23 28 14 65 55 17 8 7 80
5 ⤡з͹ԵزԷ 10 2 7 19 21 12 2 12 35
6 ͹شԷ 9 8 6 23 22 10 2 5 34
7 ҹ (Ѳҹء) 9 5 11 25 26 13 6 11 45
8 ظԷ 5 6 6 17 14 14 6 15 34
9 оطҷ (ҹءԷ) 4 5 6 15 15 10 3 2 28
10 ˹ͧ᫧Է 4 1 4 9 13 11 4 4 28
11 ҸԵԷҪѯ෾ʵ оطҷ 3 2 4 9 6 1 4 10 11
12 ˹ͧⴹԷ 1 4 3 8 9 6 1 2 16
13 ɯ֡ 0 1 1 2 1 4 4 8 9
14 0 0 0 0 0 0 0 0 0
180 137 106 423 385 142 56 91 583