私はSQLを初めて使用しています。現在、複雑なクエリを書くことを学んでいます。SQLクエリについて
私は3つのテーブルを持っています。 Country--は、国のリストを持っている
-----------+-------------
CountryId | CountryName
-----------+-------------
1 | India
2 | Srilanka
3 | Pakistan
4 | Bangladesh
5 | Nepal
6 | America
7 | Japan
8 | China
9 | Russia
10 | Canada
11 | Australia
---------------------------------------
都市 - 国の都市のリスト
--------+-------------+-----------
CityId | CityName | CountryId
--------+-------------+-----------
1 | Chennai | 1
2 | Washington | 6
3 | Moscow | 9
4 | Tokyo | 7
5 | Beijing | 8
6 | Sydney | 11
7 | Bangalore | 1
8 | Nagercoil | 1
9 | AmericaCity | 6
10 | Kathmandu | 5
11 | Dhaka | 4
12 | Lahore | 3
--------------------------------------
空港 -
AirportId | AirportName | CityId
-----------+-------------+--------
1 | Airport1 | 1
2 | Airport2 | 4
3 | Airport3 | 5
4 | Airport4 | 1
5 | Airport5 | 6
6 | Airport6 | 3
7 | Airport7 | 5
8 | Airport8 | 7
9 | Airport9 | 6
10 | Airport10 | 3
11 | Airport11 | 11
12 | Airport12 | 10
13 | Airport13 | 12
---------------------------------
が質問市の空港の一覧:私が取得したいです空港の数が多い国すべて
Output:
countryName Airports
India 3
Srilanka 0
......... etc.
、それを何ですか? – dasblinkenlight