前提・実現したいこと
テニスをしている人の数
ClubInfo
ClassCode | Club | Percentage |
---|---|---|
2-A | Basketball | 30 |
2-A | Tennis | 70 |
2-B | Baseball | 100 |
2-C | Tennis | 76 |
2-C | Baseball | 24 |
ClassInfo
Code | Name | Population |
---|---|---|
2-A | 2年A組 | 38 |
2-B | 2年B組 | 40 |
2-C | 2年C組 | 41 |
試したこと
select sum((Percentage * Population)/100) from ClubInfo, ClassInfo where Club = 'Tennis';
select sum((ClubInfo.Percentage * ClassInfo.Population)/100) from ClubInfo, ClassInfo where ClubInfo.Class = 'Tennis';
補足情報
1つの出力だけで求めたいです。
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/06/23 10:03