output
stringlengths 18
577
| instruction
stringlengths 16
224
| input
stringclasses 160
values |
---|---|---|
SELECT AirportName FROM AIRPORTS WHERE AirportCode = "AKO" | Return the name of the airport with code 'AKO'. | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT AirportName FROM AIRPORTS WHERE City = "Aberdeen" | What are airport names at City 'Aberdeen'? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT AirportName FROM AIRPORTS WHERE City = "Aberdeen" | What are the names of airports in Aberdeen? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM FLIGHTS WHERE SourceAirport = "APG" | How many flights depart from 'APG'? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM FLIGHTS WHERE SourceAirport = "APG" | Count the number of flights departing from 'APG'. | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM FLIGHTS WHERE DestAirport = "ATO" | How many flights have destination ATO? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM FLIGHTS WHERE DestAirport = "ATO" | Count the number of flights into ATO. | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = "Aberdeen" | How many flights depart from City Aberdeen? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = "Aberdeen" | Return the number of flights departing from Aberdeen. | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = "Aberdeen" | How many flights arriving in Aberdeen city? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = "Aberdeen" | Return the number of flights arriving in Aberdeen. | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = "Ashley" AND T3.City = "Aberdeen" | How many flights depart from City 'Aberdeen' and have destination City 'Ashley'? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = "Ashley" AND T3.City = "Aberdeen" | How many flights fly from Aberdeen to Ashley? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = "JetBlue Airways" | How many flights does airline 'JetBlue Airways' have? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = "JetBlue Airways" | Give the number of Jetblue Airways flights. | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = "United Airlines" AND T2.DestAirport = "ASY" | How many 'United Airlines' flights go to Airport 'ASY'? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = "United Airlines" AND T2.DestAirport = "ASY" | Count the number of United Airlines flights arriving in ASY Airport. | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = "United Airlines" AND T2.SourceAirport = "AHD" | How many 'United Airlines' flights depart from Airport 'AHD'? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = "United Airlines" AND T2.SourceAirport = "AHD" | Return the number of United Airlines flights leaving from AHD Airport. | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = "Aberdeen" AND T3.Airline = "United Airlines" | How many United Airlines flights go to City 'Aberdeen'? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = "Aberdeen" AND T3.Airline = "United Airlines" | Count the number of United Airlines flights that arrive in Aberdeen. | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1 | Which city has most number of arriving flights? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1 | Which city has the most frequent destination airport? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1 | Which city has most number of departing flights? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1 | Which city is the most frequent source airport? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) DESC LIMIT 1 | What is the code of airport that has the highest number of flights? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) DESC LIMIT 1 | What is the airport code of the airport with the most flights? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) LIMIT 1 | What is the code of airport that has fewest number of flights? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) LIMIT 1 | Give the code of the airport with the least flights. | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) DESC LIMIT 1 | Which airline has most number of flights? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) DESC LIMIT 1 | What airline serves the most flights? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.Abbreviation , T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) LIMIT 1 | Find the abbreviation and country of the airline that has fewest number of flights? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.Abbreviation , T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) LIMIT 1 | What is the abbreviation of the airilne has the fewest flights and what country is it in? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "AHD" | What are airlines that have some flight departing from airport 'AHD'? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "AHD" | Which airlines have a flight with source airport AHD? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = "AHD" | What are airlines that have flights arriving at airport 'AHD'? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = "AHD" | Which airlines have a flight with destination airport AHD? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "APG" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "CVO" | Find all airlines that have flights from both airports 'APG' and 'CVO'. | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "APG" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "CVO" | Which airlines have departing flights from both APG and CVO airports? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "CVO" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "APG" | Find all airlines that have flights from airport 'CVO' but not from 'APG'. | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "CVO" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "APG" | Which airlines have departures from CVO but not from APG airports? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10 | Find all airlines that have at least 10 flights. | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10 | Which airlines have at least 10 flights? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200 | Find all airlines that have fewer than 200 flights. | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200 | Which airlines have less than 200 flights? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = "United Airlines" | What are flight numbers of Airline "United Airlines"? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = "United Airlines" | Which flight numbers correspond to United Airlines flights? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = "APG" | What are flight numbers of flights departing from Airport "APG"? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = "APG" | Give the flight numbers of flights leaving from APG. | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT FlightNo FROM FLIGHTS WHERE DestAirport = "APG" | What are flight numbers of flights arriving at Airport "APG"? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT FlightNo FROM FLIGHTS WHERE DestAirport = "APG" | Give the flight numbers of flights landing at APG. | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = "Aberdeen" | What are flight numbers of flights departing from City "Aberdeen "? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = "Aberdeen" | Give the flight numbers of flights leaving from Aberdeen. | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = "Aberdeen" | What are flight numbers of flights arriving at City "Aberdeen"? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = "Aberdeen" | Give the flight numbers of flights arriving in Aberdeen. | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = "Aberdeen" OR T2.city = "Abilene" | Find the number of flights landing in the city of Aberdeen or Abilene. | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = "Aberdeen" OR T2.city = "Abilene" | How many flights land in Aberdeen or Abilene? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights) | Find the name of airports which do not have any flight in and out. | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights) | Which airports do not have departing or arriving flights? | "Schema (values (type))": airlines : uid (number) , Airline (text) , Abbreviation (text) , Country (text) | airports : City (text) , AirportCode (text) , AirportName (text) , Country (text) , CountryAbbrev (text) | flights : Airline (number) , FlightNo (number) , SourceAirport (text) , DestAirport (text)
"Primary Keys": airlines : uid | airports : AirportCode | flights : Airline
"Foreign Keys": flights : DestAirport equals airports : AirportCode | flights : SourceAirport equals airports : AirportCode |
SELECT count(*) FROM employee | How many employees are there? | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT count(*) FROM employee | Count the number of employees | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT name FROM employee ORDER BY age | Sort employee names by their age in ascending order. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT name FROM employee ORDER BY age | List the names of employees and sort in ascending order of age. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT count(*) , city FROM employee GROUP BY city | What is the number of employees from each city? | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT count(*) , city FROM employee GROUP BY city | Count the number of employees for each city. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING count(*) > 1 | Which cities do more than one employee under age 30 come from? | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING count(*) > 1 | Find the cities that have more than one employee under age 30. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT count(*) , LOCATION FROM shop GROUP BY LOCATION | Find the number of shops in each location. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT count(*) , LOCATION FROM shop GROUP BY LOCATION | How many shops are there in each location? | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1 | Find the manager name and district of the shop whose number of products is the largest. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1 | What are the manager name and district of the shop that sells the largest number of products? | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT min(Number_products) , max(Number_products) FROM shop | find the minimum and maximum number of products of all stores. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT min(Number_products) , max(Number_products) FROM shop | What are the minimum and maximum number of products across all the shops? | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT name , LOCATION , district FROM shop ORDER BY number_products DESC | Return the name, location and district of all shops in descending order of number of products. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT name , LOCATION , district FROM shop ORDER BY number_products DESC | Sort all the shops by number products in descending order, and return the name, location and district of each shop. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT name FROM shop WHERE number_products > (SELECT avg(number_products) FROM shop) | Find the names of stores whose number products is more than the average number of products. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT name FROM shop WHERE number_products > (SELECT avg(number_products) FROM shop) | Which shops' number products is above the average? Give me the shop names. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1 | find the name of employee who was awarded the most times in the evaluation. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1 | Which employee received the most awards in evaluations? Give me the employee name. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1 | Find the name of the employee who got the highest one time bonus. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1 | Which employee received the biggest bonus? Give me the employee name. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation) | Find the names of employees who never won any award in the evaluation. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation) | What are the names of the employees who never received any evaluation? | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1 | What is the name of the shop that is hiring the largest number of employees? | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1 | Which shop has the most employees? Give me the shop name. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring) | Find the name of the shops that do not hire any employee. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring) | Which shops run with no employees? Find the shop names | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name | Find the number of employees hired in each shop; show the shop name as well. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name | For each shop, return the number of employees working there and the name of the shop. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT sum(bonus) FROM evaluation | What is total bonus given in all evaluations? | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT sum(bonus) FROM evaluation | Find the total amount of bonus given in all the evaluations. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT * FROM hiring | Give me all the information about hiring. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT * FROM hiring | What is all the information about hiring? | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000 | Which district has both stores with less than 3000 products and stores with more than 10000 products? | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000 | Find the districts in which there are both shops selling less than 3000 products and shops selling more than 10000 products. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT count(DISTINCT LOCATION) FROM shop | How many different store locations are there? | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT count(DISTINCT LOCATION) FROM shop | Count the number of distinct store locations. | "Schema (values (type))": employee : Employee_ID (number) , Name (text) , Age (number) , City (text) | shop : Shop_ID (number) , Name (text) , Location (text) , District (text) , Number_products (number) , Manager_name (text) | hiring : Shop_ID (number) , Employee_ID (number) , Start_from (text) , Is_full_time (others) | evaluation : Employee_ID (text) , Year_awarded (text) , Bonus (number)
"Primary Keys": employee : Employee_ID | shop : Shop_ID | hiring : Employee_ID | evaluation : Employee_ID
"Foreign Keys": hiring : Employee_ID equals employee : Employee_ID | hiring : Shop_ID equals shop : Shop_ID | evaluation : Employee_ID equals employee : Employee_ID |
SELECT count(*) FROM Documents | How many documents do we have? | "Schema (values (type))": Ref_Template_Types : Template_Type_Code (text) , Template_Type_Description (text) | Templates : Template_ID (number) , Version_Number (number) , Template_Type_Code (text) , Date_Effective_From (time) , Date_Effective_To (time) , Template_Details (text) | Documents : Document_ID (number) , Template_ID (number) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Paragraphs : Paragraph_ID (number) , Document_ID (number) , Paragraph_Text (text) , Other_Details (text)
"Primary Keys": Ref_Template_Types : Template_Type_Code | Templates : Template_ID | Documents : Document_ID | Paragraphs : Paragraph_ID
"Foreign Keys": Templates : Template_Type_Code equals Ref_Template_Types : Template_Type_Code | Documents : Template_ID equals Templates : Template_ID | Paragraphs : Document_ID equals Documents : Document_ID |
SELECT count(*) FROM Documents | Count the number of documents. | "Schema (values (type))": Ref_Template_Types : Template_Type_Code (text) , Template_Type_Description (text) | Templates : Template_ID (number) , Version_Number (number) , Template_Type_Code (text) , Date_Effective_From (time) , Date_Effective_To (time) , Template_Details (text) | Documents : Document_ID (number) , Template_ID (number) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Paragraphs : Paragraph_ID (number) , Document_ID (number) , Paragraph_Text (text) , Other_Details (text)
"Primary Keys": Ref_Template_Types : Template_Type_Code | Templates : Template_ID | Documents : Document_ID | Paragraphs : Paragraph_ID
"Foreign Keys": Templates : Template_Type_Code equals Ref_Template_Types : Template_Type_Code | Documents : Template_ID equals Templates : Template_ID | Paragraphs : Document_ID equals Documents : Document_ID |
SELECT document_id , document_name , document_description FROM Documents | List document IDs, document names, and document descriptions for all documents. | "Schema (values (type))": Ref_Template_Types : Template_Type_Code (text) , Template_Type_Description (text) | Templates : Template_ID (number) , Version_Number (number) , Template_Type_Code (text) , Date_Effective_From (time) , Date_Effective_To (time) , Template_Details (text) | Documents : Document_ID (number) , Template_ID (number) , Document_Name (text) , Document_Description (text) , Other_Details (text) | Paragraphs : Paragraph_ID (number) , Document_ID (number) , Paragraph_Text (text) , Other_Details (text)
"Primary Keys": Ref_Template_Types : Template_Type_Code | Templates : Template_ID | Documents : Document_ID | Paragraphs : Paragraph_ID
"Foreign Keys": Templates : Template_Type_Code equals Ref_Template_Types : Template_Type_Code | Documents : Template_ID equals Templates : Template_ID | Paragraphs : Document_ID equals Documents : Document_ID |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.