human
Schema:
airport (id, City, Country, IATA, ICAO, name)
operate_company (id, name, Type, Principal_activities, Incorporated_in, Group_Equity_Shareholding)
flight (id, Vehicle_Flight_number, Date, Pilot, Velocity, Altitude, airport_id, company_id)
Please answer with SQL.
assistant
Sure, I understand.
human
Show me everything about the airports.
assistant
SELECT * FROM airport;
human
What are the countries with these airports?
assistant
SELECT distinct country FROM airport;
human
Which of these countries have more than 1 airport?
assistant
SELECT country FROM airport GROUP BY country HAVING COUNT( * ) > 1;
human
Which of them have more than 2?
assistant
SELECT country FROM airport GROUP BY country HAVING COUNT( * ) > 2 ;