db_id
stringclasses 20
values | question_en
stringlengths 18
174
| query
stringlengths 20
422
| answer
stringlengths 14
111k
| hardness
stringclasses 4
values | query_llm
stringlengths 20
486
| schema_SQLDatabase
stringclasses 20
values | schema_our
stringclasses 20
values | schema_dict
stringclasses 20
values | selector
stringlengths 21
225
| selector_correct
stringlengths 25
225
| schema_SQLDatabase_reduzido
stringlengths 42
669
| schema_SQLDatabase_reduzido_tabelas
stringclasses 157
values |
---|---|---|---|---|---|---|---|---|---|---|---|---|
flight_2 | Return the name of the airport with code 'AKO'. | SELECT AirportName FROM AIRPORTS WHERE AirportCode = "AKO" | [{'AirportName': 'Colorado Plains Regional Airport '}] | easy | SELECT AirportName FROM AIRPORTS WHERE AirportCode = "AKO" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airports': ['airportcode', 'airportname']
} | {
'airports': ['AirportCode', 'AirportName']
} | CREATE TABLE airports (
AirportCode TEXT,
AirportName TEXT,
PRIMARY KEY (AirportCode)
); | CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
); |
flight_2 | What are airport names at City 'Aberdeen'? | SELECT AirportName FROM AIRPORTS WHERE City = "Aberdeen" | [{'Nenhum': 'Nenhum resultado encontrado'}] | easy | SELECT AirportName FROM AIRPORTS WHERE City = "Aberdeen" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airports': ['city', 'airportcode', 'airportname']
} | {
'airports': ['City', 'AirportCode', 'AirportName']
} | CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
PRIMARY KEY (AirportCode)
); | CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
); |
flight_2 | What are the names of airports in Aberdeen? | SELECT AirportName FROM AIRPORTS WHERE City = "Aberdeen" | [{'Nenhum': 'Nenhum resultado encontrado'}] | easy | SELECT AirportName FROM AIRPORTS WHERE City = "Aberdeen" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airports': ['city', 'airportcode', 'airportname']
} | {
'airports': ['City', 'AirportCode', 'AirportName']
} | CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
PRIMARY KEY (AirportCode)
); | CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
); |
flight_2 | How many flights depart from 'APG'? | SELECT count(*) FROM FLIGHTS WHERE SourceAirport = "APG" | [{'count(*)': 0}] | easy | SELECT count(*) FROM FLIGHTS WHERE SourceAirport = "APG" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'sourceairport']
} | {
'flights': ['Airline', 'SourceAirport']
} | CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
PRIMARY KEY (Airline)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | Count the number of flights departing from 'APG'. | SELECT count(*) FROM FLIGHTS WHERE SourceAirport = "APG" | [{'count(*)': 0}] | easy | SELECT count(*) FROM FLIGHTS WHERE SourceAirport = "APG" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'sourceairport']
} | {
'flights': ['Airline', 'SourceAirport']
} | CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
PRIMARY KEY (Airline)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | How many flights have destination ATO? | SELECT count(*) FROM FLIGHTS WHERE DestAirport = "ATO" | [{'count(*)': 0}] | easy | SELECT count(*) FROM FLIGHTS WHERE DestAirport = "ATO" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'destairport']
} | {
'flights': ['Airline', 'DestAirport']
} | CREATE TABLE flights (
Airline INTEGER,
DestAirport TEXT,
PRIMARY KEY (Airline)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | Count the number of flights into ATO. | SELECT count(*) FROM FLIGHTS WHERE DestAirport = "ATO" | [{'count(*)': 0}] | easy | SELECT count(*) FROM FLIGHTS WHERE DestAirport = "ATO" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'destairport']
} | {
'flights': ['Airline', 'DestAirport']
} | CREATE TABLE flights (
Airline INTEGER,
DestAirport TEXT,
PRIMARY KEY (Airline)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | How many flights depart from City Aberdeen? | SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = "Aberdeen" | [{'count(*)': 0}] | medium | SELECT count(*) FROM FLIGHTS JOIN AIRPORTS ON FLIGHTS.SourceAirport = AIRPORTS.AirportCode WHERE AIRPORTS.City = "Aberdeen" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'sourceairport'],
'airports': ['city', 'airportcode']
} | {
'flights': ['Airline', 'SourceAirport'],
'airports': ['City', 'AirportCode']
} | CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
PRIMARY KEY (AirportCode)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
); |
flight_2 | Return the number of flights departing from Aberdeen. | SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = "Aberdeen" | [{'count(*)': 0}] | medium | SELECT count(*) FROM FLIGHTS JOIN AIRPORTS ON FLIGHTS.SourceAirport = AIRPORTS.AirportCode WHERE AIRPORTS.City = "Aberdeen" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'sourceairport'],
'airports': ['city', 'airportcode']
} | {
'flights': ['Airline', 'SourceAirport'],
'airports': ['City', 'AirportCode']
} | CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
PRIMARY KEY (AirportCode)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
); |
flight_2 | How many flights arriving in Aberdeen city? | SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = "Aberdeen" | [{'count(*)': 0}] | medium | SELECT count(*) FROM FLIGHTS JOIN AIRPORTS ON FLIGHTS.DestAirport = AIRPORTS.AirportCode WHERE AIRPORTS.City = "Aberdeen" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'destairport'],
'airports': ['city', 'airportcode']
} | {
'flights': ['Airline', 'DestAirport'],
'airports': ['City', 'AirportCode']
} | CREATE TABLE flights (
Airline INTEGER,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
PRIMARY KEY (AirportCode)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
); |
flight_2 | Return the number of flights arriving in Aberdeen. | SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = "Aberdeen" | [{'count(*)': 0}] | medium | SELECT count(*) FROM FLIGHTS JOIN AIRPORTS ON FLIGHTS.DestAirport = AIRPORTS.AirportCode WHERE AIRPORTS.City = "Aberdeen" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'destairport'],
'airports': ['city', 'airportcode']
} | {
'flights': ['Airline', 'DestAirport'],
'airports': ['City', 'AirportCode']
} | CREATE TABLE flights (
Airline INTEGER,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
PRIMARY KEY (AirportCode)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
); |
flight_2 | How many flights depart from City 'Aberdeen' and have destination City 'Ashley'? | 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" | [{'count(*)': 0}] | hard | SELECT count(*) FROM FLIGHTS JOIN AIRPORTS ON FLIGHTS.DestAirport = AIRPORTS.AirportCode JOIN AIRPORTS ON FLIGHTS.SourceAirport = AIRPORTS.AirportCode WHERE AIRPORTS.City = "Ashley" AND AIRPORTS.City = "Aberdeen" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'sourceairport', 'destairport'],
'airports': ['city', 'airportcode']
} | {
'flights': ['Airline', 'SourceAirport', 'DestAirport'],
'airports': ['City', 'AirportCode']
} | CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
PRIMARY KEY (AirportCode)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
); |
flight_2 | How many flights fly from Aberdeen to Ashley? | 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" | [{'count(*)': 0}] | hard | SELECT count(*) FROM FLIGHTS JOIN AIRPORTS ON FLIGHTS.DestAirport = AIRPORTS.AirportCode JOIN AIRPORTS ON FLIGHTS.SourceAirport = AIRPORTS.AirportCode WHERE AIRPORTS.City = "Ashley" AND AIRPORTS.City = "Aberdeen" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'sourceairport', 'destairport'],
'airports': ['city', 'airportcode']
} | {
'flights': ['Airline', 'SourceAirport', 'DestAirport'],
'airports': ['City', 'AirportCode']
} | CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
PRIMARY KEY (AirportCode)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
); |
flight_2 | How many flights does airline 'JetBlue Airways' have? | SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = "JetBlue Airways" | [{'count(*)': 100}] | medium | SELECT count(*) FROM FLIGHTS JOIN AIRLINES ON FLIGHTS.Airline = AIRLINES.uid WHERE AIRLINES.Airline = "JetBlue Airways" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline'],
'airlines': ['uid', 'airline']
} | {
'flights': ['Airline'],
'airlines': ['uid', 'Airline']
} | CREATE TABLE flights (
Airline INTEGER,
PRIMARY KEY (Airline)
);
CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
);
CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
); |
flight_2 | Give the number of Jetblue Airways flights. | SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = "JetBlue Airways" | [{'count(*)': 100}] | medium | SELECT count(*) FROM FLIGHTS JOIN AIRLINES ON FLIGHTS.Airline = AIRLINES.uid WHERE AIRLINES.Airline = "JetBlue Airways" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline'],
'airlines': ['uid', 'airline']
} | {
'flights': ['Airline'],
'airlines': ['uid', 'Airline']
} | CREATE TABLE flights (
Airline INTEGER,
PRIMARY KEY (Airline)
);
CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
);
CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
); |
flight_2 | How many 'United Airlines' flights go to Airport 'ASY'? | 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(*)': 0}] | medium | SELECT count(*) FROM AIRLINES JOIN FLIGHTS ON FLIGHTS.Airline = AIRLINES.uid WHERE AIRLINES.Airline = "United Airlines" AND FLIGHTS.DestAirport = "ASY" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airlines': ['uid', 'airline'],
'flights': ['airline', 'destairport']
} | {
'airlines': ['uid', 'Airline'],
'flights': ['Airline', 'DestAirport']
} | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
DestAirport TEXT,
PRIMARY KEY (Airline)
); | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | Count the number of United Airlines flights arriving in ASY Airport. | 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(*)': 0}] | medium | SELECT count(*) FROM AIRLINES JOIN FLIGHTS ON FLIGHTS.Airline = AIRLINES.uid WHERE AIRLINES.Airline = "United Airlines" AND FLIGHTS.DestAirport = "ASY" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airlines': ['uid', 'airline'],
'flights': ['airline', 'destairport']
} | {
'airlines': ['uid', 'Airline'],
'flights': ['Airline', 'DestAirport']
} | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
DestAirport TEXT,
PRIMARY KEY (Airline)
); | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | How many 'United Airlines' flights depart from Airport 'AHD'? | SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = "United Airlines" AND T2.SourceAirport = "AHD" | [{'count(*)': 0}] | medium | SELECT count(*) FROM AIRLINES JOIN FLIGHTS ON FLIGHTS.Airline = AIRLINES.uid WHERE AIRLINES.Airline = "United Airlines" AND FLIGHTS.SourceAirport = "AHD" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airlines': ['uid', 'airline'],
'flights': ['airline', 'sourceairport']
} | {
'airlines': ['uid', 'Airline'],
'flights': ['Airline', 'SourceAirport']
} | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
PRIMARY KEY (Airline)
); | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | Return the number of United Airlines flights leaving from AHD Airport. | SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = "United Airlines" AND T2.SourceAirport = "AHD" | [{'count(*)': 0}] | medium | SELECT count(*) FROM AIRLINES JOIN FLIGHTS ON FLIGHTS.Airline = AIRLINES.uid WHERE AIRLINES.Airline = "United Airlines" AND FLIGHTS.SourceAirport = "AHD" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airlines': ['uid', 'airline'],
'flights': ['airline', 'sourceairport']
} | {
'airlines': ['uid', 'Airline'],
'flights': ['Airline', 'SourceAirport']
} | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
PRIMARY KEY (Airline)
); | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | How many United Airlines flights go to City 'Aberdeen'? | 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(*)': 0}] | hard | SELECT count(*) FROM FLIGHTS JOIN AIRPORTS ON FLIGHTS.DestAirport = AIRPORTS.AirportCode JOIN AIRLINES ON AIRLINES.uid = FLIGHTS.Airline WHERE AIRPORTS.City = "Aberdeen" AND AIRLINES.Airline = "United Airlines" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'destairport'],
'airports': ['city', 'airportcode'],
'airlines': ['uid', 'airline']
} | {
'flights': ['Airline', 'DestAirport'],
'airports': ['City', 'AirportCode'],
'airlines': ['uid', 'Airline']
} | CREATE TABLE flights (
Airline INTEGER,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
); |
flight_2 | Count the number of United Airlines flights that arrive in Aberdeen. | 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(*)': 0}] | hard | SELECT count(*) FROM FLIGHTS JOIN AIRPORTS ON FLIGHTS.DestAirport = AIRPORTS.AirportCode JOIN AIRLINES ON AIRLINES.uid = FLIGHTS.Airline WHERE AIRPORTS.City = "Aberdeen" AND AIRLINES.Airline = "United Airlines" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'destairport'],
'airports': ['city', 'airportcode'],
'airlines': ['uid', 'airline']
} | {
'flights': ['Airline', 'DestAirport'],
'airports': ['City', 'AirportCode'],
'airlines': ['uid', 'Airline']
} | CREATE TABLE flights (
Airline INTEGER,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
); |
flight_2 | Which city has most number of arriving flights? | 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 | [{'Nenhum': 'Nenhum resultado encontrado'}] | extra | SELECT AIRPORTS.City FROM AIRPORTS JOIN FLIGHTS ON AIRPORTS.AirportCode = FLIGHTS.DestAirport GROUP BY AIRPORTS.City ORDER BY count(*) DESC LIMIT 1 | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airports': ['city', 'airportcode'],
'flights': ['airline', 'destairport']
} | {
'airports': ['City', 'AirportCode'],
'flights': ['Airline', 'DestAirport']
} | CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); |
flight_2 | Which city has the most frequent destination airport? | 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 | [{'Nenhum': 'Nenhum resultado encontrado'}] | extra | SELECT AIRPORTS.City FROM AIRPORTS JOIN FLIGHTS ON AIRPORTS.AirportCode = FLIGHTS.DestAirport GROUP BY AIRPORTS.City ORDER BY count(*) DESC LIMIT 1 | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airports': ['city', 'airportcode'],
'flights': ['airline', 'destairport']
} | {
'airports': ['City', 'AirportCode'],
'flights': ['Airline', 'DestAirport']
} | CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); |
flight_2 | Which city has most number of departing flights? | 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 | [{'Nenhum': 'Nenhum resultado encontrado'}] | extra | SELECT AIRPORTS.City FROM AIRPORTS JOIN FLIGHTS ON AIRPORTS.AirportCode = FLIGHTS.SourceAirport GROUP BY AIRPORTS.City ORDER BY count(*) DESC LIMIT 1 | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airports': ['city', 'airportcode'],
'flights': ['airline', 'sourceairport']
} | {
'airports': ['City', 'AirportCode'],
'flights': ['Airline', 'SourceAirport']
} | CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); |
flight_2 | Which city is the most frequent source airport? | 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 | [{'Nenhum': 'Nenhum resultado encontrado'}] | extra | SELECT AIRPORTS.City FROM AIRPORTS JOIN FLIGHTS ON AIRPORTS.AirportCode = FLIGHTS.SourceAirport GROUP BY AIRPORTS.City ORDER BY count(*) DESC LIMIT 1 | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airports': ['city', 'airportcode'],
'flights': ['airline', 'sourceairport']
} | {
'airports': ['City', 'AirportCode'],
'flights': ['Airline', 'SourceAirport']
} | CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); |
flight_2 | What is the code of airport that has the highest number of flights? | 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 | [{'Nenhum': 'Nenhum resultado encontrado'}] | extra | SELECT AIRPORTS.AirportCode FROM AIRPORTS JOIN FLIGHTS ON AIRPORTS.AirportCode = FLIGHTS.DestAirport OR AIRPORTS.AirportCode = FLIGHTS.SourceAirport GROUP BY AIRPORTS.AirportCode ORDER BY count(*) DESC LIMIT 1 | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airports': ['airportcode'],
'flights': ['airline', 'sourceairport', 'destairport']
} | {
'airports': ['AirportCode'],
'flights': ['Airline', 'SourceAirport', 'DestAirport']
} | CREATE TABLE airports (
AirportCode TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); |
flight_2 | What is the airport code of the airport with the most flights? | 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 | [{'Nenhum': 'Nenhum resultado encontrado'}] | extra | SELECT AIRPORTS.AirportCode FROM AIRPORTS JOIN FLIGHTS ON AIRPORTS.AirportCode = FLIGHTS.DestAirport OR AIRPORTS.AirportCode = FLIGHTS.SourceAirport GROUP BY AIRPORTS.AirportCode ORDER BY count(*) DESC LIMIT 1 | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airports': ['airportcode'],
'flights': ['airline', 'sourceairport', 'destairport']
} | {
'airports': ['AirportCode'],
'flights': ['Airline', 'SourceAirport', 'DestAirport']
} | CREATE TABLE airports (
AirportCode TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); |
flight_2 | What is the code of airport that has fewest number of flights? | 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 | [{'Nenhum': 'Nenhum resultado encontrado'}] | extra | SELECT AIRPORTS.AirportCode FROM AIRPORTS JOIN FLIGHTS ON AIRPORTS.AirportCode = FLIGHTS.DestAirport OR AIRPORTS.AirportCode = FLIGHTS.SourceAirport GROUP BY AIRPORTS.AirportCode ORDER BY count(*) LIMIT 1 | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airports': ['airportcode'],
'flights': ['airline', 'sourceairport', 'destairport']
} | {
'airports': ['AirportCode'],
'flights': ['Airline', 'SourceAirport', 'DestAirport']
} | CREATE TABLE airports (
AirportCode TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); |
flight_2 | Give the code of the airport with the least flights. | 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 | [{'Nenhum': 'Nenhum resultado encontrado'}] | extra | SELECT AIRPORTS.AirportCode FROM AIRPORTS JOIN FLIGHTS ON AIRPORTS.AirportCode = FLIGHTS.DestAirport OR AIRPORTS.AirportCode = FLIGHTS.SourceAirport GROUP BY AIRPORTS.AirportCode ORDER BY count(*) LIMIT 1 | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airports': ['airportcode'],
'flights': ['airline', 'sourceairport', 'destairport']
} | {
'airports': ['AirportCode'],
'flights': ['Airline', 'SourceAirport', 'DestAirport']
} | CREATE TABLE airports (
AirportCode TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); |
flight_2 | Which airline has most number of flights? | 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 | [{'Airline': 'Virgin America'}] | extra | SELECT AIRLINES.Airline FROM AIRLINES JOIN FLIGHTS ON AIRLINES.uid = FLIGHTS.Airline GROUP BY AIRLINES.Airline ORDER BY count(*) DESC LIMIT 1 | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airlines': ['uid', 'airline'],
'flights': ['airline']
} | {
'airlines': ['uid', 'Airline'],
'flights': ['Airline']
} | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
PRIMARY KEY (Airline)
); | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | What airline serves the most flights? | 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 | [{'Airline': 'Virgin America'}] | extra | SELECT AIRLINES.Airline FROM AIRLINES JOIN FLIGHTS ON AIRLINES.uid = FLIGHTS.Airline GROUP BY AIRLINES.Airline ORDER BY count(*) DESC LIMIT 1 | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airlines': ['uid', 'airline'],
'flights': ['airline']
} | {
'airlines': ['uid', 'Airline'],
'flights': ['Airline']
} | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
PRIMARY KEY (Airline)
); | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | Find the abbreviation and country of the airline that has fewest number of flights? | 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 | [{'Abbreviation': 'AirTran', 'Country': 'USA'}] | extra | SELECT AIRLINES.Abbreviation , AIRLINES.Country FROM AIRLINES JOIN FLIGHTS ON AIRLINES.uid = FLIGHTS.Airline GROUP BY AIRLINES.Airline ORDER BY count(*) LIMIT 1 | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airlines': ['uid', 'airline', 'abbreviation', 'country'],
'flights': ['airline']
} | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'flights': ['Airline']
} | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
PRIMARY KEY (Airline)
); | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | What is the abbreviation of the airilne has the fewest flights and what country is it in? | 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 | [{'Abbreviation': 'AirTran', 'Country': 'USA'}] | extra | SELECT AIRLINES.Abbreviation , AIRLINES.Country FROM AIRLINES JOIN FLIGHTS ON AIRLINES.uid = FLIGHTS.Airline GROUP BY AIRLINES.Airline ORDER BY count(*) LIMIT 1 | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airlines': ['uid', 'airline', 'abbreviation', 'country'],
'flights': ['airline']
} | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'flights': ['Airline']
} | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
PRIMARY KEY (Airline)
); | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | What are airlines that have some flight departing from airport 'AHD'? | SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "AHD" | [{'Nenhum': 'Nenhum resultado encontrado'}] | medium | SELECT AIRLINES.Airline FROM AIRLINES JOIN FLIGHTS ON AIRLINES.uid = FLIGHTS.Airline WHERE FLIGHTS.SourceAirport = "AHD" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airlines': ['uid', 'airline'],
'flights': ['airline', 'sourceairport']
} | {
'airlines': ['uid', 'Airline'],
'flights': ['Airline', 'SourceAirport']
} | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
PRIMARY KEY (Airline)
); | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | Which airlines have a flight with source airport AHD? | SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "AHD" | [{'Nenhum': 'Nenhum resultado encontrado'}] | medium | SELECT AIRLINES.Airline FROM AIRLINES JOIN FLIGHTS ON AIRLINES.uid = FLIGHTS.Airline WHERE FLIGHTS.SourceAirport = "AHD" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airlines': ['uid', 'airline'],
'flights': ['airline', 'sourceairport']
} | {
'airlines': ['uid', 'Airline'],
'flights': ['Airline', 'SourceAirport']
} | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
PRIMARY KEY (Airline)
); | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | What are airlines that have flights arriving at airport 'AHD'? | SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = "AHD" | [{'Nenhum': 'Nenhum resultado encontrado'}] | medium | SELECT AIRLINES.Airline FROM AIRLINES JOIN FLIGHTS ON AIRLINES.uid = FLIGHTS.Airline WHERE FLIGHTS.DestAirport = "AHD" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airlines': ['uid', 'airline'],
'flights': ['airline', 'destairport']
} | {
'airlines': ['uid', 'Airline'],
'flights': ['Airline', 'DestAirport']
} | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
DestAirport TEXT,
PRIMARY KEY (Airline)
); | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | Which airlines have a flight with destination airport AHD? | SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = "AHD" | [{'Nenhum': 'Nenhum resultado encontrado'}] | medium | SELECT AIRLINES.Airline FROM AIRLINES JOIN FLIGHTS ON AIRLINES.uid = FLIGHTS.Airline WHERE FLIGHTS.DestAirport = "AHD" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airlines': ['uid', 'airline'],
'flights': ['airline', 'destairport']
} | {
'airlines': ['uid', 'Airline'],
'flights': ['Airline', 'DestAirport']
} | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
DestAirport TEXT,
PRIMARY KEY (Airline)
); | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | Find all airlines that have flights from both airports 'APG' and 'CVO'. | 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" | [{'Nenhum': 'Nenhum resultado encontrado'}] | extra | SELECT AIRLINES.Airline FROM AIRLINES JOIN FLIGHTS ON AIRLINES.uid = FLIGHTS.Airline WHERE FLIGHTS.SourceAirport = "APG" INTERSECT SELECT AIRLINES.Airline FROM AIRLINES JOIN FLIGHTS ON AIRLINES.uid = FLIGHTS.Airline WHERE FLIGHTS.SourceAirport = "CVO" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airlines': ['uid', 'airline'],
'flights': ['airline', 'sourceairport']
} | {
'airlines': ['uid', 'Airline'],
'flights': ['Airline', 'SourceAirport']
} | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
PRIMARY KEY (Airline)
); | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | Which airlines have departing flights from both APG and CVO airports? | 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" | [{'Nenhum': 'Nenhum resultado encontrado'}] | extra | SELECT AIRLINES.Airline FROM AIRLINES JOIN FLIGHTS ON AIRLINES.uid = FLIGHTS.Airline WHERE FLIGHTS.SourceAirport = "APG" INTERSECT SELECT AIRLINES.Airline FROM AIRLINES JOIN FLIGHTS ON AIRLINES.uid = FLIGHTS.Airline WHERE FLIGHTS.SourceAirport = "CVO" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airlines': ['uid', 'airline'],
'flights': ['airline', 'sourceairport']
} | {
'airlines': ['uid', 'Airline'],
'flights': ['Airline', 'SourceAirport']
} | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
PRIMARY KEY (Airline)
); | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | Find all airlines that have flights from airport 'CVO' but not from 'APG'. | 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" | [{'Nenhum': 'Nenhum resultado encontrado'}] | extra | SELECT AIRLINES.Airline FROM AIRLINES JOIN FLIGHTS ON AIRLINES.uid = FLIGHTS.Airline WHERE FLIGHTS.SourceAirport = "CVO" EXCEPT SELECT AIRLINES.Airline FROM AIRLINES JOIN FLIGHTS ON AIRLINES.uid = FLIGHTS.Airline WHERE FLIGHTS.SourceAirport = "APG" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airlines': ['uid', 'airline'],
'flights': ['airline', 'sourceairport']
} | {
'airlines': ['uid', 'Airline'],
'flights': ['Airline', 'SourceAirport']
} | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
PRIMARY KEY (Airline)
); | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | Which airlines have departures from CVO but not from APG airports? | 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" | [{'Nenhum': 'Nenhum resultado encontrado'}] | extra | SELECT AIRLINES.Airline FROM AIRLINES JOIN FLIGHTS ON AIRLINES.uid = FLIGHTS.Airline WHERE FLIGHTS.SourceAirport = "CVO" EXCEPT SELECT AIRLINES.Airline FROM AIRLINES JOIN FLIGHTS ON AIRLINES.uid = FLIGHTS.Airline WHERE FLIGHTS.SourceAirport = "APG" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airlines': ['uid', 'airline'],
'flights': ['airline', 'sourceairport']
} | {
'airlines': ['uid', 'Airline'],
'flights': ['Airline', 'SourceAirport']
} | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
PRIMARY KEY (Airline)
); | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | Find all airlines that have at least 10 flights. | SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10 | [{'Airline': 'AirTran Airways'}, {'Airline': 'Allegiant Air'}, {'Airline': 'American Airlines'}, {'Airline': 'Continental Airlines'}, {'Airline': 'Delta Airlines'}, {'Airline': 'Frontier Airlines'}, {'Airline': 'JetBlue Airways'}, {'Airline': 'Northwest Airlines'}, {'Airline': 'Southwest Airlines'}, {'Airline': 'US Airways'}, {'Airline': 'United Airlines'}, {'Airline': 'Virgin America'}] | medium | SELECT AIRLINES.Airline FROM AIRLINES JOIN FLIGHTS ON AIRLINES.uid = FLIGHTS.Airline GROUP BY AIRLINES.Airline HAVING count(*) > 10 | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airlines': ['uid', 'airline'],
'flights': ['airline']
} | {
'airlines': ['uid', 'Airline'],
'flights': ['Airline']
} | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
PRIMARY KEY (Airline)
); | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | Which airlines have at least 10 flights? | SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10 | [{'Airline': 'AirTran Airways'}, {'Airline': 'Allegiant Air'}, {'Airline': 'American Airlines'}, {'Airline': 'Continental Airlines'}, {'Airline': 'Delta Airlines'}, {'Airline': 'Frontier Airlines'}, {'Airline': 'JetBlue Airways'}, {'Airline': 'Northwest Airlines'}, {'Airline': 'Southwest Airlines'}, {'Airline': 'US Airways'}, {'Airline': 'United Airlines'}, {'Airline': 'Virgin America'}] | medium | SELECT AIRLINES.Airline FROM AIRLINES JOIN FLIGHTS ON AIRLINES.uid = FLIGHTS.Airline GROUP BY AIRLINES.Airline HAVING count(*) > 10 | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airlines': ['uid', 'airline'],
'flights': ['airline']
} | {
'airlines': ['uid', 'Airline'],
'flights': ['Airline']
} | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
PRIMARY KEY (Airline)
); | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | Find all airlines that have fewer than 200 flights. | SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200 | [{'Airline': 'AirTran Airways'}, {'Airline': 'Allegiant Air'}, {'Airline': 'American Airlines'}, {'Airline': 'Continental Airlines'}, {'Airline': 'Delta Airlines'}, {'Airline': 'Frontier Airlines'}, {'Airline': 'JetBlue Airways'}, {'Airline': 'Northwest Airlines'}, {'Airline': 'Southwest Airlines'}, {'Airline': 'US Airways'}, {'Airline': 'United Airlines'}, {'Airline': 'Virgin America'}] | medium | SELECT AIRLINES.Airline FROM AIRLINES JOIN FLIGHTS ON AIRLINES.uid = FLIGHTS.Airline GROUP BY AIRLINES.Airline HAVING count(*) < 200 | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airlines': ['uid', 'airline'],
'flights': ['airline']
} | {
'airlines': ['uid', 'Airline'],
'flights': ['Airline']
} | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
PRIMARY KEY (Airline)
); | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | Which airlines have less than 200 flights? | SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200 | [{'Airline': 'AirTran Airways'}, {'Airline': 'Allegiant Air'}, {'Airline': 'American Airlines'}, {'Airline': 'Continental Airlines'}, {'Airline': 'Delta Airlines'}, {'Airline': 'Frontier Airlines'}, {'Airline': 'JetBlue Airways'}, {'Airline': 'Northwest Airlines'}, {'Airline': 'Southwest Airlines'}, {'Airline': 'US Airways'}, {'Airline': 'United Airlines'}, {'Airline': 'Virgin America'}] | medium | SELECT AIRLINES.Airline FROM AIRLINES JOIN FLIGHTS ON AIRLINES.uid = FLIGHTS.Airline GROUP BY AIRLINES.Airline HAVING count(*) < 200 | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airlines': ['uid', 'airline'],
'flights': ['airline']
} | {
'airlines': ['uid', 'Airline'],
'flights': ['Airline']
} | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
PRIMARY KEY (Airline)
); | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | What are flight numbers of Airline "United Airlines"? | SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = "United Airlines" | [{'FlightNo': 28}, {'FlightNo': 29}, {'FlightNo': 44}, {'FlightNo': 45}, {'FlightNo': 54}, {'FlightNo': 55}, {'FlightNo': 90}, {'FlightNo': 91}, {'FlightNo': 108}, {'FlightNo': 109}, {'FlightNo': 142}, {'FlightNo': 143}, {'FlightNo': 148}, {'FlightNo': 149}, {'FlightNo': 198}, {'FlightNo': 199}, {'FlightNo': 226}, {'FlightNo': 227}, {'FlightNo': 276}, {'FlightNo': 277}, {'FlightNo': 308}, {'FlightNo': 309}, {'FlightNo': 326}, {'FlightNo': 327}, {'FlightNo': 370}, {'FlightNo': 371}, {'FlightNo': 414}, {'FlightNo': 415}, {'FlightNo': 424}, {'FlightNo': 425}, {'FlightNo': 470}, {'FlightNo': 471}, {'FlightNo': 520}, {'FlightNo': 521}, {'FlightNo': 556}, {'FlightNo': 557}, {'FlightNo': 560}, {'FlightNo': 561}, {'FlightNo': 604}, {'FlightNo': 605}, {'FlightNo': 608}, {'FlightNo': 609}, {'FlightNo': 626}, {'FlightNo': 627}, {'FlightNo': 658}, {'FlightNo': 659}, {'FlightNo': 708}, {'FlightNo': 709}, {'FlightNo': 744}, {'FlightNo': 745}, {'FlightNo': 754}, {'FlightNo': 755}, {'FlightNo': 786}, {'FlightNo': 787}, {'FlightNo': 810}, {'FlightNo': 811}, {'FlightNo': 828}, {'FlightNo': 829}, {'FlightNo': 878}, {'FlightNo': 879}, {'FlightNo': 888}, {'FlightNo': 889}, {'FlightNo': 900}, {'FlightNo': 901}, {'FlightNo': 924}, {'FlightNo': 925}, {'FlightNo': 946}, {'FlightNo': 947}, {'FlightNo': 996}, {'FlightNo': 997}, {'FlightNo': 1000}, {'FlightNo': 1001}, {'FlightNo': 1026}, {'FlightNo': 1027}, {'FlightNo': 1062}, {'FlightNo': 1063}, {'FlightNo': 1068}, {'FlightNo': 1069}, {'FlightNo': 1100}, {'FlightNo': 1101}, {'FlightNo': 1144}, {'FlightNo': 1145}, {'FlightNo': 1166}, {'FlightNo': 1167}, {'FlightNo': 1168}, {'FlightNo': 1169}, {'FlightNo': 1192}, {'FlightNo': 1193}, {'FlightNo': 1208}, {'FlightNo': 1209}, {'FlightNo': 1216}, {'FlightNo': 1217}, {'FlightNo': 1250}, {'FlightNo': 1251}, {'FlightNo': 1274}, {'FlightNo': 1275}, {'FlightNo': 1284}, {'FlightNo': 1285}, {'FlightNo': 1328}, {'FlightNo': 1329}] | medium | SELECT FLIGHTS.FlightNo FROM FLIGHTS JOIN AIRLINES ON AIRLINES.uid = FLIGHTS.Airline WHERE AIRLINES.Airline = "United Airlines" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'flightno'],
'airlines': ['uid', 'airline']
} | {
'flights': ['Airline', 'FlightNo'],
'airlines': ['uid', 'Airline']
} | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
PRIMARY KEY (Airline)
);
CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
);
CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
); |
flight_2 | Which flight numbers correspond to United Airlines flights? | SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = "United Airlines" | [{'FlightNo': 28}, {'FlightNo': 29}, {'FlightNo': 44}, {'FlightNo': 45}, {'FlightNo': 54}, {'FlightNo': 55}, {'FlightNo': 90}, {'FlightNo': 91}, {'FlightNo': 108}, {'FlightNo': 109}, {'FlightNo': 142}, {'FlightNo': 143}, {'FlightNo': 148}, {'FlightNo': 149}, {'FlightNo': 198}, {'FlightNo': 199}, {'FlightNo': 226}, {'FlightNo': 227}, {'FlightNo': 276}, {'FlightNo': 277}, {'FlightNo': 308}, {'FlightNo': 309}, {'FlightNo': 326}, {'FlightNo': 327}, {'FlightNo': 370}, {'FlightNo': 371}, {'FlightNo': 414}, {'FlightNo': 415}, {'FlightNo': 424}, {'FlightNo': 425}, {'FlightNo': 470}, {'FlightNo': 471}, {'FlightNo': 520}, {'FlightNo': 521}, {'FlightNo': 556}, {'FlightNo': 557}, {'FlightNo': 560}, {'FlightNo': 561}, {'FlightNo': 604}, {'FlightNo': 605}, {'FlightNo': 608}, {'FlightNo': 609}, {'FlightNo': 626}, {'FlightNo': 627}, {'FlightNo': 658}, {'FlightNo': 659}, {'FlightNo': 708}, {'FlightNo': 709}, {'FlightNo': 744}, {'FlightNo': 745}, {'FlightNo': 754}, {'FlightNo': 755}, {'FlightNo': 786}, {'FlightNo': 787}, {'FlightNo': 810}, {'FlightNo': 811}, {'FlightNo': 828}, {'FlightNo': 829}, {'FlightNo': 878}, {'FlightNo': 879}, {'FlightNo': 888}, {'FlightNo': 889}, {'FlightNo': 900}, {'FlightNo': 901}, {'FlightNo': 924}, {'FlightNo': 925}, {'FlightNo': 946}, {'FlightNo': 947}, {'FlightNo': 996}, {'FlightNo': 997}, {'FlightNo': 1000}, {'FlightNo': 1001}, {'FlightNo': 1026}, {'FlightNo': 1027}, {'FlightNo': 1062}, {'FlightNo': 1063}, {'FlightNo': 1068}, {'FlightNo': 1069}, {'FlightNo': 1100}, {'FlightNo': 1101}, {'FlightNo': 1144}, {'FlightNo': 1145}, {'FlightNo': 1166}, {'FlightNo': 1167}, {'FlightNo': 1168}, {'FlightNo': 1169}, {'FlightNo': 1192}, {'FlightNo': 1193}, {'FlightNo': 1208}, {'FlightNo': 1209}, {'FlightNo': 1216}, {'FlightNo': 1217}, {'FlightNo': 1250}, {'FlightNo': 1251}, {'FlightNo': 1274}, {'FlightNo': 1275}, {'FlightNo': 1284}, {'FlightNo': 1285}, {'FlightNo': 1328}, {'FlightNo': 1329}] | medium | SELECT FLIGHTS.FlightNo FROM FLIGHTS JOIN AIRLINES ON AIRLINES.uid = FLIGHTS.Airline WHERE AIRLINES.Airline = "United Airlines" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'flightno'],
'airlines': ['uid', 'airline']
} | {
'flights': ['Airline', 'FlightNo'],
'airlines': ['uid', 'Airline']
} | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
PRIMARY KEY (Airline)
);
CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
PRIMARY KEY (uid)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
);
CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
); |
flight_2 | What are flight numbers of flights departing from Airport "APG"? | SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = "APG" | [{'Nenhum': 'Nenhum resultado encontrado'}] | easy | SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = "APG" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'flightno', 'sourceairport']
} | {
'flights': ['Airline', 'FlightNo', 'SourceAirport']
} | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
PRIMARY KEY (Airline)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | Give the flight numbers of flights leaving from APG. | SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = "APG" | [{'Nenhum': 'Nenhum resultado encontrado'}] | easy | SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = "APG" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'flightno', 'sourceairport']
} | {
'flights': ['Airline', 'FlightNo', 'SourceAirport']
} | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
PRIMARY KEY (Airline)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | What are flight numbers of flights arriving at Airport "APG"? | SELECT FlightNo FROM FLIGHTS WHERE DestAirport = "APG" | [{'Nenhum': 'Nenhum resultado encontrado'}] | easy | SELECT FlightNo FROM FLIGHTS WHERE DestAirport = "APG" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'flightno', 'destairport']
} | {
'flights': ['Airline', 'FlightNo', 'DestAirport']
} | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
DestAirport TEXT,
PRIMARY KEY (Airline)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | Give the flight numbers of flights landing at APG. | SELECT FlightNo FROM FLIGHTS WHERE DestAirport = "APG" | [{'Nenhum': 'Nenhum resultado encontrado'}] | easy | SELECT FlightNo FROM FLIGHTS WHERE DestAirport = "APG" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'flightno', 'destairport']
} | {
'flights': ['Airline', 'FlightNo', 'DestAirport']
} | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
DestAirport TEXT,
PRIMARY KEY (Airline)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline)
); |
flight_2 | What are flight numbers of flights departing from City "Aberdeen "? | SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = "Aberdeen" | [{'Nenhum': 'Nenhum resultado encontrado'}] | medium | SELECT FLIGHTS.FlightNo FROM FLIGHTS JOIN AIRPORTS ON FLIGHTS.SourceAirport = AIRPORTS.AirportCode WHERE AIRPORTS.City = "Aberdeen" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'flightno', 'sourceairport'],
'airports': ['city', 'airportcode']
} | {
'flights': ['Airline', 'FlightNo', 'SourceAirport'],
'airports': ['City', 'AirportCode']
} | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
PRIMARY KEY (AirportCode)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
); |
flight_2 | Give the flight numbers of flights leaving from Aberdeen. | SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = "Aberdeen" | [{'Nenhum': 'Nenhum resultado encontrado'}] | medium | SELECT FLIGHTS.FlightNo FROM FLIGHTS JOIN AIRPORTS ON FLIGHTS.SourceAirport = AIRPORTS.AirportCode WHERE AIRPORTS.City = "Aberdeen" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'flightno', 'sourceairport'],
'airports': ['city', 'airportcode']
} | {
'flights': ['Airline', 'FlightNo', 'SourceAirport'],
'airports': ['City', 'AirportCode']
} | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
PRIMARY KEY (AirportCode)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
); |
flight_2 | What are flight numbers of flights arriving at City "Aberdeen"? | SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = "Aberdeen" | [{'Nenhum': 'Nenhum resultado encontrado'}] | medium | SELECT FLIGHTS.FlightNo FROM FLIGHTS JOIN AIRPORTS ON FLIGHTS.DestAirport = AIRPORTS.AirportCode WHERE AIRPORTS.City = "Aberdeen" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'flightno', 'destairport'],
'airports': ['city', 'airportcode']
} | {
'flights': ['Airline', 'FlightNo', 'DestAirport'],
'airports': ['City', 'AirportCode']
} | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
PRIMARY KEY (AirportCode)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
); |
flight_2 | Give the flight numbers of flights arriving in Aberdeen. | SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = "Aberdeen" | [{'Nenhum': 'Nenhum resultado encontrado'}] | medium | SELECT FLIGHTS.FlightNo FROM FLIGHTS JOIN AIRPORTS ON FLIGHTS.DestAirport = AIRPORTS.AirportCode WHERE AIRPORTS.City = "Aberdeen" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'flightno', 'destairport'],
'airports': ['city', 'airportcode']
} | {
'flights': ['Airline', 'FlightNo', 'DestAirport'],
'airports': ['City', 'AirportCode']
} | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
PRIMARY KEY (AirportCode)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
); |
flight_2 | Find the number of flights landing in the city of Aberdeen or Abilene. | SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = "Aberdeen" OR T2.city = "Abilene" | [{'count(*)': 0}] | hard | SELECT count(*) FROM Flights JOIN Airports ON Flights.DestAirport = Airports.AirportCode WHERE Airports.city = "Aberdeen" OR Airports.city = "Abilene" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'destairport'],
'airports': ['city', 'airportcode']
} | {
'flights': ['Airline', 'DestAirport'],
'airports': ['City', 'AirportCode']
} | CREATE TABLE flights (
Airline INTEGER,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
PRIMARY KEY (AirportCode)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
); |
flight_2 | How many flights land in Aberdeen or Abilene? | SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = "Aberdeen" OR T2.city = "Abilene" | [{'count(*)': 0}] | hard | SELECT count(*) FROM Flights JOIN Airports ON Flights.DestAirport = Airports.AirportCode WHERE Airports.city = "Aberdeen" OR Airports.city = "Abilene" | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'flights': ['airline', 'destairport'],
'airports': ['city', 'airportcode']
} | {
'flights': ['Airline', 'DestAirport'],
'airports': ['City', 'AirportCode']
} | CREATE TABLE flights (
Airline INTEGER,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
PRIMARY KEY (AirportCode)
); | CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
); |
flight_2 | Find the name of airports which do not have any flight in and out. | SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights) | [{'AirportName': 'Phillips AAF '}, {'AirportName': 'Municipal '}, {'AirportName': 'Dyess AFB '}, {'AirportName': 'Municipal '}, {'AirportName': 'Virginia Highlands '}, {'AirportName': 'Ada '}, {'AirportName': 'Adak Island Ns '}, {'AirportName': 'Lenawee County '}, {'AirportName': 'Municipal '}, {'AirportName': 'Municipal '}, {'AirportName': 'Ainsworth '}, {'AirportName': 'Akhiok SPB '}, {'AirportName': 'Spb '}, {'AirportName': 'Akiak '}, {'AirportName': 'Colorado Plains Regional Airport '}, {'AirportName': 'Akron/canton Regional '}, {'AirportName': 'Fulton International '}, {'AirportName': 'Akutan '}, {'AirportName': 'Alakanuk '}, {'AirportName': 'NAS '}, {'AirportName': 'Holloman AFB '}, {'AirportName': 'Municipal '}, {'AirportName': 'Municipal '}, {'AirportName': 'Albany NAS '}, {'AirportName': 'Dougherty County '}, {'AirportName': 'Albany International '}, {'AirportName': 'Albany '}, {'AirportName': 'Albert Lea '}, {'AirportName': 'Albuquerque International '}, {'AirportName': 'Aleknagik '}, {'AirportName': 'Aleneva '}, {'AirportName': 'Thomas C Russell Fld '}, {'AirportName': 'Alexandria International '}, {'AirportName': 'Esler Field '}, {'AirportName': 'Alexandria '}, {'AirportName': 'Alexandria Bay '}, {'AirportName': 'Algona '}, {'AirportName': 'International '}, {'AirportName': 'George Downer '}, {'AirportName': 'Alitak SPB '}, {'AirportName': 'Allakaket '}, {'AirportName': 'Alliance '}, {'AirportName': 'Gratiot Community '}, {'AirportName': 'Alpena County Regional '}, {'AirportName': 'Alpine '}, {'AirportName': 'Alton '}, {'AirportName': 'Altus AFB '}, {'AirportName': 'Municipal '}, {'AirportName': 'Alyeska '}, {'AirportName': 'Rick Husband Amarillo International '}, {'AirportName': 'Tradewind '}, {'AirportName': 'Ambler '}, {'AirportName': 'Amchitka '}, {'AirportName': 'Municipal '}, {'AirportName': 'Ames '}, {'AirportName': 'Zahns '}, {'AirportName': 'Amook '}, {'AirportName': 'Anacortes '}, {'AirportName': 'USN Heliport '}, {'AirportName': 'Orange County Steel Salvage Heliport '}, {'AirportName': 'Anaktuvuk '}, {'AirportName': 'Elmendorf Afb '}, {'AirportName': 'Ted Stevens Anchorage International Airport '}, {'AirportName': 'Merrill Field '}, {'AirportName': 'Municipal '}, {'AirportName': 'Anderson '}, {'AirportName': 'Andrews '}, {'AirportName': 'Angel Fire '}, {'AirportName': 'Tri-State Steuben Cty '}, {'AirportName': 'Angoon '}, {'AirportName': 'Rollang Field '}, {'AirportName': 'Aniak '}, {'AirportName': 'Anita Bay '}, {'AirportName': 'Municipal '}, {'AirportName': 'Lee '}, {'AirportName': 'Annette Island '}, {'AirportName': 'Anniston Metropolitan '}, {'AirportName': 'Ft Mcclellan Bus Trml '}, {'AirportName': 'Reilly AHP '}, {'AirportName': 'Anthony '}, {'AirportName': 'Antlers '}, {'AirportName': 'Anvik '}, {'AirportName': 'Municipal '}, {'AirportName': 'Apple Valley '}, {'AirportName': 'Outagamie County '}, {'AirportName': 'Municipal '}, {'AirportName': 'Arcata '}, {'AirportName': 'Arctic Village '}, {'AirportName': 'Downtown '}, {'AirportName': 'Ardmore Municipal Arpt '}, {'AirportName': 'US Army Heliport '}, {'AirportName': 'Artesia '}, {'AirportName': 'Asbury Park '}, {'AirportName': 'Ashland '}, {'AirportName': 'Ashley '}, {'AirportName': 'Aspen '}, {'AirportName': 'Astoria '}, {'AirportName': 'Athens '}, {'AirportName': 'Ohio University '}, {'AirportName': 'McMinn County '}] | hard | SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights) | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airports': ['airportcode', 'airportname'],
'flights': ['airline', 'sourceairport', 'destairport']
} | {
'airports': ['AirportCode', 'AirportName'],
'flights': ['Airline', 'SourceAirport', 'DestAirport']
} | CREATE TABLE airports (
AirportCode TEXT,
AirportName TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); |
flight_2 | Which airports do not have departing or arriving flights? | SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights) | [{'AirportName': 'Phillips AAF '}, {'AirportName': 'Municipal '}, {'AirportName': 'Dyess AFB '}, {'AirportName': 'Municipal '}, {'AirportName': 'Virginia Highlands '}, {'AirportName': 'Ada '}, {'AirportName': 'Adak Island Ns '}, {'AirportName': 'Lenawee County '}, {'AirportName': 'Municipal '}, {'AirportName': 'Municipal '}, {'AirportName': 'Ainsworth '}, {'AirportName': 'Akhiok SPB '}, {'AirportName': 'Spb '}, {'AirportName': 'Akiak '}, {'AirportName': 'Colorado Plains Regional Airport '}, {'AirportName': 'Akron/canton Regional '}, {'AirportName': 'Fulton International '}, {'AirportName': 'Akutan '}, {'AirportName': 'Alakanuk '}, {'AirportName': 'NAS '}, {'AirportName': 'Holloman AFB '}, {'AirportName': 'Municipal '}, {'AirportName': 'Municipal '}, {'AirportName': 'Albany NAS '}, {'AirportName': 'Dougherty County '}, {'AirportName': 'Albany International '}, {'AirportName': 'Albany '}, {'AirportName': 'Albert Lea '}, {'AirportName': 'Albuquerque International '}, {'AirportName': 'Aleknagik '}, {'AirportName': 'Aleneva '}, {'AirportName': 'Thomas C Russell Fld '}, {'AirportName': 'Alexandria International '}, {'AirportName': 'Esler Field '}, {'AirportName': 'Alexandria '}, {'AirportName': 'Alexandria Bay '}, {'AirportName': 'Algona '}, {'AirportName': 'International '}, {'AirportName': 'George Downer '}, {'AirportName': 'Alitak SPB '}, {'AirportName': 'Allakaket '}, {'AirportName': 'Alliance '}, {'AirportName': 'Gratiot Community '}, {'AirportName': 'Alpena County Regional '}, {'AirportName': 'Alpine '}, {'AirportName': 'Alton '}, {'AirportName': 'Altus AFB '}, {'AirportName': 'Municipal '}, {'AirportName': 'Alyeska '}, {'AirportName': 'Rick Husband Amarillo International '}, {'AirportName': 'Tradewind '}, {'AirportName': 'Ambler '}, {'AirportName': 'Amchitka '}, {'AirportName': 'Municipal '}, {'AirportName': 'Ames '}, {'AirportName': 'Zahns '}, {'AirportName': 'Amook '}, {'AirportName': 'Anacortes '}, {'AirportName': 'USN Heliport '}, {'AirportName': 'Orange County Steel Salvage Heliport '}, {'AirportName': 'Anaktuvuk '}, {'AirportName': 'Elmendorf Afb '}, {'AirportName': 'Ted Stevens Anchorage International Airport '}, {'AirportName': 'Merrill Field '}, {'AirportName': 'Municipal '}, {'AirportName': 'Anderson '}, {'AirportName': 'Andrews '}, {'AirportName': 'Angel Fire '}, {'AirportName': 'Tri-State Steuben Cty '}, {'AirportName': 'Angoon '}, {'AirportName': 'Rollang Field '}, {'AirportName': 'Aniak '}, {'AirportName': 'Anita Bay '}, {'AirportName': 'Municipal '}, {'AirportName': 'Lee '}, {'AirportName': 'Annette Island '}, {'AirportName': 'Anniston Metropolitan '}, {'AirportName': 'Ft Mcclellan Bus Trml '}, {'AirportName': 'Reilly AHP '}, {'AirportName': 'Anthony '}, {'AirportName': 'Antlers '}, {'AirportName': 'Anvik '}, {'AirportName': 'Municipal '}, {'AirportName': 'Apple Valley '}, {'AirportName': 'Outagamie County '}, {'AirportName': 'Municipal '}, {'AirportName': 'Arcata '}, {'AirportName': 'Arctic Village '}, {'AirportName': 'Downtown '}, {'AirportName': 'Ardmore Municipal Arpt '}, {'AirportName': 'US Army Heliport '}, {'AirportName': 'Artesia '}, {'AirportName': 'Asbury Park '}, {'AirportName': 'Ashland '}, {'AirportName': 'Ashley '}, {'AirportName': 'Aspen '}, {'AirportName': 'Astoria '}, {'AirportName': 'Athens '}, {'AirportName': 'Ohio University '}, {'AirportName': 'McMinn County '}] | hard | SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights) | CREATE TABLE airlines (
uid INTEGER,
Airline TEXT,
Abbreviation TEXT,
Country TEXT,
PRIMARY KEY (uid)
);
CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airlines (
airlines.uid INTEGER,
airlines.Airline TEXT,
airlines.Abbreviation TEXT,
airlines.Country TEXT,
PRIMARY KEY (airlines.uid)
);
CREATE TABLE airports (
airports.City TEXT,
airports.AirportCode TEXT,
airports.AirportName TEXT,
airports.Country TEXT,
airports.CountryAbbrev TEXT,
PRIMARY KEY (airports.airportcode)
);
CREATE TABLE flights (
flights.Airline INTEGER,
flights.FlightNo INTEGER,
flights.SourceAirport TEXT,
flights.DestAirport TEXT,
PRIMARY KEY (flights.airline),
FOREIGN KEY (flights.DestAirport) REFERENCES airports.AirportCode,
FOREIGN KEY (flights.SourceAirport) REFERENCES airports.AirportCode
); | {
'airlines': ['uid', 'Airline', 'Abbreviation', 'Country'],
'airports': ['City', 'AirportCode', 'AirportName', 'Country', 'CountryAbbrev'],
'flights': ['Airline', 'FlightNo', 'SourceAirport', 'DestAirport']
} | {
'airports': ['airportcode', 'airportname'],
'flights': ['airline', 'sourceairport', 'destairport']
} | {
'airports': ['AirportCode', 'AirportName'],
'flights': ['Airline', 'SourceAirport', 'DestAirport']
} | CREATE TABLE airports (
AirportCode TEXT,
AirportName TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); | CREATE TABLE airports (
City TEXT,
AirportCode TEXT,
AirportName TEXT,
Country TEXT,
CountryAbbrev TEXT,
PRIMARY KEY (AirportCode)
);
CREATE TABLE flights (
Airline INTEGER,
FlightNo INTEGER,
SourceAirport TEXT,
DestAirport TEXT,
PRIMARY KEY (Airline),
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode),
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode)
); |
employee_hire_evaluation | How many employees are there? | SELECT count(*) FROM employee | [{'count(*)': 10}] | easy | SELECT count(*) FROM employee | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'employee': ['employee_id']
} | {
'employee': ['Employee_ID']
} | CREATE TABLE employee (
Employee_ID INT,
PRIMARY KEY (Employee_ID)
); | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
); |
employee_hire_evaluation | Count the number of employees | SELECT count(*) FROM employee | [{'count(*)': 10}] | easy | SELECT count(*) FROM employee | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'employee': ['employee_id']
} | {
'employee': ['Employee_ID']
} | CREATE TABLE employee (
Employee_ID INT,
PRIMARY KEY (Employee_ID)
); | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
); |
employee_hire_evaluation | Sort employee names by their age in ascending order. | SELECT name FROM employee ORDER BY age | [{'Name': 'George Chuter'}, {'Name': 'Andrew Sheridan'}, {'Name': 'Lee Mears'}, {'Name': 'Tim Payne'}, {'Name': 'Matt Stevens'}, {'Name': 'Jason Hobson'}, {'Name': 'Steve Borthwick'}, {'Name': 'Louis Deacon'}, {'Name': 'Phil Vickery'}, {'Name': 'Mark Regan'}] | easy | SELECT name FROM employee ORDER BY age | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'employee': ['employee_id', 'name', 'age']
} | {
'employee': ['Employee_ID', 'Name', 'Age']
} | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
PRIMARY KEY (Employee_ID)
); | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
); |
employee_hire_evaluation | List the names of employees and sort in ascending order of age. | SELECT name FROM employee ORDER BY age | [{'Name': 'George Chuter'}, {'Name': 'Andrew Sheridan'}, {'Name': 'Lee Mears'}, {'Name': 'Tim Payne'}, {'Name': 'Matt Stevens'}, {'Name': 'Jason Hobson'}, {'Name': 'Steve Borthwick'}, {'Name': 'Louis Deacon'}, {'Name': 'Phil Vickery'}, {'Name': 'Mark Regan'}] | easy | SELECT name FROM employee ORDER BY age | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'employee': ['employee_id', 'name', 'age']
} | {
'employee': ['Employee_ID', 'Name', 'Age']
} | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
PRIMARY KEY (Employee_ID)
); | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
); |
employee_hire_evaluation | What is the number of employees from each city? | SELECT count(*) , city FROM employee GROUP BY city | [{'count(*)': 3, 'City': 'Bath'}, {'count(*)': 3, 'City': 'Bristol'}, {'count(*)': 1, 'City': 'Leicester'}, {'count(*)': 1, 'City': 'Sale'}, {'count(*)': 2, 'City': 'Wasps'}] | medium | SELECT count(*) , city FROM employee GROUP BY city | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'employee': ['employee_id', 'city']
} | {
'employee': ['Employee_ID', 'City']
} | CREATE TABLE employee (
Employee_ID INT,
City TEXT,
PRIMARY KEY (Employee_ID)
); | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
); |
employee_hire_evaluation | Count the number of employees for each city. | SELECT count(*) , city FROM employee GROUP BY city | [{'count(*)': 3, 'City': 'Bath'}, {'count(*)': 3, 'City': 'Bristol'}, {'count(*)': 1, 'City': 'Leicester'}, {'count(*)': 1, 'City': 'Sale'}, {'count(*)': 2, 'City': 'Wasps'}] | medium | SELECT count(*) , city FROM employee GROUP BY city | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'employee': ['employee_id', 'city']
} | {
'employee': ['Employee_ID', 'City']
} | CREATE TABLE employee (
Employee_ID INT,
City TEXT,
PRIMARY KEY (Employee_ID)
); | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
); |
employee_hire_evaluation | Which cities do more than one employee under age 30 come from? | SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING count(*) > 1 | [{'City': 'Bath'}] | medium | SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING count(*) > 1 | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'employee': ['employee_id', 'age', 'city']
} | {
'employee': ['Employee_ID', 'Age', 'City']
} | CREATE TABLE employee (
Employee_ID INT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
); | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
); |
employee_hire_evaluation | Find the cities that have more than one employee under age 30. | SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING count(*) > 1 | [{'City': 'Bath'}] | medium | SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING count(*) > 1 | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'employee': ['employee_id', 'age', 'city']
} | {
'employee': ['Employee_ID', 'Age', 'City']
} | CREATE TABLE employee (
Employee_ID INT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
); | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
); |
employee_hire_evaluation | Find the number of shops in each location. | SELECT count(*) , LOCATION FROM shop GROUP BY LOCATION | [{'count(*)': 1, 'Location': 'Espoo'}, {'count(*)': 1, 'Location': 'Helsinki'}, {'count(*)': 1, 'Location': 'Jakobstad'}, {'count(*)': 1, 'Location': 'Kotka'}, {'count(*)': 1, 'Location': 'Kuopio'}, {'count(*)': 1, 'Location': 'Lahti'}, {'count(*)': 1, 'Location': 'Mariehamn'}, {'count(*)': 1, 'Location': 'Turku'}, {'count(*)': 1, 'Location': 'Valkeakoski'}] | medium | SELECT count(*) , LOCATION FROM shop GROUP BY LOCATION | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'shop': ['shop_id', 'location']
} | {
'shop': ['Shop_ID', 'Location']
} | CREATE TABLE shop (
Shop_ID INT,
Location TEXT,
PRIMARY KEY (Shop_ID)
); | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
); |
employee_hire_evaluation | How many shops are there in each location? | SELECT count(*) , LOCATION FROM shop GROUP BY LOCATION | [{'count(*)': 1, 'Location': 'Espoo'}, {'count(*)': 1, 'Location': 'Helsinki'}, {'count(*)': 1, 'Location': 'Jakobstad'}, {'count(*)': 1, 'Location': 'Kotka'}, {'count(*)': 1, 'Location': 'Kuopio'}, {'count(*)': 1, 'Location': 'Lahti'}, {'count(*)': 1, 'Location': 'Mariehamn'}, {'count(*)': 1, 'Location': 'Turku'}, {'count(*)': 1, 'Location': 'Valkeakoski'}] | medium | SELECT count(*) , LOCATION FROM shop GROUP BY LOCATION | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'shop': ['shop_id', 'location']
} | {
'shop': ['Shop_ID', 'Location']
} | CREATE TABLE shop (
Shop_ID INT,
Location TEXT,
PRIMARY KEY (Shop_ID)
); | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
); |
employee_hire_evaluation | Find the manager name and district of the shop whose number of products is the largest. | SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1 | [{'Manager_name': 'Ilkka Mäkelä', 'District': 'Lahden Stadion'}] | medium | SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1 | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'shop': ['shop_id', 'district', 'number_products', 'manager_name']
} | {
'shop': ['Shop_ID', 'District', 'Number_products', 'Manager_name']
} | CREATE TABLE shop (
Shop_ID INT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
); | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
); |
employee_hire_evaluation | What are the manager name and district of the shop that sells the largest number of products? | SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1 | [{'Manager_name': 'Ilkka Mäkelä', 'District': 'Lahden Stadion'}] | medium | SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1 | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'shop': ['shop_id', 'district', 'number_products', 'manager_name']
} | {
'shop': ['Shop_ID', 'District', 'Number_products', 'Manager_name']
} | CREATE TABLE shop (
Shop_ID INT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
); | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
); |
employee_hire_evaluation | find the minimum and maximum number of products of all stores. | SELECT min(Number_products) , max(Number_products) FROM shop | [{'min(Number_products)': 1600, 'max(Number_products)': 15000}] | medium | SELECT min(Number_products) , max(Number_products) FROM shop | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'shop': ['shop_id', 'number_products']
} | {
'shop': ['Shop_ID', 'Number_products']
} | CREATE TABLE shop (
Shop_ID INT,
Number_products INT,
PRIMARY KEY (Shop_ID)
); | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
); |
employee_hire_evaluation | What are the minimum and maximum number of products across all the shops? | SELECT min(Number_products) , max(Number_products) FROM shop | [{'min(Number_products)': 1600, 'max(Number_products)': 15000}] | medium | SELECT min(Number_products) , max(Number_products) FROM shop | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'shop': ['shop_id', 'number_products']
} | {
'shop': ['Shop_ID', 'Number_products']
} | CREATE TABLE shop (
Shop_ID INT,
Number_products INT,
PRIMARY KEY (Shop_ID)
); | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
); |
employee_hire_evaluation | Return the name, location and district of all shops in descending order of number of products. | SELECT name , LOCATION , district FROM shop ORDER BY number_products DESC | [{'Name': 'FC Lahti', 'Location': 'Lahti', 'District': 'Lahden Stadion'}, {'Name': 'HJK', 'Location': 'Helsinki', 'District': 'Finnair Stadium'}, {'Name': 'FC Inter', 'Location': 'Turku', 'District': 'Veritas Stadion'}, {'Name': 'FC Honka', 'Location': 'Espoo', 'District': 'Tapiolan Urheilupuisto'}, {'Name': 'FF Jaro', 'Location': 'Jakobstad', 'District': 'Jakobstads Centralplan'}, {'Name': 'FC KooTeePee', 'Location': 'Kotka', 'District': 'Arto Tolsa Areena'}, {'Name': 'FC Haka', 'Location': 'Valkeakoski', 'District': 'Tehtaan kenttä'}, {'Name': 'KuPS', 'Location': 'Kuopio', 'District': 'Magnum Areena'}, {'Name': 'IFK Mariehamn', 'Location': 'Mariehamn', 'District': 'Wiklöf Holding Arena'}] | medium | SELECT name , LOCATION , district FROM shop ORDER BY number_products DESC | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'shop': ['shop_id', 'name', 'location', 'district', 'number_products']
} | {
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products']
} | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
PRIMARY KEY (Shop_ID)
); | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
); |
employee_hire_evaluation | Sort all the shops by number products in descending order, and return the name, location and district of each shop. | SELECT name , LOCATION , district FROM shop ORDER BY number_products DESC | [{'Name': 'FC Lahti', 'Location': 'Lahti', 'District': 'Lahden Stadion'}, {'Name': 'HJK', 'Location': 'Helsinki', 'District': 'Finnair Stadium'}, {'Name': 'FC Inter', 'Location': 'Turku', 'District': 'Veritas Stadion'}, {'Name': 'FC Honka', 'Location': 'Espoo', 'District': 'Tapiolan Urheilupuisto'}, {'Name': 'FF Jaro', 'Location': 'Jakobstad', 'District': 'Jakobstads Centralplan'}, {'Name': 'FC KooTeePee', 'Location': 'Kotka', 'District': 'Arto Tolsa Areena'}, {'Name': 'FC Haka', 'Location': 'Valkeakoski', 'District': 'Tehtaan kenttä'}, {'Name': 'KuPS', 'Location': 'Kuopio', 'District': 'Magnum Areena'}, {'Name': 'IFK Mariehamn', 'Location': 'Mariehamn', 'District': 'Wiklöf Holding Arena'}] | medium | SELECT name , LOCATION , district FROM shop ORDER BY number_products DESC | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'shop': ['shop_id', 'name', 'location', 'district', 'number_products']
} | {
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products']
} | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
PRIMARY KEY (Shop_ID)
); | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
); |
employee_hire_evaluation | Find the names of stores whose number products is more than the average number of products. | SELECT name FROM shop WHERE number_products > (SELECT avg(number_products) FROM shop) | [{'Name': 'HJK'}, {'Name': 'FC Inter'}, {'Name': 'FC Lahti'}] | hard | SELECT name FROM shop WHERE number_products > (SELECT avg(number_products) FROM shop) | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'shop': ['shop_id', 'name', 'number_products']
} | {
'shop': ['Shop_ID', 'Name', 'Number_products']
} | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Number_products INT,
PRIMARY KEY (Shop_ID)
); | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
); |
employee_hire_evaluation | Which shops' number products is above the average? Give me the shop names. | SELECT name FROM shop WHERE number_products > (SELECT avg(number_products) FROM shop) | [{'Name': 'HJK'}, {'Name': 'FC Inter'}, {'Name': 'FC Lahti'}] | hard | SELECT name FROM shop WHERE number_products > (SELECT avg(number_products) FROM shop) | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'shop': ['shop_id', 'name', 'number_products']
} | {
'shop': ['Shop_ID', 'Name', 'Number_products']
} | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Number_products INT,
PRIMARY KEY (Shop_ID)
); | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
); |
employee_hire_evaluation | find the name of employee who was awarded the most times in the evaluation. | 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 | [{'Name': 'George Chuter'}] | extra | SELECT employee.name FROM employee JOIN evaluation ON employee.Employee_ID = evaluation.Employee_ID GROUP BY evaluation.Employee_ID ORDER BY count(*) DESC LIMIT 1 | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'employee': ['employee_id', 'name'],
'evaluation': ['employee_id']
} | {
'employee': ['Employee_ID', 'Name'],
'evaluation': ['Employee_ID']
} | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); |
employee_hire_evaluation | Which employee received the most awards in evaluations? Give me the employee name. | 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 | [{'Name': 'George Chuter'}] | extra | SELECT employee.name FROM employee JOIN evaluation ON employee.Employee_ID = evaluation.Employee_ID GROUP BY evaluation.Employee_ID ORDER BY count(*) DESC LIMIT 1 | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'employee': ['employee_id', 'name'],
'evaluation': ['employee_id']
} | {
'employee': ['Employee_ID', 'Name'],
'evaluation': ['Employee_ID']
} | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); |
employee_hire_evaluation | Find the name of the employee who got the highest one time bonus. | 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 | [{'Name': 'Louis Deacon'}] | hard | SELECT employee.name FROM employee JOIN evaluation ON employee.Employee_ID = evaluation.Employee_ID ORDER BY evaluation.bonus DESC LIMIT 1 | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'employee': ['employee_id', 'name'],
'evaluation': ['employee_id', 'bonus']
} | {
'employee': ['Employee_ID', 'Name'],
'evaluation': ['Employee_ID', 'Bonus']
} | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); |
employee_hire_evaluation | Which employee received the biggest bonus? Give me the employee name. | 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 | [{'Name': 'Louis Deacon'}] | hard | SELECT employee.name FROM employee JOIN evaluation ON employee.Employee_ID = evaluation.Employee_ID ORDER BY evaluation.bonus DESC LIMIT 1 | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'employee': ['employee_id', 'name'],
'evaluation': ['employee_id', 'bonus']
} | {
'employee': ['Employee_ID', 'Name'],
'evaluation': ['Employee_ID', 'Bonus']
} | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); |
employee_hire_evaluation | Find the names of employees who never won any award in the evaluation. | SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation) | [{'Name': 'Mark Regan'}, {'Name': 'Tim Payne'}, {'Name': 'Andrew Sheridan'}, {'Name': 'Phil Vickery'}, {'Name': 'Steve Borthwick'}] | hard | SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation) | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'employee': ['employee_id', 'name'],
'evaluation': ['employee_id']
} | {
'employee': ['Employee_ID', 'Name'],
'evaluation': ['Employee_ID']
} | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); |
employee_hire_evaluation | What are the names of the employees who never received any evaluation? | SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation) | [{'Name': 'Mark Regan'}, {'Name': 'Tim Payne'}, {'Name': 'Andrew Sheridan'}, {'Name': 'Phil Vickery'}, {'Name': 'Steve Borthwick'}] | hard | SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation) | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'employee': ['employee_id', 'name'],
'evaluation': ['employee_id']
} | {
'employee': ['Employee_ID', 'Name'],
'evaluation': ['Employee_ID']
} | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); |
employee_hire_evaluation | What is the name of the shop that is hiring the largest number of employees? | 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 | [{'Name': 'FC Haka'}] | extra | SELECT shop.name FROM hiring JOIN shop ON hiring.shop_id = shop.shop_id GROUP BY hiring.shop_id ORDER BY count(*) DESC LIMIT 1 | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'hiring': ['shop_id', 'employee_id'],
'shop': ['shop_id', 'name']
} | {
'hiring': ['Shop_ID', 'Employee_ID'],
'shop': ['Shop_ID', 'Name']
} | CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
PRIMARY KEY (Shop_ID)
); | CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
); |
employee_hire_evaluation | Which shop has the most employees? Give me the shop name. | 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 | [{'Name': 'FC Haka'}] | extra | SELECT shop.name FROM hiring JOIN shop ON hiring.shop_id = shop.shop_id GROUP BY hiring.shop_id ORDER BY count(*) DESC LIMIT 1 | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'hiring': ['shop_id', 'employee_id'],
'shop': ['shop_id', 'name']
} | {
'hiring': ['Shop_ID', 'Employee_ID'],
'shop': ['Shop_ID', 'Name']
} | CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
PRIMARY KEY (Shop_ID)
); | CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
); |
employee_hire_evaluation | Find the name of the shops that do not hire any employee. | SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring) | [{'Name': 'FC Honka'}, {'Name': 'KuPS'}, {'Name': 'IFK Mariehamn'}] | hard | SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring) | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'shop': ['shop_id', 'name'],
'hiring': ['shop_id', 'employee_id']
} | {
'shop': ['Shop_ID', 'Name'],
'hiring': ['Shop_ID', 'Employee_ID']
} | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
); | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
); |
employee_hire_evaluation | Which shops run with no employees? Find the shop names | SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring) | [{'Name': 'FC Honka'}, {'Name': 'KuPS'}, {'Name': 'IFK Mariehamn'}] | hard | SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring) | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'shop': ['shop_id', 'name'],
'hiring': ['shop_id', 'employee_id']
} | {
'shop': ['Shop_ID', 'Name'],
'hiring': ['Shop_ID', 'Employee_ID']
} | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
); | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
); |
employee_hire_evaluation | Find the number of employees hired in each shop; show the shop name as well. | SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name | [{'count(*)': 2, 'Name': 'FC Haka'}, {'count(*)': 1, 'Name': 'FC Inter'}, {'count(*)': 1, 'Name': 'FC KooTeePee'}, {'count(*)': 1, 'Name': 'FC Lahti'}, {'count(*)': 1, 'Name': 'FF Jaro'}, {'count(*)': 1, 'Name': 'HJK'}] | medium | SELECT count(*) , shop.name FROM hiring JOIN shop ON hiring.shop_id = shop.shop_id GROUP BY shop.name | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'hiring': ['shop_id', 'employee_id'],
'shop': ['shop_id', 'name']
} | {
'hiring': ['Shop_ID', 'Employee_ID'],
'shop': ['Shop_ID', 'Name']
} | CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
PRIMARY KEY (Shop_ID)
); | CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
); |
employee_hire_evaluation | For each shop, return the number of employees working there and the name of the shop. | SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name | [{'count(*)': 2, 'Name': 'FC Haka'}, {'count(*)': 1, 'Name': 'FC Inter'}, {'count(*)': 1, 'Name': 'FC KooTeePee'}, {'count(*)': 1, 'Name': 'FC Lahti'}, {'count(*)': 1, 'Name': 'FF Jaro'}, {'count(*)': 1, 'Name': 'HJK'}] | medium | SELECT count(*) , shop.name FROM hiring JOIN shop ON hiring.shop_id = shop.shop_id GROUP BY shop.name | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'hiring': ['shop_id', 'employee_id'],
'shop': ['shop_id', 'name']
} | {
'hiring': ['Shop_ID', 'Employee_ID'],
'shop': ['Shop_ID', 'Name']
} | CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
PRIMARY KEY (Shop_ID)
); | CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
); |
employee_hire_evaluation | What is total bonus given in all evaluations? | SELECT sum(bonus) FROM evaluation | [{'sum(bonus)': 19500.0}] | easy | SELECT sum(bonus) FROM evaluation | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'evaluation': ['employee_id', 'bonus']
} | {
'evaluation': ['Employee_ID', 'Bonus']
} | CREATE TABLE evaluation (
Employee_ID TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID)
); | CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID)
); |
employee_hire_evaluation | Find the total amount of bonus given in all the evaluations. | SELECT sum(bonus) FROM evaluation | [{'sum(bonus)': 19500.0}] | easy | SELECT sum(bonus) FROM evaluation | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'evaluation': ['employee_id', 'bonus']
} | {
'evaluation': ['Employee_ID', 'Bonus']
} | CREATE TABLE evaluation (
Employee_ID TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID)
); | CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID)
); |
employee_hire_evaluation | Give me all the information about hiring. | SELECT * FROM hiring | [{'Shop_ID': 1, 'Employee_ID': 1, 'Start_from': '2009', 'Is_full_time': 'T'}, {'Shop_ID': 1, 'Employee_ID': 2, 'Start_from': '2003', 'Is_full_time': 'T'}, {'Shop_ID': 8, 'Employee_ID': 3, 'Start_from': '2011', 'Is_full_time': 'F'}, {'Shop_ID': 4, 'Employee_ID': 4, 'Start_from': '2012', 'Is_full_time': 'T'}, {'Shop_ID': 5, 'Employee_ID': 5, 'Start_from': '2013', 'Is_full_time': 'T'}, {'Shop_ID': 2, 'Employee_ID': 6, 'Start_from': '2010', 'Is_full_time': 'F'}, {'Shop_ID': 6, 'Employee_ID': 7, 'Start_from': '2008', 'Is_full_time': 'T'}] | easy | SELECT * FROM hiring | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'hiring': ['employee_id']
} | {
'hiring': ['Employee_ID']
} | CREATE TABLE hiring (
Employee_ID INT,
PRIMARY KEY (Employee_ID)
); | CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID)
); |
employee_hire_evaluation | What is all the information about hiring? | SELECT * FROM hiring | [{'Shop_ID': 1, 'Employee_ID': 1, 'Start_from': '2009', 'Is_full_time': 'T'}, {'Shop_ID': 1, 'Employee_ID': 2, 'Start_from': '2003', 'Is_full_time': 'T'}, {'Shop_ID': 8, 'Employee_ID': 3, 'Start_from': '2011', 'Is_full_time': 'F'}, {'Shop_ID': 4, 'Employee_ID': 4, 'Start_from': '2012', 'Is_full_time': 'T'}, {'Shop_ID': 5, 'Employee_ID': 5, 'Start_from': '2013', 'Is_full_time': 'T'}, {'Shop_ID': 2, 'Employee_ID': 6, 'Start_from': '2010', 'Is_full_time': 'F'}, {'Shop_ID': 6, 'Employee_ID': 7, 'Start_from': '2008', 'Is_full_time': 'T'}] | easy | SELECT * FROM hiring | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'hiring': ['employee_id']
} | {
'hiring': ['Employee_ID']
} | CREATE TABLE hiring (
Employee_ID INT,
PRIMARY KEY (Employee_ID)
); | CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID)
); |
employee_hire_evaluation | Which district has both stores with less than 3000 products and stores with more than 10000 products? | SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000 | [{'Nenhum': 'Nenhum resultado encontrado'}] | hard | SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000 | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'shop': ['shop_id', 'district', 'number_products']
} | {
'shop': ['Shop_ID', 'District', 'Number_products']
} | CREATE TABLE shop (
Shop_ID INT,
District TEXT,
Number_products INT,
PRIMARY KEY (Shop_ID)
); | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
); |
employee_hire_evaluation | Find the districts in which there are both shops selling less than 3000 products and shops selling more than 10000 products. | SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000 | [{'Nenhum': 'Nenhum resultado encontrado'}] | hard | SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000 | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'shop': ['shop_id', 'district', 'number_products']
} | {
'shop': ['Shop_ID', 'District', 'Number_products']
} | CREATE TABLE shop (
Shop_ID INT,
District TEXT,
Number_products INT,
PRIMARY KEY (Shop_ID)
); | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
); |
employee_hire_evaluation | How many different store locations are there? | SELECT count(DISTINCT LOCATION) FROM shop | [{'count(DISTINCT LOCATION)': 9}] | easy | SELECT count(DISTINCT LOCATION) FROM shop | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'shop': ['shop_id', 'location']
} | {
'shop': ['Shop_ID', 'Location']
} | CREATE TABLE shop (
Shop_ID INT,
Location TEXT,
PRIMARY KEY (Shop_ID)
); | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
); |
employee_hire_evaluation | Count the number of distinct store locations. | SELECT count(DISTINCT LOCATION) FROM shop | [{'count(DISTINCT LOCATION)': 9}] | easy | SELECT count(DISTINCT LOCATION) FROM shop | CREATE TABLE employee (
Employee_ID INT,
Name TEXT,
Age INT,
City TEXT,
PRIMARY KEY (Employee_ID)
);
CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
);
CREATE TABLE hiring (
Shop_ID INT,
Employee_ID INT,
Start_from TEXT,
Is_full_time BOOL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID),
FOREIGN KEY (Shop_ID) REFERENCES shop(Shop_ID)
);
CREATE TABLE evaluation (
Employee_ID TEXT,
Year_awarded TEXT,
Bonus REAL,
PRIMARY KEY (Employee_ID),
FOREIGN KEY (Employee_ID) REFERENCES employee(Employee_ID)
); | CREATE TABLE employee (
employee.Employee_ID INT,
employee.Name TEXT,
employee.Age INT,
employee.City TEXT,
PRIMARY KEY (employee.employee_id)
);
CREATE TABLE shop (
shop.Shop_ID INT,
shop.Name TEXT,
shop.Location TEXT,
shop.District TEXT,
shop.Number_products INT,
shop.Manager_name TEXT,
PRIMARY KEY (shop.shop_id)
);
CREATE TABLE hiring (
hiring.Shop_ID INT,
hiring.Employee_ID INT,
hiring.Start_from TEXT,
hiring.Is_full_time BOOL,
PRIMARY KEY (hiring.employee_id),
FOREIGN KEY (hiring.Employee_ID) REFERENCES employee.Employee_ID,
FOREIGN KEY (hiring.Shop_ID) REFERENCES shop.Shop_ID
);
CREATE TABLE evaluation (
evaluation.Employee_ID TEXT,
evaluation.Year_awarded TEXT,
evaluation.Bonus REAL,
PRIMARY KEY (evaluation.employee_id),
FOREIGN KEY (evaluation.Employee_ID) REFERENCES employee.Employee_ID
); | {
'employee': ['Employee_ID', 'Name', 'Age', 'City'],
'shop': ['Shop_ID', 'Name', 'Location', 'District', 'Number_products', 'Manager_name'],
'hiring': ['Shop_ID', 'Employee_ID', 'Start_from', 'Is_full_time'],
'evaluation': ['Employee_ID', 'Year_awarded', 'Bonus']
} | {
'shop': ['shop_id', 'location']
} | {
'shop': ['Shop_ID', 'Location']
} | CREATE TABLE shop (
Shop_ID INT,
Location TEXT,
PRIMARY KEY (Shop_ID)
); | CREATE TABLE shop (
Shop_ID INT,
Name TEXT,
Location TEXT,
District TEXT,
Number_products INT,
Manager_name TEXT,
PRIMARY KEY (Shop_ID)
); |
cre_Doc_Template_Mgt | How many documents do we have? | SELECT count(*) FROM Documents | [{'count(*)': 15}] | easy | SELECT count(*) FROM Documents | CREATE TABLE Ref_Template_Types (
Template_Type_Code CHAR(15),
Template_Type_Description VARCHAR(255),
PRIMARY KEY (Template_Type_Code)
);
CREATE TABLE Templates (
Template_ID INTEGER,
Version_Number INTEGER,
Template_Type_Code CHAR(15),
Date_Effective_From DATETIME,
Date_Effective_To DATETIME,
Template_Details VARCHAR(255),
PRIMARY KEY (Template_ID),
FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types(Template_Type_Code)
);
CREATE TABLE Documents (
Document_ID INTEGER,
Template_ID INTEGER,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Other_Details VARCHAR(255),
PRIMARY KEY (Document_ID),
FOREIGN KEY (Template_ID) REFERENCES Templates(Template_ID)
);
CREATE TABLE Paragraphs (
Paragraph_ID INTEGER,
Document_ID INTEGER,
Paragraph_Text VARCHAR(255),
Other_Details VARCHAR(255),
PRIMARY KEY (Paragraph_ID),
FOREIGN KEY (Document_ID) REFERENCES Documents(Document_ID)
); | CREATE TABLE Ref_Template_Types (
Ref_Template_Types.Template_Type_Code CHAR(15),
Ref_Template_Types.Template_Type_Description VARCHAR(255),
PRIMARY KEY (ref_template_types.template_type_code)
);
CREATE TABLE Templates (
Templates.Template_ID INTEGER,
Templates.Version_Number INTEGER,
Templates.Template_Type_Code CHAR(15),
Templates.Date_Effective_From DATETIME,
Templates.Date_Effective_To DATETIME,
Templates.Template_Details VARCHAR(255),
PRIMARY KEY (templates.template_id),
FOREIGN KEY (Templates.Template_Type_Code) REFERENCES Ref_Template_Types.Template_Type_Code
);
CREATE TABLE Documents (
Documents.Document_ID INTEGER,
Documents.Template_ID INTEGER,
Documents.Document_Name VARCHAR(255),
Documents.Document_Description VARCHAR(255),
Documents.Other_Details VARCHAR(255),
PRIMARY KEY (documents.document_id),
FOREIGN KEY (Documents.Template_ID) REFERENCES Templates.Template_ID
);
CREATE TABLE Paragraphs (
Paragraphs.Paragraph_ID INTEGER,
Paragraphs.Document_ID INTEGER,
Paragraphs.Paragraph_Text VARCHAR(255),
Paragraphs.Other_Details VARCHAR(255),
PRIMARY KEY (paragraphs.paragraph_id),
FOREIGN KEY (Paragraphs.Document_ID) REFERENCES Documents.Document_ID
); | {
'Ref_Template_Types': ['Template_Type_Code', 'Template_Type_Description'],
'Templates': ['Template_ID', 'Version_Number', 'Template_Type_Code', 'Date_Effective_From', 'Date_Effective_To', 'Template_Details'],
'Documents': ['Document_ID', 'Template_ID', 'Document_Name', 'Document_Description', 'Other_Details'],
'Paragraphs': ['Paragraph_ID', 'Document_ID', 'Paragraph_Text', 'Other_Details']
} | {
'documents': ['document_id']
} | {
'Documents': ['Document_ID']
} | CREATE TABLE Documents (
Document_ID INTEGER,
PRIMARY KEY (Document_ID)
); | CREATE TABLE Documents (
Document_ID INTEGER,
Template_ID INTEGER,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Other_Details VARCHAR(255),
PRIMARY KEY (Document_ID)
); |
cre_Doc_Template_Mgt | Count the number of documents. | SELECT count(*) FROM Documents | [{'count(*)': 15}] | easy | SELECT count(*) FROM Documents | CREATE TABLE Ref_Template_Types (
Template_Type_Code CHAR(15),
Template_Type_Description VARCHAR(255),
PRIMARY KEY (Template_Type_Code)
);
CREATE TABLE Templates (
Template_ID INTEGER,
Version_Number INTEGER,
Template_Type_Code CHAR(15),
Date_Effective_From DATETIME,
Date_Effective_To DATETIME,
Template_Details VARCHAR(255),
PRIMARY KEY (Template_ID),
FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types(Template_Type_Code)
);
CREATE TABLE Documents (
Document_ID INTEGER,
Template_ID INTEGER,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Other_Details VARCHAR(255),
PRIMARY KEY (Document_ID),
FOREIGN KEY (Template_ID) REFERENCES Templates(Template_ID)
);
CREATE TABLE Paragraphs (
Paragraph_ID INTEGER,
Document_ID INTEGER,
Paragraph_Text VARCHAR(255),
Other_Details VARCHAR(255),
PRIMARY KEY (Paragraph_ID),
FOREIGN KEY (Document_ID) REFERENCES Documents(Document_ID)
); | CREATE TABLE Ref_Template_Types (
Ref_Template_Types.Template_Type_Code CHAR(15),
Ref_Template_Types.Template_Type_Description VARCHAR(255),
PRIMARY KEY (ref_template_types.template_type_code)
);
CREATE TABLE Templates (
Templates.Template_ID INTEGER,
Templates.Version_Number INTEGER,
Templates.Template_Type_Code CHAR(15),
Templates.Date_Effective_From DATETIME,
Templates.Date_Effective_To DATETIME,
Templates.Template_Details VARCHAR(255),
PRIMARY KEY (templates.template_id),
FOREIGN KEY (Templates.Template_Type_Code) REFERENCES Ref_Template_Types.Template_Type_Code
);
CREATE TABLE Documents (
Documents.Document_ID INTEGER,
Documents.Template_ID INTEGER,
Documents.Document_Name VARCHAR(255),
Documents.Document_Description VARCHAR(255),
Documents.Other_Details VARCHAR(255),
PRIMARY KEY (documents.document_id),
FOREIGN KEY (Documents.Template_ID) REFERENCES Templates.Template_ID
);
CREATE TABLE Paragraphs (
Paragraphs.Paragraph_ID INTEGER,
Paragraphs.Document_ID INTEGER,
Paragraphs.Paragraph_Text VARCHAR(255),
Paragraphs.Other_Details VARCHAR(255),
PRIMARY KEY (paragraphs.paragraph_id),
FOREIGN KEY (Paragraphs.Document_ID) REFERENCES Documents.Document_ID
); | {
'Ref_Template_Types': ['Template_Type_Code', 'Template_Type_Description'],
'Templates': ['Template_ID', 'Version_Number', 'Template_Type_Code', 'Date_Effective_From', 'Date_Effective_To', 'Template_Details'],
'Documents': ['Document_ID', 'Template_ID', 'Document_Name', 'Document_Description', 'Other_Details'],
'Paragraphs': ['Paragraph_ID', 'Document_ID', 'Paragraph_Text', 'Other_Details']
} | {
'documents': ['document_id']
} | {
'Documents': ['Document_ID']
} | CREATE TABLE Documents (
Document_ID INTEGER,
PRIMARY KEY (Document_ID)
); | CREATE TABLE Documents (
Document_ID INTEGER,
Template_ID INTEGER,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Other_Details VARCHAR(255),
PRIMARY KEY (Document_ID)
); |
cre_Doc_Template_Mgt | List document IDs, document names, and document descriptions for all documents. | SELECT document_id , document_name , document_description FROM Documents | [{'Document_ID': 0, 'Document_Name': 'Introduction of OS', 'Document_Description': 'n'}, {'Document_ID': 1, 'Document_Name': 'Understanding DB', 'Document_Description': 'y'}, {'Document_ID': 3, 'Document_Name': 'Summer Show', 'Document_Description': 'u'}, {'Document_ID': 76, 'Document_Name': 'Robbin CV', 'Document_Description': 'y'}, {'Document_ID': 80, 'Document_Name': 'Welcome to NY', 'Document_Description': 'h'}, {'Document_ID': 82, 'Document_Name': 'Data base', 'Document_Description': 'w'}, {'Document_ID': 2394, 'Document_Name': 'Customer reviews', 'Document_Description': 'y'}, {'Document_ID': 3830, 'Document_Name': 'Do not panic', 'Document_Description': 'k'}, {'Document_ID': 33930, 'Document_Name': 'How Google people work', 'Document_Description': 'z'}, {'Document_ID': 50123, 'Document_Name': 'Learning French', 'Document_Description': 'r'}, {'Document_ID': 651512, 'Document_Name': 'How to write a CV', 'Document_Description': 'f'}, {'Document_ID': 801801, 'Document_Name': 'How to read a book', 'Document_Description': 'w'}, {'Document_ID': 3540024, 'Document_Name': 'Palm reading', 'Document_Description': 'y'}, {'Document_ID': 16514113, 'Document_Name': 'A history of Arts', 'Document_Description': 'h'}, {'Document_ID': 385906526, 'Document_Name': 'About Korea', 'Document_Description': 'b'}] | medium | SELECT document_id , document_name , document_description FROM Documents | CREATE TABLE Ref_Template_Types (
Template_Type_Code CHAR(15),
Template_Type_Description VARCHAR(255),
PRIMARY KEY (Template_Type_Code)
);
CREATE TABLE Templates (
Template_ID INTEGER,
Version_Number INTEGER,
Template_Type_Code CHAR(15),
Date_Effective_From DATETIME,
Date_Effective_To DATETIME,
Template_Details VARCHAR(255),
PRIMARY KEY (Template_ID),
FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types(Template_Type_Code)
);
CREATE TABLE Documents (
Document_ID INTEGER,
Template_ID INTEGER,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Other_Details VARCHAR(255),
PRIMARY KEY (Document_ID),
FOREIGN KEY (Template_ID) REFERENCES Templates(Template_ID)
);
CREATE TABLE Paragraphs (
Paragraph_ID INTEGER,
Document_ID INTEGER,
Paragraph_Text VARCHAR(255),
Other_Details VARCHAR(255),
PRIMARY KEY (Paragraph_ID),
FOREIGN KEY (Document_ID) REFERENCES Documents(Document_ID)
); | CREATE TABLE Ref_Template_Types (
Ref_Template_Types.Template_Type_Code CHAR(15),
Ref_Template_Types.Template_Type_Description VARCHAR(255),
PRIMARY KEY (ref_template_types.template_type_code)
);
CREATE TABLE Templates (
Templates.Template_ID INTEGER,
Templates.Version_Number INTEGER,
Templates.Template_Type_Code CHAR(15),
Templates.Date_Effective_From DATETIME,
Templates.Date_Effective_To DATETIME,
Templates.Template_Details VARCHAR(255),
PRIMARY KEY (templates.template_id),
FOREIGN KEY (Templates.Template_Type_Code) REFERENCES Ref_Template_Types.Template_Type_Code
);
CREATE TABLE Documents (
Documents.Document_ID INTEGER,
Documents.Template_ID INTEGER,
Documents.Document_Name VARCHAR(255),
Documents.Document_Description VARCHAR(255),
Documents.Other_Details VARCHAR(255),
PRIMARY KEY (documents.document_id),
FOREIGN KEY (Documents.Template_ID) REFERENCES Templates.Template_ID
);
CREATE TABLE Paragraphs (
Paragraphs.Paragraph_ID INTEGER,
Paragraphs.Document_ID INTEGER,
Paragraphs.Paragraph_Text VARCHAR(255),
Paragraphs.Other_Details VARCHAR(255),
PRIMARY KEY (paragraphs.paragraph_id),
FOREIGN KEY (Paragraphs.Document_ID) REFERENCES Documents.Document_ID
); | {
'Ref_Template_Types': ['Template_Type_Code', 'Template_Type_Description'],
'Templates': ['Template_ID', 'Version_Number', 'Template_Type_Code', 'Date_Effective_From', 'Date_Effective_To', 'Template_Details'],
'Documents': ['Document_ID', 'Template_ID', 'Document_Name', 'Document_Description', 'Other_Details'],
'Paragraphs': ['Paragraph_ID', 'Document_ID', 'Paragraph_Text', 'Other_Details']
} | {
'documents': ['document_id', 'document_name', 'document_description']
} | {
'Documents': ['Document_ID', 'Document_Name', 'Document_Description']
} | CREATE TABLE Documents (
Document_ID INTEGER,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
PRIMARY KEY (Document_ID)
); | CREATE TABLE Documents (
Document_ID INTEGER,
Template_ID INTEGER,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Other_Details VARCHAR(255),
PRIMARY KEY (Document_ID)
); |