[ { "query": "SELECT name , flag FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain WHERE rank = 'Midshipman')", "question": "Find the name and flag of ships that are not steered by any captain with Midshipman rank.", "schema": "captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)\nShip: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT)" }, { "query": "SELECT name , flag FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain WHERE rank = 'Midshipman')", "question": "What are the names and flags of ships that do not have a captain with the rank of Midshipman?", "schema": "captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)\nShip: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT)" }, { "query": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Midshipman' INTERSECT SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Lieutenant'", "question": "Find the name of the ships that are steered by both a captain with Midshipman rank and a captain with Lieutenant rank.", "schema": "captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)\nShip: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT)" }, { "query": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Midshipman' INTERSECT SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Lieutenant'", "question": "What are the names of ships that are commanded by both captains with the rank of Midshipman and captains with the rank of Lieutenant?", "schema": "captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)\nShip: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT)" }, { "query": "SELECT host_city FROM hosting_city ORDER BY YEAR DESC LIMIT 1", "question": "What is id of the city that hosted events in the most recent year?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT host_city FROM hosting_city ORDER BY YEAR DESC LIMIT 1", "question": "Find the city that hosted some events in the most recent year. What is the id of this city?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT match_id FROM MATCH WHERE competition = \"1994 FIFA World Cup qualification\"", "question": "Find the match ids of the cities that hosted competition \"1994 FIFA World Cup qualification\"?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT match_id FROM MATCH WHERE competition = \"1994 FIFA World Cup qualification\"", "question": "What is the match id of the competition called \"1994 FIFA World Cup qualification\"?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010", "question": "Find the cities which were once a host city after 2010?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010", "question": "Which cities served as a host city after 2010?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY T2.host_city ORDER BY count(*) DESC LIMIT 1", "question": "Which city has hosted the most events?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY T2.host_city ORDER BY count(*) DESC LIMIT 1", "question": "Find the city that hosted the most events.", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT T3.venue FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city JOIN MATCH AS T3 ON T2.match_id = T3.match_id WHERE T1.city = \"Nanjing ( Jiangsu )\" AND T3.competition = \"1994 FIFA World Cup qualification\"", "question": "What is the venue of the competition \"1994 FIFA World Cup qualification\" hosted by \"Nanjing ( Jiangsu )\"?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT T3.venue FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city JOIN MATCH AS T3 ON T2.match_id = T3.match_id WHERE T1.city = \"Nanjing ( Jiangsu )\" AND T3.competition = \"1994 FIFA World Cup qualification\"", "question": "Find the venue of the competition \"1994 FIFA World Cup qualification\" which was hosted by \"Nanjing ( Jiangsu )\".", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = \"Shanghai\"", "question": "Give me the temperature of Shanghai in January.", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = \"Shanghai\"", "question": "What is the temperature of \"Shanghai\" city in January?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = \"Taizhou ( Zhejiang )\"", "question": "What is the host year of city \"Taizhou ( Zhejiang )\"?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = \"Taizhou ( Zhejiang )\"", "question": "IN which year did city \"Taizhou ( Zhejiang )\" serve as a host city?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT city FROM city ORDER BY regional_population DESC LIMIT 3", "question": "Which three cities have the largest regional population?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT city FROM city ORDER BY regional_population DESC LIMIT 3", "question": "What are the three largest cities in terms of regional population?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT city , GDP FROM city ORDER BY GDP LIMIT 1", "question": "Which city has the lowest GDP? Please list the city name and its GDP.", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT city , GDP FROM city ORDER BY GDP LIMIT 1", "question": "What is the city with the smallest GDP? Return the city and its GDP.", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id ORDER BY T2.Feb DESC LIMIT 1", "question": "Which city has the highest temperature in February?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id ORDER BY T2.Feb DESC LIMIT 1", "question": "In February, which city marks the highest temperature?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul OR T2.Mar > T2.Oct", "question": "Give me a list of cities whose temperature in March is lower than that in July or higher than that in Oct?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul OR T2.Mar > T2.Oct", "question": "Which cities' temperature in March is lower than that in July or higher than that in Oct?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul INTERSECT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city", "question": "Give me a list of cities whose temperature in Mar is lower than that in July and which have also served as host cities?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul INTERSECT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city", "question": "Which cities have lower temperature in March than in July and have been once host cities?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Dec EXCEPT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city", "question": "Give me a list of cities whose temperature in Mar is lower than that in Dec and which have never been host cities.", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Dec EXCEPT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city", "question": "Which cities have lower temperature in March than in Dec and have never served as host cities?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Feb > T2.Jun UNION SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city", "question": "Give me a list of cities whose temperature in Feb is higher than that in Jun or cities that were once host cities?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Feb > T2.Jun UNION SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city", "question": "Which cities have higher temperature in Feb than in Jun or have once served as host cities?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT city FROM city WHERE regional_population > 10000000", "question": "Please give me a list of cities whose regional population is over 10000000.", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT city FROM city WHERE regional_population > 10000000", "question": "Which cities have regional population above 10000000?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT city FROM city WHERE regional_population > 10000000 UNION SELECT city FROM city WHERE regional_population < 5000000", "question": "Please give me a list of cities whose regional population is over 8000000 or under 5000000.", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT city FROM city WHERE regional_population > 10000000 UNION SELECT city FROM city WHERE regional_population < 5000000", "question": "Which cities have regional population above 8000000 or below 5000000?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT count(*) , Competition FROM MATCH GROUP BY Competition", "question": "Find the number of matches in different competitions.", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT count(*) , Competition FROM MATCH GROUP BY Competition", "question": "For each competition, count the number of matches.", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT venue FROM MATCH ORDER BY date DESC", "question": "List venues of all matches in the order of their dates starting from the most recent one.", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT venue FROM MATCH ORDER BY date DESC", "question": "What are the venues of all the matches? Sort them in the descending order of match date.", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1", "question": "what is the GDP of the city with the largest population.", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1", "question": "Find the GDP of the city with the largest regional population.", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT t1.gdp , t1.Regional_Population FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY t2.Host_City HAVING count(*) > 1", "question": "What are the GDP and population of the city that already served as a host more than once?", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT t1.gdp , t1.Regional_Population FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY t2.Host_City HAVING count(*) > 1", "question": "Which cities have served as host cities more than once? Return me their GDP and population.", "schema": "city: City_ID (INT), City (TEXT), Hanzi (TEXT), Hanyu_Pinyin (TEXT), Regional_Population (INT), GDP (REAL)\nmatch: Match_ID (INT), Date (TEXT), Venue (TEXT), Score (TEXT), Result (TEXT), Competition (TEXT)\ntemperature: City_ID (INT), Jan (REAL), Feb (REAL), Mar (REAL), Apr (REAL), Jun (REAL), Jul (REAL), Aug (REAL), Sep (REAL), Oct (REAL), Nov (REAL), Dec (REAL)\nhosting_city: Year (INT), Match_ID (INT), Host_City (TEXT)" }, { "query": "SELECT individual_first_name , individual_middle_name , individual_last_name FROM individuals ORDER BY individual_last_name", "question": "List every individual's first name, middle name and last name in alphabetical order by last name.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT individual_first_name , individual_middle_name , individual_last_name FROM individuals ORDER BY individual_last_name", "question": "What are the first, middle, and last names of all individuals, ordered by last name?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT DISTINCT form_type_code FROM forms", "question": "List all the types of forms.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT DISTINCT form_type_code FROM forms", "question": "What are the different types of forms?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT t1.form_name FROM forms AS t1 JOIN party_forms AS t2 ON t1.form_id = t2.form_id GROUP BY t2.form_id ORDER BY count(*) DESC LIMIT 1", "question": "Find the name of the most popular party form.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT t1.form_name FROM forms AS t1 JOIN party_forms AS t2 ON t1.form_id = t2.form_id GROUP BY t2.form_id ORDER BY count(*) DESC LIMIT 1", "question": "What is the name of the party form that is most common?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT payment_method_code , party_phone FROM parties WHERE party_email = \"enrico09@example.com\"", "question": "Find the payment method and phone of the party with email \"enrico09@example.com\".", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT payment_method_code , party_phone FROM parties WHERE party_email = \"enrico09@example.com\"", "question": "What is the payment method code and party phone of the party with the email 'enrico09@example.com'?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT t1.party_email FROM parties AS t1 JOIN party_forms AS t2 ON t1.party_id = t2.party_id WHERE t2.form_id = (SELECT form_id FROM party_forms GROUP BY form_id ORDER BY count(*) DESC LIMIT 1)", "question": "Find the emails of parties with the most popular party form.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT t1.party_email FROM parties AS t1 JOIN party_forms AS t2 ON t1.party_id = t2.party_id WHERE t2.form_id = (SELECT form_id FROM party_forms GROUP BY form_id ORDER BY count(*) DESC LIMIT 1)", "question": "What are the party emails associated with parties that used the party form that is the most common?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT organization_name FROM organizations ORDER BY date_formed ASC", "question": "List all the name of organizations in order of the date formed.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT organization_name FROM organizations ORDER BY date_formed ASC", "question": "What are the names of organizations, ordered by the date they were formed, ascending?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1", "question": "Find the name of the youngest organization.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1", "question": "What is the name of the organization that was formed most recently?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.organization_name = \"Labour Party\" ORDER BY t2.date_contact_to DESC LIMIT 1", "question": "Find the last name of the latest contact individual of the organization \"Labour Party\".", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.organization_name = \"Labour Party\" ORDER BY t2.date_contact_to DESC LIMIT 1", "question": "What is the last name of the contact individual from the Labour party organization who was contacted most recently?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.uk_vat_number = (SELECT max(uk_vat_number) FROM organizations) ORDER BY t2.date_contact_to ASC LIMIT 1", "question": "Find the last name of the first ever contact person of the organization with the highest UK Vat number.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.uk_vat_number = (SELECT max(uk_vat_number) FROM organizations) ORDER BY t2.date_contact_to ASC LIMIT 1", "question": "What is the last name of the first individual contacted from the organization with the maximum UK Vat number across all organizations?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT count(*) FROM services", "question": "How many services are there?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT count(*) FROM services", "question": "Count the number of services.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT service_name FROM services EXCEPT SELECT t1.service_name FROM services AS t1 JOIN party_services AS t2 ON t1.service_id = t2.service_id", "question": "Find name of the services that has never been used.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT service_name FROM services EXCEPT SELECT t1.service_name FROM services AS t1 JOIN party_services AS t2 ON t1.service_id = t2.service_id", "question": "What are the names of the services that have never been used?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses", "question": "Find the name of all the cities and states.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses", "question": "What are the names of all cities and states?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT count(*) FROM addresses WHERE state_province_county = \"Colorado\"", "question": "How many cities are there in state \"Colorado\"?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT count(*) FROM addresses WHERE state_province_county = \"Colorado\"", "question": "Count the number of cities in the state of Colorado.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING count(*) > 3", "question": "Find the payment method code used by more than 3 parties.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING count(*) > 3", "question": "What are the payment method codes that have been used by more than 3 parties?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT organization_name FROM organizations WHERE organization_name LIKE \"%Party%\"", "question": "Find the name of organizations whose names contain \"Party\".", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT organization_name FROM organizations WHERE organization_name LIKE \"%Party%\"", "question": "What are the names of organizations that contain the word \"Party\"?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT count(DISTINCT payment_method_code) FROM parties", "question": "How many distinct payment methods are used by parties?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT count(DISTINCT payment_method_code) FROM parties", "question": "Count the number of different payment method codes used by parties.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT t1.party_email FROM parties AS t1 JOIN party_services AS t2 ON t1.party_id = t2.customer_id GROUP BY t1.party_email ORDER BY count(*) DESC LIMIT 1", "question": "Which is the email of the party that has used the services the most number of times?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT t1.party_email FROM parties AS t1 JOIN party_services AS t2 ON t1.party_id = t2.customer_id GROUP BY t1.party_email ORDER BY count(*) DESC LIMIT 1", "question": "Return the party email that has used party services the greatest number of times.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT state_province_county FROM addresses WHERE line_1_number_building LIKE \"%6862 Kaitlyn Knolls%\"", "question": "Which state can address \"6862 Kaitlyn Knolls\" possibly be in?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT state_province_county FROM addresses WHERE line_1_number_building LIKE \"%6862 Kaitlyn Knolls%\"", "question": "Give the state corresponding to the line number building \"6862 Kaitlyn Knolls\".", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT t1.organization_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id GROUP BY t1.organization_name ORDER BY count(*) DESC LIMIT 1", "question": "What is the name of organization that has the greatest number of contact individuals?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT t1.organization_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id GROUP BY t1.organization_name ORDER BY count(*) DESC LIMIT 1", "question": "Return the name of the organization which has the most contact individuals.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_id", "question": "Find the last name of the individuals that have been contact individuals of an organization.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_id", "question": "What are the last names of individuals who have been contact individuals for an organization?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), town_city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nServices: service_id (INTEGER), service_type_code (VARCHAR(15)), service_name (VARCHAR(80)), service_descriptio (VARCHAR(255))\nForms: form_id (INTEGER), form_type_code (VARCHAR(15)), service_id (INTEGER), form_number (VARCHAR(50)), form_name (VARCHAR(80)), form_description (VARCHAR(255))\nIndividuals: individual_id (INTEGER), individual_first_name (VARCHAR(80)), individual_middle_name (VARCHAR(80)), inidividual_phone (VARCHAR(80)), individual_email (VARCHAR(80)), individual_address (VARCHAR(255)), individual_last_name (VARCHAR(80))\nOrganizations: organization_id (INTEGER), date_formed (DATETIME), organization_name (VARCHAR(255)), uk_vat_number (VARCHAR(20))\nParties: party_id (INTEGER), payment_method_code (VARCHAR(15)), party_phone (VARCHAR(80)), party_email (VARCHAR(80))\nOrganization_Contact_Individuals: individual_id (INTEGER), organization_id (INTEGER), date_contact_from (DATETIME), date_contact_to (DATETIME)\nParty_Addresses: party_id (INTEGER), address_id (INTEGER), date_address_from (DATETIME), address_type_code (VARCHAR(15)), date_address_to (DATETIME)\nParty_Forms: party_id (INTEGER), form_id (INTEGER), date_completion_started (DATETIME), form_status_code (VARCHAR(15)), date_fully_completed (DATETIME)\nParty_Services: booking_id (INTEGER), customer_id (INTEGER), service_id (INTEGER), service_datetime (DATETIME), booking_made_date (DATETIME)" }, { "query": "SELECT count(*) FROM driver", "question": "How many drivers are there?", "schema": "driver: Driver_ID (INT), Name (TEXT), Party (TEXT), Home_city (TEXT), Age (INT)\nschool: School_ID (INT), Grade (TEXT), School (TEXT), Location (TEXT), Type (TEXT)\nschool_bus: School_ID (INT), Driver_ID (INT), Years_Working (INT), If_full_time (BOOL)" }, { "query": "SELECT name , home_city , age FROM driver", "question": "Show the name, home city, and age for all drivers.", "schema": "driver: Driver_ID (INT), Name (TEXT), Party (TEXT), Home_city (TEXT), Age (INT)\nschool: School_ID (INT), Grade (TEXT), School (TEXT), Location (TEXT), Type (TEXT)\nschool_bus: School_ID (INT), Driver_ID (INT), Years_Working (INT), If_full_time (BOOL)" }, { "query": "SELECT party , count(*) FROM driver GROUP BY party", "question": "Show the party and the number of drivers in each party.", "schema": "driver: Driver_ID (INT), Name (TEXT), Party (TEXT), Home_city (TEXT), Age (INT)\nschool: School_ID (INT), Grade (TEXT), School (TEXT), Location (TEXT), Type (TEXT)\nschool_bus: School_ID (INT), Driver_ID (INT), Years_Working (INT), If_full_time (BOOL)" }, { "query": "SELECT name FROM driver ORDER BY age DESC", "question": "Show the name of drivers in descending order of age.", "schema": "driver: Driver_ID (INT), Name (TEXT), Party (TEXT), Home_city (TEXT), Age (INT)\nschool: School_ID (INT), Grade (TEXT), School (TEXT), Location (TEXT), Type (TEXT)\nschool_bus: School_ID (INT), Driver_ID (INT), Years_Working (INT), If_full_time (BOOL)" }, { "query": "SELECT DISTINCT home_city FROM driver", "question": "Show all different home cities.", "schema": "driver: Driver_ID (INT), Name (TEXT), Party (TEXT), Home_city (TEXT), Age (INT)\nschool: School_ID (INT), Grade (TEXT), School (TEXT), Location (TEXT), Type (TEXT)\nschool_bus: School_ID (INT), Driver_ID (INT), Years_Working (INT), If_full_time (BOOL)" }, { "query": "SELECT home_city FROM driver GROUP BY home_city ORDER BY count(*) DESC LIMIT 1", "question": "Show the home city with the most number of drivers.", "schema": "driver: Driver_ID (INT), Name (TEXT), Party (TEXT), Home_city (TEXT), Age (INT)\nschool: School_ID (INT), Grade (TEXT), School (TEXT), Location (TEXT), Type (TEXT)\nschool_bus: School_ID (INT), Driver_ID (INT), Years_Working (INT), If_full_time (BOOL)" }, { "query": "SELECT party FROM driver WHERE home_city = 'Hartford' AND age > 40", "question": "Show the party with drivers from Hartford and drivers older than 40.", "schema": "driver: Driver_ID (INT), Name (TEXT), Party (TEXT), Home_city (TEXT), Age (INT)\nschool: School_ID (INT), Grade (TEXT), School (TEXT), Location (TEXT), Type (TEXT)\nschool_bus: School_ID (INT), Driver_ID (INT), Years_Working (INT), If_full_time (BOOL)" }, { "query": "SELECT home_city FROM driver WHERE age > 40 GROUP BY home_city HAVING count(*) >= 2", "question": "Show home city where at least two drivers older than 40 are from.", "schema": "driver: Driver_ID (INT), Name (TEXT), Party (TEXT), Home_city (TEXT), Age (INT)\nschool: School_ID (INT), Grade (TEXT), School (TEXT), Location (TEXT), Type (TEXT)\nschool_bus: School_ID (INT), Driver_ID (INT), Years_Working (INT), If_full_time (BOOL)" }, { "query": "SELECT home_city FROM driver EXCEPT SELECT home_city FROM driver WHERE age > 40", "question": "Show all home cities except for those having a driver older than 40.", "schema": "driver: Driver_ID (INT), Name (TEXT), Party (TEXT), Home_city (TEXT), Age (INT)\nschool: School_ID (INT), Grade (TEXT), School (TEXT), Location (TEXT), Type (TEXT)\nschool_bus: School_ID (INT), Driver_ID (INT), Years_Working (INT), If_full_time (BOOL)" }, { "query": "SELECT name FROM driver WHERE driver_id NOT IN (SELECT driver_id FROM school_bus)", "question": "Show the names of the drivers without a school bus.", "schema": "driver: Driver_ID (INT), Name (TEXT), Party (TEXT), Home_city (TEXT), Age (INT)\nschool: School_ID (INT), Grade (TEXT), School (TEXT), Location (TEXT), Type (TEXT)\nschool_bus: School_ID (INT), Driver_ID (INT), Years_Working (INT), If_full_time (BOOL)" }, { "query": "SELECT TYPE FROM school GROUP BY TYPE HAVING count(*) = 2", "question": "Show the types of schools that have two schools.", "schema": "driver: Driver_ID (INT), Name (TEXT), Party (TEXT), Home_city (TEXT), Age (INT)\nschool: School_ID (INT), Grade (TEXT), School (TEXT), Location (TEXT), Type (TEXT)\nschool_bus: School_ID (INT), Driver_ID (INT), Years_Working (INT), If_full_time (BOOL)" }, { "query": "SELECT T2.school , T3.name FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id JOIN driver AS T3 ON T1.driver_id = T3.driver_id", "question": "Show the school name and driver name for all school buses.", "schema": "driver: Driver_ID (INT), Name (TEXT), Party (TEXT), Home_city (TEXT), Age (INT)\nschool: School_ID (INT), Grade (TEXT), School (TEXT), Location (TEXT), Type (TEXT)\nschool_bus: School_ID (INT), Driver_ID (INT), Years_Working (INT), If_full_time (BOOL)" }, { "query": "SELECT max(years_working) , min(years_working) , avg(years_working) FROM school_bus", "question": "What is the maximum, minimum and average years spent working on a school bus?", "schema": "driver: Driver_ID (INT), Name (TEXT), Party (TEXT), Home_city (TEXT), Age (INT)\nschool: School_ID (INT), Grade (TEXT), School (TEXT), Location (TEXT), Type (TEXT)\nschool_bus: School_ID (INT), Driver_ID (INT), Years_Working (INT), If_full_time (BOOL)" }, { "query": "SELECT school , TYPE FROM school WHERE school_id NOT IN (SELECT school_id FROM school_bus)", "question": "Show the school name and type for schools without a school bus.", "schema": "driver: Driver_ID (INT), Name (TEXT), Party (TEXT), Home_city (TEXT), Age (INT)\nschool: School_ID (INT), Grade (TEXT), School (TEXT), Location (TEXT), Type (TEXT)\nschool_bus: School_ID (INT), Driver_ID (INT), Years_Working (INT), If_full_time (BOOL)" }, { "query": "SELECT T2.type , count(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T2.type", "question": "Show the type of school and the number of buses for each type.", "schema": "driver: Driver_ID (INT), Name (TEXT), Party (TEXT), Home_city (TEXT), Age (INT)\nschool: School_ID (INT), Grade (TEXT), School (TEXT), Location (TEXT), Type (TEXT)\nschool_bus: School_ID (INT), Driver_ID (INT), Years_Working (INT), If_full_time (BOOL)" }, { "query": "SELECT count(*) FROM driver WHERE home_city = 'Hartford' OR age < 40", "question": "How many drivers are from Hartford city or younger than 40?", "schema": "driver: Driver_ID (INT), Name (TEXT), Party (TEXT), Home_city (TEXT), Age (INT)\nschool: School_ID (INT), Grade (TEXT), School (TEXT), Location (TEXT), Type (TEXT)\nschool_bus: School_ID (INT), Driver_ID (INT), Years_Working (INT), If_full_time (BOOL)" }, { "query": "SELECT name FROM driver WHERE home_city = 'Hartford' AND age < 40", "question": "List names for drivers from Hartford city and younger than 40.", "schema": "driver: Driver_ID (INT), Name (TEXT), Party (TEXT), Home_city (TEXT), Age (INT)\nschool: School_ID (INT), Grade (TEXT), School (TEXT), Location (TEXT), Type (TEXT)\nschool_bus: School_ID (INT), Driver_ID (INT), Years_Working (INT), If_full_time (BOOL)" }, { "query": "SELECT t1.name FROM driver AS t1 JOIN school_bus AS t2 ON t1.driver_id = t2.driver_id ORDER BY years_working DESC LIMIT 1", "question": "find the name of driver who is driving the school bus with the longest working history.", "schema": "driver: Driver_ID (INT), Name (TEXT), Party (TEXT), Home_city (TEXT), Age (INT)\nschool: School_ID (INT), Grade (TEXT), School (TEXT), Location (TEXT), Type (TEXT)\nschool_bus: School_ID (INT), Driver_ID (INT), Years_Working (INT), If_full_time (BOOL)" }, { "query": "SELECT count(*) FROM flight WHERE velocity > 200", "question": "How many flights have a velocity larger than 200?", "schema": "airport: id (INT), City (TEXT), Country (TEXT), IATA (TEXT), ICAO (TEXT), name (TEXT)\noperate_company: id (INT), name (TEXT), Type (TEXT), Principal_activities (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL)\nflight: id (INT), Vehicle_Flight_number (TEXT), Date (TEXT), Pilot (TEXT), Velocity (REAL), Altitude (REAL), airport_id (INT), company_id (INT)" }, { "query": "SELECT vehicle_flight_number , date , pilot FROM flight ORDER BY altitude ASC", "question": "List the vehicle flight number, date and pilot of all the flights, ordered by altitude.", "schema": "airport: id (INT), City (TEXT), Country (TEXT), IATA (TEXT), ICAO (TEXT), name (TEXT)\noperate_company: id (INT), name (TEXT), Type (TEXT), Principal_activities (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL)\nflight: id (INT), Vehicle_Flight_number (TEXT), Date (TEXT), Pilot (TEXT), Velocity (REAL), Altitude (REAL), airport_id (INT), company_id (INT)" }, { "query": "SELECT id , country , city , name FROM airport ORDER BY name", "question": "List the id, country, city and name of the airports ordered alphabetically by the name.", "schema": "airport: id (INT), City (TEXT), Country (TEXT), IATA (TEXT), ICAO (TEXT), name (TEXT)\noperate_company: id (INT), name (TEXT), Type (TEXT), Principal_activities (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL)\nflight: id (INT), Vehicle_Flight_number (TEXT), Date (TEXT), Pilot (TEXT), Velocity (REAL), Altitude (REAL), airport_id (INT), company_id (INT)" }, { "query": "SELECT max(group_equity_shareholding) FROM operate_company", "question": "What is maximum group equity shareholding of the companies?", "schema": "airport: id (INT), City (TEXT), Country (TEXT), IATA (TEXT), ICAO (TEXT), name (TEXT)\noperate_company: id (INT), name (TEXT), Type (TEXT), Principal_activities (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL)\nflight: id (INT), Vehicle_Flight_number (TEXT), Date (TEXT), Pilot (TEXT), Velocity (REAL), Altitude (REAL), airport_id (INT), company_id (INT)" }, { "query": "SELECT avg(velocity) FROM flight WHERE pilot = 'Thompson'", "question": "What is the velocity of the pilot named 'Thompson'?", "schema": "airport: id (INT), City (TEXT), Country (TEXT), IATA (TEXT), ICAO (TEXT), name (TEXT)\noperate_company: id (INT), name (TEXT), Type (TEXT), Principal_activities (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL)\nflight: id (INT), Vehicle_Flight_number (TEXT), Date (TEXT), Pilot (TEXT), Velocity (REAL), Altitude (REAL), airport_id (INT), company_id (INT)" }, { "query": "SELECT T1.name , T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id", "question": "What are the names and types of the companies that have ever operated a flight?", "schema": "airport: id (INT), City (TEXT), Country (TEXT), IATA (TEXT), ICAO (TEXT), name (TEXT)\noperate_company: id (INT), name (TEXT), Type (TEXT), Principal_activities (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL)\nflight: id (INT), Vehicle_Flight_number (TEXT), Date (TEXT), Pilot (TEXT), Velocity (REAL), Altitude (REAL), airport_id (INT), company_id (INT)" }, { "query": "SELECT name FROM airport WHERE country != 'Iceland'", "question": "What are the names of the airports which are not in the country 'Iceland'?", "schema": "airport: id (INT), City (TEXT), Country (TEXT), IATA (TEXT), ICAO (TEXT), name (TEXT)\noperate_company: id (INT), name (TEXT), Type (TEXT), Principal_activities (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL)\nflight: id (INT), Vehicle_Flight_number (TEXT), Date (TEXT), Pilot (TEXT), Velocity (REAL), Altitude (REAL), airport_id (INT), company_id (INT)" }, { "query": "SELECT DISTINCT T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T2.velocity < 200", "question": "What are the distinct types of the companies that have operated any flights with velocity less than 200?", "schema": "airport: id (INT), City (TEXT), Country (TEXT), IATA (TEXT), ICAO (TEXT), name (TEXT)\noperate_company: id (INT), name (TEXT), Type (TEXT), Principal_activities (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL)\nflight: id (INT), Vehicle_Flight_number (TEXT), Date (TEXT), Pilot (TEXT), Velocity (REAL), Altitude (REAL), airport_id (INT), company_id (INT)" }, { "query": "SELECT T1.id , T1.name FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id GROUP BY T1.id HAVING count(*) > 1", "question": "What are the ids and names of the companies that operated more than one flight?", "schema": "airport: id (INT), City (TEXT), Country (TEXT), IATA (TEXT), ICAO (TEXT), name (TEXT)\noperate_company: id (INT), name (TEXT), Type (TEXT), Principal_activities (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL)\nflight: id (INT), Vehicle_Flight_number (TEXT), Date (TEXT), Pilot (TEXT), Velocity (REAL), Altitude (REAL), airport_id (INT), company_id (INT)" }, { "query": "SELECT T1.id , T1.name , T1.IATA FROM airport AS T1 JOIN flight AS T2 ON T1.id = T2.airport_id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1", "question": "What is the id, name and IATA code of the airport that had most number of flights?", "schema": "airport: id (INT), City (TEXT), Country (TEXT), IATA (TEXT), ICAO (TEXT), name (TEXT)\noperate_company: id (INT), name (TEXT), Type (TEXT), Principal_activities (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL)\nflight: id (INT), Vehicle_Flight_number (TEXT), Date (TEXT), Pilot (TEXT), Velocity (REAL), Altitude (REAL), airport_id (INT), company_id (INT)" }, { "query": "SELECT DISTINCT T2.pilot FROM airport AS T1 JOIN flight AS T2 ON T1.id = T2.airport_id WHERE T1.country = 'United States' OR T1.name = 'Billund Airport'", "question": "What are the different pilot names who had piloted a flight in the country 'United States' or in the airport named 'Billund Airport'?", "schema": "airport: id (INT), City (TEXT), Country (TEXT), IATA (TEXT), ICAO (TEXT), name (TEXT)\noperate_company: id (INT), name (TEXT), Type (TEXT), Principal_activities (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL)\nflight: id (INT), Vehicle_Flight_number (TEXT), Date (TEXT), Pilot (TEXT), Velocity (REAL), Altitude (REAL), airport_id (INT), company_id (INT)" }, { "query": "SELECT TYPE , count(*) FROM operate_company GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1", "question": "What is the most common company type, and how many are there?", "schema": "airport: id (INT), City (TEXT), Country (TEXT), IATA (TEXT), ICAO (TEXT), name (TEXT)\noperate_company: id (INT), name (TEXT), Type (TEXT), Principal_activities (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL)\nflight: id (INT), Vehicle_Flight_number (TEXT), Date (TEXT), Pilot (TEXT), Velocity (REAL), Altitude (REAL), airport_id (INT), company_id (INT)" }, { "query": "SELECT count(*) FROM airport WHERE id NOT IN ( SELECT airport_id FROM flight WHERE pilot = 'Thompson' );", "question": "How many airports haven't the pilot 'Thompson' driven an aircraft?", "schema": "airport: id (INT), City (TEXT), Country (TEXT), IATA (TEXT), ICAO (TEXT), name (TEXT)\noperate_company: id (INT), name (TEXT), Type (TEXT), Principal_activities (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL)\nflight: id (INT), Vehicle_Flight_number (TEXT), Date (TEXT), Pilot (TEXT), Velocity (REAL), Altitude (REAL), airport_id (INT), company_id (INT)" }, { "query": "SELECT T2.pilot FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T1.principal_activities = 'Cargo' INTERSECT SELECT T2.pilot FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T1.principal_activities = 'Catering services'", "question": "List the name of the pilots who have flied for both a company that mainly provide 'Cargo' services and a company that runs 'Catering services' activities.", "schema": "airport: id (INT), City (TEXT), Country (TEXT), IATA (TEXT), ICAO (TEXT), name (TEXT)\noperate_company: id (INT), name (TEXT), Type (TEXT), Principal_activities (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL)\nflight: id (INT), Vehicle_Flight_number (TEXT), Date (TEXT), Pilot (TEXT), Velocity (REAL), Altitude (REAL), airport_id (INT), company_id (INT)" }, { "query": "SELECT name FROM airport WHERE name LIKE '%international%'", "question": "Which of the airport names contains the word 'international'?", "schema": "airport: id (INT), City (TEXT), Country (TEXT), IATA (TEXT), ICAO (TEXT), name (TEXT)\noperate_company: id (INT), name (TEXT), Type (TEXT), Principal_activities (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL)\nflight: id (INT), Vehicle_Flight_number (TEXT), Date (TEXT), Pilot (TEXT), Velocity (REAL), Altitude (REAL), airport_id (INT), company_id (INT)" }, { "query": "SELECT T3.id , count(*) FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id JOIN airport AS T3 ON T2.airport_id = T3.id GROUP BY T3.id", "question": "How many companies operates airlines in each airport?", "schema": "airport: id (INT), City (TEXT), Country (TEXT), IATA (TEXT), ICAO (TEXT), name (TEXT)\noperate_company: id (INT), name (TEXT), Type (TEXT), Principal_activities (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL)\nflight: id (INT), Vehicle_Flight_number (TEXT), Date (TEXT), Pilot (TEXT), Velocity (REAL), Altitude (REAL), airport_id (INT), company_id (INT)" }, { "query": "SELECT count(*) , country FROM airport GROUP BY country", "question": "how many airports are there in each country?", "schema": "airport: id (INT), City (TEXT), Country (TEXT), IATA (TEXT), ICAO (TEXT), name (TEXT)\noperate_company: id (INT), name (TEXT), Type (TEXT), Principal_activities (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL)\nflight: id (INT), Vehicle_Flight_number (TEXT), Date (TEXT), Pilot (TEXT), Velocity (REAL), Altitude (REAL), airport_id (INT), company_id (INT)" }, { "query": "SELECT country FROM airport GROUP BY country HAVING count(*) > 2", "question": "which countries have more than 2 airports?", "schema": "airport: id (INT), City (TEXT), Country (TEXT), IATA (TEXT), ICAO (TEXT), name (TEXT)\noperate_company: id (INT), name (TEXT), Type (TEXT), Principal_activities (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL)\nflight: id (INT), Vehicle_Flight_number (TEXT), Date (TEXT), Pilot (TEXT), Velocity (REAL), Altitude (REAL), airport_id (INT), company_id (INT)" }, { "query": "SELECT pilot FROM flight GROUP BY pilot ORDER BY count(*) DESC LIMIT 1", "question": "which pilot is in charge of the most number of flights?", "schema": "airport: id (INT), City (TEXT), Country (TEXT), IATA (TEXT), ICAO (TEXT), name (TEXT)\noperate_company: id (INT), name (TEXT), Type (TEXT), Principal_activities (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL)\nflight: id (INT), Vehicle_Flight_number (TEXT), Date (TEXT), Pilot (TEXT), Velocity (REAL), Altitude (REAL), airport_id (INT), company_id (INT)" }, { "query": "SELECT count(*) FROM Accounts", "question": "How many accounts do we have?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT count(*) FROM Accounts", "question": "Count the number of accounts.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT account_id , account_details FROM Accounts", "question": "Show all account ids and account details.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT account_id , account_details FROM Accounts", "question": "What are the ids and details of all accounts?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT count(*) FROM Statements", "question": "How many statements do we have?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT count(*) FROM Statements", "question": "Count the number of statements.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT STATEMENT_ID , statement_details FROM Statements", "question": "List all statement ids and statement details.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT STATEMENT_ID , statement_details FROM Statements", "question": "What are the ids and details of all statements?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT T1.statement_id , T2.statement_details , T1.account_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id", "question": "Show statement id, statement detail, account detail for accounts.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT T1.statement_id , T2.statement_details , T1.account_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id", "question": "What are the statement ids, statement details, and account details, for all accounts?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT STATEMENT_ID , count(*) FROM Accounts GROUP BY STATEMENT_ID", "question": "Show all statement id and the number of accounts for each statement.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT STATEMENT_ID , count(*) FROM Accounts GROUP BY STATEMENT_ID", "question": "What are the different statement ids on accounts, and the number of accounts for each?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT T1.statement_id , T2.statement_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id GROUP BY T1.statement_id ORDER BY count(*) DESC LIMIT 1", "question": "Show the statement id and the statement detail for the statement with most number of accounts.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT T1.statement_id , T2.statement_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id GROUP BY T1.statement_id ORDER BY count(*) DESC LIMIT 1", "question": "What are the statement id and statement detail for the statement that has the most corresponding accounts?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT count(*) FROM Documents", "question": "Show the number of documents.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT count(*) FROM Documents", "question": "Count the number of documents.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_type_code , document_name , document_description FROM Documents WHERE document_name = 'Noel CV' OR document_name = 'King Book'", "question": "List the document type code, document name, and document description for the document with name 'Noel CV' or name 'King Book'.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_type_code , document_name , document_description FROM Documents WHERE document_name = 'Noel CV' OR document_name = 'King Book'", "question": "What are the type come, name, and description of the document that has either the name 'Noel CV' or 'King Book'?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_id , document_name FROM Documents", "question": "Show the ids and names of all documents.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_id , document_name FROM Documents", "question": "What are the ids and names for each of the documents?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_name , document_id FROM Documents WHERE document_type_code = \"BK\"", "question": "Find names and ids of all documents with document type code BK.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_name , document_id FROM Documents WHERE document_type_code = \"BK\"", "question": "What are the names and ids of documents that have the type code BK?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT count(*) , project_id FROM Documents WHERE document_type_code = \"BK\" GROUP BY project_id", "question": "How many documents are with document type code BK for each product id?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT count(*) , project_id FROM Documents WHERE document_type_code = \"BK\" GROUP BY project_id", "question": "Count the number of documents with the type code BK that correspond to each product id.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_name , document_date FROM Documents AS T1 JOIN projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'Graph Database project'", "question": "Show the document name and the document date for all documents on project with details 'Graph Database project'.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_name , document_date FROM Documents AS T1 JOIN projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'Graph Database project'", "question": "What are the names and dates for documents corresponding to project that has the details 'Graph Database project'?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT project_id , count(*) FROM Documents GROUP BY project_id", "question": "Show project ids and the number of documents in each project.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT project_id , count(*) FROM Documents GROUP BY project_id", "question": "How many documents correspond with each project id?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT project_id FROM Documents GROUP BY project_id ORDER BY count(*) ASC LIMIT 1", "question": "What is the id of the project with least number of documents?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT project_id FROM Documents GROUP BY project_id ORDER BY count(*) ASC LIMIT 1", "question": "Return the id of the project that has the fewest corresponding documents.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT project_id FROM Documents GROUP BY project_id HAVING count(*) >= 2", "question": "Show the ids for projects with at least 2 documents.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT project_id FROM Documents GROUP BY project_id HAVING count(*) >= 2", "question": "What are project ids of projects that have 2 or more corresponding documents?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_type_code , count(*) FROM Documents GROUP BY document_type_code", "question": "List document type codes and the number of documents in each code.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_type_code , count(*) FROM Documents GROUP BY document_type_code", "question": "How many documents are there of each type?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1", "question": "What is the document type code with most number of documents?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1", "question": "Return the code of the document type that is most common.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING count(*) < 3", "question": "Show the document type code with fewer than 3 documents.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING count(*) < 3", "question": "What are the codes corresponding to document types for which there are less than 3 documents?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT T1.statement_details , T2.document_name FROM Statements AS T1 JOIN Documents AS T2 ON T1.statement_id = T2.document_id WHERE T1.statement_details = 'Private Project'", "question": "Show the statement detail and the corresponding document name for the statement with detail 'Private Project'.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT T1.statement_details , T2.document_name FROM Statements AS T1 JOIN Documents AS T2 ON T1.statement_id = T2.document_id WHERE T1.statement_details = 'Private Project'", "question": "What are the details for statements with the details 'Private Project', and what are the names of the corresponding documents?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_type_code , document_type_name , document_type_description FROM Ref_document_types", "question": "Show all document type codes, document type names, document type descriptions.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_type_code , document_type_name , document_type_description FROM Ref_document_types", "question": "What are the codes, names, and descriptions of the different document types?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_type_description FROM Ref_document_types WHERE document_type_name = \"Film\"", "question": "What is the document type description for document type named Film?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_type_description FROM Ref_document_types WHERE document_type_name = \"Film\"", "question": "Return the description of the document type name 'Film'.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT T1.document_type_name , T1.document_type_description , T2.Document_date FROM Ref_document_types AS T1 JOIN Documents AS T2 ON T1.document_type_code = T2.document_type_code", "question": "What is the document type name and the document type description and creation date for all the documents?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT T1.document_type_name , T1.document_type_description , T2.Document_date FROM Ref_document_types AS T1 JOIN Documents AS T2 ON T1.document_type_code = T2.document_type_code", "question": "Return the type name, type description, and date of creation for each document.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT count(*) FROM Projects", "question": "Show the number of projects.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT count(*) FROM Projects", "question": "How many projects are there?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT project_id , project_details FROM Projects", "question": "List ids and details for all projects.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT project_id , project_details FROM Projects", "question": "What are the ids and details for each project?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT T1.project_id , T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id HAVING count(*) > 2", "question": "What is the project id and detail for the project with at least two documents?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT T1.project_id , T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id HAVING count(*) > 2", "question": "Return the ids and details corresponding to projects for which there are more than two documents.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id WHERE T2.document_name = \"King Book\"", "question": "What is the project detail for the project with document \"King Book\"?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id WHERE T2.document_name = \"King Book\"", "question": "Give the details of the project with the document name 'King Book'.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT count(*) FROM Ref_budget_codes", "question": "How many budget types do we have?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT count(*) FROM Ref_budget_codes", "question": "Count the number of budget codes.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT budget_type_code , budget_type_description FROM Ref_budget_codes", "question": "List all budget type codes and descriptions.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT budget_type_code , budget_type_description FROM Ref_budget_codes", "question": "What are the type codes and descriptions of each budget type?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code = \"ORG\"", "question": "What is the description for the budget type with code ORG?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code = \"ORG\"", "question": "Return the description of the budget type that has the code ORG.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT count(*) FROM Documents_with_expenses", "question": "How many documents have expenses?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT count(*) FROM Documents_with_expenses", "question": "Count the number of documents with expenses.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF'", "question": "What are the document ids for the budget type code 'SF'?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF'", "question": "Give the ids of documents with expenses that have the budget code 'SF'.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT T2.budget_type_code , T2.budget_type_description , T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_budget_codes AS T2 ON T1.budget_type_code = T2.budget_type_code", "question": "Show the budget type code and description and the corresponding document id.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT T2.budget_type_code , T2.budget_type_description , T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_budget_codes AS T2 ON T1.budget_type_code = T2.budget_type_code", "question": "Return the budget type codes, budget type descriptions and document ids for documents with expenses.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_code = T2.Budget_Type_code WHERE T2.budget_type_Description = \"Government\"", "question": "Show ids for all documents with budget types described as 'Government'.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_code = T2.Budget_Type_code WHERE T2.budget_type_Description = \"Government\"", "question": "Give the ids for documents that have the budget description 'Government'.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT budget_type_code , count(*) FROM Documents_with_expenses GROUP BY budget_type_code", "question": "Show budget type codes and the number of documents in each budget type.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT budget_type_code , count(*) FROM Documents_with_expenses GROUP BY budget_type_code", "question": "What are the different budget type codes, and how many documents are there for each?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY count(*) DESC LIMIT 1", "question": "What is the budget type code with most number of documents.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY count(*) DESC LIMIT 1", "question": "Give the budget type code that is most common among documents with expenses.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses", "question": "What are the ids of documents which don't have expense budgets?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses", "question": "Return the ids of documents that do not have expenses.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_id FROM Documents WHERE document_type_code = \"CV\" EXCEPT SELECT document_id FROM Documents_with_expenses", "question": "Show ids for all documents in type CV without expense budgets.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT document_id FROM Documents WHERE document_type_code = \"CV\" EXCEPT SELECT document_id FROM Documents_with_expenses", "question": "What are the ids of documents with the type code CV that do not have expenses.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT T1.document_id FROM Documents AS T1 JOIN Documents_with_expenses AS T2 ON T1.document_id = T2.document_id WHERE T1.document_name LIKE '%s%'", "question": "What are the ids of documents with letter 's' in the name with any expense budgets.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT T1.document_id FROM Documents AS T1 JOIN Documents_with_expenses AS T2 ON T1.document_id = T2.document_id WHERE T1.document_name LIKE '%s%'", "question": "Give the ids of documents that have expenses and contain the letter s in their names.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT count(*) FROM Documents WHERE document_id NOT IN ( SELECT document_id FROM Documents_with_expenses )", "question": "How many documents do not have any expense?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT count(*) FROM Documents WHERE document_id NOT IN ( SELECT document_id FROM Documents_with_expenses )", "question": "Count the number of documents that do not have expenses.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'GV' INTERSECT SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'SF'", "question": "What are the dates for the documents with both 'GV' type and 'SF' type expenses?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'GV' INTERSECT SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'SF'", "question": "Give the dates of creation for documents that have both budget type codes 'GV' and 'SF'.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT max(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE \"%5%\"", "question": "What are the account details with the largest value or with value having char '5' in it?", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT max(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE \"%5%\"", "question": "Return the account details with the greatest value, as well as those that include the character 5.", "schema": "Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))\nRef_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))\nProjects: Project_ID (INTEGER), Project_Details (VARCHAR(255))\nDocuments: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))\nStatements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))\nDocuments_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))\nAccounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255))" }, { "query": "SELECT count(*) FROM scientists", "question": "Find the total number of scientists.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT count(*) FROM scientists", "question": "How many scientists are there?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT sum(hours) FROM projects", "question": "Find the total hours of all projects.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT sum(hours) FROM projects", "question": "What is the total number of hours for all projects?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT count(DISTINCT scientist) FROM assignedto", "question": "How many different scientists are assigned to any project?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT count(DISTINCT scientist) FROM assignedto", "question": "Count the number of different scientists assigned to any project.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT count(DISTINCT name) FROM projects", "question": "Find the number of distinct projects.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT count(DISTINCT name) FROM projects", "question": "How many different projects are there?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT avg(hours) FROM projects", "question": "Find the average hours of all projects.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT avg(hours) FROM projects", "question": "What is the average hours across all projects?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT name FROM projects ORDER BY hours DESC LIMIT 1", "question": "Find the name of project that continues for the longest time.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT name FROM projects ORDER BY hours DESC LIMIT 1", "question": "What is the name of the project with the most hours?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT name FROM projects WHERE hours > (SELECT avg(hours) FROM projects)", "question": "List the name of all projects that are operated longer than the average working hours of all projects.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT name FROM projects WHERE hours > (SELECT avg(hours) FROM projects)", "question": "What are the names of projects that have taken longer than the average number of hours for all projects?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT T1.name , T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T2.project ORDER BY count(*) DESC LIMIT 1", "question": "Find the name and hours of project that has the most number of scientists.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT T1.name , T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T2.project ORDER BY count(*) DESC LIMIT 1", "question": "What is the name and hours for the project which has the most scientists assigned to it?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name LIKE '%Smith%'", "question": "Find the name of the project for which a scientist whose name contains \u2018Smith\u2019 is assigned to.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name LIKE '%Smith%'", "question": "What is the name of the project that has a scientist assigned to it whose name contains 'Smith'?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT sum(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name = 'Michael Rogers' OR T3.name = 'Carol Smith'", "question": "Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT sum(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name = 'Michael Rogers' OR T3.name = 'Carol Smith'", "question": "What is the sum of hours for projects that scientists with the name Michael Rogers or Carol Smith are assigned to?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT name FROM projects WHERE hours BETWEEN 100 AND 300", "question": "Find the name of projects that require between 100 and 300 hours of work.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT name FROM projects WHERE hours BETWEEN 100 AND 300", "question": "What are the names of projects that require between 100 and 300 hours?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'Matter of Time' INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'A Puzzling Parallax'", "question": "Find the name of the scientist who worked on both a project named 'Matter of Time' and a project named 'A Puzzling Parallax'.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'Matter of Time' INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'A Puzzling Parallax'", "question": "What are the names of any scientists who worked on projects named 'Matter of Time' and 'A Puzzling Pattern'?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT name FROM scientists ORDER BY name", "question": "List the names of all scientists sorted in alphabetical order.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT name FROM scientists ORDER BY name", "question": "What are the names of all the scientists in alphabetical order?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name", "question": "Find the number of scientists involved for each project name.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name", "question": "What are the naems of all the projects, and how many scientists were assigned to each of them?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.hours > 300 GROUP BY T1.name", "question": "Find the number of scientists involved for the projects that require more than 300 hours.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.hours > 300 GROUP BY T1.name", "question": "What are the names of projects that require more than 300 hours, and how many scientists are assigned to each?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT count(*) , T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name", "question": "Find the number of projects which each scientist is working on and scientist's name.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT count(*) , T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name", "question": "What are the names of the scientists, and how many projects are each of them working on?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT T3.ssn , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects)", "question": "Find the SSN and name of scientists who are assigned to the project with the longest hours.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT T3.ssn , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects)", "question": "What are the SSN and names of scientists working on the project with the most hours?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn", "question": "Find the name of scientists who are assigned to some project.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn", "question": "What are the names of scientists who are assigned to any project?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo)", "question": "Select the project names which are not assigned yet.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo)", "question": "What are the names of projects that have not been assigned?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT Name FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)", "question": "Find the name of scientists who are not assigned to any project.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT Name FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)", "question": "What are the names of scientists who have not been assigned a project?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT count(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)", "question": "Find the number of scientists who are not assigned to any project.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT count(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)", "question": "How many scientists do not have any projects assigned to them?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects)", "question": "Find the names of scientists who are not working on the project with the highest hours.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects)", "question": "What are the names of scientists who are not working on the project with the most hours?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT T1.Name , T3.Name , T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name , T1.Name", "question": "List all the scientists' names, their projects' names, and the hours worked by that scientist on each project, in alphabetical order of project name, and then scientist name.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT T1.Name , T3.Name , T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name , T1.Name", "question": "What are the names of each scientist, the names of the projects that they work on, and the hours for each of those projects, listed in alphabetical order by project name, then scientist name.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT T2.name , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT min(hours) FROM projects)", "question": "Find name of the project that needs the least amount of time to finish and the name of scientists who worked on it.", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT T2.name , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT min(hours) FROM projects)", "question": "What is the name of the project that requires the fewest number of hours, and the names of the scientists assigned to it?", "schema": "Scientists: SSN (INT), Name (CHAR(30))\nAssignedTo: Scientist (INT), Project (CHAR(4))" }, { "query": "SELECT Name FROM WINE ORDER BY Score LIMIT 1", "question": "What is the name of the highest rated wine?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Name FROM WINE ORDER BY Score LIMIT 1", "question": "Give the name of the wine with the highest score.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Winery FROM WINE ORDER BY SCORE LIMIT 1", "question": "Which winery is the wine that has the highest score from?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Winery FROM WINE ORDER BY SCORE LIMIT 1", "question": "What is the winery at which the wine with the highest score was made?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Name FROM WINE WHERE YEAR = \"2008\"", "question": "Find the names of all wines produced in 2008.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Name FROM WINE WHERE YEAR = \"2008\"", "question": "What are the names of all wines produced in 2008?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Grape , Appelation FROM WINE", "question": "List the grapes and appelations of all wines.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Grape , Appelation FROM WINE", "question": "What are the grapes and appelations of each wine?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Name , Score FROM WINE", "question": "List the names and scores of all wines.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Name , Score FROM WINE", "question": "What are the names and scores of all wines?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Area , County FROM APPELLATIONS", "question": "List the area and county of all appelations.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Area , County FROM APPELLATIONS", "question": "What are the areas and counties for all appelations?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Price FROM WINE WHERE YEAR < 2010", "question": "What are the prices of wines produced before the year of 2010?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Price FROM WINE WHERE YEAR < 2010", "question": "Return the prices of wines produced before 2010.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Name FROM WINE WHERE score > 90", "question": "List the names of all distinct wines that have scores higher than 90.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Name FROM WINE WHERE score > 90", "question": "What are the names of wines with scores higher than 90?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"Red\"", "question": "List the names of all distinct wines that are made of red color grape.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"Red\"", "question": "What are the names of wines made from red grapes?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = \"North Coast\"", "question": "Find the names of all distinct wines that have appellations in North Coast area.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = \"North Coast\"", "question": "What are the distinct names of wines that have appellations in the North Coast area?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT count(*) FROM WINE WHERE Winery = \"Robert Biale\"", "question": "How many wines are produced at Robert Biale winery?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT count(*) FROM WINE WHERE Winery = \"Robert Biale\"", "question": "Count the number of wines produced at Robert Biale winery.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT count(*) FROM APPELLATIONS WHERE County = \"Napa\"", "question": "How many appelations are in Napa Country?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT count(*) FROM APPELLATIONS WHERE County = \"Napa\"", "question": "Count the number of appelations in Napa County.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = \"Sonoma\"", "question": "Give me the average prices of wines that are produced by appelations in Sonoma County.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = \"Sonoma\"", "question": "What is the average price of wines produced in appelations in Sonoma County?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT T2.Name , T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"White\"", "question": "What are the names and scores of wines that are made of white color grapes?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT T2.Name , T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"White\"", "question": "Give the names and scores of wines made from white grapes.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT max(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = \"Central Coast\" AND T2.year < 2005", "question": "Find the maximum price of wins from the appelations in Central Coast area and produced before the year of 2005.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT max(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = \"Central Coast\" AND T2.year < 2005", "question": "What is the maximum price of wines from the appelation in the Central Coast area, which was produced before 2005?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"White\" AND T2.score > 90", "question": "Find the the grape whose white color grapes are used to produce wines with scores higher than 90.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"White\" AND T2.score > 90", "question": "Find the white grape used to produce wines with scores above 90.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"Red\" AND T2.price > 50", "question": "What are the wines that have prices higher than 50 and made of Red color grapes?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"Red\" AND T2.price > 50", "question": "What are the names of wines made from red grapes and with prices above 50?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = \"Monterey\" AND T2.price < 50", "question": "What are the wines that have prices lower than 50 and have appelations in Monterey county?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = \"Monterey\" AND T2.price < 50", "question": "Give the neames of wines with prices below 50 and with appelations in Monterey county.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT count(*) , Grape FROM WINE GROUP BY Grape", "question": "What are the numbers of wines for different grapes?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT count(*) , Grape FROM WINE GROUP BY Grape", "question": "How many wines are there for each grape?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT avg(Price) , YEAR FROM WINE GROUP BY YEAR", "question": "What are the average prices of wines for different years?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT avg(Price) , YEAR FROM WINE GROUP BY YEAR", "question": "What is the average prices of wines for each each?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT min(Price) FROM wine WHERE Winery = \"John Anthony\")", "question": "Find the distinct names of all wines that have prices higher than some wines from John Anthony winery.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT min(Price) FROM wine WHERE Winery = \"John Anthony\")", "question": "What are the distinct names of wines with prices higher than any wine from John Anthony winery.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT DISTINCT Name FROM WINE ORDER BY Name", "question": "List the names of all distinct wines in alphabetical order.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT DISTINCT Name FROM WINE ORDER BY Name", "question": "What are the names of wines, sorted in alphabetical order?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT DISTINCT Name FROM WINE ORDER BY price", "question": "List the names of all distinct wines ordered by price.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT DISTINCT Name FROM WINE ORDER BY price", "question": "What are the names of wines, sorted by price ascending?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT T1.Area FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING T2.year < 2010 ORDER BY count(*) DESC LIMIT 1", "question": "What is the area of the appelation that produces the highest number of wines before the year of 2010?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT T1.Area FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING T2.year < 2010 ORDER BY count(*) DESC LIMIT 1", "question": "What is the area for the appelation which produced the most wines prior to 2010?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) DESC LIMIT 1", "question": "What is the color of the grape whose wine products has the highest average price?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) DESC LIMIT 1", "question": "Give the color of the grape whose wine products have the highest average price?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010", "question": "Find the distinct names of wines produced before the year of 2000 or after the year of 2010.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010", "question": "Give the distinct names of wines made before 2000 or after 2010.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100", "question": "Find the distinct winery of wines having price between 50 and 100.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100", "question": "What are the distinct wineries which produce wines costing between 50 and 100?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT AVG(Price) , AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = \"Zinfandel\"", "question": "What are the average prices and cases of wines produced in the year of 2009 and made of Zinfandel grape?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT AVG(Price) , AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = \"Zinfandel\"", "question": "Give the average price and case of wines made from Zinfandel grapes in the year 2009.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT max(Price) , max(Score) FROM WINE WHERE Appelation = \"St. Helena\"", "question": "What are the maximum price and score of wines produced by St. Helena appelation?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT max(Price) , max(Score) FROM WINE WHERE Appelation = \"St. Helena\"", "question": "Give the maximum price and score for wines produced in the appelation St. Helena.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT max(Price) , max(Score) , YEAR FROM WINE GROUP BY YEAR", "question": "What are the maximum price and score of wines in each year?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT max(Price) , max(Score) , YEAR FROM WINE GROUP BY YEAR", "question": "What are the maximum price and score of wines for each year?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT avg(Price) , avg(Score) , Appelation FROM WINE GROUP BY Appelation", "question": "What are the average price and score of wines grouped by appelation?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT avg(Price) , avg(Score) , Appelation FROM WINE GROUP BY Appelation", "question": "What are the average price and score of wines for each appelation?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Winery FROM WINE GROUP BY Winery HAVING count(*) >= 4", "question": "Find the wineries that have at least four wines.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Winery FROM WINE GROUP BY Winery HAVING count(*) >= 4", "question": "Which wineries produce at least four wines?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING count(*) <= 3", "question": "Find the country of all appelations who have at most three wines.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING count(*) <= 3", "question": "What are the countries for appelations with at most 3 wines?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Name FROM WINE WHERE YEAR < (SELECT min(YEAR) FROM WINE WHERE Winery = \"Brander\")", "question": "What are the names of wines whose production year are before the year of all wines by Brander winery?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Name FROM WINE WHERE YEAR < (SELECT min(YEAR) FROM WINE WHERE Winery = \"Brander\")", "question": "What are the names of wines produced before any wine from the Brander winery?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Name FROM WINE WHERE Price > (SELECT max(Price) FROM WINE WHERE YEAR = 2006)", "question": "What are the names of wines that are more expensive then all wines made in the year 2006?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Name FROM WINE WHERE Price > (SELECT max(Price) FROM WINE WHERE YEAR = 2006)", "question": "Give the names of wines with prices above any wine produced in 2006.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT T2.Winery FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.GRAPE = T2.GRAPE WHERE T1.Color = \"White\" GROUP BY T2.Winery ORDER BY count(*) DESC LIMIT 3", "question": "Find the top 3 wineries with the greatest number of wines made of white color grapes.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT T2.Winery FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.GRAPE = T2.GRAPE WHERE T1.Color = \"White\" GROUP BY T2.Winery ORDER BY count(*) DESC LIMIT 3", "question": "Which 3 wineries produce the most wines made from white grapes?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Grape , Winery , YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR", "question": "List the grape, winery and year of the wines whose price is bigger than 100 ordered by year.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Grape , Winery , YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR", "question": "What are the grapes, wineries and years for wines with price higher than 100, sorted by year?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Grape , Appelation , Name FROM WINE WHERE Score > 93 ORDER BY Name", "question": "List the grape, appelation and name of wines whose score is higher than 93 ordered by Name.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Grape , Appelation , Name FROM WINE WHERE Score > 93 ORDER BY Name", "question": "What are the grapes, appelations, and wines with scores above 93, sorted by Name?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = \"Central Coast\"", "question": "Find the appelations that produce wines after the year of 2008 but not in Central Coast area.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = \"Central Coast\"", "question": "What are the appelations for wines produced after 2008 but not in the Central Coast area?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT avg(price) FROM wine WHERE Appelation NOT IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma')", "question": "Find the average price of wines that are not produced from Sonoma county.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT avg(price) FROM wine WHERE Appelation NOT IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma')", "question": "What is the average price for wines not produced in Sonoma county?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T2.Score > 90 GROUP BY T1.County ORDER BY count(*) DESC LIMIT 1", "question": "Find the county where produces the most number of wines with score higher than 90.", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T2.Score > 90 GROUP BY T1.County ORDER BY count(*) DESC LIMIT 1", "question": "What is the county that produces the most wines scoring higher than 90?", "schema": "grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)\nappellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)\nwine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT)" }, { "query": "SELECT count(*) FROM station", "question": "How many train stations are there?", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT name , LOCATION , number_of_platforms FROM station", "question": "Show the name, location, and number of platforms for all stations.", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT DISTINCT LOCATION FROM station", "question": "What are all locations of train stations?", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT name , total_passengers FROM station WHERE LOCATION != 'London'", "question": "Show the names and total passengers for all train stations not in London.", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT name , main_services FROM station ORDER BY total_passengers DESC LIMIT 3", "question": "Show the names and main services for train stations that have the top three total number of passengers.", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT avg(total_passengers) , max(total_passengers) FROM station WHERE LOCATION = 'London' OR LOCATION = 'Glasgow'", "question": "What is the average and maximum number of total passengers for train stations in London or Glasgow?", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT LOCATION , sum(number_of_platforms) , sum(total_passengers) FROM station GROUP BY LOCATION", "question": "Show all locations and the total number of platforms and passengers for all train stations in each location.", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT DISTINCT LOCATION FROM station WHERE number_of_platforms >= 15 AND total_passengers > 25", "question": "Show all locations that have train stations with at least 15 platforms and train stations with more than 25 total passengers.", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT LOCATION FROM station EXCEPT SELECT LOCATION FROM station WHERE number_of_platforms >= 15", "question": "Show all locations which don't have a train station with at least 15 platforms.", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT LOCATION FROM station GROUP BY LOCATION ORDER BY count(*) DESC LIMIT 1", "question": "Show the location with most number of train stations.", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT name , TIME , service FROM train", "question": "Show the name, time, and service for all trains.", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT count(*) FROM train", "question": "Show the number of trains", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT name , service FROM train ORDER BY TIME", "question": "Show the name and service for all trains in order by time.", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT T2.name , count(*) FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id", "question": "Show the station name and number of trains in each station.", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT T2.name , T3.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id", "question": "show the train name and station name for each train.", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT T3.name , T3.time FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T2.location = 'London' ORDER BY T3.time DESC", "question": "Show all train names and times in stations in London in descending order by train time.", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id ORDER BY count(*) DESC LIMIT 1", "question": "Show the station name with greatest number of trains.", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id HAVING count(*) >= 2", "question": "Show the station name with at least two trains.", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT LOCATION FROM station GROUP BY LOCATION HAVING count(*) = 1", "question": "Show all locations with only 1 station.", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT name FROM station WHERE station_id NOT IN (SELECT station_id FROM train_station)", "question": "Show station names without any trains.", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T3.Name = \"Ananthapuri Express\" INTERSECT SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T3.Name = \"Guruvayur Express\"", "question": "What are the names of the stations which serve both \"Ananthapuri Express\" and \"Guruvayur Express\" trains?", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT T2.name FROM train_station AS T1 JOIN train AS T2 ON T1.train_id = T2.train_id WHERE T1.station_id NOT IN (SELECT T4.station_id FROM train_station AS T3 JOIN station AS T4 ON T3.station_id = T4.station_id WHERE t4.location = \"London\")", "question": "Find the names of the trains that do not pass any station located in London.", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT name , LOCATION FROM station ORDER BY Annual_entry_exit , Annual_interchanges", "question": "List the names and locations of all stations ordered by their yearly entry exit and interchange amounts.", "schema": "station: Station_ID (INT), Name (TEXT), Annual_entry_exit (REAL), Annual_interchanges (REAL), Total_Passengers (REAL), Location (TEXT), Main_Services (TEXT), Number_of_Platforms (INT)\ntrain: Train_ID (INT), Name (TEXT), Time (TEXT), Service (TEXT)\ntrain_station: Train_ID (INT), Station_ID (INT)" }, { "query": "SELECT vehicle_id FROM Vehicles;", "question": "List all vehicle id", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT vehicle_id FROM Vehicles;", "question": "What are the ids of all vehicles?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Vehicles;", "question": "How many vehicle in total?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Vehicles;", "question": "How many vehicles exist?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1;", "question": "Show the detail of vehicle with id 1.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1;", "question": "What are the details of the car with id 1?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT first_name , middle_name , last_name FROM Staff;", "question": "List the first name middle name and last name of all staff.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT first_name , middle_name , last_name FROM Staff;", "question": "What are the first, middle, and last names of all staff?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT date_of_birth FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";", "question": "What is the birthday of the staff member with first name as Janessa and last name as Sawayn?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT date_of_birth FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";", "question": "What is the date of birth for the staff member named Janessa Sawayn?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT date_joined_staff FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";", "question": "When did the staff member with first name as Janessa and last name as Sawayn join the company?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT date_joined_staff FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";", "question": "When did the staff member named Janessa Sawayn join the company?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT date_left_staff FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";", "question": "When did the staff member with first name as Janessa and last name as Sawayn leave the company?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT date_left_staff FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";", "question": "When did the staff member Janessa Sawayn leave the company?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Staff WHERE first_name = \"Ludie\";", "question": "How many staff have the first name Ludie?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Staff WHERE first_name = \"Ludie\";", "question": "How many employees have a first name of Ludie?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT nickname FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";", "question": "What is the nickname of staff with first name as Janessa and last name as Sawayn?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT nickname FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";", "question": "What is the nickname of the employee named Janessa Sawayn?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Staff;", "question": "How many staff in total?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Staff;", "question": "How many employees are there?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T1.city FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";", "question": "Which city does staff with first name as Janessa and last name as Sawayn live?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T1.city FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";", "question": "In what city does Janessa Sawayn live?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T1.country , T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";", "question": "Which country and state does staff with first name as Janessa and last name as Sawayn lived?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T1.country , T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";", "question": "In which country and state does Janessa Sawayn live?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT sum(T1.lesson_time) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Rylan\" AND T2.last_name = \"Goodwin\";", "question": "How long is the total lesson time took by customer with first name as Rylan and last name as Goodwin?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT sum(T1.lesson_time) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Rylan\" AND T2.last_name = \"Goodwin\";", "question": "How long is the total lesson time took by the customer named Rylan Goodwin?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";", "question": "What is the zip code of staff with first name as Janessa and last name as Sawayn lived?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";", "question": "What is the zip code of the hosue of the employee named Janessa Sawayn?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Addresses WHERE state_province_county = \"Georgia\";", "question": "How many staff live in state Georgia?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Addresses WHERE state_province_county = \"Georgia\";", "question": "How many employees live in Georgia?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T2.first_name , T2.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T1.city = \"Damianfort\";", "question": "Find out the first name and last name of staff lived in city Damianfort.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T2.first_name , T2.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T1.city = \"Damianfort\";", "question": "What is the first and last name of all employees who live in the city Damianfort?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T1.city , count(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY count(*) DESC LIMIT 1;", "question": "Which city lives most of staffs? List the city name and number of staffs.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T1.city , count(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY count(*) DESC LIMIT 1;", "question": "In which city do the most employees live and how many of them live there?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.state_province_county HAVING count(*) BETWEEN 2 AND 4;", "question": "List the states which have between 2 to 4 staffs living there.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.state_province_county HAVING count(*) BETWEEN 2 AND 4;", "question": "What are the names of the states that have 2 to 4 employees living there?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT first_name , last_name FROM Customers;", "question": "List the first name and last name of all customers.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT first_name , last_name FROM Customers;", "question": "What are the first and last names for all customers?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT email_address , date_of_birth FROM Customers WHERE first_name = \"Carole\"", "question": "List email address and birthday of customer whose first name as Carole.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT email_address , date_of_birth FROM Customers WHERE first_name = \"Carole\"", "question": "What are the email addresses and date of births for all customers who have a first name of Carole?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT phone_number , email_address FROM Customers WHERE amount_outstanding > 2000;", "question": "List phone number and email address of customer with more than 2000 outstanding balance.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT phone_number , email_address FROM Customers WHERE amount_outstanding > 2000;", "question": "What are the phone numbers and email addresses of all customers who have an outstanding balance of more than 2000?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT customer_status_code , cell_mobile_phone_number , email_address FROM Customers WHERE first_name = \"Marina\" OR last_name = \"Kohler\"", "question": "What is the status code, mobile phone number and email address of customer with last name as Kohler or first name as Marina?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT customer_status_code , cell_mobile_phone_number , email_address FROM Customers WHERE first_name = \"Marina\" OR last_name = \"Kohler\"", "question": "What is the status code, phone number, and email address of the customer whose last name is Kohler or whose first name is Marina?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer'", "question": "When are the birthdays of customer who are classified as 'Good Customer' status?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer'", "question": "What is the date of birth of every customer whose status code is 'Good Customer'?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT date_became_customer FROM Customers WHERE first_name = \"Carole\" AND last_name = \"Bernhard\";", "question": "When did customer with first name as Carole and last name as Bernhard became a customer?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT date_became_customer FROM Customers WHERE first_name = \"Carole\" AND last_name = \"Bernhard\";", "question": "When did Carole Bernhard first become a customer?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Customers;", "question": "How many customers in total?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Customers;", "question": "How many customers are there?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT customer_status_code , count(*) FROM Customers GROUP BY customer_status_code;", "question": "List all customer status codes and the number of customers having each status code.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT customer_status_code , count(*) FROM Customers GROUP BY customer_status_code;", "question": "For each customer status code, how many customers are classified that way?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY count(*) ASC LIMIT 1;", "question": "Which customer status code has least number of customers?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY count(*) ASC LIMIT 1;", "question": "What is the status code with the least number of customers?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Rylan\" AND T2.last_name = \"Goodwin\" AND T1.lesson_status_code = \"Completed\";", "question": "How many lessons taken by customer with first name as Rylan and last name as Goodwin were completed?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Rylan\" AND T2.last_name = \"Goodwin\" AND T1.lesson_status_code = \"Completed\";", "question": "How many lessons did the customer Ryan Goodwin complete?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT max(amount_outstanding) , min(amount_outstanding) , avg(amount_outstanding) FROM Customers;", "question": "What is maximum, minimum and average amount of outstanding of customer?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT max(amount_outstanding) , min(amount_outstanding) , avg(amount_outstanding) FROM Customers;", "question": "What is the maximum, minimum, and average amount of money outsanding for all customers?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT first_name , last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000;", "question": "List the first name and last name of customers have the amount of outstanding between 1000 and 3000.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT first_name , last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000;", "question": "What are the first and last names of all customers with between 1000 and 3000 dollars outstanding?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T1.first_name , T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = \"Lockmanfurt\";", "question": "List first name and last name of customers lived in city Lockmanfurt.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T1.first_name , T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = \"Lockmanfurt\";", "question": "What are the first and last names of all customers who lived in Lockmanfurt?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = \"Carole\" AND T1.last_name = \"Bernhard\"", "question": "Which country does customer with first name as Carole and last name as Bernhard lived in?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = \"Carole\" AND T1.last_name = \"Bernhard\"", "question": "What is the country in which the customer Carole Bernhard lived?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = \"Carole\" AND T1.last_name = \"Bernhard\"", "question": "What is zip code of customer with first name as Carole and last name as Bernhard?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = \"Carole\" AND T1.last_name = \"Bernhard\"", "question": "What is the zip code of the customer Carole Bernhard?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY count(*) DESC LIMIT 1;", "question": "Which city does has most number of customers?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY count(*) DESC LIMIT 1;", "question": "What is the city with the most customers?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Carole\" AND T2.last_name = \"Bernhard\"", "question": "How much in total does customer with first name as Carole and last name as Bernhard paid?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Carole\" AND T2.last_name = \"Bernhard\"", "question": "What is the total amount of moeny paid by the customer Carole Bernhard?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payments );", "question": "List the number of customers that did not have any payment history.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payments );", "question": "How many customers have no payment histories?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T2.first_name , T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) > 2;", "question": "List first name and last name of customers that have more than 2 payments.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T2.first_name , T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) > 2;", "question": "What are the first and last names of all customers with more than 2 payments?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT payment_method_code , count(*) FROM Customer_Payments GROUP BY payment_method_code;", "question": "List all payment methods and number of payments using each payment methods.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT payment_method_code , count(*) FROM Customer_Payments GROUP BY payment_method_code;", "question": "For each payment method, how many payments were made?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Lessons WHERE lesson_status_code = \"Cancelled\";", "question": "How many lessons were in cancelled state?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Lessons WHERE lesson_status_code = \"Cancelled\";", "question": "How many lessons have been cancelled?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\" AND nickname LIKE \"%s%\";", "question": "List lesson id of all lessons taught by staff with first name as Janessa, last name as Sawayn and nickname containing letter 's'.", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\" AND nickname LIKE \"%s%\";", "question": "What are the the lesson ids of all staff taught by Janessa Sawayn whose nickname has the letter s?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE \"%a%\"", "question": "How many lessons taught by staff whose first name has letter 'a' in it?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE \"%a%\"", "question": "How many lessons were taught by a staff member whose first name has the letter 'a' in it?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT sum(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";", "question": "How long is the total lesson time taught by staff with first name as Janessa and last name as Sawayn?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT sum(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";", "question": "What is the total time for all lessons taught by Janessa Sawayn?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT avg(price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";", "question": "What is average lesson price taught by staff with first name as Janessa and last name as Sawayn?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT avg(price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";", "question": "What is the average price for a lesson taught by Janessa Sawayn?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Ray\"", "question": "How many lesson does customer with first name Ray took?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Ray\"", "question": "How many lessons did the customer with the first name Ray take?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff", "question": "Which last names are both used by customers and by staff?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff", "question": "What are the last names that are used by customers and staff?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id", "question": "What is the first name of the staff who did not give any lesson?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id", "question": "What is the first name of all employees who do not give any lessons?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT T1.vehicle_id , T1.vehicle_details FROM Vehicles AS T1 JOIN Lessons AS T2 ON T1.vehicle_id = T2.vehicle_id GROUP BY T1.vehicle_id ORDER BY count(*) DESC LIMIT 1", "question": "What is the id and detail of the vehicle used in lessons for most of the times?", "schema": "Addresses: address_id (INTEGER), line_1_number_building (VARCHAR(80)), city (VARCHAR(50)), zip_postcode (VARCHAR(20)), state_province_county (VARCHAR(50)), country (VARCHAR(50))\nStaff: staff_id (INTEGER), staff_address_id (INTEGER), nickname (VARCHAR(80)), first_name (VARCHAR(80)), middle_name (VARCHAR(80)), last_name (VARCHAR(80)), date_of_birth (DATETIME), date_joined_staff (DATETIME), date_left_staff (DATETIME)\nVehicles: vehicle_id (INTEGER), vehicle_details (VARCHAR(255))\nCustomers: customer_id (INTEGER), customer_address_id (INTEGER), customer_status_code (VARCHAR(15)), date_became_customer (DATETIME), date_of_birth (DATETIME), first_name (VARCHAR(80)), last_name (VARCHAR(80)), amount_outstanding (DOUBLE), email_address (VARCHAR(250)), phone_number (VARCHAR(255)), cell_mobile_phone_number (VARCHAR(255))\nCustomer_Payments: customer_id (INTEGER), datetime_payment (DATETIME), payment_method_code (VARCHAR(10)), amount_payment (DOUBLE)\nLessons: lesson_id (INTEGER), customer_id (INTEGER), lesson_status_code (VARCHAR(15)), staff_id (INTEGER), vehicle_id (INTEGER), lesson_date (DATETIME), lesson_time (VARCHAR(10)), price (DOUBLE)" }, { "query": "SELECT count(*) FROM Faculty", "question": "How many faculty do we have?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT count(*) FROM Faculty", "question": "What is the total number of faculty members?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT DISTINCT rank FROM Faculty", "question": "What ranks do we have for faculty?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT DISTINCT rank FROM Faculty", "question": "Find the list of distinct ranks for faculty.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT DISTINCT building FROM Faculty", "question": "Show all the distinct buildings that have faculty rooms.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT DISTINCT building FROM Faculty", "question": "What buildings have faculty offices?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT rank , Fname , Lname FROM Faculty", "question": "Show the rank, first name, and last name for all the faculty.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT rank , Fname , Lname FROM Faculty", "question": "What are the rank, first name, and last name of the faculty members?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT Fname , Lname , phone FROM Faculty WHERE Sex = 'F'", "question": "Show the first name, last name, and phone number for all female faculty members.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT Fname , Lname , phone FROM Faculty WHERE Sex = 'F'", "question": "What are the first name, last name, and phone number of all the female faculty members?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT FacID FROM Faculty WHERE Sex = 'M'", "question": "Show ids for all the male faculty.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT FacID FROM Faculty WHERE Sex = 'M'", "question": "What are the faculty ids of all the male faculty members?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT count(*) FROM Faculty WHERE Sex = 'F' AND Rank = \"Professor\"", "question": "How many female Professors do we have?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT count(*) FROM Faculty WHERE Sex = 'F' AND Rank = \"Professor\"", "question": "Count the number of female Professors we have.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT phone , room , building FROM Faculty WHERE Fname = \"Jerry\" AND Lname = \"Prince\"", "question": "Show the phone, room, and building for the faculty named Jerry Prince.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT phone , room , building FROM Faculty WHERE Fname = \"Jerry\" AND Lname = \"Prince\"", "question": "What are the phone, room, and building of the faculty member called Jerry Prince?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT count(*) FROM Faculty WHERE Rank = \"Professor\" AND building = \"NEB\"", "question": "How many Professors are in building NEB?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT count(*) FROM Faculty WHERE Rank = \"Professor\" AND building = \"NEB\"", "question": "Count the number of Professors who have office in building NEB.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT fname , lname FROM Faculty WHERE Rank = \"Instructor\"", "question": "Show the first name and last name for all the instructors.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT fname , lname FROM Faculty WHERE Rank = \"Instructor\"", "question": "What are the first name and last name of all the instructors?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT building , count(*) FROM Faculty GROUP BY building", "question": "Show all the buildings along with the number of faculty members the buildings have.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT building , count(*) FROM Faculty GROUP BY building", "question": "How many faculty members does each building have? List the result with the name of the building.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT building FROM Faculty GROUP BY building ORDER BY count(*) DESC LIMIT 1", "question": "Which building has most faculty members?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT building FROM Faculty GROUP BY building ORDER BY count(*) DESC LIMIT 1", "question": "Find the building that has the largest number of faculty members.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT building FROM Faculty WHERE rank = \"Professor\" GROUP BY building HAVING count(*) >= 10", "question": "Show all the buildings that have at least 10 professors.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT building FROM Faculty WHERE rank = \"Professor\" GROUP BY building HAVING count(*) >= 10", "question": "In which buildings are there at least ten professors?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT rank , count(*) FROM Faculty GROUP BY rank", "question": "For each faculty rank, show the number of faculty members who have it.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT rank , count(*) FROM Faculty GROUP BY rank", "question": "How many faculty members do we have for each faculty rank?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT rank , sex , count(*) FROM Faculty GROUP BY rank , sex", "question": "Show all the ranks and the number of male and female faculty for each rank.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT rank , sex , count(*) FROM Faculty GROUP BY rank , sex", "question": "How many faculty members do we have for each rank and gender?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT rank FROM Faculty GROUP BY rank ORDER BY count(*) ASC LIMIT 1", "question": "Which rank has the smallest number of faculty members?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT rank FROM Faculty GROUP BY rank ORDER BY count(*) ASC LIMIT 1", "question": "Find the faculty rank that has the least members.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT sex , count(*) FROM Faculty WHERE rank = \"AsstProf\" GROUP BY sex", "question": "Show the number of male and female assistant professors.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT sex , count(*) FROM Faculty WHERE rank = \"AsstProf\" GROUP BY sex", "question": "How many male and female assistant professors do we have?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T2.fname = \"Linda\" AND T2.lname = \"Smith\"", "question": "What are the first name and last name of Linda Smith's advisor?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T2.fname = \"Linda\" AND T2.lname = \"Smith\"", "question": "Who is the advisor of Linda Smith? Give me the first name and last name.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = \"Professor\"", "question": "Show the ids of students whose advisors are professors.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = \"Professor\"", "question": "Which students have professors as their advisors? Find their student ids.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T2.fname , T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.fname = \"Michael\" AND T1.lname = \"Goodrich\"", "question": "Show first name and last name for all the students advised by Michael Goodrich.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T2.fname , T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.fname = \"Michael\" AND T1.lname = \"Goodrich\"", "question": "Which students are advised by Michael Goodrich? Give me their first and last names.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.FacID , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID", "question": "Show the faculty id of each faculty member, along with the number of students he or she advises.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.FacID , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID", "question": "What are the faculty id and the number of students each faculty has?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.rank , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank", "question": "Show all the faculty ranks and the number of students advised by each rank.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.rank , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank", "question": "How many students are advised by each rank of faculty? List the rank and the number of students.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1", "question": "What are the first and last name of the faculty who has the most students?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1", "question": "Give me the the first and last name of the faculty who advises the most students.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING count(*) >= 2", "question": "Show the ids for all the faculty members who have at least 2 students.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING count(*) >= 2", "question": "Which faculty members advise two ore more students? Give me their faculty ids.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student", "question": "Show ids for the faculty members who don't advise any student.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student", "question": "What are the ids of the faculty members who do not advise any student.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT activity_name FROM Activity", "question": "What activities do we have?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT activity_name FROM Activity", "question": "List all the activities we have.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT count(*) FROM Activity", "question": "How many activities do we have?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT count(*) FROM Activity", "question": "Find the number of activities available.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT count(DISTINCT FacID) FROM Faculty_participates_in", "question": "How many faculty members participate in an activity?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT count(DISTINCT FacID) FROM Faculty_participates_in", "question": "Give me the number of faculty members who participate in an activity", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in", "question": "Show the ids of the faculty who don't participate in any activity.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in", "question": "Which faculty do not participate in any activity? Find their faculty ids.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student", "question": "Show the ids of all the faculty members who participate in an activity and advise a student.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student", "question": "What are ids of the faculty members who not only participate in an activity but also advise a student.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID WHERE T1.fname = \"Mark\" AND T1.lname = \"Giuliano\"", "question": "How many activities does Mark Giuliano participate in?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID WHERE T1.fname = \"Mark\" AND T1.lname = \"Giuliano\"", "question": "Find the number of activities Mark Giuliano is involved in.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN Activity AS T3 ON T3.actid = T2.actid WHERE T1.fname = \"Mark\" AND T1.lname = \"Giuliano\"", "question": "Show the names of all the activities Mark Giuliano participates in.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN Activity AS T3 ON T3.actid = T2.actid WHERE T1.fname = \"Mark\" AND T1.lname = \"Giuliano\"", "question": "What are the names of the activities Mark Giuliano is involved in", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.fname , T1.lname , count(*) , T1.FacID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID", "question": "Show the first and last name of all the faculty members who participated in some activity, together with the number of activities they participated in.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.fname , T1.lname , count(*) , T1.FacID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID", "question": "What is the first and last name of the faculty members who participated in at least one activity? For each of them, also show the number of activities they participated in.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.activity_name , count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID", "question": "Show all the activity names and the number of faculty involved in each activity.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.activity_name , count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID", "question": "How many faculty members participate in each activity? Return the activity names and the number of faculty members.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1", "question": "What is the first and last name of the faculty participating in the most activities?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1", "question": "Find the first and last name of the faculty who is involved in the largest number of activities.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1", "question": "What is the name of the activity that has the most faculty members involved in?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1", "question": "Which activity has the most faculty members participating in? Find the activity name.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in", "question": "Show the ids of the students who don't participate in any activity.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in", "question": "What are the ids of the students who are not involved in any activity", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20", "question": "Show the ids for all the students who participate in an activity and are under 20.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20", "question": "What are the ids of the students who are under 20 years old and are involved in at least one activity.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.fname , T1.lname FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1", "question": "What is the first and last name of the student participating in the most activities?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.fname , T1.lname FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1", "question": "Tell me the first and last name of the student who has the most activities.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1", "question": "What is the name of the activity with the most students?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1", "question": "Find the name of the activity that has the largest number of student participants.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'", "question": "Find the first names of the faculty members who are playing Canoeing or Kayaking.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'", "question": "Which faculty members are playing either Canoeing or Kayaking? Tell me their first names.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT lname FROM faculty WHERE rank = 'Professor' EXCEPT SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'", "question": "Find the first names of professors who are not playing Canoeing or Kayaking.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT lname FROM faculty WHERE rank = 'Professor' EXCEPT SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'", "question": "What are the first names of the professors who do not play Canoeing or Kayaking as activities?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Kayaking'", "question": "Find the first names of the faculty members who participate in Canoeing and Kayaking.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Kayaking'", "question": "What are the first names of the faculty members playing both Canoeing and Kayaking?", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Canoeing' INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Kayaking'", "question": "Find the ids of the students who participate in Canoeing and Kayaking.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Canoeing' INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Kayaking'", "question": "Which students participate in both Canoeing and Kayaking as their activities? Tell me their student ids.", "schema": "Activity: actid (INTEGER), activity_name (VARCHAR(25))\nParticipates_in: stuid (INTEGER), actid (INTEGER)\nFaculty_Participates_in: FacID (INTEGER), actid (INTEGER)\nStudent: StuID (INTEGER), LName (VARCHAR(12)), Fname (VARCHAR(12)), Age (INTEGER), Sex (VARCHAR(1)), Major (INTEGER), Advisor (INTEGER), city_code (VARCHAR(3))\nFaculty: FacID (INTEGER), Lname (VARCHAR(15)), Fname (VARCHAR(15)), Rank (VARCHAR(15)), Sex (VARCHAR(1)), Phone (INTEGER), Room (VARCHAR(5)), Building (VARCHAR(13))" }, { "query": "SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1", "question": "What is the id of the most recent order?", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1", "question": "Find the id of the order made most recently.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT order_id , customer_id FROM orders ORDER BY date_order_placed LIMIT 1", "question": "what are the order id and customer id of the oldest order?", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT order_id , customer_id FROM orders ORDER BY date_order_placed LIMIT 1", "question": "Find the order id and customer id associated with the oldest order.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT order_id FROM shipments WHERE shipment_tracking_number = \"3452\"", "question": "Find the id of the order whose shipment tracking number is \"3452\".", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT order_id FROM shipments WHERE shipment_tracking_number = \"3452\"", "question": "Which order's shipment tracking number is \"3452\"? Give me the id of the order.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT order_item_id FROM order_items WHERE product_id = 11", "question": "Find the ids of all the order items whose product id is 11.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT order_item_id FROM order_items WHERE product_id = 11", "question": "Find all the order items whose product id is 11. What are the order item ids?", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Packing\"", "question": "List the name of all the distinct customers who have orders with status \"Packing\".", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Packing\"", "question": "Which customers have orders with status \"Packing\"? Give me the customer names.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT DISTINCT T1.customer_details FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\"", "question": "Find the details of all the distinct customers who have orders with status \"On Road\".", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT DISTINCT T1.customer_details FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\"", "question": "What are the distinct customers who have orders with status \"On Road\"? Give me the customer details?", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "question": "What is the name of the customer who has the most orders?", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "question": "Which customer made the most orders? Find the customer name.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "question": "What is the customer id of the customer who has the most orders?", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "question": "Find the id of the customer who made the most orders.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T2.order_id , T2.order_status FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = \"Jeramie\"", "question": "Give me a list of id and status of orders which belong to the customer named \"Jeramie\".", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T2.order_id , T2.order_status FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = \"Jeramie\"", "question": "Which orders are made by the customer named \"Jeramie\"? Give me the order ids and status.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T2.date_order_placed FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = \"Jeramie\"", "question": "Find the dates of orders which belong to the customer named \"Jeramie\".", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T2.date_order_placed FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = \"Jeramie\"", "question": "What are the dates of the orders made by the customer named \"Jeramie\"?", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.date_order_placed >= \"2009-01-01\" AND T2.date_order_placed <= \"2010-01-01\"", "question": "Give me the names of customers who have placed orders between 2009-01-01 and 2010-01-01.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.date_order_placed >= \"2009-01-01\" AND T2.date_order_placed <= \"2010-01-01\"", "question": "Which customers made orders between 2009-01-01 and 2010-01-01? Find their names.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT DISTINCT T2.product_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id WHERE T1.date_order_placed >= \"1975-01-01\" AND T1.date_order_placed <= \"1976-01-01\"", "question": "Give me a list of distinct product ids from orders placed between 1975-01-01 and 1976-01-01?", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT DISTINCT T2.product_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id WHERE T1.date_order_placed >= \"1975-01-01\" AND T1.date_order_placed <= \"1976-01-01\"", "question": "What are the distinct ids of products ordered between 1975-01-01 and 1976-01-01??", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\" INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Shipped\"", "question": "Find the names of the customers who have order status both \"On Road\" and \"Shipped\".", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\" INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Shipped\"", "question": "Which customers have both \"On Road\" and \"Shipped\" as order status? List the customer names.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\" INTERSECT SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Shipped\"", "question": "Find the id of the customers who have order status both \"On Road\" and \"Shipped\".", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\" INTERSECT SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Shipped\"", "question": "Which customers have both \"On Road\" and \"Shipped\" as order status? List the customer ids.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.shipment_tracking_number = 3452", "question": "When was the order placed whose shipment tracking number is 3452? Give me the date.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.shipment_tracking_number = 3452", "question": "On which day was the order placed whose shipment tracking number is 3452?", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.invoice_number = 10", "question": "What is the placement date of the order whose invoice number is 10?", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.invoice_number = 10", "question": "On what day was the order with invoice number 10 placed?", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT count(*) , T3.product_id FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id", "question": "List the count and id of each product in all the orders.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT count(*) , T3.product_id FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id", "question": "For each product, return its id and the number of times it was ordered.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T3.product_name , count(*) FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id", "question": "List the name and count of each product in all orders.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T3.product_name , count(*) FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id", "question": "For each product, show its name and the number of times it was ordered.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT order_id FROM shipments WHERE shipment_date > \"2000-01-01\"", "question": "Find the ids of orders which are shipped after 2000-01-01.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT order_id FROM shipments WHERE shipment_date > \"2000-01-01\"", "question": "Which orders have shipment after 2000-01-01? Give me the order ids.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT order_id FROM shipments WHERE shipment_date = (SELECT max(shipment_date) FROM shipments)", "question": "Find the id of the order which is shipped most recently.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT order_id FROM shipments WHERE shipment_date = (SELECT max(shipment_date) FROM shipments)", "question": "Which order has the most recent shipment? Give me the order id.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT DISTINCT product_name FROM products ORDER BY product_name", "question": "List the names of all distinct products in alphabetical order.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT DISTINCT product_name FROM products ORDER BY product_name", "question": "Sort all the distinct products in alphabetical order.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed", "question": "List the ids of all distinct orders ordered by placed date.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed", "question": "What are ids of the all distinct orders, sorted by placement date?", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.order_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id ORDER BY count(*) DESC LIMIT 1", "question": "What is the id of the order which has the most items?", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.order_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id ORDER BY count(*) DESC LIMIT 1", "question": "Which order deals with the most items? Return the order id.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "question": "What is the name of the customer who has the largest number of orders?", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "question": "Find the name of the customer who made the most orders.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT invoice_number FROM invoices WHERE invoice_date < \"1989-09-03\" OR invoice_date > \"2007-12-25\"", "question": "Find the invoice numbers which are created before 1989-09-03 or after 2007-12-25.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT invoice_number FROM invoices WHERE invoice_date < \"1989-09-03\" OR invoice_date > \"2007-12-25\"", "question": "What are the invoice numbers created before 1989-09-03 or after 2007-12-25?", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < \"1989-09-03\" OR invoice_date > \"2007-12-25\"", "question": "Find the distinct details of invoices which are created before 1989-09-03 or after 2007-12-25.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < \"1989-09-03\" OR invoice_date > \"2007-12-25\"", "question": "What are the distinct details of invoices created before 1989-09-03 or after 2007-12-25?", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T2.customer_name , count(*) FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING count(*) >= 2", "question": "For each customer who has at least two orders, find the customer name and number of orders made.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T2.customer_name , count(*) FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING count(*) >= 2", "question": "Which customers have made at least two orders? Give me each customer name and number of orders made.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T2.customer_name FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING count(*) <= 2", "question": "Find the name of the customers who have at most two orders.", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T2.customer_name FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING count(*) <= 2", "question": "What are the names of the customers who have made two or less orders?", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T4.product_name = \"food\" GROUP BY T1.customer_id HAVING count(*) >= 1", "question": "List the names of the customers who have once bought product \"food\".", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T4.product_name = \"food\" GROUP BY T1.customer_id HAVING count(*) >= 1", "question": "What are the names of the customers who bought product \"food\" at least once?", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T3.order_item_status = \"Cancel\" AND T4.product_name = \"food\" GROUP BY T1.customer_id HAVING count(*) >= 1", "question": "List the names of customers who have once canceled the purchase of the product \"food\" (the item status is \"Cancel\").", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T3.order_item_status = \"Cancel\" AND T4.product_name = \"food\" GROUP BY T1.customer_id HAVING count(*) >= 1", "question": "Which customers have ever canceled the purchase of the product \"food\" (the item status is \"Cancel\")?", "schema": "Customers: customer_id (INTEGER), customer_name (VARCHAR(80)), customer_details (VARCHAR(255))\nInvoices: invoice_number (INTEGER), invoice_date (DATETIME), invoice_details (VARCHAR(255))\nOrders: order_id (INTEGER), customer_id (INTEGER), order_status (VARCHAR(10)), date_order_placed (DATETIME), order_details (VARCHAR(255))\nProducts: product_id (INTEGER), product_name (VARCHAR(80)), product_details (VARCHAR(255))\nOrder_Items: order_item_id (INTEGER), product_id (INTEGER), order_id (INTEGER), order_item_status (VARCHAR(10)), order_item_details (VARCHAR(255))\nShipments: shipment_id (INTEGER), order_id (INTEGER), invoice_number (INTEGER), shipment_tracking_number (VARCHAR(80)), shipment_date (DATETIME), other_shipment_details (VARCHAR(255))\nShipment_Items: shipment_id (INTEGER), order_item_id (INTEGER)" }, { "query": "SELECT count(*) FROM architect WHERE gender = 'female'", "question": "How many architects are female?", "schema": "architect: id (TEXT), name (TEXT), nationality (TEXT), gender (TEXT)\nbridge: architect_id (INT), id (INT), name (TEXT), location (TEXT), length_meters (REAL), length_feet (REAL)\nmill: architect_id (INT), id (INT), location (TEXT), name (TEXT), type (TEXT), built_year (INT), notes (TEXT)" }, { "query": "SELECT name , nationality , id FROM architect WHERE gender = 'male' ORDER BY name", "question": "List the name, nationality and id of all male architects ordered by their names lexicographically.", "schema": "architect: id (TEXT), name (TEXT), nationality (TEXT), gender (TEXT)\nbridge: architect_id (INT), id (INT), name (TEXT), location (TEXT), length_meters (REAL), length_feet (REAL)\nmill: architect_id (INT), id (INT), location (TEXT), name (TEXT), type (TEXT), built_year (INT), notes (TEXT)" }, { "query": "SELECT max(T1.length_meters) , T2.name FROM bridge AS T1 JOIN architect AS T2 ON T1.architect_id = T2.id", "question": "What is the maximum length in meters for the bridges and what are the architects' names?", "schema": "architect: id (TEXT), name (TEXT), nationality (TEXT), gender (TEXT)\nbridge: architect_id (INT), id (INT), name (TEXT), location (TEXT), length_meters (REAL), length_feet (REAL)\nmill: architect_id (INT), id (INT), location (TEXT), name (TEXT), type (TEXT), built_year (INT), notes (TEXT)" }, { "query": "SELECT avg(length_feet) FROM bridge", "question": "What is the average length in feet of the bridges?", "schema": "architect: id (TEXT), name (TEXT), nationality (TEXT), gender (TEXT)\nbridge: architect_id (INT), id (INT), name (TEXT), location (TEXT), length_meters (REAL), length_feet (REAL)\nmill: architect_id (INT), id (INT), location (TEXT), name (TEXT), type (TEXT), built_year (INT), notes (TEXT)" }, { "query": "SELECT name , built_year FROM mill WHERE TYPE = 'Grondzeiler'", "question": "What are the names and year of construction for the mills of 'Grondzeiler' type?", "schema": "architect: id (TEXT), name (TEXT), nationality (TEXT), gender (TEXT)\nbridge: architect_id (INT), id (INT), name (TEXT), location (TEXT), length_meters (REAL), length_feet (REAL)\nmill: architect_id (INT), id (INT), location (TEXT), name (TEXT), type (TEXT), built_year (INT), notes (TEXT)" }, { "query": "SELECT DISTINCT T1.name , T1.nationality FROM architect AS T1 JOIN mill AS t2 ON T1.id = T2.architect_id", "question": "What are the distinct names and nationalities of the architects who have ever built a mill?", "schema": "architect: id (TEXT), name (TEXT), nationality (TEXT), gender (TEXT)\nbridge: architect_id (INT), id (INT), name (TEXT), location (TEXT), length_meters (REAL), length_feet (REAL)\nmill: architect_id (INT), id (INT), location (TEXT), name (TEXT), type (TEXT), built_year (INT), notes (TEXT)" }, { "query": "SELECT name FROM mill WHERE LOCATION != 'Donceel'", "question": "What are the names of the mills which are not located in 'Donceel'?", "schema": "architect: id (TEXT), name (TEXT), nationality (TEXT), gender (TEXT)\nbridge: architect_id (INT), id (INT), name (TEXT), location (TEXT), length_meters (REAL), length_feet (REAL)\nmill: architect_id (INT), id (INT), location (TEXT), name (TEXT), type (TEXT), built_year (INT), notes (TEXT)" }, { "query": "SELECT DISTINCT T1.type FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id = T2.id WHERE T2.nationality = 'American' OR T2.nationality = 'Canadian'", "question": "What are the distinct types of mills that are built by American or Canadian architects?", "schema": "architect: id (TEXT), name (TEXT), nationality (TEXT), gender (TEXT)\nbridge: architect_id (INT), id (INT), name (TEXT), location (TEXT), length_meters (REAL), length_feet (REAL)\nmill: architect_id (INT), id (INT), location (TEXT), name (TEXT), type (TEXT), built_year (INT), notes (TEXT)" }, { "query": "SELECT T1.id , T1.name FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING count(*) >= 3", "question": "What are the ids and names of the architects who built at least 3 bridges ?", "schema": "architect: id (TEXT), name (TEXT), nationality (TEXT), gender (TEXT)\nbridge: architect_id (INT), id (INT), name (TEXT), location (TEXT), length_meters (REAL), length_feet (REAL)\nmill: architect_id (INT), id (INT), location (TEXT), name (TEXT), type (TEXT), built_year (INT), notes (TEXT)" }, { "query": "SELECT T1.id , T1.name , T1.nationality FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1", "question": "What is the id, name and nationality of the architect who built most mills?", "schema": "architect: id (TEXT), name (TEXT), nationality (TEXT), gender (TEXT)\nbridge: architect_id (INT), id (INT), name (TEXT), location (TEXT), length_meters (REAL), length_feet (REAL)\nmill: architect_id (INT), id (INT), location (TEXT), name (TEXT), type (TEXT), built_year (INT), notes (TEXT)" }, { "query": "SELECT T1.id , T1.name , T1.gender FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING count(*) = 2 UNION SELECT T1.id , T1.name , T1.gender FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING count(*) = 1", "question": "What are the ids, names and genders of the architects who built two bridges or one mill?", "schema": "architect: id (TEXT), name (TEXT), nationality (TEXT), gender (TEXT)\nbridge: architect_id (INT), id (INT), name (TEXT), location (TEXT), length_meters (REAL), length_feet (REAL)\nmill: architect_id (INT), id (INT), location (TEXT), name (TEXT), type (TEXT), built_year (INT), notes (TEXT)" }, { "query": "SELECT LOCATION FROM bridge WHERE name = 'Kolob Arch' OR name = 'Rainbow Bridge'", "question": "What is the location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'?", "schema": "architect: id (TEXT), name (TEXT), nationality (TEXT), gender (TEXT)\nbridge: architect_id (INT), id (INT), name (TEXT), location (TEXT), length_meters (REAL), length_feet (REAL)\nmill: architect_id (INT), id (INT), location (TEXT), name (TEXT), type (TEXT), built_year (INT), notes (TEXT)" }, { "query": "SELECT name FROM mill WHERE name LIKE '%Moulin%'", "question": "Which of the mill names contains the french word 'Moulin'?", "schema": "architect: id (TEXT), name (TEXT), nationality (TEXT), gender (TEXT)\nbridge: architect_id (INT), id (INT), name (TEXT), location (TEXT), length_meters (REAL), length_feet (REAL)\nmill: architect_id (INT), id (INT), location (TEXT), name (TEXT), type (TEXT), built_year (INT), notes (TEXT)" }, { "query": "SELECT DISTINCT T1.name FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id = T2.id JOIN bridge AS T3 ON T3.architect_id = T2.id WHERE T3.length_meters > 80", "question": "What are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters?", "schema": "architect: id (TEXT), name (TEXT), nationality (TEXT), gender (TEXT)\nbridge: architect_id (INT), id (INT), name (TEXT), location (TEXT), length_meters (REAL), length_feet (REAL)\nmill: architect_id (INT), id (INT), location (TEXT), name (TEXT), type (TEXT), built_year (INT), notes (TEXT)" }, { "query": "SELECT TYPE , count(*) FROM mill GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1", "question": "What is the most common mill type, and how many are there?", "schema": "architect: id (TEXT), name (TEXT), nationality (TEXT), gender (TEXT)\nbridge: architect_id (INT), id (INT), name (TEXT), location (TEXT), length_meters (REAL), length_feet (REAL)\nmill: architect_id (INT), id (INT), location (TEXT), name (TEXT), type (TEXT), built_year (INT), notes (TEXT)" }, { "query": "SELECT count(*) FROM architect WHERE id NOT IN ( SELECT architect_id FROM mill WHERE built_year < 1850 );", "question": "How many architects haven't built a mill before year 1850?", "schema": "architect: id (TEXT), name (TEXT), nationality (TEXT), gender (TEXT)\nbridge: architect_id (INT), id (INT), name (TEXT), location (TEXT), length_meters (REAL), length_feet (REAL)\nmill: architect_id (INT), id (INT), location (TEXT), name (TEXT), type (TEXT), built_year (INT), notes (TEXT)" }, { "query": "SELECT t1.name FROM bridge AS t1 JOIN architect AS t2 ON t1.architect_id = t2.id WHERE t2.nationality = 'American' ORDER BY t1.length_feet", "question": "show the name of all bridges that was designed by american archtect, and sort the result by the bridge feet length.", "schema": "architect: id (TEXT), name (TEXT), nationality (TEXT), gender (TEXT)\nbridge: architect_id (INT), id (INT), name (TEXT), location (TEXT), length_meters (REAL), length_feet (REAL)\nmill: architect_id (INT), id (INT), location (TEXT), name (TEXT), type (TEXT), built_year (INT), notes (TEXT)" }, { "query": "SELECT count(*) FROM book_club", "question": "How many book clubs are there?", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT count(*) FROM book_club", "question": "Count the number of book clubs.", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT book_title , author_or_editor FROM book_club WHERE YEAR > 1989", "question": "show the titles, and authors or editors for all books made after the year 1989.", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT book_title , author_or_editor FROM book_club WHERE YEAR > 1989", "question": "What are the titles and authors or editors that correspond to books made after 1989?", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT DISTINCT publisher FROM book_club", "question": "Show all distinct publishers for books.", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT DISTINCT publisher FROM book_club", "question": "What are all the different book publishers?", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT YEAR , book_title , publisher FROM book_club ORDER BY YEAR DESC", "question": "Show the years, book titles, and publishers for all books, in descending order by year.", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT YEAR , book_title , publisher FROM book_club ORDER BY YEAR DESC", "question": "What are the years, titles, and publishers for all books, ordered by year descending?", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT publisher , count(*) FROM book_club GROUP BY publisher", "question": "Show all publishers and the number of books for each publisher.", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT publisher , count(*) FROM book_club GROUP BY publisher", "question": "How many books are there for each publisher?", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT publisher FROM book_club GROUP BY publisher ORDER BY count(*) DESC LIMIT 1", "question": "What is the publisher with most number of books?", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT publisher FROM book_club GROUP BY publisher ORDER BY count(*) DESC LIMIT 1", "question": "Return the publisher that has published the most books.", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT category , count(*) FROM book_club GROUP BY category", "question": "Show all book categories and the number of books in each category.", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT category , count(*) FROM book_club GROUP BY category", "question": "How many books fall into each category?", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING count(*) >= 2", "question": "List categories that have at least two books after year 1989.", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING count(*) >= 2", "question": "What categories have two or more corresponding books that were made after 1989?", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990", "question": "Show publishers with a book published in 1989 and a book in 1990.", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990", "question": "What are the publishers who have published a book in both 1989 and 1990?", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989", "question": "Show all publishers which do not have a book in 1989.", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989", "question": "Which publishers did not publish a book in 1989?", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT title , YEAR , director FROM movie ORDER BY budget_million", "question": "Show all movie titles, years, and directors, ordered by budget.", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT title , YEAR , director FROM movie ORDER BY budget_million", "question": "What are the titles, years, and directors of all movies, ordered by budget in millions?", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT COUNT (DISTINCT director) FROM movie", "question": "How many movie directors are there?", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT COUNT (DISTINCT director) FROM movie", "question": "Count the number of different directors.", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT title , director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1", "question": "What is the title and director for the movie with highest worldwide gross in the year 2000 or before?", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT title , director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1", "question": "Return the title and director of the movie released in the year 2000 or earlier that had the highest worldwide gross.", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999", "question": "Show all director names who have a movie in both year 1999 and 2000.", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999", "question": "Which directors had a movie both in the year 1999 and 2000?", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000", "question": "Show all director names who have a movie in the year 1999 or 2000.", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000", "question": "Which directors had a movie in either 1999 or 2000?", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT avg(budget_million) , max(budget_million) , min(budget_million) FROM movie WHERE YEAR < 2000", "question": "What is the average, maximum, and minimum budget for all movies before 2000.", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT avg(budget_million) , max(budget_million) , min(budget_million) FROM movie WHERE YEAR < 2000", "question": "Return the average, maximum, and minimum budgets in millions for movies made before the year 2000.", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT T1.company_name FROM culture_company AS T1 JOIN book_club AS T2 ON T1.book_club_id = T2.book_club_id WHERE T2.publisher = 'Alyson'", "question": "List all company names with a book published by Alyson.", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT T1.company_name FROM culture_company AS T1 JOIN book_club AS T2 ON T1.book_club_id = T2.book_club_id WHERE T2.publisher = 'Alyson'", "question": "What are all the company names that have a book published by Alyson?", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT T1.title , T3.book_title FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id JOIN book_club AS T3 ON T3.book_club_id = T2.book_club_id WHERE T2.incorporated_in = 'China'", "question": "Show the movie titles and book titles for all companies in China.", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT T1.title , T3.book_title FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id JOIN book_club AS T3 ON T3.book_club_id = T2.book_club_id WHERE T2.incorporated_in = 'China'", "question": "What are the titles of movies and books corresponding to companies incorporated in China?", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999", "question": "Show all company names with a movie directed in year 1999.", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" }, { "query": "SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999", "question": "What are all company names that have a corresponding movie directed in the year 1999?", "schema": "book_club: book_club_id (INT), Year (INT), Author_or_Editor (TEXT), Book_Title (TEXT), Publisher (TEXT), Category (TEXT), Result (TEXT)\nmovie: movie_id (INT), Title (TEXT), Year (INT), Director (TEXT), Budget_million (REAL), Gross_worldwide (INT)\nculture_company: Company_name (TEXT), Type (TEXT), Incorporated_in (TEXT), Group_Equity_Shareholding (REAL), book_club_id (TEXT), movie_id (TEXT)" } ]