diff --git "a/train_randomized.jsonl" "b/train_randomized.jsonl" --- "a/train_randomized.jsonl" +++ "b/train_randomized.jsonl" @@ -1,7010 +1,7010 @@ -{"text": "Q: SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa' \nA: What are the payment dates for any payments that have an amount greater than 10 or were handled by a staff member with the first name Elsa? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T1.name, T1.date, T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id \nA: Show the name and date for each race and its track name. \n Additional table information: table: race_track"} -{"text": "Q: SELECT Name FROM manager ORDER BY Age DESC LIMIT 1 \nA: What is the name of the oldest manager? \n Additional table information: table: railway"} -{"text": "Q: SELECT T2.Name, T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID \nA: Show the names of editors and the theme of journals for which they serve on committees. \n Additional table information: table: journal_committee"} -{"text": "Q: SELECT Ref_Document_Status.document_status_description FROM Ref_Document_Status JOIN Documents ON Documents.document_status_code = Ref_Document_Status.document_status_code WHERE Documents.document_id = 1 \nA: What is the document status description of the document with id 1? \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18' \nA: What roles did staff members play between '2003-04-19 15:06:20' and '2016-03-15 00:33:18'? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT AVG(enrollment) FROM university WHERE founded < 1850 \nA: What are the average enrollment size of the universities that are founded before 1850? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT DISTINCT firstname, lastname FROM list \nA: Show each student's first name and last name. \n Additional table information: table: student_1"} -{"text": "Q: SELECT Party FROM representative GROUP BY Party HAVING COUNT(*) >= 3 \nA: What parties have at least three representatives? \n Additional table information: table: election_representative"} -{"text": "Q: SELECT StuID FROM Student WHERE major = 600 INTERSECT SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y' \nA: Show student ids who are on scholarship and have major 600. \n Additional table information: table: game_1"} -{"text": "Q: SELECT Carrier FROM device WHERE NOT Device_ID IN (SELECT Device_ID FROM stock) \nA: What are the carriers of devices that are not in stock anywhere? \n Additional table information: table: device"} -{"text": "Q: SELECT budget_type_code, COUNT(*) FROM Documents_with_expenses GROUP BY budget_type_code \nA: What are the different budget type codes, and how many documents are there for each? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT MIN(rank) FROM review \nA: Find the highest rank of all reviews. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT AVG(age) FROM Person \nA: What is the average age for all person? \n Additional table information: table: network_2"} -{"text": "Q: SELECT vehicle_flight_number, date, pilot FROM flight ORDER BY altitude ASC NULLS FIRST \nA: List the vehicle flight number, date and pilot of all the flights, ordered by altitude. \n Additional table information: table: flight_company"} -{"text": "Q: SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 2 \nA: Show id, first and last names for all customers with at least two cards. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs' \nA: Return the unit of measure for 'Herb' products. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the airport with the most number of routes that start in China? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT product_id, product_name FROM products WHERE product_price < 600 OR product_price > 900 \nA: Give the ids and names of products with price lower than 600 or higher than 900. \n Additional table information: table: department_store"} -{"text": "Q: SELECT COUNT(*), T1.blockcode FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockcode \nA: Find the number of rooms for different block code? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Accounts) \nA: How many customers do not have an account? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT name, email FROM user_profiles WHERE name LIKE '%Swift%' \nA: Find the name and email of the user whose name contains the word \u2018Swift\u2019. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT Operating_system, COUNT(*) FROM web_client_accelerator GROUP BY Operating_system \nA: Find the number of web accelerators used for each Operating system. \n Additional table information: table: browser_web"} -{"text": "Q: SELECT MAX(budget_in_billions), MIN(budget_in_billions) FROM department \nA: What are the maximum and minimum budget of the departments? \n Additional table information: table: department_management"} -{"text": "Q: SELECT party FROM driver WHERE home_city = 'Hartford' AND age > 40 \nA: Show the party with drivers from Hartford and drivers older than 40. \n Additional table information: table: school_bus"} -{"text": "Q: SELECT COUNT(DISTINCT T3.title) FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.type = 'Studio' \nA: Find the number of songs in all the studio albums. \n Additional table information: table: music_2"} -{"text": "Q: 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' \nA: What are the titles of movies and books corresponding to companies incorporated in China? \n Additional table information: table: culture_company"} -{"text": "Q: SELECT cust_name FROM customer ORDER BY credit_score NULLS FIRST LIMIT 1 \nA: Find the name of customer who has the lowest credit score. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT TIME, train_number FROM train WHERE destination = 'Chennai' ORDER BY TIME NULLS FIRST \nA: Give me the times and numbers of all trains that go to Chennai, ordered by time. \n Additional table information: table: station_weather"} -{"text": "Q: SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2004 AND T2.campus = 'San Francisco State University' \nA: How many faculty lines are there at San Francisco State University in 2004? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT location_code, date_in_location_from, date_in_locaton_to FROM Document_locations \nA: What are each document's location code, and starting date and ending data in that location? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT MAX(Age) FROM STUDENT \nA: Find the maximum age of all the students. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT DISTINCT YEAR FROM party WHERE Governor = 'Eliot Spitzer' \nA: In which distinct years was the governor 'Eliot Spitzer'? \n Additional table information: table: election"} -{"text": "Q: SELECT * FROM employees WHERE hire_date > '1987-09-07' \nA: display those employees who joined after 7th September, 1987. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC \nA: List the companies of entrepreneurs in descending order of money requested. \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT T1.director, T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars = 5 \nA: What are the names of the directors who created a movie with a 5 star rating, and what was the name of those movies? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT name FROM people WHERE NOT people_id IN (SELECT people_id FROM candidate) \nA: what are the names of people who did not participate in the candidate election. \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT T2.title, T1.stars, T2.director, MAX(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE director <> 'null' GROUP BY director \nA: For each director, return the director's name together with the title of the movie they directed that received the highest rating among all of their movies, and the value of that rating. Ignore movies whose director is NULL. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT f_id, genre_is, artist_name FROM song WHERE languages = 'english' ORDER BY rating NULLS FIRST \nA: What is the id, genre, and name of the artist for every English song ordered by ascending rating? \n Additional table information: table: music_1"} -{"text": "Q: SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' \nA: Find the names of the channels that are broadcast in the morning. \n Additional table information: table: program_share"} -{"text": "Q: SELECT customer_first_name, customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name, T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id \nA: Show the first names and last names of customers without any account. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T1.project_details, T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which project made the most number of outcomes? List the project details and the project id. \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT address_line_1, address_line_2 FROM customers WHERE email_address = 'vbogisich@example.org' \nA: Find the address line 1 and 2 of the customer with email 'vbogisich@example.org'. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT f_id FROM files ORDER BY duration DESC LIMIT 1 \nA: What is the id of the longest song? \n Additional table information: table: music_1"} -{"text": "Q: SELECT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds NULLS FIRST LIMIT 1 \nA: What are the forename and surname of the driver who has the smallest laptime? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT COUNT(*) FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.city = 'Lake Geovannyton' \nA: Find the number of customers who live in the city called Lake Geovannyton. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT COUNT(*) FROM ALBUM \nA: Find the number of albums. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT Product_Name FROM Products ORDER BY Product_Price ASC NULLS FIRST \nA: List the name of products in ascending order of price. \n Additional table information: table: solvency_ii"} -{"text": "Q: SELECT COUNT(*) FROM Allergy_type WHERE allergytype = 'animal' \nA: How many allergies have type animal? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT city, GDP FROM city ORDER BY GDP NULLS FIRST LIMIT 1 \nA: What is the city with the smallest GDP? Return the city and its GDP. \n Additional table information: table: city_record"} -{"text": "Q: SELECT T2.balance, T3.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid \nA: Find the name, checking balance and saving balance of all accounts in the bank. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT * FROM Albums WHERE YEAR = 2012 \nA: return all columns of the albums created in the year of 2012. \n Additional table information: table: music_2"} -{"text": "Q: SELECT COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines' \nA: How many routes does American Airlines operate? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT T2.Name, SUM(T1.Num_of_stock) FROM phone_market AS T1 JOIN phone AS T2 ON T1.Phone_ID = T2.Phone_ID GROUP BY T2.Name \nA: For each phone, show its names and total number of stocks. \n Additional table information: table: phone_market"} -{"text": "Q: SELECT t2.section_title FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code WHERE t1.document_name = 'David CV' \nA: What are all the section titles of the document named 'David CV'? \n Additional table information: table: document_management"} -{"text": "Q: SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'LORIA' AND T2.lastname = 'ONDERSMA' \nA: Count the number of students the teacher LORIA ONDERSMA teaches. \n Additional table information: table: student_1"} -{"text": "Q: SELECT course_description FROM COURSES WHERE course_name = 'database' \nA: Return the description for the courses named 'database'. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING COUNT(*) <= 3 \nA: What are the countries for appelations with at most 3 wines? \n Additional table information: table: wine_1"} -{"text": "Q: 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' \nA: What is the country in which the customer Carole Bernhard lived? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT * FROM employees WHERE department_id = 'null' \nA: What are all the employees without a department number? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT COUNT(*), T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name ORDER BY COUNT(*) DESC \nA: Find the number of routes and airport name for each source airport, order the results by decreasing number of routes. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT T1.Festival_ID, T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID GROUP BY T1.Festival_ID HAVING COUNT(*) >= 2 \nA: Show the ids and names of festivals that have at least two nominations for artworks. \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT SUM(student_capacity) FROM dorm \nA: Find the total capacity of all dorms. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC NULLS FIRST \nA: Please show the different statuses, ordered by the number of cities that have each. \n Additional table information: table: farm"} -{"text": "Q: SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Afghanistan' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Albania' \nA: What are the names of the storms that affected both the regions of Afghanistan and Albania? \n Additional table information: table: storm_record"} -{"text": "Q: SELECT MAX(market_share), MIN(market_share), AVG(market_share) FROM browser \nA: What is the maximum, minimum and average market share of the listed browsers? \n Additional table information: table: browser_web"} -{"text": "Q: SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t2.customer_details = 'Dayana Robel' \nA: What are the type codes of the policies used by the customer 'Dayana Robel'? \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT Competition_type, Country FROM competition \nA: What are the types and countries of competitions? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT COUNT(*) FROM catalog_contents \nA: Find the total number of catalog contents. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'CIS-220' INTERSECT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'QM-261' \nA: Find the first name of the professor who is teaching two courses with code CIS-220 and QM-261. \n Additional table information: table: college_1"} -{"text": "Q: SELECT Status, AVG(Population) FROM city GROUP BY Status \nA: What are the statuses and average populations of each city? \n Additional table information: table: farm"} -{"text": "Q: SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Der Kapitan' AND T1.StagePosition = 'back' \nA: Who is performing in the back stage position for the song 'Der Kapitan'? Show the first name and last name. \n Additional table information: table: music_2"} -{"text": "Q: SELECT RoomId, roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1 \nA: Find the id and name of the most expensive base price room. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count < 50 \nA: What are the lot details of lots associated with transactions with share count smaller than 50? \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT COUNT(DISTINCT LEVEL) FROM member \nA: How many different levels do members have? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT label FROM albums GROUP BY label ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the label that has the most albums? \n Additional table information: table: music_2"} -{"text": "Q: SELECT lastname FROM list WHERE classroom = 111 \nA: What are the last names of students in room 111? \n Additional table information: table: student_1"} -{"text": "Q: SELECT POSITION FROM player WHERE Points > 20 INTERSECT SELECT POSITION FROM player WHERE Points < 10 \nA: What are the positions of both players that have more than 20 20 points and less than 10 points? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT name FROM projects ORDER BY hours DESC LIMIT 1 \nA: Find the name of project that continues for the longest time. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT customer_id, COUNT(*) FROM Customers_cards GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the customer id with most number of cards, and how many does he have? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Elsa' \nA: Where does the staff member with the first name Elsa live? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT COUNT(*), sex FROM people WHERE weight > 85 GROUP BY sex \nA: Count the number of people of each sex who have a weight higher than 85. \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT Enrollment FROM school WHERE Denomination <> 'Catholic' \nA: List the enrollment for each school that does not have 'Catholic' as denomination. \n Additional table information: table: school_player"} -{"text": "Q: SELECT SUM(T1.budgeted) FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn' \nA: What is the total budget amount for school 'Glenn' in all years? \n Additional table information: table: school_finance"} -{"text": "Q: SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999 \nA: Show all company names with a movie directed in year 1999. \n Additional table information: table: culture_company"} -{"text": "Q: SELECT hotel_id, star_rating_code FROM HOTELS ORDER BY price_range ASC NULLS FIRST \nA: Show the id and star rating of each hotel, ordered by its price from low to high. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T1.Total_Points > 57.5 \nA: What are the distinct hometowns of gymnasts with total points more than 57.5? \n Additional table information: table: gymnast"} -{"text": "Q: SELECT firstname FROM teachers WHERE classroom = 110 \nA: Which teachers teach in classroom 110? Give me their first names. \n Additional table information: table: student_1"} -{"text": "Q: SELECT COUNT(DISTINCT product_type_code) FROM products \nA: Find the number of different product types. \n Additional table information: table: department_store"} -{"text": "Q: SELECT COUNT(*) FROM country \nA: Count the number of countries. \n Additional table information: table: match_season"} -{"text": "Q: SELECT destination FROM Flight GROUP BY destination ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: Which destination has least number of flights? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = 'shared' \nA: How many songs have a shared vocal? \n Additional table information: table: music_2"} -{"text": "Q: SELECT company, main_industry FROM company WHERE NOT company_id IN (SELECT company_id FROM station_company) \nA: Show company name and main industry without a gas station. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT MIN(snatch) FROM body_builder \nA: What is the minimum snatch score? \n Additional table information: table: body_builder"} -{"text": "Q: SELECT crs_credit, crs_description FROM course WHERE crs_code = 'CIS-220' \nA: How many credits does course CIS-220 have, and what its description? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T2.bathroom_count > 2 \nA: Show the addresses of the buildings that have apartments with more than 2 bathrooms. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = 'Binders Unbound' \nA: Who is the author of the paper titled 'Binders Unbound'? Give me the last name. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT T2.party_name, COUNT(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id \nA: Show all party names and the number of members in each party. \n Additional table information: table: party_people"} -{"text": "Q: SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Tokohu University' \nA: Find the number of papers published by authors from the institution 'Tokohu University'. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT SUM(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research' \nA: What is the total grant amount of the organisations described as research? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT date_of_birth FROM Guests WHERE gender_code = 'Male' \nA: What are dates of birth of all the guests whose gender is 'Male'? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT T1.Museum_Details, T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID \nA: What are the details and opening hours of the museums? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo \nA: What are the ids of all students who don't play sports? \n Additional table information: table: game_1"} -{"text": "Q: SELECT COUNT(DISTINCT role_code) FROM Project_Staff \nA: How many kinds of roles are there for the staff? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT Advisor FROM Student WHERE StuID = 1004 \nA: Who advises student 1004? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT invoice_number FROM invoices WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25' \nA: Find the invoice numbers which are created before 1989-09-03 or after 2007-12-25. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = 'San Francisco State University' AND t2.year = 2001 \nA: What degrees were conferred in San Francisco State University in the year 2001? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT rank FROM captain GROUP BY rank ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which rank is the most common among captains? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT Name, Score FROM WINE \nA: What are the names and scores of all wines? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT t1.product_name, t1.typical_buying_price, t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = 'yellow' \nA: Return the names and typical buying and selling prices for products that have 'yellow' as their color description. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT COUNT(DISTINCT allergy) FROM Allergy_type \nA: How many allergies are there? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT t2.claim_status_name FROM claims_processing AS t1 JOIN claims_processing_stages AS t2 ON t1.claim_stage_id = t2.claim_stage_id GROUP BY t1.claim_stage_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which claim processing stage has the most claims? Show the claim status name. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT Name FROM ship WHERE Nationality <> 'United States' \nA: List the name of ships whose nationality is not 'United States'. \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT T1.personal_name, T1.family_name, T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the personal name, family name, and author ID of the course author that teaches the most courses. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT address_line_1, address_line_2 FROM customers WHERE email_address = 'vbogisich@example.org' \nA: What are lines 1 and 2 of the addressed of the customer with the email 'vbogisich@example.org'? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.FirstName = 'Astrid' AND LastName = 'Gruber' \nA: Find all invoice dates corresponding to customers with first name Astrid and last name Gruber. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3 \nA: What are the majors only less than three students are studying? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T2.amenid = T1.amenid JOIN dorm AS T3 ON T2.dormid = T3.dormid WHERE T3.dorm_name = 'Anonymous Donor Hall' ORDER BY T1.amenity_name NULLS FIRST \nA: What are the amenities in alphabetical order that Anonymous Donor Hall has? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT COUNT(DISTINCT student_id) FROM Students_in_Detention \nA: How many distinct students have been in detention? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT product_name, product_description FROM products_for_hire WHERE product_type_code = 'Cutlery' AND daily_hire_cost < 20 \nA: What are the names and descriptions of the products that are of 'Cutlery' type and have daily hire cost lower than 20? \n Additional table information: table: products_for_hire"} -{"text": "Q: SELECT COUNT(DISTINCT Artist_ID) FROM volume \nA: How many distinct artists have volumes? \n Additional table information: table: music_4"} -{"text": "Q: SELECT COUNT(*) FROM Accounts \nA: Count the number of accounts. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5 \nA: Find the last names of the teachers that teach fifth grade. \n Additional table information: table: student_1"} -{"text": "Q: SELECT Name FROM editor WHERE Age > 25 \nA: List the names of editors who are older than 25. \n Additional table information: table: journal_committee"} -{"text": "Q: SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.Fname = 'David' AND T2.Lname = 'Shieber' \nA: What is the total number of hours per work and number of games played by David Shieber? \n Additional table information: table: game_1"} -{"text": "Q: SELECT DISTINCT grade FROM list WHERE classroom = 105 \nA: Find the grade studying in room 105. \n Additional table information: table: student_1"} -{"text": "Q: SELECT ResName, Rating FROM Restaurant ORDER BY Rating DESC LIMIT 1 \nA: Which restaurants have highest rating? List the restaurant name and its rating. \n Additional table information: table: restaurant_1"} -{"text": "Q: SELECT product_description FROM products WHERE product_name = 'Chocolate' \nA: What is the description of the product named 'Chocolate'? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT COUNT(*) FROM team_franchise WHERE active = 'Y' \nA: How many team franchises are active, with active value 'Y'? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT director FROM Movie GROUP BY director HAVING COUNT(*) = 1 \nA: What are the names of the directors who made exactly one movie? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT COUNT(DISTINCT city) FROM bank \nA: In how many different cities are banks located? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT T2.Country, T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID \nA: What are the countries of markets and their corresponding years of market estimation? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT COUNT(*), AVG(age), city_code FROM student GROUP BY city_code \nA: How many students live in each city and what are their average ages? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING COUNT(*) > 3 \nA: What are the attribute data types with more than 3 attribute definitions? \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT T1.fname, T1.age FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE NOT T2.dormid IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge') \nA: What is the first name and age of every student who lives in a dorm with a TV Lounge? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT COUNT(*) FROM VOTING_RECORD \nA: How many voting records do we have? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT title FROM albums \nA: List every album's title. \n Additional table information: table: store_1"} -{"text": "Q: SELECT name, LOCATION FROM cinema WHERE capacity > (SELECT AVG(capacity) FROM cinema) \nA: Show the cinema name and location for cinemas with capacity above average. \n Additional table information: table: cinema"} -{"text": "Q: SELECT Date_of_ceremony FROM music_festival WHERE Category = 'Best Song' AND RESULT = 'Awarded' \nA: What are the date of ceremony of music festivals with category 'Best Song' and result 'Awarded'? \n Additional table information: table: music_4"} -{"text": "Q: SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3 \nA: How much salary did the top 3 well-paid players get in 2001? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT T2.team_id, T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id ORDER BY AVG(T1.attendance) DESC LIMIT 1 \nA: In 2014, what are the id and rank of the team that has the largest average number of attendance? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT Name FROM team WHERE NOT Team_id IN (SELECT Team FROM match_season) \nA: Return the names of teams that have no match season record. \n Additional table information: table: match_season"} -{"text": "Q: SELECT pPos FROM tryout GROUP BY pPos ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which position is most popular among players in the tryout? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT t1.name, t1.sex, MIN(oppose_rate) FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex \nA: For each sex, what is the name and sex of the candidate with the oppose rate for their sex? \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT dept_address FROM department WHERE dept_name = 'History' \nA: Where is the history department? \n Additional table information: table: college_1"} -{"text": "Q: SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts \nA: Show customer ids who don't have an account. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT product_name, typical_buying_price FROM products \nA: What are the names and buying prices of all the products? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT COUNT(*) FROM enzyme WHERE NOT id IN (SELECT enzyme_id FROM medicine_enzyme_interaction) \nA: How many enzymes do not have any interactions? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT AVG(acc_bal), acc_type FROM customer WHERE credit_score < 50 GROUP BY acc_type \nA: What is the average account balance of customers with credit score below 50 for the different account types? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*) > 1 \nA: What are the official names of cities that have hosted more than one competition? \n Additional table information: table: farm"} -{"text": "Q: SELECT Country FROM market ORDER BY Number_cities DESC \nA: List all countries of markets in descending order of number of cities. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT AVG(Number_of_hosts) FROM party \nA: Compute the average number of hosts for parties. \n Additional table information: table: party_host"} -{"text": "Q: SELECT host_city FROM hosting_city ORDER BY YEAR DESC LIMIT 1 \nA: What is id of the city that hosted events in the most recent year? \n Additional table information: table: city_record"} -{"text": "Q: SELECT song_name FROM song WHERE rating < (SELECT MIN(rating) FROM song WHERE languages = 'english') \nA: What are the names of the songs whose rating is below the rating of all songs in English? \n Additional table information: table: music_1"} -{"text": "Q: SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees) \nA: Find the employee id for all employees who earn more than the average salary. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT flno FROM Flight ORDER BY distance ASC NULLS FIRST LIMIT 3 \nA: What are the numbers of the shortest flights? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT student_capacity, gender FROM dorm WHERE dorm_name LIKE '%Donor%' \nA: What is the student capacity and type of gender for the dorm whose name as the phrase Donor in it? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT building, COUNT(*) FROM Faculty GROUP BY building \nA: Show all the buildings along with the number of faculty members the buildings have. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT T2.Author, T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID \nA: For each submission, find its author and acceptance result. \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT COUNT(DISTINCT OWNER) FROM channel \nA: Count the number of distinct channel owners. \n Additional table information: table: program_share"} -{"text": "Q: 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' \nA: How long is the total lesson time took by customer with first name as Rylan and last name as Goodwin? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT MAX(amount_outstanding), MIN(amount_outstanding), AVG(amount_outstanding) FROM Customers \nA: What is the maximum, minimum, and average amount of money outsanding for all customers? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT AVG(damage_millions_USD), MAX(damage_millions_USD) FROM storm WHERE max_speed > 1000 \nA: What is the average and maximum damage in millions for storms that had a max speed over 1000? \n Additional table information: table: storm_record"} -{"text": "Q: SELECT COUNT(*), sex FROM people WHERE weight > 85 GROUP BY sex \nA: how many people are there whose weight is higher than 85 for each gender? \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT SUM(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE '%London%' \nA: What are the total number of Domestic Passengers of airports that contain the word 'London'. \n Additional table information: table: aircraft"} -{"text": "Q: SELECT COUNT(*) FROM campuses \nA: How many CSU campuses are there? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT Destruction_Authorised_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID \nA: Show the id of each employee and the number of document destruction authorised by that employee. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT login_name FROM Students WHERE family_name = 'Ward' \nA: What are the login names of the students with family name 'Ward'? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the budget type code with most number of documents. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' INTERSECT SELECT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice' \nA: Find the name and age of the person who is a friend of both Dan and Alice. \n Additional table information: table: network_2"} -{"text": "Q: SELECT DISTINCT T2.problem_id, T2.problem_log_id FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T1.staff_first_name = 'Rylan' AND T1.staff_last_name = 'Homenick' \nA: List the problem id and log id which are assigned to the staff named Rylan Homenick. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: 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' \nA: What is the total time for all lessons taught by Janessa Sawayn? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT COUNT(*) FROM ROLES \nA: Count the total number of roles listed. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT Player, Years_Played FROM player \nA: Show the players and the years played. \n Additional table information: table: match_season"} -{"text": "Q: SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id \nA: Show all product names without an order. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING COUNT(*) >= 2 \nA: Which faculty members advise two ore more students? Give me their faculty ids. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = 'Metallica' \nA: Find the number of albums by the artist 'Metallica'. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT service_type_code FROM services ORDER BY service_type_code NULLS FIRST \nA: List the type of the services in alphabetical order. \n Additional table information: table: local_govt_in_alabama"} -{"text": "Q: SELECT T2.balance, T3.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid \nA: What are the names, checking balances, and savings balances for all customers? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT DISTINCT LOCATION FROM track \nA: Give the different locations of tracks. \n Additional table information: table: race_track"} -{"text": "Q: SELECT COUNT(*), T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T1.date_problem_reported > '1986-11-13' GROUP BY T2.product_id \nA: What are the products that have problems reported after 1986-11-13? Give me the product id and the count of problems reported after 1986-11-13. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name, COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id \nA: What are the the full names and ids for all customers, and how many accounts does each have? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*) <= 5 \nA: What are the types of competition that have most 5 competitions for that type? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT T2.product_type_code, T2.product_name, T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3 \nA: Return the product type, name, and price for products supplied by supplier 3. \n Additional table information: table: department_store"} -{"text": "Q: SELECT Birth_Place FROM people GROUP BY Birth_Place HAVING COUNT(*) >= 2 \nA: What are the birth places that are shared by at least two people? \n Additional table information: table: body_builder"} -{"text": "Q: SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'LORIA' AND T2.lastname = 'ONDERSMA' \nA: How many students does LORIA ONDERSMA teaches? \n Additional table information: table: student_1"} -{"text": "Q: SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most popular payment method? \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT COUNT(DISTINCT major), COUNT(DISTINCT city_code) FROM student \nA: Find the numbers of different majors and cities. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT COUNT(*), T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY COUNT(*) DESC LIMIT 1 \nA: How many problems does the product with the most problems have? List the number of the problems and product name. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT COUNT(*), cName FROM tryout GROUP BY cName ORDER BY COUNT(*) DESC \nA: How many students participated in tryouts for each college by descennding count? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT Fname, Lname FROM Student \nA: What are the full names of all students \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT name FROM instructor WHERE dept_name = 'Statistics' ORDER BY salary NULLS FIRST LIMIT 1 \nA: what is the name of the instructor who is in Statistics department and earns the lowest salary? \n Additional table information: table: college_2"} -{"text": "Q: SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y' \nA: What are the ids for all sporty students who are on scholarship? \n Additional table information: table: game_1"} -{"text": "Q: SELECT AVG(Price), manufacturer FROM Products GROUP BY manufacturer \nA: What are the average prices of products, grouped by manufacturer code? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT role_code, COUNT(*) FROM Employees GROUP BY role_code \nA: Show all role codes and the number of employees in each role. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT Name FROM People ORDER BY Age DESC LIMIT 5 \nA: List the names of the top 5 oldest people. \n Additional table information: table: gymnast"} -{"text": "Q: SELECT Fname, Lname FROM Student WHERE Major = 600 \nA: List all students' first names and last names who majored in 600. \n Additional table information: table: restaurant_1"} -{"text": "Q: SELECT decor, COUNT(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor \nA: Find the number of rooms with price higher than 120 for different decor. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'MADLOCK' AND T1.lastname = 'RAY' \nA: How many teachers does the student named MADLOCK RAY have? \n Additional table information: table: student_1"} -{"text": "Q: SELECT SUM(maxOccupancy) FROM Rooms WHERE decor = 'modern' \nA: What is the total number of people who could stay in the modern rooms in this inn? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT DISTINCT Venue FROM debate \nA: Show the distinct venues of debates \n Additional table information: table: debate"} -{"text": "Q: SELECT title FROM film WHERE rating = 'R' \nA: Return the titles of any movies with an R rating. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT COUNT(DISTINCT t3.product_id) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = 'Rodrick Heaney' \nA: Find the number of distinct products Rodrick Heaney has bought so far. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT DISTINCT characteristic_name FROM CHARACTERISTICS \nA: What are the different names of the product characteristics? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT country FROM airports ORDER BY elevation DESC LIMIT 1 \nA: What is the country of the airport with the highest elevation? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT COUNT(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Ray' \nA: How many lesson does customer with first name Ray took? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = 'Brazil' \nA: Find the first names of all customers that live in Brazil and have an invoice. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT Name FROM member WHERE NOT Member_ID IN (SELECT Member_ID FROM round) \nA: List the names of members who did not participate in any round. \n Additional table information: table: decoration_competition"} -{"text": "Q: SELECT date, zip_code FROM weather WHERE min_dew_point_f < (SELECT MIN(min_dew_point_f) FROM weather WHERE zip_code = 94107) \nA: On which day and in which zip code was the min dew point lower than any day in zip code 94107? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT t3.characteristic_name, t3.characteristic_data_type FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'cumin' \nA: List all the characteristic names and data types of product 'cumin'. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id > 8 \nA: What are the catalog entry names of the products with next entry ID above 8? \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id ORDER BY T3.tot_cred DESC LIMIT 1 \nA: What is the name of the instructor who advises the student with the greatest number of total credits? \n Additional table information: table: college_2"} -{"text": "Q: SELECT DISTINCT POSITION FROM match_season WHERE College = 'UCLA' OR College = 'Duke' \nA: Show the distinct position of players from college UCLA or Duke. \n Additional table information: table: match_season"} -{"text": "Q: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 2 \nA: What document types have more than 2 corresponding documents? \n Additional table information: table: document_management"} -{"text": "Q: SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most common status across all cities? \n Additional table information: table: farm"} -{"text": "Q: SELECT cust_name FROM customer WHERE credit_score < (SELECT AVG(credit_score) FROM customer) \nA: Find the name of customers whose credit score is below the average credit scores of all customers. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT SUM(revenue) FROM manufacturers WHERE revenue > (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin') \nA: Find the total revenue of companies whose revenue is larger than the revenue of some companies based in Austin. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT gtype, COUNT(*) FROM Video_games GROUP BY gtype \nA: What are the types of video games and how many are in each type? \n Additional table information: table: game_1"} -{"text": "Q: SELECT COUNT(DISTINCT Status_of_Thing_Code) FROM Timed_Status_of_Things \nA: How many different status codes of things are there? \n Additional table information: table: local_govt_and_lot"} -{"text": "Q: SELECT T2.name FROM train_station AS T1 JOIN train AS T2 ON T1.train_id = T2.train_id WHERE NOT T1.station_id 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') \nA: Find the names of the trains that do not pass any station located in London. \n Additional table information: table: train_station"} -{"text": "Q: SELECT date, cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5 \nA: What are the dates that had the top 5 cloud cover rates? Also tell me the cloud cover rate. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed \nA: Which employees do not destroy any document? Find their employee ids. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT city, COUNT(*) FROM airports GROUP BY city HAVING COUNT(*) > 1 \nA: List the cities which have more than one airport and number of airports. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = 'San Francisco State University' AND t1.year = 2000 \nA: In the year 2000, what is the campus fee for San Francisco State University? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT T2.emp_fname, T4.prof_office, T3.crs_description, T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num JOIN department AS T5 ON T4.dept_code = T5.dept_code \nA: What are the first names, office locations, and departments of all instructors, and also what are the descriptions of the courses they teach? \n Additional table information: table: college_1"} -{"text": "Q: SELECT order_id FROM shipments WHERE shipment_date = (SELECT MAX(shipment_date) FROM shipments) \nA: Which order has the most recent shipment? Give me the order id. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT First_year, Last_year FROM party WHERE Party_Theme = 'Spring' OR Party_Theme = 'Teqnology' \nA: Show the first year and last year of parties with theme 'Spring' or 'Teqnology'. \n Additional table information: table: party_host"} -{"text": "Q: SELECT COUNT(DISTINCT t3.characteristic_name) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame' \nA: Count the number of different characteristic names the product 'cumin' has. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT COUNT(DISTINCT cName) FROM tryout \nA: How many different colleges were represented at tryouts? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT T1.staff_id, T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = 'Department Manager' \nA: What are the staff ids and genders of all staffs whose job title is Department Manager? \n Additional table information: table: department_store"} -{"text": "Q: SELECT T1.organisation_id, T1.organisation_type, T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the ids, types, and details of the organization with the most research staff? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT home_city FROM driver EXCEPT SELECT home_city FROM driver WHERE age > 40 \nA: Show all home cities except for those having a driver older than 40. \n Additional table information: table: school_bus"} -{"text": "Q: SELECT T3.Name, COUNT(*) FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name \nA: Show the names of journalists and the number of events they reported. \n Additional table information: table: news_report"} -{"text": "Q: SELECT name FROM airports WHERE city = 'Goroka' \nA: Find the name of the airport in the city of Goroka. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT StuID FROM Has_allergy GROUP BY StuID HAVING COUNT(*) >= 2 \nA: Show all student IDs who have at least two allergies. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT minister FROM party WHERE took_office > 1961 OR took_office < 1959 \nA: Show the minister who took office after 1961 or before 1959. \n Additional table information: table: party_people"} -{"text": "Q: SELECT COUNT(*), POSITION FROM player WHERE points < 30 GROUP BY POSITION \nA: find the number of players whose points are lower than 30 in each position. \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name, COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id \nA: Show id, first name and last name for all customers and the number of accounts. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = 'United States' \nA: Show the distinct fate of missions that involve ships with nationality 'United States' \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT AVG(age), job FROM Person WHERE gender = 'male' GROUP BY job \nA: What is the average age for a male in each job? \n Additional table information: table: network_2"} -{"text": "Q: SELECT COUNT(*) FROM film WHERE title LIKE '%Dummy%' \nA: Count the number of films whose title contains the word 'Dummy'. \n Additional table information: table: cinema"} -{"text": "Q: 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' \nA: What are the dates for the documents with both 'GV' type and 'SF' type expenses? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT CName FROM COURSE WHERE Credits = 3 UNION SELECT CName FROM COURSE WHERE Credits = 1 AND Hours = 4 \nA: Find the names of courses that have either 3 credits or 1 credit but 4 hours. \n Additional table information: table: college_3"} -{"text": "Q: SELECT Date FROM game ORDER BY home_team DESC \nA: List the dates of games by the home team name in descending order. \n Additional table information: table: game_injury"} -{"text": "Q: SELECT name FROM people WHERE NOT people_id IN (SELECT people_id FROM candidate) \nA: Give the names of people who did not participate in the candidate election. \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT name, average_attendance, total_attendance FROM stadium EXCEPT SELECT T2.name, T2.average_attendance, T2.total_attendance FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id \nA: Show the name, average attendance, total attendance for stadiums where no accidents happened. \n Additional table information: table: game_injury"} -{"text": "Q: SELECT t1.name FROM stadium AS t1 JOIN event AS t2 ON t1.id = t2.stadium_id GROUP BY t2.stadium_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the stadium which held the most events? \n Additional table information: table: swimming"} -{"text": "Q: SELECT name, followers FROM user_profiles ORDER BY followers DESC \nA: List the name and number of followers for each user, and sort the results by the number of followers in descending order. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT billing_state, COUNT(*), SUM(total) FROM invoices WHERE billing_state = 'CA' \nA: List the number of invoices and the invoice total from California. \n Additional table information: table: store_1"} -{"text": "Q: SELECT customer_details FROM customers UNION SELECT staff_details FROM staff \nA: Find the names of all the customers and staff members. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.attribute_value = (SELECT attribute_value FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_value ORDER BY COUNT(*) DESC LIMIT 1) \nA: What are the entry names of catalog with the attribute possessed by most entries. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT T2.name, T2.position FROM department AS T1 JOIN physician AS T2 ON T1.head = T2.EmployeeID GROUP BY departmentID ORDER BY COUNT(departmentID) NULLS FIRST LIMIT 1 \nA: what is the name and position of the head whose department has least number of employees? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT COUNT(DISTINCT course_id) FROM course WHERE dept_name = 'Physics' \nA: Count the number of courses in the Physics department. \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(patient) FROM stay WHERE room = 112 \nA: How many patients stay in room 112? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT title FROM Movie WHERE director = 'James Cameron' OR YEAR < 1980 \nA: What are the names of all movies made before 1980 or had James Cameron as the director? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT Name FROM member WHERE Country = 'United States' OR Country = 'Canada' \nA: Show the names of members whose country is 'United States' or 'Canada'. \n Additional table information: table: decoration_competition"} -{"text": "Q: SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration NULLS FIRST LIMIT 1 \nA: What are the names of the artists who sang the shortest song? \n Additional table information: table: music_1"} -{"text": "Q: SELECT COUNT(*) FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id WHERE T1.name = 'England' \nA: How many leagues are there in England? \n Additional table information: table: soccer_1"} -{"text": "Q: SELECT T2.apt_number, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id \nA: What are the apartment number, start date, and end date of each apartment booking? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT MAX(Market_Value_in_Billion), MIN(Market_Value_in_Billion) FROM company \nA: What is the maximum and minimum market value of companies? \n Additional table information: table: company_employee"} -{"text": "Q: SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Aerosmith' \nA: What are the titles of all the Aerosmith albums? \n Additional table information: table: store_1"} -{"text": "Q: SELECT product FROM product WHERE product LIKE '%Scanner%' \nA: Find all the product whose name contains the word 'Scanner'. \n Additional table information: table: store_product"} -{"text": "Q: SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY AVG(T2.rating) NULLS FIRST LIMIT 1 \nA: Find the name of the item with the lowest average rating. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT id FROM station WHERE city = 'San Francisco' INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING AVG(bikes_available) > 10 \nA: What are the ids of stations that are located in San Francisco and have average bike availability above 10. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE '4:%' UNION SELECT song_name FROM song WHERE languages = 'english' \nA: What are the names of all songs that are approximately 4 minutes long or are in English? \n Additional table information: table: music_1"} -{"text": "Q: SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = 'walk' \nA: Find the details of the shops that can be reached by walk. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id = T2.address_id WHERE T2.customer_id = 10 \nA: What is the address for the customer with id 10? \n Additional table information: table: department_store"} -{"text": "Q: SELECT Team FROM player ORDER BY Age DESC LIMIT 1 \nA: Find the team of the player of the highest age. \n Additional table information: table: school_player"} -{"text": "Q: SELECT COUNT(DISTINCT gtype) FROM Video_games \nA: What is the count of different game types? \n Additional table information: table: game_1"} -{"text": "Q: SELECT Destroyed_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID \nA: Show the employee ids and the number of documents destroyed by each employee. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT lot_details FROM Lots EXCEPT SELECT T1.lot_details FROM Lots AS T1 JOIN transactions_lots AS T2 ON T1.lot_id = T2.lot_id \nA: What are the details of the lots which are not used in any transactions? \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: 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' \nA: Which customers have orders with status 'Packing'? Give me the customer names. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT StuID FROM Student WHERE Advisor = 1121 \nA: Show ids for all students who have advisor 1121. \n Additional table information: table: game_1"} -{"text": "Q: SELECT SUM(T2.balance), T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name \nA: Find the total saving balance for each account name. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT product_type_code FROM products GROUP BY product_type_code HAVING AVG(product_price) > (SELECT AVG(product_price) FROM products) \nA: Find the product type whose average price is higher than the average price of all products. \n Additional table information: table: department_store"} -{"text": "Q: SELECT Major, COUNT(*) FROM Student GROUP BY Major HAVING COUNT(Major) BETWEEN 2 AND 30 \nA: Which major has between 2 and 30 number of students? List major and the number of students. \n Additional table information: table: restaurant_1"} -{"text": "Q: SELECT MAX(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = 'Monaco Grand Prix' \nA: What is the maximum fastest lap speed in the Monaco Grand Prix in 2008? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT employee_id, first_name, last_name, job_id FROM employees WHERE salary > (SELECT MAX(salary) FROM employees WHERE job_id = 'PU_MAN') \nA: What are the employee ids, full names, and job ids for employees who make more than the highest earning employee with title PU_MAN? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT Market_Rate, name FROM furniture WHERE NOT Furniture_ID IN (SELECT Furniture_ID FROM furniture_manufacte) \nA: Find the market shares and names of furnitures which no any company is producing in our records. \n Additional table information: table: manufacturer"} -{"text": "Q: SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1 \nA: List the school color of the school that has the largest enrollment. \n Additional table information: table: school_player"} -{"text": "Q: SELECT DISTINCT city FROM branch WHERE membership_amount >= 100 \nA: What are the different cities that have more than 100 memberships? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT name, Assets_billion FROM Companies ORDER BY name ASC NULLS FIRST \nA: What are the name and assets of each company, sorted in ascending order of company name? \n Additional table information: table: company_office"} -{"text": "Q: SELECT T2.name, AVG(T1.age) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend GROUP BY T2.name ORDER BY AVG(T1.age) DESC LIMIT 1 \nA: Which person whose friends have the oldest average age? \n Additional table information: table: network_2"} -{"text": "Q: SELECT director FROM Movie WHERE director <> 'null' GROUP BY director HAVING COUNT(*) = 1 \nA: What are the names of all directors who have made one movie except for the director named NULL? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = 'Binders Unbound' \nA: What are the last names of the author of the paper titled 'Binders Unbound'? \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT document_type_code FROM documents WHERE document_name = 'David CV' \nA: What is the type of the document named 'David CV'? \n Additional table information: table: document_management"} -{"text": "Q: SELECT account_id, COUNT(*) FROM Financial_transactions GROUP BY account_id \nA: What are the different account ids that have made financial transactions, as well as how many transactions correspond to each? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T1.purchase_details FROM PURCHASES AS T1 JOIN TRANSACTIONS AS T2 ON T1.purchase_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction > 10000 \nA: What are the purchase details of transactions with amount bigger than 10000? \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT Country FROM market ORDER BY Country ASC NULLS FIRST \nA: What are the countries for each market, ordered alphabetically? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT COUNT(*), T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name \nA: Find the number of scientists involved for each project name. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT AVG(bedroom_count) FROM Apartments \nA: What is the average number of bedrooms of all apartments? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT COUNT(*) FROM Employees \nA: How many employees do we have? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT MAX(group_equity_shareholding) FROM operate_company \nA: What is maximum group equity shareholding of the companies? \n Additional table information: table: flight_company"} -{"text": "Q: SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2 \nA: What are the booking start and end dates of the apartments with more than 2 bedrooms? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT city_code FROM Student WHERE LName = 'Kim' \nA: Which city does the student whose last name is 'Kim' live in? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT T1.title, T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T2.inventory_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the film title and inventory id of the item in the inventory which was rented most frequently? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id HAVING COUNT(*) >= 2 \nA: What are the names of regions with two or more storms? \n Additional table information: table: storm_record"} -{"text": "Q: SELECT AVG(product_price) FROM products WHERE product_type_code = 'Clothes' \nA: Find the average price of all product clothes. \n Additional table information: table: department_store"} -{"text": "Q: SELECT T1.Museum_Details, T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID \nA: Give me the detail and opening hour for each museum. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT outcome_code, COUNT(*) FROM mailshot_customers GROUP BY outcome_code \nA: Show the outcome code of mailshots along with the number of mailshots in each outcome code. \n Additional table information: table: customers_campaigns_ecommerce"} -{"text": "Q: SELECT Tourist_Details FROM VISITORS \nA: Show details of all visitors. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT COUNT(*) FROM inst \nA: How many institutions are there? \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT COUNT(*) FROM Settlements \nA: Count the total number of settlements made. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT COUNT(*) FROM Rooms \nA: How many rooms are there? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*) > 1 \nA: Show the official names of the cities that have hosted more than one competition. \n Additional table information: table: farm"} -{"text": "Q: SELECT COUNT(*) FROM Projects \nA: Show the number of projects. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT t1.payment_method FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY SUM(t3.order_quantity) NULLS FIRST LIMIT 1 \nA: Tell me the payment method used by the customer who ordered the least amount of goods in total. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT name FROM races WHERE TIME > '12:00:00' OR TIME < '09:00:00' \nA: What are the names of all races that occurred after 12:00:00 or before 09:00:00? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE DEPT_NAME = 'Accounting' \nA: How many professors are in the accounting dept? \n Additional table information: table: college_1"} -{"text": "Q: SELECT Age FROM artist \nA: What are the ages of all music artists? \n Additional table information: table: music_4"} -{"text": "Q: SELECT transaction_type_description FROM Ref_Transaction_Types WHERE transaction_type_code = 'PUR' \nA: Show the description of transaction type with code 'PUR'. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT International_Passengers, Domestic_Passengers FROM airport WHERE Airport_Name = 'London Heathrow' \nA: How many international and domestic passengers are there in the airport London Heathrow? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name NULLS FIRST \nA: List all the information about course authors and tutors in alphabetical order of the personal name. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT apt_type_code, COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC NULLS FIRST \nA: Show the apartment type codes and the corresponding number of apartments sorted by the number of apartments in ascending order. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT COUNT(*) FROM candidate \nA: How many candidates are there? \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Morning' INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Night' \nA: find the program owners that have some programs in both morning and night time. \n Additional table information: table: program_share"} -{"text": "Q: SELECT Festival_Name FROM festival_detail ORDER BY YEAR DESC LIMIT 3 \nA: Show the names of the three most recent festivals. \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT campus FROM campuses WHERE YEAR < 1800 \nA: Find the name of the campuses opened before 1800. \n Additional table information: table: csu_1"} -{"text": "Q: SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y' \nA: List ids for all student who are on scholarship. \n Additional table information: table: game_1"} -{"text": "Q: SELECT Name FROM HOST WHERE NOT Host_ID IN (SELECT Host_ID FROM party_host) \nA: What are the names of hosts who did not host any party in our record? \n Additional table information: table: party_host"} -{"text": "Q: SELECT COUNT(*), sex FROM employee WHERE salary < 50000 GROUP BY sex \nA: Find the number of employees of each gender whose salary is lower than 50000. \n Additional table information: table: company_1"} -{"text": "Q: SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id = T2.document_id JOIN Ref_locations AS T3 ON T2.location_code = T3.location_code WHERE T1.document_name = 'Robin CV' \nA: Show the location name for document 'Robin CV'. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT COUNT(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' AND T1.sex = 'F' \nA: Find the number of female students (with F sex) living in Smith Hall \n Additional table information: table: dorm_1"} -{"text": "Q: 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' \nA: Find the dates of orders which belong to the customer named 'Jeramie'. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT T2.Date_of_Birth FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor = 'Simon Woodroffe' OR T1.Investor = 'Peter Jones' \nA: What are the dates of birth of entrepreneurs with investor 'Simon Woodroffe' or 'Peter Jones'? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT city FROM addresses WHERE zip_postcode = 255 \nA: Find the city with post code 255. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T1.amenid = T2.amenid GROUP BY T2.amenid ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the name of amenity that is most common in all dorms. \n Additional table information: table: dorm_1"} -{"text": "Q: 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 \nA: In which city do the most employees live and how many of them live there? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT AVG(price_in_euros), MIN(price_in_euros) FROM catalog_contents \nA: What are the average and minimum price (in Euro) of all products? \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT COUNT(*) FROM aircraft \nA: How many aircrafts are there? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA' \nA: How many professors attained either Ph.D. or Masters degrees? \n Additional table information: table: college_1"} -{"text": "Q: SELECT phone_number FROM customers UNION SELECT phone_number FROM staff \nA: What are the phone numbers of all customers and all staff members? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT COUNT(*) FROM medicine WHERE FDA_approved = 'No' \nA: How many medicines were not approved by the FDA? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT SUM(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = 'San Francisco State University' \nA: What is the number of graduates in 'San Francisco State University' in year 2004? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT COUNT(*) FROM appointment \nA: Count how many appointments have been made in total. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT code, name, MIN(price) FROM products GROUP BY name \nA: What are the codes and names of the cheapest products in each category? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500 \nA: What are the names of players whose training hours is between 500 and 1500? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq \nA: Find the id of the courses that do not have any prerequisite? \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*) FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM customer_events) \nA: How many customers did not have any event? \n Additional table information: table: local_govt_and_lot"} -{"text": "Q: SELECT County_name, Population FROM county \nA: Show the county name and population of all counties. \n Additional table information: table: election"} -{"text": "Q: 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 \nA: Show the statement id and the statement detail for the statement with most number of accounts. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT COUNT(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Billy Cobham' \nA: How many albums does Billy Cobham has? \n Additional table information: table: store_1"} -{"text": "Q: SELECT DISTINCT song_name FROM song WHERE resolution > (SELECT MIN(resolution) FROM song WHERE languages = 'english') \nA: Find the distinct names of all songs that have a higher resolution than some songs in English. \n Additional table information: table: music_1"} -{"text": "Q: SELECT name, CLASS FROM ship WHERE NOT ship_id IN (SELECT ship_id FROM captain) \nA: what are the names and classes of the ships that do not have any captain yet? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price > (SELECT AVG(Product_Price) FROM PRODUCTS) \nA: Show all the distinct product names with price higher than the average. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT AVG(capacity) FROM stadium WHERE opening_year = 2005 \nA: What is the average capacity of the stadiums that were opened in year 2005? \n Additional table information: table: swimming"} -{"text": "Q: SELECT MAX(Price), MAX(Score) FROM WINE WHERE Appelation = 'St. Helena' \nA: What are the maximum price and score of wines produced by St. Helena appelation? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT T2.name, T1.category_id, COUNT(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id \nA: How many films are there in each category? List the genre name, genre id and the count. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the poll resource associated with the most candidates. \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Height DESC LIMIT 1 \nA: Show the company of the tallest entrepreneur. \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT MAX(Cows), MIN(Cows) FROM farm \nA: Return the maximum and minimum number of cows across all farms. \n Additional table information: table: farm"} -{"text": "Q: SELECT T2.dept_name, T2.dept_address FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name and address of the department with the most students? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T1.City_Town FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Store_Name = 'FJA Filming' \nA: Find the city the store named 'FJA Filming' is in. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the id and full name of the customer with the most accounts. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT participant_type_code FROM participants GROUP BY participant_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most common participant type? \n Additional table information: table: local_govt_in_alabama"} -{"text": "Q: SELECT name, headquarter FROM manufacturers ORDER BY revenue DESC \nA: Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' INTERSECT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music' \nA: What are the names of all the tracks that are in both the Movies and music playlists? \n Additional table information: table: store_1"} -{"text": "Q: SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1 \nA: What is the name of the most expensive product? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id ORDER BY T3.tot_cred DESC LIMIT 1 \nA: Find the name of instructor who is the advisor of the student who has the highest number of total credits. \n Additional table information: table: college_2"} -{"text": "Q: SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1 \nA: Show me the owner of the channel with the highest rating. \n Additional table information: table: program_share"} -{"text": "Q: SELECT T1.Title, T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 GROUP BY T2.AlbumID \nA: Show the album names and ids for albums that contain tracks with unit price bigger than 1. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT COUNT(*) FROM ASSESSMENT_NOTES \nA: How many assessment notes are there in total? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Pen and Paper Gaming' \nA: How many people have membership in the club 'Pen and Paper Gaming'? \n Additional table information: table: club_1"} -{"text": "Q: SELECT incident_type_description FROM Ref_Incident_Type WHERE incident_type_code = 'VIOLENCE' \nA: What is the incident type description for the incident type with code 'VIOLENCE'? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed NULLS FIRST \nA: What are ids of the all distinct orders, sorted by placement date? \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT T1.name FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the airline with the most routes? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT COUNT(*) FROM ARTIST WHERE NOT artistid IN (SELECT artistid FROM ALBUM) \nA: Cound the number of artists who have not released an album. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT COUNT(*) FROM club \nA: What is the total number of clubs? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT STATEMENT_ID, statement_details FROM Statements \nA: List all statement ids and statement details. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT campus FROM campuses WHERE YEAR = 1958 \nA: What are the campuses that opened in 1958? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT AVG(weight) FROM Player \nA: What is the average weight of all players? \n Additional table information: table: soccer_1"} -{"text": "Q: SELECT FacID FROM Faculty WHERE Sex = 'M' \nA: What are the faculty ids of all the male faculty members? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31 \nA: What are the dates that have an average sea level pressure between 30.3 and 31? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT * FROM swimmer \nA: Find all details for each swimmer. \n Additional table information: table: swimming"} -{"text": "Q: SELECT COUNT(*) FROM Flight \nA: What is the number of flights? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT COUNT(*) FROM phone \nA: How many phones are there? \n Additional table information: table: phone_market"} -{"text": "Q: 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' \nA: What are the first and last names of all customers who lived in Lockmanfurt? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid HAVING SUM(hours_played) >= 1000 \nA: Show all game names played by at least 1000 hours. \n Additional table information: table: game_1"} -{"text": "Q: SELECT mID FROM Rating EXCEPT SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = 'Brittany Harris' \nA: What are the ids of all moviest hat have not been reviewed by Britanny Harris? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT POSITION FROM player WHERE Points > 20 INTERSECT SELECT POSITION FROM player WHERE Points < 10 \nA: What are the positions with both players having more than 20 points and less than 10 points. \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which type of policy is most frequently used? Give me the policy type code. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT title, directed_by FROM film \nA: What are the title and director of each film? \n Additional table information: table: cinema"} -{"text": "Q: SELECT AVG(Gross_in_dollar) FROM film \nA: What is the average ticket sales gross in dollars of films? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = 'US museum' \nA: Tell me the name of the staff in charge of the attraction called 'US museum'. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.region_name = 'Denmark' \nA: Show all storm names affecting region 'Denmark'. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT COUNT(DISTINCT Status) FROM city \nA: How many different statuses do cities have? \n Additional table information: table: farm"} -{"text": "Q: SELECT T2.company, COUNT(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id \nA: For each company id, what are the companies and how many gas stations does each one operate? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT MIN(Price) FROM wine WHERE Winery = 'John Anthony') \nA: Find the distinct names of all wines that have prices higher than some wines from John Anthony winery. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the payment method that is used the most often in all the invoices. Give me its code. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT name FROM projects WHERE hours > (SELECT AVG(hours) FROM projects) \nA: What are the names of projects that have taken longer than the average number of hours for all projects? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT T2.department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY T2.department_name \nA: Give the name of each department and the number of employees in each. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT DISTINCT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' OR T2.friend = 'Alice' \nA: Find the name and age of the person who is a friend of Dan or Alice. \n Additional table information: table: network_2"} -{"text": "Q: SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = 'Taizhou ( Zhejiang )' \nA: What is the host year of city 'Taizhou ( Zhejiang )'? \n Additional table information: table: city_record"} -{"text": "Q: SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id = t2.product_id JOIN store AS t3 ON t2.store_id = t3.store_id WHERE t3.store_name = 'Miramichi' \nA: What products are sold at the store named Miramichi? \n Additional table information: table: store_product"} -{"text": "Q: SELECT id FROM instructor EXCEPT SELECT id FROM teaches \nA: What are the ids of instructors who didnt' teach? \n Additional table information: table: college_2"} -{"text": "Q: SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Completed' INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Part' \nA: Show the names of customers who have both an order in completed status and an order in part status. \n Additional table information: table: customers_and_products_contacts"} -{"text": "Q: SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor <> 'Rachel Elnaugh' \nA: What are the names of entrepreneurs whose investor is not 'Rachel Elnaugh'? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT COUNT(*), T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id \nA: For each product which has problems, what are the number of problems and the product id? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT DISTINCT T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Sarah Martinez' \nA: What are the names of all directors whose movies have been reviewed by Sarah Martinez? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT company, headquarters FROM company ORDER BY market_value DESC \nA: Show all company names and headquarters in the descending order of market value. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT Election_Cycle, COUNT(*) FROM VOTING_RECORD GROUP BY Election_Cycle \nA: Count the number of voting records for each election cycle. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT SUM(T2.Killed) FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 1.84 \nA: What is the total kills of the perpetrators with height more than 1.84. \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT customer_name, customer_phone FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM customer_address_history) \nA: Show names and phones of customers who do not have address information. \n Additional table information: table: customers_and_products_contacts"} -{"text": "Q: SELECT home_city FROM driver WHERE age > 40 GROUP BY home_city HAVING COUNT(*) >= 2 \nA: Show home city where at least two drivers older than 40 are from. \n Additional table information: table: school_bus"} -{"text": "Q: SELECT Birth_Date FROM People ORDER BY Height ASC NULLS FIRST \nA: What are the birthdays of people in ascending order of height? \n Additional table information: table: body_builder"} -{"text": "Q: SELECT T1.student_id, T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the student ID and login name of the student with the most course enrollments \n Additional table information: table: e_learning"} -{"text": "Q: SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Democratic' \nA: Return all the committees that have delegates from Democratic party. \n Additional table information: table: election"} -{"text": "Q: SELECT MAX(T1.stars), T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT MAX(YEAR) FROM Movie) \nA: What is highest rating for the most recent movie and when was it released? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT preferred_foot, AVG(overall_rating) FROM Player_Attributes GROUP BY preferred_foot \nA: What is the average rating for right-footed players and left-footed players? \n Additional table information: table: soccer_1"} -{"text": "Q: SELECT council_tax_id, cmi_cross_ref_id FROM parking_fines \nA: List the council tax ids and their related cmi cross references of all the parking fines. \n Additional table information: table: local_govt_mdm"} -{"text": "Q: SELECT T1.product_name, SUM(T2.order_quantity) FROM products AS T1 JOIN order_items AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_id \nA: Show the product name and total order quantity for each product. \n Additional table information: table: customers_and_products_contacts"} -{"text": "Q: SELECT COUNT(*) FROM DEPARTMENT WHERE Division = 'AS' \nA: What is the number of departments in Division 'AS'? \n Additional table information: table: college_3"} -{"text": "Q: SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number = t2.catalog_level_number ORDER BY t1.price_in_dollars NULLS FIRST LIMIT 1 \nA: What is the level name of the cheapest catalog (in USD)? \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT SUM(city_population) FROM district WHERE city_area > (SELECT AVG(city_area) FROM district) \nA: Find the total population of the districts where the area is bigger than the average city area. \n Additional table information: table: store_product"} -{"text": "Q: SELECT other_account_details FROM Accounts WHERE account_name = '338' \nA: Show other account details for account with name 338. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT date, mean_temperature_f, mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3 \nA: What are the date, mean temperature and mean humidity for the top 3 days with the largest max gust speeds? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT name FROM Reviewer UNION SELECT title FROM Movie \nA: What are the names of all the reviewers and movie names? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = 'Marianne' GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which vocal type has the band mate with first name 'Marianne' played the most? \n Additional table information: table: music_2"} -{"text": "Q: SELECT COUNT(*) FROM Ref_budget_codes \nA: How many budget types do we have? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT COUNT(*) FROM Documents \nA: Show the number of documents. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code = T2.color_code WHERE T2.color_description = 'yellow' \nA: Give the name of the products that have a color description 'yellow'. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT COUNT(*) FROM Rooms WHERE bedType = 'King' \nA: Find the number of rooms with a king bed. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT County_name FROM county ORDER BY Population ASC NULLS FIRST \nA: Sort the names of all counties in ascending order of population. \n Additional table information: table: election"} -{"text": "Q: SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = 'San Jose State University' AND t1.year = 2000 \nA: Find the campus fee of 'San Jose State University' in year 2000. \n Additional table information: table: csu_1"} -{"text": "Q: SELECT T1.staff_name, COUNT(*) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id GROUP BY T1.staff_name \nA: How many engineers did each staff contact? List both the contact staff name and number of engineers contacted. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT Writer FROM book ORDER BY Writer ASC NULLS FIRST \nA: List the writers of the books in ascending alphabetical order. \n Additional table information: table: book_2"} -{"text": "Q: SELECT title FROM course ORDER BY title NULLS FIRST, credits NULLS FIRST \nA: Given the titles of all courses, in order of titles and credits. \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*) FROM member WHERE address <> 'Hartford' \nA: How many members are not living in Hartford? \n Additional table information: table: coffee_shop"} -{"text": "Q: SELECT name FROM artist EXCEPT SELECT T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.year = 2004 \nA: Show all artist names who didn't have an exhibition in 2004. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT name, price FROM products WHERE price >= 180 ORDER BY price DESC, name ASC NULLS FIRST \nA: What are the names and prices of products that cost at least 180, sorted by price decreasing and name ascending? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT name FROM Person ORDER BY age DESC \nA: What are the names of everybody sorted by age in descending order? \n Additional table information: table: network_2"} -{"text": "Q: SELECT DISTINCT artist_name FROM artist WHERE country = 'Bangladesh' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7 \nA: Find the names of the artists who are from Bangladesh and have never received rating higher than 7. \n Additional table information: table: music_1"} -{"text": "Q: SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID HAVING COUNT(*) >= 3 \nA: What are the names of all reviewers that have rated 3 or more movies? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE country = 'Canada' \nA: How many routes end in a Canadian airport? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Jazz' \nA: What is the average unit price of tracks that belong to Jazz genre? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1 \nA: Return the famous release date for the oldest artist. \n Additional table information: table: music_4"} -{"text": "Q: SELECT Fname FROM FACULTY WHERE Rank = 'Professor' ORDER BY Fname NULLS FIRST \nA: What are the first names for all faculty professors, ordered by first name? \n Additional table information: table: college_3"} -{"text": "Q: SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which game type has most number of games? \n Additional table information: table: game_1"} -{"text": "Q: SELECT major, COUNT(*) FROM Student GROUP BY major \nA: Show all majors and corresponding number of students. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT other_details FROM Residents WHERE other_details LIKE '%Miss%' \nA: What are the resident details containing the substring 'Miss'? \n Additional table information: table: local_govt_and_lot"} -{"text": "Q: SELECT SUM(Enrollment), affiliation FROM university WHERE founded > 1850 GROUP BY affiliation \nA: Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT Name FROM phone WHERE NOT Phone_id IN (SELECT Phone_ID FROM phone_market) \nA: List the names of phones that are not on any market. \n Additional table information: table: phone_market"} -{"text": "Q: SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_id \nA: Which students not enrolled in any course? Find their personal names. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE stageposition = 'back' GROUP BY lastname ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the last name of the musician that has been at the back position the most? \n Additional table information: table: music_2"} -{"text": "Q: SELECT t1.name, t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id ORDER BY t2.support_rate DESC LIMIT 1 \nA: What is the name and sex of the candidate with the highest support rate? \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID \nA: Return the names of the gymnasts. \n Additional table information: table: gymnast"} -{"text": "Q: SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = 'walk' OR T2.How_to_Get_There = 'bus' \nA: What are the details of the markets that can be accessed by walk or bus? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT COUNT order_year FROM \"vehicles\".\"cars\" WHERE fleet_series_quantity = '468-473 (6)' \nA: how many times is the fleet series (quantity) is 468-473 (6)? \n Additional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion"} -{"text": "Q: SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1 \nA: What are the names of the courses that have exactly 1 student enrollment? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT name FROM buildings ORDER BY Height DESC \nA: What are the names of buildings sorted in descending order of building height? \n Additional table information: table: company_office"} -{"text": "Q: SELECT T2.customer_first_name, T2.customer_last_name, T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = '162' \nA: What is the first name, last name, and phone of the customer with account name 162? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT COUNT(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009 \nA: How many times did Boston Red Stockings lose in 2009 postseason? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT COUNT(*) FROM Video_games WHERE gtype = 'Massively multiplayer online game' \nA: Count the number of video games with Massively multiplayer online game type . \n Additional table information: table: game_1"} -{"text": "Q: 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' \nA: What are the names of ships that are commanded by both captains with the rank of Midshipman and captains with the rank of Lieutenant? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT DISTINCT President_Vote, VICE_President_Vote FROM VOTING_RECORD \nA: Report the distinct president vote and the vice president vote. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T1.Title, T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID \nA: What are the titles of films and corresponding types of market estimations? \n Additional table information: table: film_rank"} -{"text": "Q: 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' \nA: Show the document name and the document date for all documents on project with details 'Graph Database project'. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT COUNT(DISTINCT advisor) FROM Student \nA: How many advisors are there? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' INTERSECT SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Loss' \nA: Find the names of the swimmers who have both 'win' and 'loss' results in the record. \n Additional table information: table: swimming"} -{"text": "Q: SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*) > 2 \nA: Show the headquarters shared by more than two companies. \n Additional table information: table: company_office"} -{"text": "Q: SELECT name, flag FROM ship WHERE NOT ship_id IN (SELECT ship_id FROM captain WHERE rank = 'Midshipman') \nA: What are the names and flags of ships that do not have a captain with the rank of Midshipman? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT LName FROM STUDENT WHERE Sex = 'F' ORDER BY Age DESC \nA: What are the last names of female students, ordered by age descending? \n Additional table information: table: college_3"} -{"text": "Q: SELECT school, TYPE FROM school WHERE NOT school_id IN (SELECT school_id FROM school_bus) \nA: Show the school name and type for schools without a school bus. \n Additional table information: table: school_bus"} -{"text": "Q: SELECT COUNT(*) FROM item WHERE NOT i_id IN (SELECT i_id FROM review) \nA: Find the number of items that did not receive any review. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT DISTINCT Location_Name FROM LOCATIONS \nA: Show all distinct location names. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT COUNT(DISTINCT Industry) FROM Companies \nA: How many different industries are the companies in? \n Additional table information: table: company_office"} -{"text": "Q: SELECT COUNT(*) FROM scientists \nA: How many scientists are there? \n Additional table information: table: scientist_1"} -{"text": "Q: 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' \nA: What is the sum of hours for projects that scientists with the name Michael Rogers or Carol Smith are assigned to? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT name FROM circuits WHERE country = 'UK' OR country = 'Malaysia' \nA: What are the names of all the circuits that are in the UK or Malaysia? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT MAX(Age), MIN(Age) FROM STUDENT WHERE Major = 600 \nA: What are the maximum and minimum age of students with major 600? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T1.Service_Type_Description, T2.Service_Type_Code, COUNT(*) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T2.Service_Type_Code \nA: List the description, code and the number of services for each service type. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT DISTINCT address_type_code FROM customer_addresses \nA: What are the distinct address type codes for all customer addresses? \n Additional table information: table: customers_campaigns_ecommerce"} -{"text": "Q: SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff \nA: Which last names are both used by customers and by staff? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT DISTINCT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Brittany Harris' OR T2.year > 2000 \nA: What are names of the movies that are either made after 2000 or reviewed by Brittany Harris? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most frequent status of bookings? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = 'Cathrine' \nA: Return the addresses of the course authors or tutors whose personal name is 'Cathrine'. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT name FROM physician WHERE POSITION LIKE '%senior%' \nA: What are the names of the physicians who have 'senior' in their titles. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT Model_name, RAM_MiB FROM chip_model ORDER BY RAM_MiB ASC NULLS FIRST LIMIT 1 \nA: Which model has the least amount of RAM? List the model name and the amount of RAM. \n Additional table information: table: phone_1"} -{"text": "Q: SELECT building, COUNT(*) FROM Faculty GROUP BY building \nA: How many faculty members does each building have? List the result with the name of the building. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT name FROM program ORDER BY launch DESC LIMIT 1 \nA: Which program was launched most recently? Return the program name. \n Additional table information: table: program_share"} -{"text": "Q: SELECT interaction_type, COUNT(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most common interaction type between enzymes and medicine? And how many are there? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT T1.name FROM church AS T1 JOIN wedding AS T2 ON T1.church_id = T2.church_id GROUP BY T1.church_id HAVING COUNT(*) >= 2 \nA: Show all church names that have hosted least two weddings. \n Additional table information: table: wedding"} -{"text": "Q: SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1 \nA: Return the founded year for the school with the largest enrollment. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.' \nA: How many professors do have a Ph.D. degree? \n Additional table information: table: college_1"} -{"text": "Q: SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID = T2.nurse \nA: Find the names of nurses who are on call. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT COUNT(DISTINCT participant_id) FROM participants_in_Events \nA: What are all the distinct participant ids who attended any events? \n Additional table information: table: local_govt_in_alabama"} -{"text": "Q: SELECT T1.first_name, T1.last_name, T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY SUM(amount) ASC NULLS FIRST LIMIT 1 \nA: Which customer, who has made at least one payment, has spent the least money? List his or her first name, last name, and the id. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT name FROM pilot WHERE NOT pilot_id IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia') \nA: What are the names of the pilots that have not won any matches in Australia? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1 \nA: Show the name of the shop that have the largest quantity of devices in stock. \n Additional table information: table: device"} -{"text": "Q: SELECT MAX(years_working), MIN(years_working), AVG(years_working) FROM school_bus \nA: What is the maximum, minimum and average years spent working on a school bus? \n Additional table information: table: school_bus"} -{"text": "Q: SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma' \nA: Give me the average prices of wines that are produced by appelations in Sonoma County. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT Shop_Name, LOCATION FROM shop ORDER BY Shop_Name ASC NULLS FIRST \nA: What are the names and location of the shops in ascending alphabetical order of name. \n Additional table information: table: device"} -{"text": "Q: SELECT SUM(Amount_Claimed) FROM Claims \nA: Find the total claimed amount of all the claims. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT Product_Name, Product_Type_Code FROM Products \nA: What are the names and type codes of products? \n Additional table information: table: solvency_ii"} -{"text": "Q: SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = 'Deputy' \nA: Find the names of the customers who have an deputy policy. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num ORDER BY T2.emp_fname NULLS FIRST \nA: Find the first names and offices of all professors sorted by alphabetical order of their first name. \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(*) FROM Customers \nA: Show the number of customers. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT * FROM chip_model \nA: Find the details for all chip models. \n Additional table information: table: phone_1"} -{"text": "Q: SELECT COUNT(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city <> 'San Francisco' \nA: How many trips did not end in San Francisco? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT MIN(order_date) FROM Customer_Orders WHERE order_status_code = 'Cancelled') \nA: What are the distinct ids of customers who made an order after any order that was Cancelled? \n Additional table information: table: department_store"} -{"text": "Q: SELECT T1.invoice_date, T1.order_id, T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id \nA: What are the invoice dates, order ids, and order details for all invoices? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT TYPE, Nationality FROM ship \nA: What are the type and nationality of ships? \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT forename, surname FROM drivers WHERE nationality = 'German' \nA: What is the first and last name of all the German drivers? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines' \nA: Find the number of routes operated by American Airlines. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT Votes FROM election ORDER BY Votes DESC \nA: List the votes of elections in descending order. \n Additional table information: table: election_representative"} -{"text": "Q: SELECT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = 'Nameless , Painless' \nA: Find the first and last name of the author(s) who wrote the paper 'Nameless, Painless'. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT start_station_name, start_station_id FROM trip WHERE start_date LIKE '8/%' GROUP BY start_station_name ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the start station's name and id for the one that had the most start trips in August? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T1.name FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = 'Sigma' OR T1.brand = 'Olympus' \nA: What are the names of photos taken with the lens brand 'Sigma' or 'Olympus'? \n Additional table information: table: mountain_photos"} -{"text": "Q: SELECT COUNT(*), AVG(age), city_code FROM student GROUP BY city_code \nA: Find the number and average age of students living in each city. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT COUNT(*) FROM authors \nA: How many authors are there? \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT location_code, location_name FROM Ref_locations \nA: What are all the location codes and location names? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT AVG(enr) FROM College WHERE state = 'FL' \nA: What is average number of students enrolled in Florida colleges? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT company FROM customers WHERE first_name = 'Eduardo' AND last_name = 'Martins' \nA: What is the company where Eduardo Martins is a customer? \n Additional table information: table: store_1"} -{"text": "Q: SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 1996 \nA: Find the average fee on a CSU campus in 1996 \n Additional table information: table: csu_1"} -{"text": "Q: SELECT MAX(Silver), MIN(Silver) FROM club_rank \nA: What are the maximum and minimum number of silver medals for clubs. \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT dept_name, building FROM department WHERE budget > (SELECT AVG(budget) FROM department) \nA: What is the name and building of the departments whose budget is more than the average budget? \n Additional table information: table: college_2"} -{"text": "Q: SELECT AVG(T1.age) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.student_capacity = (SELECT MAX(student_capacity) FROM dorm) \nA: What is the average age of students who are living in the dorm with the largest capacity? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT login_name, family_name FROM Course_Authors_and_Tutors \nA: List all the login names and family names of course author and tutors. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT order_id FROM shipments WHERE shipment_date > '2000-01-01' \nA: Which orders have shipment after 2000-01-01? Give me the order ids. \n Additional table information: table: tracking_orders"} -{"text": "Q: 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 \nA: Which order deals with the most items? Return the order id. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT firstname FROM list WHERE classroom = 108 \nA: Find the first names of students studying in room 108. \n Additional table information: table: student_1"} -{"text": "Q: 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 \nA: Find the city that hosted the most events. \n Additional table information: table: city_record"} -{"text": "Q: SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn' INTERSECT SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Triton' \nA: Show the names of donors who donated to both school 'Glenn' and 'Triton.' \n Additional table information: table: school_finance"} -{"text": "Q: SELECT Name FROM pilot ORDER BY Age DESC \nA: List names of all pilot in descending order of age. \n Additional table information: table: aircraft"} -{"text": "Q: SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the membership level with the most people? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT login_name FROM Students WHERE family_name = 'Ward' \nA: Return the login names of the students whose family name is 'Ward'. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT COUNT(*) FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.city = 'Lake Geovannyton' \nA: How many customers are living in city 'Lake Geovannyton'? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = 'Spain' AND T1.year > 2017 \nA: What are the names of races that were held after 2017 and the circuits were in the country of Spain? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T1.Service_Type_Description, T2.Service_Type_Code, COUNT(*) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T2.Service_Type_Code \nA: What is the description, code and the corresponding count of each service type? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT COUNT(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code = T2.dept_code WHERE dept_name = 'Computer Info. Systems' \nA: How many courses are offered by the Computer Info. Systems department? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = 'mp3' INTERSECT SELECT song_name FROM song WHERE resolution < 1000 \nA: What are the names of all songs that are in mp3 format and have a resolution lower than 1000? \n Additional table information: table: music_1"} -{"text": "Q: SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name and age of the pilot younger than 30 who has won the most number of times? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT transaction_type_code, MAX(share_count), MIN(share_count) FROM TRANSACTIONS GROUP BY transaction_type_code \nA: Show the maximum and minimum share count of different transaction types. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = 'Japan' AND t2.authorder = 1 AND t1.lname = 'Ohori' \nA: Find the titles of papers whose first author is affiliated with an institution in the country 'Japan' and has last name 'Ohori'? \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T1.flno = 99 \nA: What is the name of the aircraft that was on flight number 99? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT DISTINCT staff_first_name, staff_last_name FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T2.problem_id = 1 \nA: Which staff members are assigned to the problem with id 1? Give me their first and last names. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T1.dept_code = T3.dept_code WHERE T3.dept_name = 'History' AND T1.prof_high_degree <> 'Ph.D.' \nA: Find the first name and office of history professor who did not get a Ph.D. degree. \n Additional table information: table: college_1"} -{"text": "Q: SELECT T1.CName FROM COURSE AS T1 JOIN ENROLLED_IN AS T2 ON T1.CID = T2.CID GROUP BY T2.CID HAVING COUNT(*) >= 5 \nA: What are the name of courses that have at least five enrollments? \n Additional table information: table: college_3"} -{"text": "Q: SELECT T2.name, AVG(T1.age) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend GROUP BY T2.name ORDER BY AVG(T1.age) DESC LIMIT 1 \nA: What is the name of the person who has the oldest average age for their friends, and what is that average age? \n Additional table information: table: network_2"} -{"text": "Q: SELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner' \nA: What are the ranks of captains that are both in the Cutter and Armed schooner classes? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' \nA: Find the names of swimmers who has a result of 'win'. \n Additional table information: table: swimming"} -{"text": "Q: SELECT COUNT(DISTINCT director) FROM movie \nA: How many movie directors are there? \n Additional table information: table: culture_company"} -{"text": "Q: SELECT name FROM people ORDER BY date_of_birth NULLS FIRST \nA: List all people names in the order of their date of birth from old to young. \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT home_city FROM driver GROUP BY home_city ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the home city with the most number of drivers. \n Additional table information: table: school_bus"} -{"text": "Q: SELECT individual_first_name, individual_middle_name, individual_last_name FROM individuals ORDER BY individual_last_name NULLS FIRST \nA: List every individual's first name, middle name and last name in alphabetical order by last name. \n Additional table information: table: e_government"} -{"text": "Q: SELECT COUNT(*) FROM services \nA: How many services are there? \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2002 AND T2.campus = 'Long Beach State University' \nA: What is the number of faculty lines in campus 'Long Beach State University' in 2002? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT Aircraft FROM aircraft WHERE NOT Aircraft_ID IN (SELECT Winning_Aircraft FROM MATCH) \nA: What are the names of all aicrafts that have never won any match? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' AND t2.position = 'CTO' \nA: Who is the 'CTO' of club 'Hopkins Student Enterprises'? Show the first name and last name. \n Additional table information: table: club_1"} -{"text": "Q: SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000 \nA: What is the name of the movie produced after 2000 and directed by James Cameron? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT minister, took_office, left_office FROM party ORDER BY left_office NULLS FIRST \nA: Who are the ministers, when did they take office, and when did they leave office, ordered by when they left office? \n Additional table information: table: party_people"} -{"text": "Q: SELECT AVG(Gross_in_dollar) FROM film \nA: Return the average gross sales in dollars across all films. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT T1.student_details FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is detail of the student who registered the most number of courses? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT Player, Years_Played FROM player \nA: Who are the different players and how many years has each played? \n Additional table information: table: match_season"} -{"text": "Q: SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200 \nA: What are the titles of films that are either longer than 100 minutes or rated PG other than those that cost more than 200 to replace? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT COUNT(*) FROM (SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 3) \nA: What is the count of cities with more than 3 airports? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT COUNT(*) FROM Faculty \nA: What is the total number of faculty members? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student \nA: What are ids of the faculty members who not only participate in an activity but also advise a student. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = 'Dublin' \nA: What are the distinct positions of the players from a country whose capital is Dublin? \n Additional table information: table: match_season"} -{"text": "Q: SELECT T1.School_name, T1.Mascot, T1.IHSAA_Football_Class FROM school AS T1 JOIN budget AS T2 ON T1.school_id = T2.school_id WHERE Budgeted > 6000 OR YEAR < 2003 ORDER BY T2.total_budget_percent_invested NULLS FIRST, T2.total_budget_percent_budgeted NULLS FIRST \nA: List the name, IHSAA Football Class, and Mascot of the schools that have more than 6000 of budgeted amount or were founded before 2003, in the order of percent of total invested budget and total budgeted budget. \n Additional table information: table: school_finance"} -{"text": "Q: SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Rock' \nA: Count the number of tracks that are part of the rock genre. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT DISTINCT donator_name FROM endowment \nA: Show all donor names. \n Additional table information: table: school_finance"} -{"text": "Q: SELECT COUNT(*), city FROM airports WHERE country = 'United States' GROUP BY city ORDER BY COUNT(*) DESC \nA: How many airports are there per city in the United States? Order the cities by decreasing number of airports. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code \nA: List the description of the outcomes for all projects. \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT DISTINCT T1.EMP_FNAME, T1.EMP_DOB FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE CRS_CODE = 'ACCT-211' \nA: What are the first names and birthdates of the professors in charge of ACCT-211? \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(*) FROM APPELLATIONS WHERE County = 'Napa' \nA: How many appelations are in Napa Country? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = 'San Francisco State University' AND t2.year = 2001 \nA: What are the degrees conferred in 'San Francisco State University' in 2001. \n Additional table information: table: csu_1"} -{"text": "Q: SELECT T2.emp_fname, T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code \nA: What are the first names of all teachers who have taught a course and the corresponding descriptions? \n Additional table information: table: college_1"} -{"text": "Q: SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = 'San Jose State University' AND t2.year = 2000 \nA: How many degrees were conferred at San Jose State University in 2000? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT title FROM albums WHERE title LIKE 'A%' ORDER BY title NULLS FIRST \nA: What are the titles of all albums that start with A in alphabetical order? \n Additional table information: table: store_1"} -{"text": "Q: SELECT Age FROM artist \nA: List the age of all music artists. \n Additional table information: table: music_4"} -{"text": "Q: SELECT COUNT(*) FROM products WHERE price >= 180 \nA: How many products have prices of at least 180? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT COUNT(DISTINCT class_code) FROM CLASS \nA: How many unique classes are offered? \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(DISTINCT complaint_type_code) FROM complaints \nA: Count the number of different complaint type codes. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT COUNT(*) FROM program \nA: Count the number of programs. \n Additional table information: table: program_share"} -{"text": "Q: SELECT MAX(T1.HS), pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos \nA: What is the maximum training hours for the students whose training hours is greater than 1000 in different positions? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT founder FROM manufacturers WHERE name LIKE 'S%' \nA: Find the founder of the company whose name begins with the letter 'S'. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT T1.name_full, T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the full name and id of the college that has the most baseball players. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT T3.Name, T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID \nA: Show names of technicians and series of machines they are assigned to repair. \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT name, LOCATION, year_opened FROM track WHERE seating > (SELECT AVG(seating) FROM track) \nA: What are the names, locations, and years of opening for tracks with seating higher than average? \n Additional table information: table: race_track"} -{"text": "Q: SELECT COUNT(*) FROM park WHERE city = 'Atlanta' \nA: How many parks does Atlanta city have? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT AVG(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = 'Monaco Grand Prix' \nA: What is the average fastest lap speed for the Monaco Grand Prix in 2008? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T2.Name, T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID ORDER BY T3.Attendance DESC \nA: Show the names of members and the dates of performances they attended in descending order of attendance of the performances. \n Additional table information: table: performance_attendance"} -{"text": "Q: SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211' \nA: What are the first names of all students in course ACCT-211? \n Additional table information: table: college_1"} -{"text": "Q: SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Badlands' \nA: What types of vocals are used in the song 'Badlands'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT COUNT(*) FROM club \nA: Count the total number of clubs. \n Additional table information: table: club_1"} -{"text": "Q: SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = 'Balls to the Wall' \nA: What is the name of all tracks in the album named Balls to the Wall? \n Additional table information: table: store_1"} -{"text": "Q: SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000 \nA: Show the names of mountains with height more than 5000 or prominence more than 1000. \n Additional table information: table: climbing"} -{"text": "Q: SELECT T3.Name, T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID ORDER BY T1.Year_working NULLS FIRST \nA: Show names of companies and that of employees in descending order of number of years working for that employee. \n Additional table information: table: company_employee"} -{"text": "Q: SELECT DISTINCT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000 \nA: What are the forenames and surnames of all unique drivers who had a lap time of less than 93000 milliseconds? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT Nominee FROM musical WHERE Award = 'Tony Award' OR Award = 'Cleavant Derricks' \nA: Who are the nominees who were nominated for either of the Bob Fosse or Cleavant Derricks awards? \n Additional table information: table: musical"} -{"text": "Q: SELECT document_type_code, document_name, document_description FROM Documents WHERE document_name = 'Noel CV' OR document_name = 'King Book' \nA: What are the type come, name, and description of the document that has either the name 'Noel CV' or 'King Book'? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT DISTINCT Visit_Date FROM VISITS \nA: What are the distinct visit dates? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT T2.customer_first_name, T2.customer_last_name, T2.customer_phone FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_number = '4560596484842' \nA: Return the full name and phone of the customer who has card number 4560596484842. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT nickname FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn' \nA: What is the nickname of the employee named Janessa Sawayn? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE '%Functional%' \nA: Find the first names of all the authors who have written a paper with title containing the word 'Functional'. \n Additional table information: table: icfp_1"} -{"text": "Q: 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 \nA: What are the ids, names and genders of the architects who built two bridges or one mill? \n Additional table information: table: architecture"} -{"text": "Q: SELECT COUNT(DISTINCT temporary_acting) FROM management \nA: How many acting statuses are there? \n Additional table information: table: department_management"} -{"text": "Q: SELECT T1.cust_name, T1.acc_type FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING SUM(T2.amount) > 5000 \nA: What are the names and account balances for customers who have taken a total amount of more than 5000 in loans? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT COUNT(*) FROM chip_model WHERE wifi = 'No' \nA: How many models do not have the wifi function? \n Additional table information: table: phone_1"} -{"text": "Q: SELECT MAX(Sales_billion), MIN(Sales_billion) FROM Companies WHERE Industry <> 'Banking' \nA: What are the maximum and minimum sales of the companies whose industries are not 'Banking'. \n Additional table information: table: company_office"} -{"text": "Q: SELECT cName FROM college WHERE enr > (SELECT MAX(enr) FROM college WHERE state = 'FL') \nA: What are the names of all colleges with a larger enrollment than the largest college in Florida? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'shopping' \nA: What are the names of the tourist attractions that have parking or shopping as their feature details? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT Category, COUNT(*) FROM music_festival GROUP BY Category \nA: Return the number of music festivals of each category. \n Additional table information: table: music_4"} -{"text": "Q: SELECT Address FROM Restaurant WHERE ResName = 'Subway' \nA: What is the address of the restaurant Subway? \n Additional table information: table: restaurant_1"} -{"text": "Q: SELECT SUM(grant_amount), organisation_id FROM Grants GROUP BY organisation_id \nA: What is the total amount of grant money given to each organization and what is its id? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT * FROM Albums WHERE YEAR = 2012 \nA: Find all the albums in 2012. \n Additional table information: table: music_2"} -{"text": "Q: SELECT city FROM Addresses ORDER BY city NULLS FIRST \nA: List all cities of addresses in alphabetical order. \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT StuID FROM Student WHERE sex = 'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname = 'Football' \nA: What are the ids of all male students who do not play football? \n Additional table information: table: game_1"} -{"text": "Q: SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1 \nA: Please show the most common reigns of wrestlers. \n Additional table information: table: wrestler"} -{"text": "Q: SELECT stu_gpa, stu_phone, stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5 \nA: What is the first name, gpa and phone number of the top 5 students with highest gpa? \n Additional table information: table: college_1"} -{"text": "Q: SELECT investor_id, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY investor_id \nA: Show the average amount of transactions for different investors. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT T1.sales_details, T2.date_of_transaction FROM SALES AS T1 JOIN TRANSACTIONS AS T2 ON T1.sales_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction < 3000 \nA: What are the sale details and dates of transactions with amount smaller than 3000? \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Tennis Club' \nA: Retrieve the average age of members of the club 'Tennis Club'. \n Additional table information: table: club_1"} -{"text": "Q: SELECT T1.id, T1.score, T1.date FROM game AS T1 JOIN injury_accident AS T2 ON T2.game_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 2 \nA: What are the ids, scores, and dates of the games which caused at least two injury accidents? \n Additional table information: table: game_injury"} -{"text": "Q: SELECT AVG(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID \nA: Return the average age across all gymnasts. \n Additional table information: table: gymnast"} -{"text": "Q: SELECT SUM(stu_hrs), dept_code FROM student GROUP BY dept_code \nA: How many hours do the students spend studying in each department? \n Additional table information: table: college_1"} -{"text": "Q: SELECT DISTINCT product_details FROM products \nA: Return the the details of all products. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT name FROM department GROUP BY departmentID ORDER BY COUNT(departmentID) DESC LIMIT 1 \nA: Find the department with the most employees. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT first_name FROM actor GROUP BY first_name ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the most common first name among all actors. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT customer_id, customer_first_name FROM Customers EXCEPT SELECT T1.customer_id, T2.customer_first_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE card_type_code = 'Credit' \nA: What are the ids and first names of customers who do not hold a credit card? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT theme, YEAR FROM exhibition ORDER BY ticket_price DESC \nA: What are the themes and years for exhibitions, sorted by ticket price descending? \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT city FROM airports WHERE country = 'United States' GROUP BY city HAVING COUNT(*) > 3 \nA: Return the cities with more than 3 airports in the United States. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT country FROM addresses GROUP BY country HAVING COUNT(address_id) > 4 \nA: For which countries are there more than four distinct addresses listed? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT t1.name FROM train AS t1 JOIN route AS t2 ON t1.id = t2.train_id GROUP BY t2.train_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the name of the train whose route runs through greatest number of stations. \n Additional table information: table: station_weather"} -{"text": "Q: SELECT T1.pName, T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' \nA: What are the names and hours spent practicing of every student who received a yes at tryouts? \n Additional table information: table: soccer_2"} -{"text": "Q: 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 \nA: Find the county where produces the most number of wines with score higher than 90. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT COUNT(*) FROM HOTELS \nA: Find the total number of available hotels. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING COUNT(*) < 3 \nA: Show the document type code with fewer than 3 documents. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT COUNT(*), flag FROM ship GROUP BY flag \nA: What are the different ship flags, and how many ships have each? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT T2.customer_first_name, T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = '900' \nA: Show the first name and last name for the customer with account name 900. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT COUNT(*) FROM Accounts \nA: Show the number of accounts. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name HAVING COUNT(*) >= 2 \nA: Give the names of characteristics that are in two or more products? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T1.campus, SUM(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T1.county = 'Orange' AND T2.year >= 2000 GROUP BY T1.campus \nA: What is the total number of degrees granted after 2000 for each Orange county campus? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT COUNT(*) FROM dorm \nA: How many dorms are there? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T1.part_name, COUNT(*) FROM Parts AS T1 JOIN Asset_Parts AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name \nA: How many assets can each parts be used in? List the part name and the number. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT COUNT(T1.SSN) FROM patient AS T1 JOIN prescribes AS T2 ON T1.SSN = T2.patient JOIN physician AS T3 ON T2.physician = T3.employeeid WHERE T3.name = 'John Dorian' \nA: Find the number of patients' prescriptions physician John Dorian made. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT Payment_ID, Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa' \nA: Give me the payment Id, the date and the amount for all the payments processed with Visa. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT email FROM employees WHERE commission_pct = 'null' AND salary BETWEEN 7000 AND 12000 AND department_id = 50 \nA: What are the emails of employees with null commission, salary between 7000 and 12000, and who work in department 50? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT DISTINCT T2.source_system_code FROM customer_master_index AS T1 JOIN cmi_cross_references AS T2 ON T1.master_customer_id = T2.master_customer_id WHERE T1.cmi_details = 'Gottlieb , Becker and Wyman' \nA: What are the distinct cross reference source system codes which are related to the master customer details 'Gottlieb, Becker and Wyman'? \n Additional table information: table: local_govt_mdm"} -{"text": "Q: SELECT COUNT(*) FROM Student WHERE age = 18 \nA: How many students are age 18? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE = 'Fall' \nA: Return all the distinct secretary votes made in the fall election cycle. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T2.Country, T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID \nA: Please list the countries and years of film market estimations. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT T1.first_name, T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id \nA: What are the first name and department name of all employees? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id GROUP BY t2.customer_details ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the name of the customer that has been involved in the most policies. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT COUNT(*) FROM race \nA: Count the number of races. \n Additional table information: table: race_track"} -{"text": "Q: SELECT document_type_code, document_name, document_description FROM Documents WHERE document_name = 'Noel CV' OR document_name = 'King Book' \nA: List the document type code, document name, and document description for the document with name 'Noel CV' or name 'King Book'. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_details = 'quo' \nA: Find the organisation type description of the organisation detailed as 'quo'. \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT Name FROM actor WHERE Age <> 20 \nA: List the name of actors whose age is not 20. \n Additional table information: table: musical"} -{"text": "Q: SELECT name FROM program EXCEPT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Morning' \nA: Find the names of programs that are never broadcasted in the morning. \n Additional table information: table: program_share"} -{"text": "Q: SELECT customer_name FROM customers \nA: Find the name of all customers. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT name FROM building WHERE NOT building_id IN (SELECT building_id FROM institution) \nA: Show the name of buildings that do not have any institution. \n Additional table information: table: protein_institute"} -{"text": "Q: SELECT COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = 'food' \nA: How many students are affected by food related allergies? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT COUNT(*) FROM artist WHERE age > 46 AND year_join > 1990 \nA: Count the number of artists who are older than 46 and joined after 1990. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT T2.Fname, T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY COUNT(*) DESC LIMIT 3 \nA: What are the full names of the 3 instructors who teach the most courses? \n Additional table information: table: college_3"} -{"text": "Q: SELECT LOCATION, COUNT(*) FROM performance GROUP BY LOCATION \nA: Show different locations and the number of performances at each location. \n Additional table information: table: performance_attendance"} -{"text": "Q: SELECT * FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code \nA: Select all the data from the products and each product's manufacturer. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT T3.manager_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.company = 'ExxonMobil' \nA: Show the manager name for gas stations belonging to the ExxonMobil company. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT T1.product_name, T2.color_description, T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code = T2.color_code WHERE product_category_code = 'Herbs' \nA: What are the names, color descriptions, and product descriptions for products in the 'Herbs' category? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT COUNT(*) FROM airlines WHERE country = 'Russia' \nA: What is the number of airlines based in Russia? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which room has the largest number of reservations? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT T1.Date_of_ceremony FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T2.Weeks_on_Top > 2 \nA: What are the dates of ceremony at music festivals corresponding to volumes that lasted more than 2 weeks on top? \n Additional table information: table: music_4"} -{"text": "Q: SELECT id FROM trip ORDER BY duration NULLS FIRST LIMIT 1 \nA: What is the id of the trip that has the shortest duration? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T3.Name, T2.Date FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID \nA: Show the names of journalists and the dates of the events they reported. \n Additional table information: table: news_report"} -{"text": "Q: SELECT T1.subject_id, T2.subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id \nA: Find the subject ID, subject name, and the corresponding number of available courses for each subject. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT TYPE, Nationality FROM ship \nA: What are the types and nationalities of every ship? \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT name FROM station WHERE city = 'Palo Alto' EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING COUNT(*) > 100 \nA: What are the names of the stations that are located in Palo Alto but have never been the ending point of the trips \n Additional table information: table: bike_1"} -{"text": "Q: SELECT LOCATION FROM gas_station ORDER BY open_year NULLS FIRST \nA: order all gas station locations by the opening year. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Australian Grand Prix' INTERSECT SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Chinese Grand Prix' \nA: Find the id and forenames of drivers who participated both the races with name Australian Grand Prix and the races with name Chinese Grand Prix? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT COUNT(DISTINCT course_id) FROM course WHERE dept_name = 'Physics' \nA: How many different courses offered by Physics department? \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*) FROM Accounts \nA: How many accounts do we have? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT AVG(high_temperature), day_of_week FROM weekly_weather GROUP BY day_of_week \nA: What is the average high temperature for each day of week? \n Additional table information: table: station_weather"} -{"text": "Q: SELECT COUNT(DISTINCT team) FROM elimination \nA: What is the number of distinct teams that suffer elimination? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT MAX(Points) FROM climber WHERE Country = 'United Kingdom' \nA: Return the maximum number of points for climbers from the United Kingdom. \n Additional table information: table: climbing"} -{"text": "Q: SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age NULLS FIRST LIMIT 1 \nA: How old is the youngest winning pilot and what is their name? \n Additional table information: table: aircraft"} -{"text": "Q: 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' \nA: Find the venue of the competition '1994 FIFA World Cup qualification' which was hosted by 'Nanjing ( Jiangsu )'. \n Additional table information: table: city_record"} -{"text": "Q: SELECT T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID WHERE T3.Age < 34 \nA: Show the fleet series of the aircrafts flied by pilots younger than 34 \n Additional table information: table: pilot_record"} -{"text": "Q: SELECT T1.id, T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id WHERE T2.interaction_type = 'activitor' GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the id and name of the enzyme with most number of medicines that can interact as 'activator'? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT booking_start_date, booking_end_date FROM Apartment_Bookings \nA: What are the start date and end date of each apartment booking? \n Additional table information: table: apartment_rentals"} -{"text": "Q: 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 \nA: What is the name of the party form that is most common? \n Additional table information: table: e_government"} -{"text": "Q: SELECT DISTINCT customer_details FROM Customers \nA: What are all the distinct details of the customers? \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT Nationality FROM journalist GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the most common nationality for journalists. \n Additional table information: table: news_report"} -{"text": "Q: SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the most common type code across products. \n Additional table information: table: solvency_ii"} -{"text": "Q: SELECT T1.claim_id, T1.date_claim_made, COUNT(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the claim id and claim date of the claim that incurred the most settlement count. Also tell me the count. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT COUNT(DISTINCT i_id) FROM review \nA: How many different items were reviewed by some users? \n Additional table information: table: epinions_1"} -{"text": "Q: 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 \nA: Show the school name and driver name for all school buses. \n Additional table information: table: school_bus"} -{"text": "Q: SELECT AVG(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = 'Female' \nA: What is the average rating of songs produced by female artists? \n Additional table information: table: music_1"} -{"text": "Q: SELECT SUM(revenue), founder FROM manufacturers GROUP BY founder \nA: What is the total revenue of companies started by founder? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'inhibitor' INTERSECT SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'activitor' \nA: List the medicine name and trade name which can both interact as 'inhibitor' and 'activitor' with enzymes. \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT T1.member_name, T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id \nA: List member names and their party names. \n Additional table information: table: party_people"} -{"text": "Q: SELECT COUNT(DISTINCT customer_id) FROM customer_orders WHERE order_status = 'Cancelled' \nA: Return the number of customers who have at least one order with 'Cancelled' status. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa NULLS FIRST LIMIT 1 \nA: What is the department name of the students with lowest gpa belongs to? \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(DISTINCT OWNER) FROM channel \nA: what is the number of different channel owners? \n Additional table information: table: program_share"} -{"text": "Q: SELECT AVG(no_of_customers) FROM bank WHERE state = 'Utah' \nA: Find the average number of customers in all banks of Utah state. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT DISTINCT country FROM artist \nA: What are all distinct country for artists? \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT T2.name FROM photos AS T1 JOIN camera_lens AS T2 ON T1.camera_lens_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the names of the cameras that have taken picture of the most mountains? \n Additional table information: table: mountain_photos"} -{"text": "Q: SELECT employee_id, job_id FROM employees WHERE salary < (SELECT MIN(salary) FROM employees WHERE job_id = 'MK_MAN') \nA: display the employee number and job id for all employees whose salary is smaller than any salary of those employees whose job title is MK_MAN. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS = 'Third-rate ship of the line' \nA: What are the ranks of captains that have no captain that are in the Third-rate ship of the line class? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT AVG(Enrollment) FROM school \nA: Take the average of the school enrollment. \n Additional table information: table: school_player"} -{"text": "Q: SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised NULLS FIRST LIMIT 1 \nA: Return the last name of the staff member who handled the complaint with the earliest date raised. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT COUNT(DISTINCT s_id) FROM advisor \nA: How many students have advisors? \n Additional table information: table: college_2"} -{"text": "Q: SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'Mobile Computing') \nA: What is the title of the course that is a prerequisite for Mobile Computing? \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*), flag FROM ship GROUP BY flag \nA: Group by ships by flag, and return number of ships that have each flag. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = 'SALE' GROUP BY T2.investor_id HAVING COUNT(*) >= 2 \nA: Show the ids and details of the investors who have at least two transactions with type code 'SALE'. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT name FROM browser ORDER BY market_share DESC \nA: List the name of browsers in descending order by market share. \n Additional table information: table: browser_web"} -{"text": "Q: SELECT characteristic_name, other_characteristic_details, characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name, t1.other_characteristic_details, t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id = t2.characteristic_id \nA: Give the names, details, and data types of characteristics that are not found in any product. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name = 'Open' \nA: Find the description of the claim status 'Open'. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT Weight FROM people ORDER BY Height ASC NULLS FIRST LIMIT 1 \nA: Return the weight of the shortest person. \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2 \nA: Which locations are shared by more than two wrestlers? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT COUNT(DISTINCT T2.id), COUNT(DISTINCT T3.id), T3.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_name = T2.dept_name JOIN instructor AS T3 ON T1.dept_name = T3.dept_name GROUP BY T3.dept_name \nA: How many students and instructors are in each department? \n Additional table information: table: college_2"} -{"text": "Q: SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'GELL' AND T1.lastname = 'TAMI' \nA: Find the last names of all the teachers that teach GELL TAMI. \n Additional table information: table: student_1"} -{"text": "Q: SELECT COUNT(DISTINCT language_id) FROM film \nA: Count the number of different languages in these films. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_details = 'quo' \nA: What is the type description of the organization whose detail is listed as 'quo'? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT Name FROM city ORDER BY White DESC LIMIT 5 \nA: List the names of the city with the top 5 white percentages. \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT investor_id, COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code = 'SALE' GROUP BY investor_id \nA: Show the number of transactions with transaction type code 'SALE' for different investors if it is larger than 0. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT order_id, SUM(product_quantity) FROM Order_items GROUP BY order_id \nA: Show order ids and the total quantity in each order. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT * FROM COURSE ORDER BY Credits NULLS FIRST \nA: List all information about courses sorted by credits in the ascending order. \n Additional table information: table: college_3"} -{"text": "Q: SELECT COUNT(*) FROM Reviewer \nA: How many reviewers are there? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_outcomes) \nA: What are the details of the project with no outcomes? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num GROUP BY T2.stu_num HAVING COUNT(*) = 1 \nA: What are the first names of student who only took one course? \n Additional table information: table: college_1"} -{"text": "Q: SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes' \nA: Find the states where have some college students in tryout and their decisions are yes. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT zip_code FROM weather GROUP BY zip_code HAVING AVG(mean_visibility_miles) < 10 \nA: Find the zip code in which the average mean visibility is lower than 10. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT COUNT(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Columbus Crew' \nA: Count the number of different colleges that players who play for Columbus Crew are from. \n Additional table information: table: match_season"} -{"text": "Q: SELECT COUNT(*) FROM Documents_with_expenses \nA: Count the number of documents with expenses. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC NULLS FIRST \nA: List the research staff details, and order in ascending order. \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT headquarters FROM company WHERE main_industry = 'Banking' GROUP BY headquarters HAVING COUNT(*) >= 2 \nA: Show headquarters with at least two companies in the banking industry. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT Description FROM aircraft \nA: List the description of all aircrafts. \n Additional table information: table: aircraft"} -{"text": "Q: SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY SUM(degrees) DESC LIMIT 1 \nA: Which year has the most degrees conferred? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE = 'Fall' \nA: What are the distinct secretary votes in the fall election cycle? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT Weight FROM people ORDER BY Height ASC NULLS FIRST LIMIT 1 \nA: What is the weight of the shortest person? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T2.balance > T3.balance \nA: What are the names of customers with a higher checking balance than savings balance? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT AVG(Money_Requested) FROM entrepreneur \nA: What is the average money requested by all entrepreneurs? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT Official_Name FROM city ORDER BY Population DESC \nA: List official names of cities in descending order of population. \n Additional table information: table: farm"} -{"text": "Q: SELECT COUNT(*) FROM people WHERE is_male = 'F' AND age > 30 \nA: How many female people are older than 30 in our record? \n Additional table information: table: wedding"} -{"text": "Q: SELECT Name, birth_place FROM people EXCEPT SELECT T1.Name, T1.birth_place FROM people AS T1 JOIN body_builder AS T2 ON T1.people_id = T2.people_id \nA: List the names and origins of people who are not body builders. \n Additional table information: table: body_builder"} -{"text": "Q: SELECT SUM(market_rate) FROM furniture ORDER BY market_rate DESC LIMIT 2 \nA: find the total market rate of the furnitures that have the top 2 market shares. \n Additional table information: table: manufacturer"} -{"text": "Q: SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF' \nA: Give the ids of documents with expenses that have the budget code 'SF'. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT first_name, last_name, salary FROM employees WHERE first_name LIKE '%m' \nA: Return the full names and salaries for employees with first names that end with the letter m. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT location_code, date_in_location_from, date_in_locaton_to FROM Document_locations \nA: Show the location code, the starting date and ending data in that location for all the documents. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT company, rank FROM company ORDER BY Sales_billion DESC \nA: List the company name and rank for all companies in the decreasing order of their sales. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT COUNT(*), T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id \nA: How many tasks does each project have? List the task count and the project detail. \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT COUNT(*) FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid WHERE T3.Title = 'Flash' \nA: How many musicians play in the song 'Flash'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT T3.Name, COUNT(*) FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID GROUP BY T3.Name \nA: Show the names of companies and the number of employees they have \n Additional table information: table: company_employee"} -{"text": "Q: SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Confirmed' INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Provisional' \nA: Which apartments have bookings with both status codes 'Provisional' and 'Confirmed'? Give me the apartment numbers. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Christop' AND T2.staff_last_name = 'Berge' INTERSECT SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.closure_authorised_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Ashley' AND T2.staff_last_name = 'Medhurst' \nA: For which product was there a problem reported by Christop Berge, with closure authorised by Ashley Medhurst? Return the product ids. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT T3.name FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id JOIN artist AS T3 ON T3.artist_id = T2.artist_id GROUP BY T3.artist_id HAVING AVG(T1.attendance) > 200 \nA: What are the names of artist whose exhibitions draw over 200 attendees on average? \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT text_bg_color FROM \"regional_marketing\" WHERE State/territory = 'Australian Capital Territory' \nA: Name the background colour for the Australian Capital Territory. \n Additional table information: table: regional_marketing\ncolumns: state_territory, text_bg_color, format, current_slogan, current_series, Notes"} -{"text": "Q: SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the payment method code used by the most orders? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq \nA: What are the ids of courses without prerequisites? \n Additional table information: table: college_2"} -{"text": "Q: SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE '%film%' \nA: Which location names contain the word 'film'? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Success' INTERSECT SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Fail' \nA: Which services type had both successful and failure event details? \n Additional table information: table: local_govt_in_alabama"} -{"text": "Q: SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: With which kind of payment method were the least number of payments processed? \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT AVG(T2.gradepoint) FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.LName = 'Smith' \nA: What is the average gradepoint for students with the last name Smith? \n Additional table information: table: college_3"} -{"text": "Q: SELECT T1.Name, MAX(T1.Price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name \nA: For each manufacturer name, what are the names and prices of their most expensive product? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT classroom, COUNT(*) FROM list WHERE grade = '4' GROUP BY classroom \nA: For each fourth-grade classroom, show the classroom number and the total number of students using it. \n Additional table information: table: student_1"} -{"text": "Q: SELECT id FROM teaches WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT id FROM teaches WHERE semester = 'Spring' AND YEAR = 2010 \nA: What are the ids of instructors who taught in the Fall of 2009 but not in the Spring of 2010? \n Additional table information: table: college_2"} -{"text": "Q: SELECT ObjectNumber FROM railway WHERE NOT Railway_ID IN (SELECT Railway_ID FROM train) \nA: List the object number of railways that do not have any trains. \n Additional table information: table: railway"} -{"text": "Q: SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id \nA: What are the names of the different banks that have provided loans? \n Additional table information: table: loan_1"} -{"text": "Q: 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 NULLS FIRST, T1.Name NULLS FIRST \nA: 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. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT T1.Name, T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID \nA: What are the names of actors and the musicals that they are in? \n Additional table information: table: musical"} -{"text": "Q: SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING COUNT(*) > 60 \nA: What are the names of rooms whose reservation frequency exceeds 60 times? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT Name FROM WINE WHERE YEAR < (SELECT MIN(YEAR) FROM WINE WHERE Winery = 'Brander') \nA: What are the names of wines produced before any wine from the Brander winery? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2 \nA: What is the team with at least 2 technicians? \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT DISTINCT allergytype FROM Allergy_type \nA: What are the different allergy types? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT cName, enr FROM College WHERE enr > 10000 AND state = 'LA' \nA: Find the name, enrollment of the colleges whose size is bigger than 10000 and location is in state LA. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT T2.dept_name, T2.dept_address, COUNT(*) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 3 \nA: What is the name, address, and number of students in the departments that have the 3 most students? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T2.product_name, COUNT(*) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T3.order_id = T1.order_id GROUP BY T2.product_name \nA: Show all product names and the number of customers having an order on each product. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT name FROM PersonFriend GROUP BY name HAVING COUNT(*) = 1 \nA: Find the person who has exactly one friend. \n Additional table information: table: network_2"} -{"text": "Q: SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1 \nA: List the name of the county with the largest population. \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT T2.customer_first_name, T2.customer_last_name, T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: What is the customer first, last name and id with least number of accounts. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT rank, Fname, Lname FROM Faculty \nA: Show the rank, first name, and last name for all the faculty. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT name FROM city WHERE county_ID = (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1) \nA: What are the names of cities that are in the county with the most police officers? \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT dept_name, building FROM department ORDER BY budget DESC LIMIT 1 \nA: What is the department name and corresponding building for the department with the greatest budget? \n Additional table information: table: college_2"} -{"text": "Q: SELECT SUM(enr) FROM College \nA: How many students are enrolled in college? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT transaction_type, COUNT(*) FROM Financial_transactions GROUP BY transaction_type \nA: Show the transaction type and the number of transactions. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT COUNT(*), account_id FROM Financial_transactions \nA: Count the number of financial transactions that correspond to each account id. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' INTERSECT SELECT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice' \nA: What are the names and ages of every person who is a friend of both Dan and Alice? \n Additional table information: table: network_2"} -{"text": "Q: SELECT Hardware_Model_name, Company_name FROM phone WHERE Accreditation_type LIKE 'Full' \nA: Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name. \n Additional table information: table: phone_1"} -{"text": "Q: SELECT T1.first_name, T1.last_name FROM customer AS T1 JOIN rental AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.rental_date ASC NULLS FIRST LIMIT 1 \nA: Return the full name of the customer who made the first rental. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Davis' AND t3.lname = 'Steven' \nA: List the clubs having 'Davis Steven' as a member. \n Additional table information: table: club_1"} -{"text": "Q: SELECT T1.Fname, T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID = T2.FacID WHERE T2.DNO = 520 \nA: Find the full names of faculties who are members of department with department number 520. \n Additional table information: table: college_3"} -{"text": "Q: SELECT Payment_Method_Code, Date_Payment_Made, Amount_Payment FROM Payments ORDER BY Date_Payment_Made ASC NULLS FIRST \nA: List the method, date and amount of all the payments, in ascending order of date. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT T1.part_name, T1.part_id FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_id HAVING COUNT(*) > 2 \nA: Which parts have more than 2 faults? Show the part name and id. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT t2.product_details, t2.product_id FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY SUM(t1.order_quantity) NULLS FIRST LIMIT 1 \nA: What are the name and ID of the product bought the most. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT Tourist_Details FROM VISITORS \nA: What is the detail of each visitor? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT DISTINCT T1.Fname, T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_President_VOTE WHERE T1.age = 18 \nA: What are the first names and last names of the students who are 18 years old and have vice president votes. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T1.subject_id, T2.subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) ASC NULLS FIRST \nA: Find the subject ID, name of subject and the corresponding number of courses for each subject, and sort by the course count in ascending order. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT customer_name FROM customers \nA: What are the names of all the customers? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: 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 \nA: In February, which city marks the highest temperature? \n Additional table information: table: city_record"} -{"text": "Q: SELECT StuID FROM Student WHERE city_code = 'CHI' \nA: Show ids for all students who live in CHI. \n Additional table information: table: game_1"} -{"text": "Q: SELECT T2.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance NULLS FIRST LIMIT 1 \nA: Find the name and checking balance of the account with the lowest saving balance. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT advisor, COUNT(*) FROM Student GROUP BY advisor \nA: Show all advisors and corresponding number of students. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT COUNT(*) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = 'Linda' AND Student.Lname = 'Smith' AND Restaurant.ResName = 'Subway' \nA: How many times has the student Linda Smith visited Subway? \n Additional table information: table: restaurant_1"} -{"text": "Q: SELECT SUM(T1.crs_credit), T1.dept_code FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code GROUP BY T1.dept_code \nA: Find the total credits of all classes offered by each department. \n Additional table information: table: college_1"} -{"text": "Q: SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING COUNT(*) <= 3 \nA: Find the country of all appelations who have at most three wines. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT zip_code, COUNT(*) FROM weather WHERE max_wind_Speed_mph >= 25 GROUP BY zip_code \nA: For each zip code, how many times has the maximum wind speed reached 25 mph? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT COUNT(*) FROM Activity \nA: Find the number of activities available. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT COUNT(DISTINCT name) FROM PersonFriend WHERE NOT friend IN (SELECT name FROM person WHERE city = 'Austin') \nA: What is the total number of people who have no friends living in Austin? \n Additional table information: table: network_2"} -{"text": "Q: SELECT DISTINCT T1.name, T1.nationality FROM architect AS T1 JOIN mill AS t2 ON T1.id = T2.architect_id \nA: What are the distinct names and nationalities of the architects who have ever built a mill? \n Additional table information: table: architecture"} -{"text": "Q: SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name HAVING COUNT(*) >= 1 \nA: Find the name and country of origin for all artists who have release at least one song of resolution above 900. \n Additional table information: table: music_1"} -{"text": "Q: SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' \nA: Which channels are broadcast in the morning? Give me the channel names. \n Additional table information: table: program_share"} -{"text": "Q: SELECT COUNT(*) FROM customer_orders WHERE order_details = 'Second time' \nA: Tell me the number of orders with 'Second time' as order detail. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT MIN(Crime_rate), MAX(Crime_rate) FROM county_public_safety \nA: Return the minimum and maximum crime rates across all counties. \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType \nA: What is the average base price of rooms, for each bed type? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT complaint_status_code, COUNT(*) FROM complaints WHERE complaint_type_code = 'Product Failure' GROUP BY complaint_status_code \nA: Find the number of complaints with Product Failure type for each complaint status. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1 \nA: List the name of the aircraft that has been named winning aircraft the most number of times. \n Additional table information: table: aircraft"} -{"text": "Q: SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name \nA: What are the average prices of products, grouped by manufacturer name? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT name, TIME, service FROM train \nA: Show the name, time, and service for all trains. \n Additional table information: table: train_station"} -{"text": "Q: SELECT zip_code, AVG(mean_temperature_f) FROM weather WHERE date LIKE '8/%' GROUP BY zip_code \nA: For each zip code, what is the average mean temperature for all dates that start with '8'? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT calendar_date, day_Number FROM Ref_calendar \nA: Show all calendar dates and day Numbers. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT DISTINCT building_description FROM Apartment_Buildings \nA: Give me a list of all the distinct building descriptions. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT title FROM item WHERE NOT i_id IN (SELECT i_id FROM review) \nA: Find the names of the items that did not receive any review. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT start_station_name, end_station_name FROM trip ORDER BY id NULLS FIRST LIMIT 3 \nA: What is the station station and end station for the trips with the three smallest ids? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = 'Deputy' \nA: Which customers have an insurance policy with the type code 'Deputy'? Give me the customer details. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT Author, College FROM submission \nA: For each submission, show the author and their affiliated college. \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.family_name = 'Zieme' AND T2.personal_name = 'Bernie' \nA: List the dates of enrollment and completion of the student with family name 'Zieme' and personal name 'Bernie'. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT f_id FROM song WHERE resolution > (SELECT MAX(resolution) FROM song WHERE rating < 8) \nA: What is ids of the songs whose resolution is higher than the resolution of any songs with rating lower than 8? \n Additional table information: table: music_1"} -{"text": "Q: SELECT AVG(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = 'Female' \nA: How many songs, on average, are sung by a female artist? \n Additional table information: table: music_1"} -{"text": "Q: SELECT T1.detention_type_code, T2.detention_type_description FROM Detention AS T1 JOIN Ref_Detention_Type AS T2 ON T1.detention_type_code = T2.detention_type_code GROUP BY T1.detention_type_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: What are the code and description of the least frequent detention type ? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT Date_Claim_Made, Date_Claim_Settled FROM Settlements \nA: Tell me the the claim date and settlement date for each settlement case. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT T1.first_name, T1.last_name, T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Give the full name and staff id of the staff who has handled the fewest payments. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T1.Aircraft, T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000 \nA: What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT DISTINCT grade FROM list WHERE classroom = 105 \nA: Which grade is studying in room 105? \n Additional table information: table: student_1"} -{"text": "Q: SELECT Carrier FROM device ORDER BY Carrier ASC NULLS FIRST \nA: What are the different carriers for devices, listed in alphabetical order? \n Additional table information: table: device"} -{"text": "Q: SELECT aid FROM Aircraft WHERE distance > 1000 \nA: What are the ids of all aircrafts that can cover a distance of more than 1000? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT product_name FROM products ORDER BY product_price DESC LIMIT 1 \nA: Find the name of the most expensive product. \n Additional table information: table: customer_deliveries"} -{"text": "Q: SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = 'Female' \nA: What are the start date and end date of the apartment bookings made by female guests (gender code 'Female')? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the customer who has the most policies listed? \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT DISTINCT T1.age FROM management AS T2 JOIN head AS T1 ON T1.head_id = T2.head_id WHERE T2.temporary_acting = 'Yes' \nA: What are the distinct ages of the heads who are acting? \n Additional table information: table: department_management"} -{"text": "Q: SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id ORDER BY T3.Number_Deaths DESC LIMIT 1 \nA: What are the names of regions that were affected by the storm in which the most people died? \n Additional table information: table: storm_record"} -{"text": "Q: SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT AVG(balance) FROM savings)) \nA: Find the checking balance of the accounts whose savings balance is higher than the average savings balance. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT COUNT(DISTINCT driverId) FROM results WHERE NOT raceId IN (SELECT raceId FROM races WHERE YEAR <> 2009) \nA: How many drivers did not race in 2009? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT cust_name, acc_type, acc_bal FROM customer ORDER BY credit_score DESC LIMIT 1 \nA: What is the name, account type, and account balance corresponding to the customer with the highest credit score? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT channel_code FROM customer_contact_channels GROUP BY channel_code HAVING COUNT(customer_id) < 5 \nA: Which contact channel codes were used less than 5 times? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'statistics' ORDER BY T2.date_of_attendance NULLS FIRST \nA: List the id of students who attended statistics courses in the order of attendance date. \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT name, cost FROM procedures ORDER BY cost DESC \nA: List the name and cost of all procedures sorted by the cost from the highest to the lowest. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT dept_name FROM course GROUP BY dept_name ORDER BY SUM(credits) DESC LIMIT 1 \nA: What is the name of the department with the most credits? \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.level = 6 \nA: What is the total number of purchases for members with level 6? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70 \nA: What are all the different zip codes that have a maximum dew point that was always below 70? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the name of the building that has the most company offices. \n Additional table information: table: company_office"} -{"text": "Q: SELECT school_code FROM department WHERE dept_name = 'Accounting' \nA: What is the school code of the accounting department? \n Additional table information: table: college_1"} -{"text": "Q: SELECT Birth_Place, COUNT(*) FROM people GROUP BY Birth_Place \nA: List each birth place along with the number of people from there. \n Additional table information: table: body_builder"} -{"text": "Q: SELECT Park FROM roller_coaster ORDER BY Speed DESC LIMIT 1 \nA: Show the park of the roller coaster with the highest speed. \n Additional table information: table: roller_coaster"} -{"text": "Q: SELECT Height, Weight FROM people ORDER BY Height DESC \nA: List the height and weight of people in descending order of height. \n Additional table information: table: body_builder"} -{"text": "Q: SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = 'Duplex' \nA: What are the booking start and end dates of the apartments with type code 'Duplex'? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id = T2.document_id JOIN Ref_locations AS T3 ON T2.location_code = T3.location_code WHERE T1.document_name = 'Robin CV' \nA: What is the location name of the document 'Robin CV'? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT enrollment, primary_conference FROM university ORDER BY founded NULLS FIRST LIMIT 1 \nA: Show the enrollment and primary_conference of the oldest college. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010 \nA: Find courses that ran in Fall 2009 but not in Spring 2010. \n Additional table information: table: college_2"} -{"text": "Q: SELECT T1.campus, SUM(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T1.county = 'Orange' AND T2.year >= 2000 GROUP BY T1.campus \nA: For each Orange county campus, report the number of degrees granted after 2000. \n Additional table information: table: csu_1"} -{"text": "Q: SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.rating DESC LIMIT 3 \nA: What are the names and countries of origin for the artists who produced the top three highly rated songs. \n Additional table information: table: music_1"} -{"text": "Q: SELECT title FROM film WHERE rating = 'R' \nA: What are all the movies rated as R? List the titles. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT classroom, COUNT(*) FROM list WHERE grade = '4' GROUP BY classroom \nA: Report the total number of students for each fourth-grade classroom. \n Additional table information: table: student_1"} -{"text": "Q: SELECT T2.customer_name, T3.city, T1.date_from, T1.date_to FROM customer_address_history AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id JOIN addresses AS T3 ON T1.address_id = T3.address_id \nA: Show the customer name, customer address city, date from, and date to for each customer address history. \n Additional table information: table: customers_and_products_contacts"} -{"text": "Q: SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1 \nA: Show all information on the airport that has the largest number of international passengers. \n Additional table information: table: aircraft"} -{"text": "Q: SELECT major FROM Student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the largest major? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT name FROM track EXCEPT SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id WHERE T1.class = 'GT' \nA: Give the names of tracks that do not have a race in the class 'GT'. \n Additional table information: table: race_track"} -{"text": "Q: SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1 \nA: Return the address of store 1. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay = T3.StayID WHERE T3.room = 111 \nA: What are the names of patients who are staying in room 111 and have an undergoing treatment? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT customer_id, COUNT(*) FROM Customers_cards GROUP BY customer_id \nA: Show all customer ids and the number of cards owned by each customer. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: 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' \nA: What are the names of any scientists who worked on projects named 'Matter of Time' and 'A Puzzling Pattern'? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT COUNT(*) FROM county_public_safety \nA: How many counties are there? \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT COUNT(*) FROM postseason WHERE YEAR = 1885 AND ties = 1 \nA: How many games in 1885 postseason resulted in ties (that is, the value of 'ties' is '1')? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT name, LOCATION FROM track \nA: What are the names and locations of all tracks? \n Additional table information: table: race_track"} -{"text": "Q: SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = 'Pass' \nA: What are the enrollment dates of all the tests that have result 'Pass'? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT DISTINCT Name FROM WINE ORDER BY price NULLS FIRST \nA: List the names of all distinct wines ordered by price. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID \nA: Show the names of climbers and the heights of mountains they climb. \n Additional table information: table: climbing"} -{"text": "Q: SELECT DISTINCT T1.customer_first_name, T1.customer_last_name, T1.phone_number FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id \nA: Show the unique first names, last names, and phone numbers for all customers with any account. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.age > 18 \nA: How many members of 'Bootup Baltimore' are older than 18? \n Additional table information: table: club_1"} -{"text": "Q: SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE DEPT_NAME = 'Accounting' \nA: Find the number of professors in accounting department. \n Additional table information: table: college_1"} -{"text": "Q: SELECT Name FROM editor ORDER BY Age ASC NULLS FIRST LIMIT 1 \nA: What is the name of the youngest editor? \n Additional table information: table: journal_committee"} -{"text": "Q: SELECT AVG(order_quantity) FROM order_items \nA: Find the average order quantity per order. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT T1.Order_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID JOIN Products AS T3 ON T2.Product_ID = T3.Product_ID WHERE T3.Product_price > 1000 \nA: What are the order dates of orders with price higher than 1000? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 4 \nA: What are the codes of types of documents of which there are for or more? \n Additional table information: table: document_management"} -{"text": "Q: SELECT FirstName, LastName FROM EMPLOYEE WHERE City = 'Calgary' \nA: Find the full names of employees living in the city of Calgary. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT COUNT(*) FROM Ref_locations \nA: Show the number of locations. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT customer_phone FROM available_policies \nA: What are all the phone numbers? \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT COUNT(*) FROM campuses WHERE county = 'Los Angeles' \nA: How many campuses exist are in the county of LA? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT DISTINCT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = 'Spain' AND T1.year > 2000 \nA: What are the names of all races held after 2000 in Spain? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id = T2.category_id JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'HUNGER ROOF' \nA: Return the name of the category to which the film 'HUNGER ROOF' belongs. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Accounts) \nA: How many customers don't have an account? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT COUNT(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night' \nA: How many distinct programs are broadcast at 'Night' time? \n Additional table information: table: program_share"} -{"text": "Q: SELECT classroom, COUNT(*) FROM list WHERE grade = '0' GROUP BY classroom \nA: For each grade 0 classroom, return the classroom number and the count of students. \n Additional table information: table: student_1"} -{"text": "Q: 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' \nA: What are all the company names that have a book published by Alyson? \n Additional table information: table: culture_company"} -{"text": "Q: SELECT T1.customer_name, T1.customer_phone, T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the name, phone number and email address for the customer with the most orders. \n Additional table information: table: department_store"} -{"text": "Q: SELECT name FROM projects ORDER BY hours DESC LIMIT 1 \nA: What is the name of the project with the most hours? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT AVG(Price), AVG(Score), Appelation FROM WINE GROUP BY Appelation \nA: What are the average price and score of wines for each appelation? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which allergy has most number of students affected? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId \nA: Find the names of artists that do not have any albums. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT name FROM circuits WHERE country = 'UK' OR country = 'Malaysia' \nA: What are the names of circuits that belong to UK or Malaysia? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT instrument FROM instruments GROUP BY instrument ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most used instrument? \n Additional table information: table: music_2"} -{"text": "Q: SELECT lastname FROM teachers WHERE classroom = 109 \nA: Which teachers teach in classroom 109? Give me their last names. \n Additional table information: table: student_1"} -{"text": "Q: SELECT COUNT(*) FROM bank \nA: Count the number of bank branches. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1 \nA: What are the first names of the teachers who teach grade 1? \n Additional table information: table: student_1"} -{"text": "Q: SELECT MAX(customer_code), MIN(customer_code) FROM Customers \nA: Return the maximum and minimum customer codes. \n Additional table information: table: department_store"} -{"text": "Q: SELECT card_number FROM member WHERE Hometown LIKE '%Kentucky%' \nA: What are the card numbers of members from Kentucky? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT T1.id, T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id \nA: What is the installation date for each ending station on all the trips? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament' \nA: which countries did participated in both Friendly and Tournament type competitions. \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT state_province_county, country FROM addresses WHERE zip_postcode LIKE '4%' \nA: What are the state and country of all the cities that have post codes starting with 4.\\ \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT MAX(T2.resolution), MIN(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE '3:%' \nA: What is the maximum and minimum resolution of all songs that are approximately 3 minutes long? \n Additional table information: table: music_1"} -{"text": "Q: SELECT guest_first_name, guest_last_name FROM Guests \nA: What are the first names and last names of all the guests? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT major, AVG(age), MIN(age), MAX(age) FROM Student GROUP BY major \nA: Show the average, minimum, and maximum age for different majors. \n Additional table information: table: game_1"} -{"text": "Q: SELECT COUNT(*) FROM dorm_amenity \nA: How many diffrent dorm amenities are there? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T1.CName FROM COURSE AS T1 JOIN ENROLLED_IN AS T2 ON T1.CID = T2.CID GROUP BY T2.CID HAVING COUNT(*) >= 5 \nA: Give the names of the courses with at least five enrollments. \n Additional table information: table: college_3"} -{"text": "Q: SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date = '08/30/2015' \nA: Show all the distinct president votes made on 08/30/2015. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT COUNT(*) FROM Aircraft WHERE distance BETWEEN 1000 AND 5000 \nA: How many aircrafts have distance between 1000 and 5000? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT SUM(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id = t2.claim_id WHERE t2.created_date = (SELECT created_date FROM claims_documents ORDER BY created_date NULLS FIRST LIMIT 1) \nA: How much amount in total were claimed in the most recently created document? \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT T1.employee_id, T2.job_title FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.department_id = 80 \nA: display the employee ID and job name for all those jobs in department 80. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT document_name FROM documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 3 INTERSECT SELECT document_name FROM documents GROUP BY document_structure_code ORDER BY COUNT(*) DESC LIMIT 3 \nA: What are the names of documents that have both one of the three most common types and one of three most common structures? \n Additional table information: table: document_management"} -{"text": "Q: SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000 \nA: Return the phone numbers of employees with salaries between 8000 and 12000. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT name FROM airports WHERE country = 'Cuba' OR country = 'Argentina' \nA: Find the name of the airports located in Cuba or Argentina. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT f_id FROM song WHERE resolution > (SELECT AVG(resolution) FROM song WHERE genre_is = 'modern') \nA: What are the ids of all songs that have higher resolution of the average resolution in the modern genre? \n Additional table information: table: music_1"} -{"text": "Q: SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'OTHA' AND T2.lastname = 'MOYER' \nA: Which students study under the teacher named OTHA MOYER? Give me the first and last names of the students. \n Additional table information: table: student_1"} -{"text": "Q: SELECT name FROM station WHERE city = 'Palo Alto' EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING COUNT(*) > 100 \nA: What are the names of stations that are located in Palo Alto city but have never been the ending point of trips more than 100 times? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT DISTINCT name FROM medication ORDER BY name NULLS FIRST \nA: What is the alphabetically ordered list of all distinct medications? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T1.name, T1.team_id, MAX(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id \nA: What is the highest salary among each team? List the team name, id and maximum salary. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT T1.Aircraft, COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft \nA: List the names of aircrafts and the number of times it won matches. \n Additional table information: table: aircraft"} -{"text": "Q: SELECT enrollment, primary_conference FROM university ORDER BY founded NULLS FIRST LIMIT 1 \nA: What are the enrollment and primary conference for the university which was founded the earliest? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT Studio, COUNT(*) FROM film GROUP BY Studio \nA: List the studios of each film and the number of films produced by that studio. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public' \nA: What are the schools that were either founded before 1850 or are public? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 1 \nA: Show the apartment numbers of apartments with unit status availability of both 0 and 1. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT t2.id, t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id GROUP BY t1.station_id HAVING MAX(t1.precipitation) > 50 \nA: Find the id and local authority of the station whose maximum precipitation is higher than 50. \n Additional table information: table: station_weather"} -{"text": "Q: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo \nA: Show student ids who don't have any sports. \n Additional table information: table: game_1"} -{"text": "Q: SELECT T3.product_name, COUNT(*) FROM orders AS T1, 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 \nA: For each product, show its name and the number of times it was ordered. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.city = 'new york city' \nA: What are the names of all friends who are from New York? \n Additional table information: table: network_2"} -{"text": "Q: SELECT T1.Delegate, T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID \nA: For each delegate, find the names of the party they are part of. \n Additional table information: table: election"} -{"text": "Q: SELECT name, phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn GROUP BY T1.patient HAVING COUNT(*) > 1 \nA: Which patients made more than one appointment? Tell me the name and phone number of these patients. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT COUNT(*) FROM Has_allergy WHERE Allergy = 'Cat' \nA: How many students have cat allergies? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT T1.student_id, COUNT(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id \nA: List the id of students who registered some courses and the number of their registered courses? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT date, zip_code FROM weather WHERE max_temperature_f >= 80 \nA: What zip codes have a station with a max temperature greater than or equal to 80 and when did it reach that temperature? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1 \nA: What is the id of the appointment that started most recently? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT Song FROM volume ORDER BY Song NULLS FIRST \nA: What are the the songs in volumes, listed in ascending order? \n Additional table information: table: music_4"} -{"text": "Q: SELECT product_id FROM order_items GROUP BY product_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the id of the product that was ordered the most often? \n Additional table information: table: department_store"} -{"text": "Q: SELECT name FROM Aircraft ORDER BY distance NULLS FIRST LIMIT 3 \nA: Show the name of aircrafts with top three lowest distances. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY AVG(room_count) DESC LIMIT 3 \nA: What are the top three apartment types in terms of the average room count? Give me the \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT cName FROM college WHERE enr > (SELECT MAX(enr) FROM college WHERE state = 'FL') \nA: Find names of all colleges whose enrollment is greater than that of all colleges in the FL state. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT fname, lname FROM student WHERE major <> (SELECT major FROM student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1) \nA: What is the first and last name of the students who are not in the largest major? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT Title FROM book WHERE Writer <> 'Elaine Lee' \nA: What are the titles of the books whose writer is not 'Elaine Lee'? \n Additional table information: table: book_2"} -{"text": "Q: SELECT country FROM airport GROUP BY country HAVING COUNT(*) > 2 \nA: which countries have more than 2 airports? \n Additional table information: table: flight_company"} -{"text": "Q: SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC \nA: What are the total points for all gymnasts, ordered by total points descending? \n Additional table information: table: gymnast"} -{"text": "Q: SELECT COUNT(*) FROM COURSE WHERE Credits > 2 \nA: How many courses have more than 2 credits? \n Additional table information: table: college_3"} -{"text": "Q: SELECT T2.Party, COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party \nA: Show the name of each party and the corresponding number of delegates from that party. \n Additional table information: table: election"} -{"text": "Q: SELECT Starting_Year FROM technician WHERE Team = 'CLE' INTERSECT SELECT Starting_Year FROM technician WHERE Team = 'CWS' \nA: Show the starting years shared by technicians from team 'CLE' and 'CWS'. \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT COUNT(*), T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name \nA: How many tracks are in each genre? \n Additional table information: table: store_1"} -{"text": "Q: SELECT t1.title FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID ORDER BY high_estimate DESC LIMIT 1 \nA: What is the title of the film that has the highest high market estimation. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING COUNT(*) >= 2 INTERSECT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING SUM(T2.number_city_affected) >= 10 \nA: What are the names of storms that both affected two or more regions and affected a total of 10 or more cities? \n Additional table information: table: storm_record"} -{"text": "Q: SELECT COUNT(*) FROM Documents \nA: Count the number of documents. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT city_code FROM Student WHERE Fname = 'Linda' AND Lname = 'Smith' \nA: Which city does student Linda Smith live in? \n Additional table information: table: restaurant_1"} -{"text": "Q: SELECT DISTINCT staff_first_name, staff_last_name FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T2.problem_id = 1 \nA: List the first and last names of all distinct staff members who are assigned to the problem whose id is 1. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT classroom FROM list GROUP BY classroom ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which classroom has the most students? \n Additional table information: table: student_1"} -{"text": "Q: SELECT T3.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T1.name = 'John Williams' \nA: Show names for all aircrafts of which John Williams has certificates. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT name FROM Companies WHERE Headquarters <> 'USA' \nA: What are the names of companies whose headquarters are not 'USA'? \n Additional table information: table: company_office"} -{"text": "Q: SELECT Advisor, COUNT(*) FROM STUDENT GROUP BY Advisor \nA: For each advisor, report the total number of students advised by him or her. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT COUNT(*) FROM bank \nA: How many bank branches are there? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType \nA: For each bed type, find the average room price. \n Additional table information: table: inn_1"} -{"text": "Q: 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 \nA: Which cities have lower temperature in March than in Dec and have never served as host cities? \n Additional table information: table: city_record"} -{"text": "Q: SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which policy type has the most records in the database? \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT COUNT(*), customer_id FROM Accounts GROUP BY customer_id \nA: How many accounts does each customer have? List the number and customer id. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT COUNT(*) FROM book_club \nA: How many book clubs are there? \n Additional table information: table: culture_company"} -{"text": "Q: SELECT DISTINCT city_code FROM Student \nA: What cities do students live in? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT COUNT(*) FROM patient WHERE NOT SSN IN (SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication = T2.Code WHERE T2.name = 'Procrastin-X') \nA: Find the number of patients who are not using the medication of Procrastin-X. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT COUNT(*) FROM Products_for_hire WHERE NOT product_id IN (SELECT product_id FROM products_booked WHERE booked_amount > 200) \nA: How many products are never booked with amount higher than 200? \n Additional table information: table: products_for_hire"} -{"text": "Q: SELECT COUNT(*) FROM Tasks \nA: How many tasks are there? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT COUNT(DISTINCT dept_address), school_code FROM department GROUP BY school_code \nA: Count different addresses of each school. \n Additional table information: table: college_1"} -{"text": "Q: SELECT nationality, COUNT(*) FROM swimmer GROUP BY nationality HAVING COUNT(*) > 1 \nA: List countries that have more than one swimmer. \n Additional table information: table: swimming"} -{"text": "Q: SELECT MAX(Silver), MIN(Silver) FROM club_rank \nA: What are the maximum and minimum number of silver medals for all the clubs? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1 \nA: What is the location of the party with the most hosts? \n Additional table information: table: party_host"} -{"text": "Q: SELECT DISTINCT (catalog_entry_name) FROM catalog_contents \nA: What are all the catalog entry names? \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT T1.date_in_location_from, T1.date_in_locaton_to FROM Document_locations AS T1 JOIN All_documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = 'Robin CV' \nA: What is 'the date in location from' and 'the date in location to' for the document with name 'Robin CV'? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT zip_code, AVG(mean_temperature_f) FROM weather WHERE date LIKE '8/%' GROUP BY zip_code \nA: For each zip code, return the average mean temperature of August there. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1 \nA: Where is store 1 located? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t2.acc_percent NULLS FIRST LIMIT 1 \nA: Return the primary conference of the school with the lowest acc percentage score. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT COUNT(*) FROM university WHERE LOCATION LIKE '%NY%' \nA: Find how many school locations have the word 'NY'. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.source_u_id GROUP BY T2.source_u_id ORDER BY AVG(trust) DESC LIMIT 1 \nA: Find the name of the source user with the highest average trust score. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = 'Lucas' AND T1.last_name = 'Mancini' \nA: How much money did Lucas Mancini spend? \n Additional table information: table: store_1"} -{"text": "Q: SELECT T3.dept_name, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T1.emp_lname = 'Heffington' \nA: What is department name and office for the professor whose last name is Heffington? \n Additional table information: table: college_1"} -{"text": "Q: SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2 \nA: What are the employee ids for those who had two or more jobs. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT salary, manager_id FROM employees WHERE manager_id <> 'null' \nA: What are the salaries and manager ids for employees who have managers? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT COUNT(*) FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY' \nA: How many times does ROY SWEAZY has reserved a room. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code HAVING COUNT(DISTINCT dept_name) < 5 \nA: How many different departments are there in each school that has less than 5 apartments? \n Additional table information: table: college_1"} -{"text": "Q: SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1 \nA: List the software platform shared by the greatest number of devices. \n Additional table information: table: device"} -{"text": "Q: SELECT fname, lname FROM student WHERE major <> (SELECT major FROM student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1) \nA: Find the first and last name of students who are not in the largest major. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' INTERSECT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room' \nA: Find the name of dorms which have both TV Lounge and Study Room as amenities. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT COUNT(*) FROM Ref_calendar \nA: How many calendar items do we have? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT T1.booking_id, T1.amount_of_refund FROM Bookings AS T1 JOIN Payments AS T2 ON T1.booking_id = T2.booking_id GROUP BY T1.booking_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the id and the amount of refund of the booking that incurred the most times of payments? \n Additional table information: table: products_for_hire"} -{"text": "Q: SELECT T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance DESC LIMIT 1 \nA: Find the saving balance of the account with the highest checking balance. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT T1.course_name, COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name \nA: List the name and the number of enrolled student for each course. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT DISTINCT name FROM medication ORDER BY name NULLS FIRST \nA: List the names of all distinct medications, ordered in an alphabetical order. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT name, salary FROM Employee WHERE eid = 242518965 \nA: What is the name and salary for employee with id 242518965? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT dept_name FROM department ORDER BY budget NULLS FIRST LIMIT 1 \nA: Which department has the lowest budget? \n Additional table information: table: college_2"} -{"text": "Q: SELECT Festival_Name, LOCATION FROM festival_detail \nA: What are the names and locations of festivals? \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT T1.supplier_name, T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id = T2.supplier_id JOIN addresses AS T3 ON T2.address_id = T3.address_id ORDER BY T3.address_details NULLS FIRST \nA: What are the names and phone numbers for all suppliers, sorted in alphabetical order of their addressed? \n Additional table information: table: department_store"} -{"text": "Q: SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId GROUP BY T2.MediaTypeId ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: What is the least common media type in all tracks? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the name of the party with the most members. \n Additional table information: table: party_people"} -{"text": "Q: SELECT rID FROM Reviewer WHERE name LIKE '%Mike%' \nA: What is the id of the reviewer whose name has substring \u201cMike\u201d? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT COUNT(*) FROM Student_Tests_Taken WHERE test_result = 'Fail' \nA: Count the number of tests with 'Fail' result. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT T1.title, T1.i_id FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY AVG(T2.rating) DESC LIMIT 1 \nA: Find the name and id of the item with the highest average rating. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT DISTINCT Nominee FROM musical WHERE Award <> 'Tony Award' \nA: What are the distinct nominees of the musicals with the award that is not 'Tony Award'? \n Additional table information: table: musical"} -{"text": "Q: SELECT T2.name, T3.name FROM wedding AS T1 JOIN people AS T2 ON T1.male_id = T2.people_id JOIN people AS T3 ON T1.female_id = T3.people_id WHERE T1.year > 2014 \nA: Show the pair of male and female names in all weddings after year 2014 \n Additional table information: table: wedding"} -{"text": "Q: SELECT DName FROM DEPARTMENT EXCEPT SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO \nA: What is the name of the department htat has no students minoring in it? \n Additional table information: table: college_3"} -{"text": "Q: SELECT DISTINCT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000 \nA: List the forename and surname of all distinct drivers who once had laptime less than 93000 milliseconds? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT Stuid, SUM(hours_played) FROM Plays_games GROUP BY Stuid \nA: Show all student ids and the number of hours played. \n Additional table information: table: game_1"} -{"text": "Q: SELECT COUNT(*) FROM party_events \nA: How many party events do we have? \n Additional table information: table: party_people"} -{"text": "Q: SELECT YEAR FROM festival_detail WHERE LOCATION = 'United States' INTERSECT SELECT YEAR FROM festival_detail WHERE LOCATION <> 'United States' \nA: In which year are there festivals both inside the 'United States' and outside the 'United States'? \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT name FROM student WHERE NOT id IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.dept_name = 'Biology') \nA: Find the name of students who didn't take any course from Biology department. \n Additional table information: table: college_2"} -{"text": "Q: SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000 \nA: What are the titles of all movies that James Cameron directed after 2000? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT MIN(T2.HS), T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID GROUP BY T1.pPos \nA: What is minimum hours of the students playing in different position? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT patient FROM stay WHERE room = 111 ORDER BY staystart DESC LIMIT 1 \nA: Find the patient who most recently stayed in room 111. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T2.Fname, T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID WHERE T1.CName = 'COMPUTER LITERACY' \nA: What is the full name of the instructor who has a course named COMPUTER LITERACY? \n Additional table information: table: college_3"} -{"text": "Q: SELECT name, CLASS FROM ship WHERE NOT ship_id IN (SELECT ship_id FROM captain) \nA: Return the names and classes of ships that do not have a captain? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT name, home_city, age FROM driver \nA: Show the name, home city, and age for all drivers. \n Additional table information: table: school_bus"} -{"text": "Q: SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.region_name = 'Denmark' \nA: What are the names of the storms that affected Denmark? \n Additional table information: table: storm_record"} -{"text": "Q: SELECT T2.weight FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T1.snatch > 140 OR T2.height > 200 \nA: List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200. \n Additional table information: table: body_builder"} -{"text": "Q: SELECT T1.name, T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID \nA: Please show the names and the players of clubs. \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId GROUP BY T2.Name ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the artist with the greatest number of albums? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT date FROM weather WHERE max_temperature_f > 85 \nA: Give me the dates when the max temperature was higher than 85. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT pName, HS FROM Player WHERE HS < 1500 \nA: Find the name and training hours of players whose hours are below 1500. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Aerosmith' \nA: List Aerosmith's albums. \n Additional table information: table: store_1"} -{"text": "Q: SELECT COUNT(*) FROM accounts \nA: How many accounts are there in total? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price > (SELECT AVG(Product_Price) FROM PRODUCTS) \nA: What are the distinct names of the products that cost more than the average? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: 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' \nA: Which country does customer with first name as Carole and last name as Bernhard lived in? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT COUNT(DISTINCT rank) FROM captain \nA: Count the number of different ranks of captain. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num GROUP BY T2.stu_num HAVING COUNT(*) = 1 \nA: Find the first names of students who took exactly one class. \n Additional table information: table: college_1"} -{"text": "Q: SELECT DISTINCT location_code FROM Document_locations \nA: What are the different location codes for documents? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT DISTINCT (BillingCountry) FROM INVOICE \nA: What are the distinct billing countries of the invoices? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT first_name FROM Teachers WHERE email_address LIKE '%man%' \nA: Find the first names of teachers whose email address contains the word 'man'. \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT T1.department_id, T1.name, COUNT(*) FROM management AS T2 JOIN department AS T1 ON T1.department_id = T2.department_id GROUP BY T1.department_id HAVING COUNT(*) > 1 \nA: Which department has more than 1 head at a time? List the id, name and the number of heads. \n Additional table information: table: department_management"} -{"text": "Q: SELECT state FROM customers GROUP BY state ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: Which state has the most customers? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars = 3 INTERSECT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars = 4 \nA: What are the names of movies that get 3 star and 4 star? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex ORDER BY AVG(t2.unsure_rate) DESC LIMIT 1 \nA: What is the sex of the candidate who had the highest unsure rate? \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT AVG(Price), AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = 'Zinfandel' \nA: What are the average prices and cases of wines produced in the year of 2009 and made of Zinfandel grape? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT T1.name, T1.id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING AVG(T2.bikes_available) > 14 UNION SELECT name, id FROM station WHERE installation_date LIKE '12/%' \nA: What are the names and ids of all stations that have more than 14 bikes available on average or had bikes installed in December? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT semester, YEAR FROM takes GROUP BY semester, YEAR ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: Find the semester and year which has the least number of student taking any class. \n Additional table information: table: college_2"} -{"text": "Q: SELECT department_id, SUM(salary) FROM employees GROUP BY department_id HAVING COUNT(*) >= 2 \nA: display the department id and the total salary for those departments which contains at least two employees. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT Name FROM WINE ORDER BY Score NULLS FIRST LIMIT 1 \nA: Give the name of the wine with the highest score. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT name, flag FROM ship WHERE NOT ship_id IN (SELECT ship_id FROM captain WHERE rank = 'Midshipman') \nA: Find the name and flag of ships that are not steered by any captain with Midshipman rank. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT T1.name, T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance NULLS FIRST LIMIT 1 \nA: Find the name and checking balance of the account with the lowest savings balance. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 23 \nA: Return the issue dates of volumes by artists who are at most 23 years old? \n Additional table information: table: music_4"} -{"text": "Q: SELECT Name FROM scientists WHERE NOT ssn IN (SELECT scientist FROM AssignedTo) \nA: Find the name of scientists who are not assigned to any project. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT DISTINCT classroom FROM list WHERE grade = 4 \nA: Which classrooms are used by grade 4? \n Additional table information: table: student_1"} -{"text": "Q: SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name HAVING COUNT(*) >= 1 \nA: What is the name and country of origin for each artist who has released a song with a resolution higher than 900? \n Additional table information: table: music_1"} -{"text": "Q: SELECT Famous_Title, Age FROM artist ORDER BY Age DESC \nA: Please list the age and famous title of artists in descending order of age. \n Additional table information: table: music_4"} -{"text": "Q: SELECT product, chromosome, porphyria FROM enzyme WHERE LOCATION = 'Cytosol' \nA: What is the product, chromosome, and porphyria of the enzymes located at 'Cytosol'? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT COUNT(*) FROM submission \nA: Count the number of submissions. \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT COUNT(*) FROM Statements \nA: How many statements do we have? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT name FROM swimmer ORDER BY meter_100 NULLS FIRST \nA: Find the names of all swimmers, sorted by their 100 meter scores in ascending order. \n Additional table information: table: swimming"} -{"text": "Q: SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_piad = (SELECT MIN(amount_piad) FROM claim_headers) \nA: Which customer made the smallest amount of claim in one claim? Return the customer details. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT address, num_of_staff FROM shop WHERE NOT shop_id IN (SELECT shop_id FROM happy_hour) \nA: Find the address and staff number of the shops that do not have any happy hour. \n Additional table information: table: coffee_shop"} -{"text": "Q: SELECT zip_code FROM weather GROUP BY zip_code HAVING AVG(mean_visibility_miles) < 10 \nA: For each zip code, select all those that have an average mean visiblity below 10. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T1.Customer_Event_ID, T1.property_id FROM Customer_Events AS T1 JOIN Customer_Event_Notes AS T2 ON T1.Customer_Event_ID = T2.Customer_Event_ID GROUP BY T1.customer_event_id HAVING COUNT(*) BETWEEN 1 AND 3 \nA: Which events have the number of notes between one and three? List the event id and the property id. \n Additional table information: table: local_govt_and_lot"} -{"text": "Q: SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed \nA: Show the ids of all employees who don't destroy any document. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT nurse FROM on_call WHERE blockfloor = 1 AND blockcode = 1 \nA: Find the ids of the nurses who are on call in block floor 1 and block code 1. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T2.Fname, T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID WHERE T1.CName = 'COMPUTER LITERACY' \nA: Find the first name and last name of the instructor of course that has course name \n Additional table information: table: college_3"} -{"text": "Q: SELECT roomName FROM Rooms WHERE bedType = 'King' OR bedType = 'Queen' \nA: List the name of rooms with king or queen bed. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT COUNT(*) FROM medicine WHERE FDA_approved = 'No' \nA: How many medicines have the FDA approval status 'No' ? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT T2.FirstName, T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.FirstName = 'Leonie' \nA: Find the full names of employees who help customers with the first name Leonie. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT Candidate_ID FROM candidate ORDER BY oppose_rate NULLS FIRST LIMIT 1 \nA: Find the id of the candidate who got the lowest oppose rate. \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT COUNT(*) FROM architect WHERE NOT id IN (SELECT architect_id FROM mill WHERE built_year < 1850) \nA: How many architects haven't built a mill before year 1850? \n Additional table information: table: architecture"} -{"text": "Q: SELECT T1.name, T2.alid FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T2.alid ORDER BY COUNT(*) DESC LIMIT 10 \nA: For the airline ids with the top 10 most routes operated, what are their names? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT T2.name, COUNT(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id \nA: What are the names of different tracks, and how many races has each had? \n Additional table information: table: race_track"} -{"text": "Q: SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code WHERE T4.dept_name = 'Accounting' \nA: How many students are enrolled in the class taught by some professor from the accounting department? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) <= 20 \nA: Please show the employee last names that serves no more than 20 customers. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT AVG(age), MIN(age), CLASS FROM captain GROUP BY CLASS \nA: What are the average and minimum age of captains in different class? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT Delegate, Committee FROM election \nA: What are the delegate and committee information for each election record? \n Additional table information: table: election"} -{"text": "Q: SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.PostalCode = '70174' \nA: What city does the employee who helps the customer with postal code 70174 live in? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT payment_date FROM payment ORDER BY payment_date ASC NULLS FIRST LIMIT 1 \nA: What was the date of the earliest payment? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T1.name, T2.name FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id \nA: List all country and league names. \n Additional table information: table: soccer_1"} -{"text": "Q: SELECT T1.Name, T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING COUNT(*) >= 2 \nA: Show the names and ids of tourist attractions that are visited at least two times. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the result that is most frequent at music festivals. \n Additional table information: table: music_4"} -{"text": "Q: SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid WHERE T2.distance > 5000 GROUP BY T1.aid ORDER BY COUNT(*) >= 5 NULLS FIRST \nA: Show the name and distance of the aircrafts with more than 5000 distance and which at least 5 people have its certificate. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT COUNT(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id WHERE T2.dept_store_chain_name = 'South' \nA: How many department stores does the store chain South have? \n Additional table information: table: department_store"} -{"text": "Q: SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70 \nA: Find all the zip codes in which the max dew point have never reached 70. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T2.Name, T1.Team FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC \nA: List the names of wrestlers and the teams in elimination in descending order of days held. \n Additional table information: table: wrestler"} -{"text": "Q: SELECT DISTINCT artist_name FROM song WHERE languages = 'english' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8 \nA: Find the names of the artists who have produced English songs but have never received rating higher than 8. \n Additional table information: table: music_1"} -{"text": "Q: SELECT COUNT(*) FROM film \nA: How many film are there? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT Party, COUNT(*) FROM people GROUP BY Party \nA: Show different parties of people along with the number of people in each party. \n Additional table information: table: debate"} -{"text": "Q: SELECT T2.address_id, T1.city FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id ORDER BY AVG(monthly_rental) DESC LIMIT 1 \nA: Find the id and city of the student address with the highest average monthly rental. \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT book_title, author_or_editor FROM book_club WHERE YEAR > 1989 \nA: show the titles, and authors or editors for all books made after the year 1989. \n Additional table information: table: culture_company"} -{"text": "Q: SELECT country_id, COUNT(*) FROM locations GROUP BY country_id \nA: Give the country id and corresponding count of cities in each country. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.advisor = 1121 \nA: Which clubs have one or more members whose advisor is '1121'? \n Additional table information: table: club_1"} -{"text": "Q: SELECT Delegate FROM election WHERE District = 1 \nA: Who is the delegate of district 1 in the elections? \n Additional table information: table: election"} -{"text": "Q: SELECT T1.firstname, T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0 \nA: What are the first and last names of people who payed more than the rooms' base prices? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT DISTINCT characteristic_name FROM CHARACTERISTICS \nA: Find the names of all the product characteristics. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT COUNT(DISTINCT dept_address) FROM department WHERE school_code = 'BUS' \nA: How many different locations does the school with code BUS has? \n Additional table information: table: college_1"} -{"text": "Q: SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = 'back' \nA: What are the different names of all songs without back vocals? \n Additional table information: table: music_2"} -{"text": "Q: SELECT Nationality FROM journalist ORDER BY Years_working DESC LIMIT 1 \nA: What is the nationality of the journalist with the largest number of years working? \n Additional table information: table: news_report"} -{"text": "Q: SELECT COUNT(DISTINCT dormid) FROM has_amenity \nA: Find the number of dorms that have some amenity. \n Additional table information: table: dorm_1"} -{"text": "Q: 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 \nA: Show the budget type code and description and the corresponding document id. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT Name, Party FROM representative \nA: What are the names and parties of representatives? \n Additional table information: table: election_representative"} -{"text": "Q: SELECT T1.rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank \nA: How many students are advised by each rank of faculty? List the rank and the number of students. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT DISTINCT Region FROM club ORDER BY Region ASC NULLS FIRST \nA: What are the different regions of clubs in ascending alphabetical order? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT name FROM buildings WHERE NOT id IN (SELECT building_id FROM Office_locations) \nA: Which buildings do not have any company office? Give me the building names. \n Additional table information: table: company_office"} -{"text": "Q: SELECT COUNT(DISTINCT T2.id), COUNT(DISTINCT T3.id), T3.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_name = T2.dept_name JOIN instructor AS T3 ON T1.dept_name = T3.dept_name GROUP BY T3.dept_name \nA: Find the total number of students and total number of instructors for each department. \n Additional table information: table: college_2"} -{"text": "Q: SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = 'Shanghai' \nA: Give me the temperature of Shanghai in January. \n Additional table information: table: city_record"} -{"text": "Q: SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = 'Professor' \nA: Show the ids of students whose advisors are professors. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_date < '2018-03-17 07:13:53' \nA: What is the total amount of products purchased before 2018-03-17 07:13:53? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID WHERE T2.Type = 'Program Talent Show' \nA: Show the names of festivals that have nominated artworks of type 'Program Talent Show'. \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID WHERE T2.Role = 'Violin' \nA: Show the dates of performances with attending members whose roles are 'Violin'. \n Additional table information: table: performance_attendance"} -{"text": "Q: SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer' \nA: When are the birthdays of customer who are classified as 'Good Customer' status? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT COUNT(*) FROM ARTIST WHERE NOT artistid IN (SELECT artistid FROM ALBUM) \nA: How many artists do not have any album? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT job_id FROM employees GROUP BY job_id HAVING AVG(salary) > 8000 \nA: What are the job ids corresponding to jobs with average salary above 8000? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT COUNT(*), constructorid FROM constructorStandings GROUP BY constructorid \nA: For each constructor id, how many races are there? \n Additional table information: table: formula_1"} -{"text": "Q: 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 \nA: Find the name of the most popular party form. \n Additional table information: table: e_government"} -{"text": "Q: SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'photo' INTERSECT SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'film' \nA: Give me the description of the service type that offers not only the photo product but also the film product. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2003 ORDER BY T2.faculty DESC LIMIT 1 \nA: Which campus has the most faculties in year 2003? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars = 4 \nA: find the ids of reviewers who did not give 4 star. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC \nA: Please show the industries of companies in descending order of the number of companies. \n Additional table information: table: company_office"} -{"text": "Q: SELECT roomName, basePrice FROM Rooms ORDER BY basePrice ASC NULLS FIRST LIMIT 1 \nA: Which room has cheapest base price? List the room's name and the base price. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote INTERSECT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = '8741' \nA: What are the distinct last names of the students who have president votes and have 8741 as the advisor? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT artist_name FROM artist WHERE country = 'UK' INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'english' \nA: What are the names of all singers that are from the UK and released a song in English? \n Additional table information: table: music_1"} -{"text": "Q: SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE YEAR = 2009 OR YEAR = 2010 \nA: Find the name of students who took any class in the years of 2009 and 2010. \n Additional table information: table: college_2"} -{"text": "Q: SELECT CLASS, COUNT(*) FROM race GROUP BY CLASS \nA: What are the different classes of races, and how many races correspond to each? \n Additional table information: table: race_track"} -{"text": "Q: SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Indiana University' \nA: What are the papers published under the institution 'Indiana University'? \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT COUNT(DISTINCT city) FROM Person \nA: How many different cities do people originate from? \n Additional table information: table: network_2"} -{"text": "Q: SELECT T1.name, COUNT(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id \nA: How many regions were affected by each storm? \n Additional table information: table: storm_record"} -{"text": "Q: 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) \nA: Find the names of scientists who are not working on the project with the highest hours. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_claimed = (SELECT MAX(amount_claimed) FROM claim_headers) \nA: Which customer made the largest amount of claim in a single claim? Return the customer details. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING COUNT(*) >= 2 \nA: What categories have two or more corresponding books that were made after 1989? \n Additional table information: table: culture_company"} -{"text": "Q: SELECT MAX(customer_code), MIN(customer_code) FROM Customers \nA: What is the largest and smallest customer codes? \n Additional table information: table: department_store"} -{"text": "Q: SELECT COUNT(*) FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'Canada') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States') \nA: How many routes go from the United States to Canada? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT AVG(Population) FROM county \nA: On average how large is the population of the counties? \n Additional table information: table: election"} -{"text": "Q: SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: Find the country of origin for the artist who made the least number of songs? \n Additional table information: table: music_1"} -{"text": "Q: SELECT AVG(Num_of_Audience) FROM festival_detail \nA: What is the average number of audience for festivals? \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT Name FROM Products \nA: Select the names of all the products in the store. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT order_id, SUM(product_quantity) FROM Order_items GROUP BY order_id \nA: Give the order ids for all orders, as well as the total product quantity in each. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT DISTINCT label FROM Albums \nA: What are all the labels? \n Additional table information: table: music_2"} -{"text": "Q: SELECT MAX(t2.active_to_date) FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Tillman Ernser' \nA: What is the 'active to date' of the latest contact channel used by 'Tillman Ernser'? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT formats FROM files GROUP BY formats ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the file format that is used by the most files. \n Additional table information: table: music_1"} -{"text": "Q: SELECT Name FROM county_public_safety ORDER BY Population DESC \nA: List the names of counties in descending order of population. \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211' \nA: How many students enrolled in class ACCT-211? \n Additional table information: table: college_1"} -{"text": "Q: SELECT AVG(student_capacity), SUM(student_capacity) FROM dorm WHERE gender = 'X' \nA: Find the average and total capacity of dorms for the students with gender X. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT country FROM stadium EXCEPT SELECT country FROM stadium WHERE opening_year > 2006 \nA: Which countries do not have a stadium that was opened after 2006? \n Additional table information: table: swimming"} -{"text": "Q: SELECT Amount_Settled, Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC NULLS FIRST LIMIT 1 \nA: Among all the claims, what is the amount claimed in the claim with the least amount settled? List both the settlement amount and claim amount. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT COUNT(*) FROM Customers \nA: How many customers are there? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'MADLOCK' AND T1.lastname = 'RAY' \nA: Find the number of teachers who teach the student called MADLOCK RAY. \n Additional table information: table: student_1"} -{"text": "Q: SELECT * FROM people \nA: What is all the information about all people? \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT name FROM people ORDER BY date_of_birth NULLS FIRST \nA: What are the names of all people, ordered by their date of birth? \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT MIN(bathroom_count), MAX(bathroom_count) FROM Apartments \nA: What is the minimum and maximum number of bathrooms of all the apartments? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT T1.driverid, COUNT(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING COUNT(*) <= 30 \nA: For each id of a driver who participated in at most 30 races, how many races did they participate in? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT employee_id, salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam') \nA: What are the employee ids of employees who report to Payam, and what are their salaries? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT t1.attribute_name, t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 0 \nA: Which attribute definitions have attribute value 0? Give me the attribute name and attribute ID. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT T1.student_id, T2.course_name FROM student_course_registrations AS T1 JOIN courses AS T2 ON T1.course_id = T2.course_id \nA: What are the ids of all students for courses and what are the names of those courses? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT classroom FROM list GROUP BY classroom ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the classroom that the most students use. \n Additional table information: table: student_1"} -{"text": "Q: SELECT COUNT(DISTINCT T2.Location_Code) FROM Things AS T1 JOIN Timed_Locations_of_Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.service_details = 'Unsatisfied' \nA: How many distinct locations have the things with service detail 'Unsatisfied' been located in? \n Additional table information: table: local_govt_and_lot"} -{"text": "Q: SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: Which game type has least number of games? \n Additional table information: table: game_1"} -{"text": "Q: SELECT publisher FROM book_club GROUP BY publisher ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the publisher that has published the most books. \n Additional table information: table: culture_company"} -{"text": "Q: SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = 'saving' \nA: What are the names of customers who do not have saving accounts? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT COUNT(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Blanche' AND T2.customer_last_name = 'Huels' AND T1.card_type_code = 'Credit' \nA: Count the number of credit cards that the customer with first name Blanche and last name Huels has. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT minister, party_name FROM party ORDER BY took_office DESC \nA: Show all ministers and parties they belong to in descending order of the time they took office. \n Additional table information: table: party_people"} -{"text": "Q: SELECT country FROM competition WHERE competition_type = 'Tournament' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1 \nA: what is the name of the country that participated in the most tournament competitions? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT COUNT(*), rank FROM captain WHERE age < 50 GROUP BY rank \nA: Count the number of captains younger than 50 of each rank. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT YEAR FROM SECTION GROUP BY YEAR ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which year had the greatest number of courses? \n Additional table information: table: college_2"} -{"text": "Q: SELECT trade_name, COUNT(*) FROM medicine GROUP BY trade_name \nA: How many medicines are offered by each trade name? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT T1.Location, T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID \nA: Show locations and nicknames of schools. \n Additional table information: table: school_player"} -{"text": "Q: SELECT T1.driverid, T1.forename, COUNT(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING COUNT(*) >= 2 \nA: Find the id, forename and number of races of all drivers who have at least participated in two races? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT building FROM Faculty GROUP BY building ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which building has most faculty members? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC NULLS FIRST \nA: Return the different statuses of cities, ascending by frequency. \n Additional table information: table: farm"} -{"text": "Q: SELECT title, Studio FROM film WHERE Studio LIKE '%Universal%' \nA: What are the titles and studios of films that have been produced by a studio whose name contains 'Universal'? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id WHERE Circulation_History.document_id = 1 \nA: List all employees in the circulation history of the document with id 1. List the employee's name. \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT COUNT(*) FROM Students WHERE NOT student_id IN (SELECT student_id FROM Student_Course_Enrolment) \nA: Count the number of students who did not enroll in any course. \n Additional table information: table: e_learning"} -{"text": "Q: 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 \nA: What are the names of projects that require more than 300 hours, and how many scientists are assigned to each? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT T1.name, COUNT(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id \nA: List the name for storms and the number of affected regions for each storm. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT T2.firstname, T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom GROUP BY T2.firstname, T2.lastname ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the name of the teacher who teaches the largest number of students. \n Additional table information: table: student_1"} -{"text": "Q: SELECT Name, Score FROM WINE \nA: List the names and scores of all wines. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT date_left_staff FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn' \nA: When did the staff member with first name as Janessa and last name as Sawayn leave the company? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT COUNT(*) FROM country \nA: How many countries are there in total? \n Additional table information: table: match_season"} -{"text": "Q: SELECT dept_address FROM department WHERE dept_name = 'History' \nA: what is the address of history department? \n Additional table information: table: college_1"} -{"text": "Q: SELECT MAX(capacity), AVG(capacity), building FROM classroom GROUP BY building \nA: What are the greatest and average capacity for rooms in each building? \n Additional table information: table: college_2"} -{"text": "Q: SELECT POSITION, AVG(Points) FROM player GROUP BY POSITION \nA: List the position of players and the average number of points of players of each position. \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T3.Number_of_hosts > 20 \nA: Which parties have more than 20 hosts? Give me the host names for these parties. \n Additional table information: table: party_host"} -{"text": "Q: SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 1 \nA: Which apartments have unit status availability of both 0 and 1? Return their apartment numbers. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id HAVING COUNT(*) > 1 \nA: Which buildings have more than one company offices? Give me the building names. \n Additional table information: table: company_office"} -{"text": "Q: SELECT T2.Lifespan FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY Vote_Percent DESC \nA: What are the lifespans of representatives in descending order of vote percent? \n Additional table information: table: election_representative"} -{"text": "Q: SELECT Fname, Lname, phone FROM Faculty WHERE Sex = 'F' \nA: Show the first name, last name, and phone number for all female faculty members. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT Carrier FROM device WHERE Software_Platform <> 'Android' \nA: Return the device carriers that do not have Android as their software platform. \n Additional table information: table: device"} -{"text": "Q: SELECT Advisor FROM Student WHERE StuID = 1004 \nA: Who is the advisor of student with ID 1004? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1 \nA: Find the name of the youngest organization. \n Additional table information: table: e_government"} -{"text": "Q: SELECT T1.Aircraft, T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000 \nA: Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000. \n Additional table information: table: aircraft"} -{"text": "Q: SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = 'Cathrine' \nA: What are the addresses of the course authors or tutors with personal name 'Cathrine' \n Additional table information: table: e_learning"} -{"text": "Q: SELECT AVG(T1.salary), COUNT(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name = T2.dept_name ORDER BY T2.budget DESC LIMIT 1 \nA: How many instructors are in the department with the highest budget, and what is their average salary? \n Additional table information: table: college_2"} -{"text": "Q: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Jeremy' AND t1.lname = 'Gibbons' \nA: Find the titles of all the papers written by 'Jeremy Gibbons' \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id GROUP BY t2.customer_details ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which customer have the most policies? Give me the customer details. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT AVG(age), city_code FROM student GROUP BY city_code \nA: What is the average age for each city and what are those cities? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT Team FROM Elimination WHERE Eliminated_By = 'Orton' INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = 'Benjamin' \nA: Show the teams that have both wrestlers eliminated by 'Orton' and wrestlers eliminated by 'Benjamin'. \n Additional table information: table: wrestler"} -{"text": "Q: SELECT AVG(student_capacity), SUM(student_capacity) FROM dorm WHERE gender = 'X' \nA: What is the average and total capacity for all dorms who are of gender X? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000 \nA: Please show the themes of competitions with host cities having populations larger than 1000. \n Additional table information: table: farm"} -{"text": "Q: SELECT job_id FROM employees GROUP BY job_id HAVING AVG(salary) > 8000 \nA: Find the job ID for those jobs which average salary is above 8000. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1 \nA: Which park did the most people attend in 2008? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT Nickname FROM school_details WHERE Division <> 'Division 1' \nA: Show the nicknames of schools that are not in division 1. \n Additional table information: table: school_player"} -{"text": "Q: SELECT state_province_county FROM addresses WHERE NOT address_id IN (SELECT employee_address_id FROM Employees) \nA: Find the states which do not have any employee in their record. \n Additional table information: table: customer_deliveries"} -{"text": "Q: SELECT name, openning_year, capacity FROM cinema \nA: Show name, opening year, and capacity for each cinema. \n Additional table information: table: cinema"} -{"text": "Q: SELECT Name FROM member WHERE NOT Member_ID IN (SELECT Member_ID FROM member_attendance) \nA: List the names of members who did not attend any performance. \n Additional table information: table: performance_attendance"} -{"text": "Q: SELECT name, LOCATION, number_of_platforms FROM station \nA: Show the name, location, and number of platforms for all stations. \n Additional table information: table: train_station"} -{"text": "Q: SELECT T2.Store_Name FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T1.Status_Code = 'stop' \nA: What are the names of the workshop groups that have bookings with status code 'stop'? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT t1.title FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID ORDER BY high_estimate DESC LIMIT 1 \nA: Return the title of the film with the highest high estimate? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT DISTINCT T3.name, T2.title, T1.stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.director = T3.name \nA: For any rating where the name of reviewer is the same as the director of the movie, return the reviewer name, movie title, and number of stars. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT product_type_code, AVG(product_price) FROM products GROUP BY product_type_code \nA: Return the average price for each product type. \n Additional table information: table: department_store"} -{"text": "Q: SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts \nA: What are the customer ids for customers who do not have an account? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT product_category_description FROM ref_product_categories WHERE product_category_code = 'Spices' \nA: Find the product category description of the product category with code 'Spices'. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT first_name, last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000 \nA: List the first name and last name of customers have the amount of outstanding between 1000 and 3000. \n Additional table information: table: driving_school"} -{"text": "Q: SELECT LName FROM STUDENT WHERE Sex = 'F' ORDER BY Age DESC \nA: Find the last name of female (sex is F) students in the descending order of age. \n Additional table information: table: college_3"} -{"text": "Q: SELECT DISTINCT publisher FROM book_club \nA: Show all distinct publishers for books. \n Additional table information: table: culture_company"} -{"text": "Q: SELECT name FROM artist EXCEPT SELECT T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.year = 2004 \nA: What are the names of artists who did not have an exhibition in 2004? \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT AVG(price) FROM wine WHERE NOT Appelation IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma') \nA: Find the average price of wines that are not produced from Sonoma county. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = 'shared' \nA: How many different songs have shared vocals? \n Additional table information: table: music_2"} -{"text": "Q: SELECT COUNT(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2000 \nA: How many players were in the team Boston Red Stockings in 2000? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT SUM(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_short_name = 'Columbus Square' \nA: How many rooms in total are there in the apartments in the building with short name 'Columbus Square'? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT building FROM Faculty WHERE rank = 'Professor' GROUP BY building HAVING COUNT(*) >= 10 \nA: In which buildings are there at least ten professors? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*) >= 2 \nA: Return the investors who have invested in two or more entrepreneurs. \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT T3.booking_start_date, T3.booking_end_date FROM Products_for_hire AS T1 JOIN products_booked AS T2 ON T1.product_id = T2.product_id JOIN bookings AS T3 ON T2.booking_id = T3.booking_id WHERE T1.product_name = 'Book collection A' \nA: What are the start date and end date of the booking that has booked the product named 'Book collection A'? \n Additional table information: table: products_for_hire"} -{"text": "Q: SELECT SUM(enr) FROM College \nA: What is the total enrollment number of all colleges? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT COUNT(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Columbus Crew' \nA: How many distinct colleges are associated with players from the team with name 'Columbus Crew'. \n Additional table information: table: match_season"} -{"text": "Q: SELECT customer_name, customer_phone FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM mailshot_customers) \nA: Show the name and phone of the customer without any mailshot. \n Additional table information: table: customers_campaigns_ecommerce"} -{"text": "Q: SELECT DISTINCT T1.driverid, T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds > 100000 \nA: Find all the distinct id and nationality of drivers who have had laptime more than 100000 milliseconds? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT project_id FROM Documents GROUP BY project_id HAVING COUNT(*) >= 2 \nA: Show the ids for projects with at least 2 documents. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT name, LOCATION FROM enzyme \nA: List the names and the locations that the enzymes can make an effect. \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT COUNT(*) FROM club WHERE clublocation = 'HHH' \nA: Count the number of clubs located at 'HHH'. \n Additional table information: table: club_1"} -{"text": "Q: SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus' \nA: What are the names of the tourist attractions that can be accessed by bus? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT AVG(UnitPrice) FROM TRACK \nA: Find the average unit price for a track. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT T2.Comptroller FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2 \nA: Find the parties associated with the delegates from district 1 or 2. Who served as comptrollers of the parties? \n Additional table information: table: election"} -{"text": "Q: SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1 \nA: Show the detail of vehicle with id 1. \n Additional table information: table: driving_school"} -{"text": "Q: SELECT AVG(Enrollment) FROM school \nA: What is the average enrollment of schools? \n Additional table information: table: school_player"} -{"text": "Q: SELECT title, film_id FROM film WHERE rental_rate = 0.99 INTERSECT SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id HAVING COUNT(*) < 3 \nA: What are the title and id of the film which has a rental rate of 0.99 and an inventory of below 3? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T1.cmi_cross_ref_id, T1.source_system_code FROM CMI_Cross_References AS T1 JOIN Council_Tax AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id GROUP BY T1.cmi_cross_ref_id HAVING COUNT(*) >= 1 \nA: What is the cmi cross reference id that is related to at least one council tax entry? List the cross reference id and source system code. \n Additional table information: table: local_govt_mdm"} -{"text": "Q: SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING COUNT(*) >= 2 \nA: What are the names for all aircrafts with at least 2 flights? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT COUNT(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.gender = 'M' \nA: What are the total number of students who are living in a male dorm? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT MAX(Transit_Passengers), MIN(Transit_Passengers) FROM airport \nA: What are the maximum and minimum number of transit passengers of all aiports. \n Additional table information: table: aircraft"} -{"text": "Q: SELECT T1.problem_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T2.product_name = 'voluptatem' AND T1.date_problem_reported > '1995' \nA: List the ids of the problems from the product 'voluptatem' that are reported after 1995? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = 'Deputy' OR t1.policy_type_code = 'Uniform' \nA: Find the names of customers who either have an deputy policy or uniformed policy. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance < 100 INTERSECT SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 500 \nA: Show the theme for exhibitions with both records of an attendance below 100 and above 500. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = 'Human Resource' OR T2.role_name = 'Manager' \nA: Show the employee ids for all employees with role name 'Human Resource' or 'Manager'. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT YEAR, AVG(attendance) FROM home_game GROUP BY YEAR \nA: For each year, return the year and the average number of attendance at home games. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId WHERE T1.Name = 'AAC audio file' \nA: Count the number of tracks that are of the media type 'AAC audio file'. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1 \nA: What are the names of the physician who prescribed the highest dose? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT Name FROM ship WHERE Nationality = 'United States' OR Nationality = 'United Kingdom' \nA: What are the names of the ships that are from either the US or the UK? \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT first_name, last_name FROM employees WHERE department_id = 70 OR department_id = 90 \nA: What are the full names of employees who with in department 70 or 90? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT * FROM employees WHERE hire_date < '2002-06-21' \nA: display all the details from Employees table for those employees who was hired before 2002-06-21. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT COUNT(*), Competition FROM MATCH GROUP BY Competition \nA: For each competition, count the number of matches. \n Additional table information: table: city_record"} -{"text": "Q: SELECT COUNT(*) FROM submission \nA: How many submissions are there? \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT t1.color_code, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = 'chervil' \nA: Return the color code and description for the product with the name 'chervil'. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) >= 2 \nA: Show all the locations with at least two cinemas with capacity above 300. \n Additional table information: table: cinema"} -{"text": "Q: SELECT COUNT(*) FROM station AS T1, trip AS T2, station AS T3 JOIN trip AS T4 ON T1.id = T2.start_station_id AND T2.id = T4.id AND T3.id = T4.end_station_id WHERE T1.city = 'Mountain View' AND T3.city = 'Palo Alto' \nA: How many trips started from Mountain View city and ended at Palo Alto city? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte' \nA: Find the names of customers who never ordered product Latte. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = 'Karson' \nA: On what dates did the student whose personal name is 'Karson' enroll in and complete the courses? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT name FROM buildings WHERE Status = 'on-hold' ORDER BY Stories ASC NULLS FIRST \nA: Please show the names of the buildings whose status is 'on-hold', in ascending order of stories. \n Additional table information: table: company_office"} -{"text": "Q: SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte' \nA: What are names of customers who never ordered product Latte. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT date_from FROM Project_Staff ORDER BY date_from ASC NULLS FIRST LIMIT 1 \nA: When did the first staff for the projects started working? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT T2.Name, T1.Team FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC \nA: What are the names of wrestlers and their teams in elimination, ordered descending by days held? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.order_date DESC LIMIT 1 \nA: Who made the latest order? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT T1.name, T1.team_id, MAX(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id \nA: For each team, return the team name, id and the maximum salary among the team. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT T1.line_1 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.address_id INTERSECT SELECT T1.line_1 FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id \nA: What are the line 1 of addresses shared by some students and some teachers? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T2.Position = 'Right Wing' \nA: What are the names of the clubs that have players in the position of 'Right Wing'? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT COUNT(*) FROM (SELECT * FROM endowment WHERE amount > 8.5 GROUP BY school_id HAVING COUNT(*) > 1) \nA: Find the number of schools that have more than one donator whose donation amount is less than 8.5. \n Additional table information: table: school_finance"} -{"text": "Q: SELECT state_province_county, COUNT(*) FROM addresses GROUP BY state_province_county \nA: Show each state and the number of addresses in each state. \n Additional table information: table: customers_and_products_contacts"} -{"text": "Q: SELECT Hosts FROM farm_competition WHERE Theme <> 'Aliens' \nA: What are the hosts of competitions whose theme is not 'Aliens'? \n Additional table information: table: farm"} -{"text": "Q: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.advisor = 1121 \nA: List the clubs that have at least a member with advisor '1121'. \n Additional table information: table: club_1"} -{"text": "Q: SELECT SUM(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id = t2.claim_id WHERE t2.created_date = (SELECT created_date FROM claims_documents ORDER BY created_date NULLS FIRST LIMIT 1) \nA: Find the total amount claimed in the most recently created document. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT T2.guest_first_name, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id \nA: Show the guest first names, start dates, and end dates of all the apartment bookings. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT T1.editor_id, T1.Name, COUNT(*) FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.editor_id \nA: Show the id, name of each editor and the number of journal committees they are on. \n Additional table information: table: journal_committee"} -{"text": "Q: SELECT DISTINCT T2.Type FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID WHERE T3.Year = 2007 \nA: Show distinct types of artworks that are nominated in festivals in 2007. \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT COUNT(DISTINCT scientist) FROM assignedto \nA: Count the number of different scientists assigned to any project. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT DISTINCT cName FROM college WHERE enr > (SELECT MIN(enr) FROM college WHERE state = 'FL') \nA: Find names of colleges with enrollment greater than that of some (at least one) college in the FL state. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT Planned_Delivery_Date, Actual_Delivery_Date FROM BOOKINGS \nA: Show all the planned delivery dates and actual delivery dates of bookings. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Psychiatry' \nA: Which physicians are affiliated with both Surgery and Psychiatry departments? Tell me their names. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING COUNT(*) > 4 \nA: Find the policy types more than 4 customers use. Show their type code. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT COUNT(*) FROM Apartments WHERE NOT apt_id IN (SELECT apt_id FROM Apartment_Facilities) \nA: Find the number of apartments that have no facility. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20 \nA: Show the hometowns shared by people older than 23 and younger than 20. \n Additional table information: table: gymnast"} -{"text": "Q: SELECT Stuid, SUM(hours_played) FROM Plays_games GROUP BY Stuid \nA: What are the ids of all students and number of hours played? \n Additional table information: table: game_1"} -{"text": "Q: SELECT bike_id FROM trip WHERE zip_code = 94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which bike traveled the most often in zip code 94002? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT apt_type_code, MAX(room_count), MIN(room_count) FROM Apartments GROUP BY apt_type_code \nA: Show each apartment type code, and the maximum and minimum number of rooms for each type. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT COUNT(*) FROM people WHERE NOT people_id IN (SELECT People_ID FROM body_builder) \nA: How many persons are not body builders? \n Additional table information: table: body_builder"} -{"text": "Q: SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING SUM(hoursperweek) > 10 \nA: Show all student IDs with more than total 10 hours per week on all sports played. \n Additional table information: table: game_1"} -{"text": "Q: SELECT dorm_name FROM dorm WHERE NOT dormid IN (SELECT dormid FROM has_amenity) \nA: What are the names of all the dorms that don't have any amenities? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT COUNT(*) FROM wedding WHERE YEAR = 2016 \nA: How many weddings are there in year 2016? \n Additional table information: table: wedding"} -{"text": "Q: SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2000 AND T2.city = 'Atlanta' \nA: How many games were played in city Atlanta in 2000? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT CName FROM COURSE ORDER BY Credits NULLS FIRST \nA: List the course name of courses sorted by credits. \n Additional table information: table: college_3"} -{"text": "Q: SELECT lname FROM authors WHERE fname = 'Amal' \nA: Which authors have first name 'Amal'? List their last names. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT AVG(product_price) FROM products) \nA: Return ids of all the products that are supplied by supplier id 2 and are more expensive than the average price of all products. \n Additional table information: table: department_store"} -{"text": "Q: SELECT AVG(product_price) FROM products WHERE product_type_code = 'Clothes' \nA: What is the average price of clothes? \n Additional table information: table: department_store"} -{"text": "Q: SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC \nA: Show the ages of gymnasts in descending order of total points. \n Additional table information: table: gymnast"} -{"text": "Q: SELECT SUM(Points) FROM player \nA: Show total points of all players. \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games \nA: What are the ids of all students who are not video game players? \n Additional table information: table: game_1"} -{"text": "Q: SELECT emp_fname, emp_lname FROM employee ORDER BY emp_dob NULLS FIRST LIMIT 1 \nA: What is the first and last name of the oldest employee? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id = T2.address_id WHERE T2.customer_id = 10 \nA: Return the address of customer 10. \n Additional table information: table: department_store"} -{"text": "Q: SELECT product_type_code, MAX(product_price), MIN(product_price) FROM products GROUP BY product_type_code \nA: For each product type, return the maximum and minimum price. \n Additional table information: table: department_store"} -{"text": "Q: SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_Senator_VOTE \nA: What are the distinct first names of the students who have class president votes? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T2.theme, T1.date, T1.attendance FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T2.year = 2004 \nA: Return the themes, dates, and attendance for exhibitions that happened in 2004. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT Venue FROM debate ORDER BY Num_of_Audience ASC NULLS FIRST \nA: List the venues of debates in ascending order of the number of audience. \n Additional table information: table: debate"} -{"text": "Q: SELECT COUNT(*) FROM player WHERE birth_country = 'USA' AND bats = 'R' \nA: Count the number of players who were born in USA and have bats information 'R'. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT name, headquarter FROM manufacturers ORDER BY revenue DESC \nA: What are the names and headquarters of all manufacturers, ordered by revenue descending? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT Working_year_starts FROM manager ORDER BY LEVEL DESC \nA: Show the working years of managers in descending order of their level. \n Additional table information: table: railway"} -{"text": "Q: SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.crs_description LIKE '%Statistics%' \nA: Find the name of department that offers the class whose description has the word 'Statistics'. \n Additional table information: table: college_1"} -{"text": "Q: SELECT rank, COUNT(*) FROM Faculty GROUP BY rank \nA: How many faculty members do we have for each faculty rank? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT AVG(hours) FROM projects \nA: What is the average hours across all projects? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = 'Sales Person' EXCEPT SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = 'Clerical Staff' \nA: What are the names and genders of staff who have held the title Sales Person, but never Clerical Staff? \n Additional table information: table: department_store"} -{"text": "Q: SELECT AVG(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no' \nA: What is the average number of hours spent practicing for students who got rejected? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT max_page_size FROM product GROUP BY max_page_size HAVING COUNT(*) > 3 \nA: Find the list of page size which have more than 3 product listed \n Additional table information: table: store_product"} -{"text": "Q: SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students \nA: Find the common login name of course authors and students. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT name FROM instructor WHERE salary > (SELECT MAX(salary) FROM instructor WHERE dept_name = 'Biology') \nA: Find the names of all instructors whose salary is greater than the salary of all instructors in the Biology department. \n Additional table information: table: college_2"} -{"text": "Q: SELECT document_type_description FROM Ref_document_types WHERE document_type_name = 'Film' \nA: Return the description of the document type name 'Film'. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: 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' \nA: What are the first names of the faculty members playing both Canoeing and Kayaking? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = 'San Jose State University' AND t2.year = 2000 \nA: How many degrees were conferred in 'San Jose State University' in 2000? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT COUNT(*) FROM Customers \nA: Count the number of customers. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T2.Date_of_Birth FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor = 'Simon Woodroffe' OR T1.Investor = 'Peter Jones' \nA: Return the dates of birth for entrepreneurs who have either the investor Simon Woodroffe or Peter Jones. \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT Allergy, COUNT(*) FROM Has_allergy GROUP BY Allergy \nA: How many students have each different allergy? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT channel_code FROM customer_contact_channels GROUP BY channel_code HAVING COUNT(customer_id) < 5 \nA: List all the contact channel codes that were used less than 5 times. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Give the color description that is least common across products. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T2.card_type_code, COUNT(*) FROM Financial_transactions AS T1 JOIN Customers_cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_code \nA: Show the card type codes and the number of transactions. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT AVG(RAM_MiB) FROM chip_model WHERE NOT model_name IN (SELECT chip_model FROM phone) \nA: Find the average ram mib size of the chip models that are never used by any phone. \n Additional table information: table: phone_1"} -{"text": "Q: SELECT COUNT(*) FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'Canada') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States') \nA: Find the number of routes from the United States to Canada. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT fname, lname FROM student WHERE city_code <> 'HKG' ORDER BY age NULLS FIRST \nA: What are the first and last names of all students who are not living in the city HKG and order the results by age? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Initial Application' \nA: For grants with both documents described as 'Regular' and documents described as 'Initial Application', list its start date. \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT COUNT(*) FROM farm \nA: Count the number of farms. \n Additional table information: table: farm"} -{"text": "Q: SELECT dept_name FROM course GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 3 \nA: Find the names of the top 3 departments that provide the largest amount of courses? \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*), T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name \nA: Find the number of projects which each scientist is working on and scientist's name. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT COUNT(DISTINCT T1.injury) FROM injury_accident AS T1 JOIN game AS T2 ON T1.game_id = T2.id WHERE T2.season > 2010 \nA: How many distinct kinds of injuries happened after season 2010? \n Additional table information: table: game_injury"} -{"text": "Q: SELECT transaction_type, SUM(transaction_amount) FROM Financial_transactions GROUP BY transaction_type \nA: What are total transaction amounts for each transaction type? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT document_name, document_id FROM Documents WHERE document_type_code = 'BK' \nA: Find names and ids of all documents with document type code BK. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT AVG(Speed) FROM roller_coaster \nA: What is the average speed of roller coasters? \n Additional table information: table: roller_coaster"} -{"text": "Q: SELECT MAX(capacity), AVG(capacity), building FROM classroom GROUP BY building \nA: Find the maximum and average capacity among rooms in each building. \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(DISTINCT POSITION) FROM player \nA: How many different positions of players are there? \n Additional table information: table: school_player"} -{"text": "Q: SELECT COUNT(*) FROM list \nA: Find the number of students in total. \n Additional table information: table: student_1"} -{"text": "Q: SELECT name FROM track EXCEPT SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id WHERE T1.class = 'GT' \nA: What are the names for tracks without a race in class 'GT'. \n Additional table information: table: race_track"} -{"text": "Q: SELECT role_description FROM ROLES WHERE role_code = (SELECT role_code FROM users WHERE user_login = 1 GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1) \nA: What is the description of the most popular role among users that have logged in? \n Additional table information: table: document_management"} -{"text": "Q: 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' \nA: 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. \n Additional table information: table: flight_company"} -{"text": "Q: SELECT product_type_code FROM products GROUP BY product_type_code HAVING COUNT(*) >= 2 \nA: Show the product type codes which have at least two products. \n Additional table information: table: customers_and_products_contacts"} -{"text": "Q: SELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = 'US museum' \nA: What is the name of the staff that is in charge of the attraction named 'US museum'? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT COUNT(*) FROM products WHERE product_category_code = 'Seeds' \nA: How many products are there under the category 'Seeds'? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT document_name, document_id FROM Documents WHERE document_type_code = 'BK' \nA: What are the names and ids of documents that have the type code BK? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.age < 18 \nA: How many members of club 'Bootup Baltimore' are younger than 18? \n Additional table information: table: club_1"} -{"text": "Q: SELECT ResName FROM Restaurant \nA: Show me all the restaurants. \n Additional table information: table: restaurant_1"} -{"text": "Q: SELECT start_station_id, start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*) >= 200 \nA: What are the ids and names of all start stations that were the beginning of at least 200 trips? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT order_item_id FROM order_items WHERE product_id = 11 \nA: Find all the order items whose product id is 11. What are the order item ids? \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT T1.Aircraft, COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft \nA: For each aircraft that has won an award, what is its name and how many time has it won? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT T2.Name, T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID \nA: For each journal_committee, find the editor name and the journal theme. \n Additional table information: table: journal_committee"} -{"text": "Q: SELECT date_left_staff FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn' \nA: When did the staff member Janessa Sawayn leave the company? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT MIN(product_price), MAX(product_price), AVG(product_price) FROM products \nA: Show the minimum, maximum, average price for all products. \n Additional table information: table: customers_and_products_contacts"} -{"text": "Q: SELECT Name FROM pilot WHERE Age >= 25 \nA: what is the name of every pilot who is at least 25 years old? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY department_name \nA: What are the department names and how many employees work in each of them? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus' \nA: Which tourist attractions can we get to by bus? Tell me the names of the attractions. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2001 ORDER BY t3.degrees NULLS FIRST LIMIT 1 \nA: How many faculty members are at the university that gave the least number of degrees in 2001? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT COUNT(*) FROM employees WHERE country = 'Canada' \nA: How many employees live in Canada? \n Additional table information: table: store_1"} -{"text": "Q: SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1 \nA: What is the id of the most recent order? \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT COUNT(*) FROM Students WHERE personal_name LIKE '%son%' \nA: Find the number of students who have the word 'son' in their personal names. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT fname, lname, address FROM employee ORDER BY Bdate NULLS FIRST \nA: list the first and last names, and the addresses of all employees in the ascending order of their birth date. \n Additional table information: table: company_1"} -{"text": "Q: SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100 \nA: What are the response received dates for the documents described as 'Regular' or granted with more than 100? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT mID, AVG(stars) FROM Rating WHERE NOT mID IN (SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = 'Brittany Harris') GROUP BY mID \nA: What is the average rating for each movie that has never been reviewed by Brittany Harris? \n Additional table information: table: movie_1"} -{"text": "Q: 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' \nA: What is the first and last name of all employees who live in the city Damianfort? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT country FROM airports ORDER BY elevation DESC LIMIT 1 \nA: Which country is the airport that has the highest altitude located in? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT COUNT(*) FROM Apartments WHERE NOT apt_id IN (SELECT apt_id FROM Apartment_Facilities) \nA: How many apartments do not have any facility? \n Additional table information: table: apartment_rentals"} -{"text": "Q: 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' \nA: Which city does staff with first name as Janessa and last name as Sawayn live? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT document_type_code FROM Ref_document_types WHERE document_type_name = 'Paper' \nA: Find the code of the document type 'Paper'. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT store_id FROM inventory GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the id of the store that has the most items in inventory? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT COUNT(DISTINCT customer_id) FROM Accounts \nA: How many customers have an account? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT project_details FROM Projects WHERE organisation_id IN (SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY COUNT(*) DESC LIMIT 1) \nA: What are the details for the projects which were launched by the organization with the most projects? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT Official_Name FROM city ORDER BY Population DESC \nA: What are the official names of cities, ordered descending by population? \n Additional table information: table: farm"} -{"text": "Q: SELECT Official_native_language FROM country WHERE Official_native_language LIKE '%English%' \nA: What are the official native languages that contain the string 'English'. \n Additional table information: table: match_season"} -{"text": "Q: SELECT T1.stu_fname, T1.stu_lname, T4.crs_description FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code \nA: What are the names of all students who took a class and the corresponding course descriptions? \n Additional table information: table: college_1"} -{"text": "Q: SELECT patient FROM undergoes ORDER BY dateundergoes NULLS FIRST LIMIT 1 \nA: Which patient is undergoing the most recent treatment? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T1.Order_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID JOIN Products AS T3 ON T2.Product_ID = T3.Product_ID WHERE T3.Product_price > 1000 \nA: Find the order dates of the orders with price above 1000. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid WHERE T2.distance > 5000 GROUP BY T1.aid ORDER BY COUNT(*) >= 5 NULLS FIRST \nA: What is the name and distance of every aircraft that can cover a distance of more than 5000 and which at least 5 people can fly? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas' \nA: Show all headquarters with both a company in banking industry and a company in Oil and gas. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT Birth_Place FROM people GROUP BY Birth_Place ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most common birth place of people? \n Additional table information: table: body_builder"} -{"text": "Q: SELECT region_name FROM region WHERE NOT region_id IN (SELECT region_id FROM affected_region) \nA: Show the name for regions not affected. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT product_name FROM products WHERE product_category_code = 'Spices' \nA: What are the names of products with category 'Spices'? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT lname, sex FROM Student WHERE StuID IN (SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = 'Call of Destiny' INTERSECT SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = 'Works of Widenius') \nA: what is the last name and gender of all students who played both Call of Destiny and Works of Widenius? \n Additional table information: table: game_1"} -{"text": "Q: SELECT DISTINCT form_type_code FROM forms \nA: What are the different types of forms? \n Additional table information: table: e_government"} -{"text": "Q: SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses \nA: What are the names of all cities and states? \n Additional table information: table: e_government"} -{"text": "Q: SELECT billing_country, AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10 \nA: What are the names of the countries and average invoice size of the top countries by size? \n Additional table information: table: store_1"} -{"text": "Q: 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' \nA: Who is the advisor of Linda Smith? Give me the first name and last name. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT COUNT(*) FROM artist WHERE age > 46 AND year_join > 1990 \nA: How many artists are above age 46 and joined after 1990? \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT product_id FROM order_items GROUP BY product_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Give the product id for the product that was ordered most frequently. \n Additional table information: table: department_store"} -{"text": "Q: SELECT Customer_Name FROM Clients EXCEPT SELECT T2.Customer_Name FROM Bookings AS T1 JOIN Clients AS T2 ON T1.Customer_ID = T2.Client_ID \nA: Show the names of all the clients with no booking. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT last_name FROM staff WHERE email_address LIKE '%wrau%' \nA: What are the last names of staff with email addressed containing the substring 'wrau'? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT phone_number, email_address FROM Customers WHERE amount_outstanding > 2000 \nA: List phone number and email address of customer with more than 2000 outstanding balance. \n Additional table information: table: driving_school"} -{"text": "Q: SELECT dept_name, building FROM department ORDER BY budget DESC LIMIT 1 \nA: Find the name and building of the department with the highest budget. \n Additional table information: table: college_2"} -{"text": "Q: SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = 'Female' \nA: Show the start dates and end dates of all the apartment bookings made by guests with gender code 'Female'. \n Additional table information: table: apartment_rentals"} -{"text": "Q: 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 \nA: What is the first and last name of the faculty participating in the most activities? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1 \nA: What is the name of the ship with the largest tonnage? \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT Name FROM wrestler ORDER BY Days_held DESC \nA: List the names of wrestlers in descending order of days held. \n Additional table information: table: wrestler"} -{"text": "Q: SELECT T2.first_name, T2.last_name, COUNT(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY COUNT(T1.reports_to) DESC LIMIT 1 \nA: What are the first and last names of all the employees and how many people report to them? \n Additional table information: table: store_1"} -{"text": "Q: SELECT city, MAX(lat) FROM station GROUP BY city \nA: For each city, return the highest latitude among its stations. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT COUNT(*) FROM Has_allergy WHERE Allergy = 'Cat' \nA: How many students are affected by cat allergies? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT T3.dept_name, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T1.emp_lname = 'Heffington' \nA: What is the name of the department and office location for the professor with the last name of Heffington? \n Additional table information: table: college_1"} -{"text": "Q: SELECT AVG(credit_score) FROM customer WHERE NOT cust_id IN (SELECT cust_id FROM loan) \nA: Find the average credit score of the customers who do not have any loan. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the busiest source airport that runs most number of routes in China. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%' \nA: Which document type is described with the prefix 'Initial'? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT name, city, country, elevation FROM airports WHERE city = 'New York' \nA: What is the name, city, country, and elevation for every airport in the city of New York? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT Name FROM GENRE \nA: What are the names of different music genres? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT AVG(elevation), country FROM airports GROUP BY country \nA: Find the average elevation of all airports for each country. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT organization_name FROM organizations ORDER BY date_formed ASC NULLS FIRST \nA: List all the name of organizations in order of the date formed. \n Additional table information: table: e_government"} -{"text": "Q: SELECT COUNT(*) FROM WINE WHERE Winery = 'Robert Biale' \nA: Count the number of wines produced at Robert Biale winery. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT COUNT(*), T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code \nA: What is the number of professors for different school? \n Additional table information: table: college_1"} -{"text": "Q: SELECT kids FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY' \nA: Find the number of kids staying in the rooms reserved by a person called ROY SWEAZ. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y' \nA: What are the last names for all scholarship students? \n Additional table information: table: game_1"} -{"text": "Q: SELECT Studio, COUNT(*) FROM film GROUP BY Studio \nA: How films are produced by each studio? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the denomination of the school that has the most players. \n Additional table information: table: school_player"} -{"text": "Q: SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC NULLS FIRST \nA: Show the crime rates of counties in ascending order of number of police officers. \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT LOCATION FROM school WHERE NOT School_ID IN (SELECT School_ID FROM Player) \nA: List the locations of schools that do not have any player. \n Additional table information: table: school_player"} -{"text": "Q: SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Monterey' AND T2.price < 50 \nA: What are the wines that have prices lower than 50 and have appelations in Monterey county? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT T1.title, T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title \nA: For each director who directed more than one movie, what are the titles and dates of release for all those movies? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'english' GROUP BY T2.artist_name HAVING COUNT(*) >= 1 \nA: Find the names and number of works of all artists who have at least one English songs. \n Additional table information: table: music_1"} -{"text": "Q: 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 \nA: Show statement id, statement detail, account detail for accounts. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT clubdesc FROM club WHERE clubname = 'Pen and Paper Gaming' \nA: What is the description of the club 'Pen and Paper Gaming'? \n Additional table information: table: club_1"} -{"text": "Q: SELECT COUNT(*), dept_code FROM professor WHERE prof_high_degree = 'Ph.D.' GROUP BY dept_code \nA: How many professors have a Ph.D. in each department? \n Additional table information: table: college_1"} -{"text": "Q: SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = 'San Jose State University' AND T2.year = 1996 \nA: What is the campus fee of 'San Jose State University' in year 1996? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT TYPE FROM institution GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the institution type with the largest number of institutions. \n Additional table information: table: protein_institute"} -{"text": "Q: 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' \nA: Find the first names of the faculty members who are playing Canoeing or Kayaking. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT customer_name FROM customers WHERE payment_method = 'Cash' \nA: What are the names of customers who use payment method 'Cash'? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT COUNT(*) FROM ROLES \nA: How many roles are there? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT order_id FROM shipments WHERE shipment_date > '2000-01-01' \nA: Find the ids of orders which are shipped after 2000-01-01. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT COUNT(DISTINCT crs_code) FROM CLASS \nA: How many courses are offered? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = 'Nominated' \nA: Please show the songs that have result 'nominated' at music festivals. \n Additional table information: table: music_4"} -{"text": "Q: SELECT LOCATION FROM performance GROUP BY LOCATION HAVING COUNT(*) >= 2 \nA: Show the locations that have at least two performances. \n Additional table information: table: performance_attendance"} -{"text": "Q: SELECT DISTINCT card_type_code FROM Customers_Cards \nA: Show all card type codes. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT Elimination_Move FROM Elimination WHERE Team = 'Team Orton' \nA: Return the elimination movies of wrestlers on Team Orton. \n Additional table information: table: wrestler"} -{"text": "Q: SELECT name FROM channel WHERE OWNER <> 'CCTV' \nA: Which channels are not owned by CCTV? Give me the channel names. \n Additional table information: table: program_share"} -{"text": "Q: SELECT T1.Status FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the status of the city that has hosted the most competitions? \n Additional table information: table: farm"} -{"text": "Q: SELECT name FROM airport WHERE country <> 'Iceland' \nA: What are the names of the airports which are not in the country 'Iceland'? \n Additional table information: table: flight_company"} -{"text": "Q: 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' \nA: Show ids for all documents with budget types described as 'Government'. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100 \nA: What are the distinct wineries which produce wines costing between 50 and 100? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT Clean_Jerk FROM body_builder ORDER BY Total DESC LIMIT 1 \nA: What are the clean and jerk score of the body builder with the highest total score? \n Additional table information: table: body_builder"} -{"text": "Q: SELECT headquarter FROM manufacturers WHERE founder = 'James' \nA: Where is the headquarter of the company founded by James? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT Issue_Date FROM volume ORDER BY Weeks_on_Top ASC NULLS FIRST LIMIT 1 \nA: What is the issue date of the volume with the minimum weeks on top? \n Additional table information: table: music_4"} -{"text": "Q: SELECT TYPE FROM institution WHERE founded > 1990 AND enrollment >= 1000 \nA: Show the institution type with an institution founded after 1990 and an institution with at least 1000 enrollment. \n Additional table information: table: protein_institute"} -{"text": "Q: 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' \nA: What are the different pilot names who had piloted a flight in the country 'United States' or in the airport named 'Billund Airport'? \n Additional table information: table: flight_company"} -{"text": "Q: SELECT T2.Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown \nA: How many gymnasts are from each hometown? \n Additional table information: table: gymnast"} -{"text": "Q: 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 \nA: What is the name and hours for the project which has the most scientists assigned to it? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT name FROM swimmer WHERE NOT id IN (SELECT swimmer_id FROM record) \nA: Find the names of the swimmers who have no record. \n Additional table information: table: swimming"} -{"text": "Q: SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3 \nA: Give the ids of the three products purchased in the largest amounts. \n Additional table information: table: department_store"} -{"text": "Q: SELECT dept_name, building FROM department ORDER BY budget DESC \nA: What are the names and buildings of the deparments, sorted by budget descending? \n Additional table information: table: college_2"} -{"text": "Q: SELECT name_first, name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998 \nA: List the first and last name for players who participated in all star game in 1998. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT DISTINCT T2.thing_id, T2.Type_of_Thing_Code FROM Timed_Status_of_Things AS T1 JOIN Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.Status_of_Thing_Code = 'Close' OR T1.Date_and_Date < '2017-06-19 02:59:21' \nA: What are the distinct id and type of the thing that has the status 'Close' or has a status record before the date '2017-06-19 02:59:21' \n Additional table information: table: local_govt_and_lot"} -{"text": "Q: SELECT DISTINCT cName FROM tryout ORDER BY cName NULLS FIRST \nA: What are the different names of the colleges involved in the tryout in alphabetical order? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT Open_Date, Open_Year FROM shop WHERE Shop_Name = 'Apple' \nA: List the open date of open year of the shop named 'Apple'. \n Additional table information: table: device"} -{"text": "Q: SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which vocal type is the most frequently appearring type? \n Additional table information: table: music_2"} -{"text": "Q: SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay = T3.StayID WHERE T3.room = 111 \nA: Find the names of all patients who have an undergoing treatment and are staying in room 111. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT DISTINCT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.name = 'Thesisin' \nA: What is the names of the physicians who prescribe medication Thesisin? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT rid FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'United States') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States') \nA: Find the id of routes whose source and destination airports are in the United States. \n Additional table information: table: flight_4"} -{"text": "Q: 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 \nA: What is the id of the order which has the most items? \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Jeremy' AND t1.lname = 'Gibbons' \nA: What are the titles of papers published by 'Jeremy Gibbons'? \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT artist_name FROM artist WHERE country = 'UK' AND gender = 'Male' \nA: What are the names of artists who are Male and are from UK? \n Additional table information: table: music_1"} -{"text": "Q: SELECT T2.balance, T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T1.name = 'Brown' \nA: What are the checking and savings balances in accounts belonging to Brown? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT Team FROM Elimination WHERE Eliminated_By = 'Orton' INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = 'Benjamin' \nA: What are the teams that have both wrestlers eliminated by Orton and wrestlers eliminated by Benjamin? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT customer_name FROM customers WHERE customer_name LIKE '%Alex%' \nA: Find the name of all customers whose name contains 'Alex'. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT T2.party_name FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id HAVING COUNT(*) >= 2 \nA: What are the names of parties with at least 2 events? \n Additional table information: table: party_people"} -{"text": "Q: SELECT f_id FROM files WHERE formats = 'mp4' UNION SELECT f_id FROM song WHERE resolution > 720 \nA: What are the ids of all songs that are available on mp4 or have a higher resolution than 720? \n Additional table information: table: music_1"} -{"text": "Q: SELECT main_industry, COUNT(*) FROM company GROUP BY main_industry ORDER BY SUM(market_value) DESC LIMIT 1 \nA: For each main industry, what is the total number of companies for the industry with the highest total market value? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details NULLS FIRST \nA: What are all the details of the organisations described as 'Sponsor'? Sort the result in an ascending order. \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T1.amenid = T2.amenid GROUP BY T2.amenid ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most common amenity in the dorms? \n Additional table information: table: dorm_1"} -{"text": "Q: 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 \nA: Which city has the highest temperature in February? \n Additional table information: table: city_record"} -{"text": "Q: SELECT COUNT(*) FROM wrestler \nA: Count the number of wrestlers. \n Additional table information: table: wrestler"} -{"text": "Q: SELECT Fname FROM STUDENT WHERE Age > 22 \nA: What are the first names of all the students aged above 22? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1 \nA: What is the ship with the largest amount of tonnage called? \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT name, city FROM branch WHERE NOT branch_id IN (SELECT branch_id FROM membership_register_branch) \nA: What are the names and cities of the branches that do not have any registered members? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY SUM(T2.amount) NULLS FIRST \nA: What are the names of the different customers who have taken out a loan, ordered by the total amount that they have taken? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT name, TYPE, flag FROM ship ORDER BY built_year DESC LIMIT 1 \nA: What is the name, type, and flag of the ship that was built in the most recent year? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT rank FROM Faculty GROUP BY rank ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Find the faculty rank that has the least members. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT T3.dept_name FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T1.dept_code = T3.dept_code GROUP BY T1.dept_code ORDER BY SUM(T1.crs_credit) DESC LIMIT 1 \nA: Find the name of the department that offers the largest number of credits of all classes. \n Additional table information: table: college_1"} -{"text": "Q: SELECT AVG(long) FROM station WHERE NOT id IN (SELECT station_id FROM status GROUP BY station_id HAVING MAX(bikes_available) > 10) \nA: What is the mean longitude for all stations that have never had more than 10 bikes available? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code = t3.color_code WHERE t3.color_description = 'white' AND t2.unit_of_measure <> 'Handful' \nA: Find the product names that are colored 'white' but do not have unit of measurement 'Handful'. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT languages FROM song GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the languages that are used most often in songs? \n Additional table information: table: music_1"} -{"text": "Q: SELECT TYPE FROM ship WHERE flag = 'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag = 'Malta' \nA: Find the ship type that are used by both ships with Panama and Malta flags. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT DISTINCT District FROM election \nA: Show all the distinct districts for elections. \n Additional table information: table: election"} -{"text": "Q: SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'Colorado' \nA: Find the name of customers who are living in Colorado? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1 \nA: which poll source does the highest oppose rate come from? \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which policy type appears most frequently in the available policies? \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT title FROM papers WHERE title LIKE '%Database%' \nA: Which papers have the substring 'Database' in their titles? Show the titles of the papers. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT payment_method_code, party_phone FROM parties WHERE party_email = 'enrico09@example.com' \nA: What is the payment method code and party phone of the party with the email 'enrico09@example.com'? \n Additional table information: table: e_government"} -{"text": "Q: SELECT DISTINCT Nominee FROM musical WHERE Award <> 'Tony Award' \nA: Return the different nominees of musicals that have an award that is not the Tony Award. \n Additional table information: table: musical"} -{"text": "Q: SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country \nA: What are the countries of perpetrators? Show each country and the corresponding number of perpetrators there. \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade = 'B' \nA: Find the number of students that have at least one grade 'B'. \n Additional table information: table: college_3"} -{"text": "Q: SELECT T1.Fname, T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID = T2.FacID WHERE T2.DNO = 520 \nA: What are the full names of faculty members who are a part of department 520? \n Additional table information: table: college_3"} -{"text": "Q: SELECT card_type_code, COUNT(DISTINCT customer_id) FROM Customers_cards GROUP BY card_type_code \nA: What are the different card type codes, and how many different customers hold each type? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT COUNT(DISTINCT T1.donator_name) FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn' \nA: How many donors have endowment for school named 'Glenn'? \n Additional table information: table: school_finance"} -{"text": "Q: SELECT T1.Name, T2.Tourist_Attraction_ID, COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID \nA: What are the name, id and the corresponding number of visits for each tourist attraction? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT T1.course_name, COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name \nA: What is the name of each course and the corresponding number of student enrollment? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT Industry FROM Companies WHERE Headquarters = 'USA' INTERSECT SELECT Industry FROM Companies WHERE Headquarters = 'China' \nA: Show the industries shared by companies whose headquarters are 'USA' and companies whose headquarters are 'China'. \n Additional table information: table: company_office"} -{"text": "Q: SELECT Party, COUNT(*) FROM representative GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the party that has the largest number of representatives? \n Additional table information: table: election_representative"} -{"text": "Q: SELECT bname FROM bank WHERE state = 'New York' \nA: What are the names of banks in the state of New York? \n Additional table information: table: loan_1"} -{"text": "Q: 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' \nA: List the name of all the distinct customers who have orders with status 'Packing'. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT County_name FROM county ORDER BY County_name DESC \nA: Sort the names of all counties in descending alphabetical order. \n Additional table information: table: election"} -{"text": "Q: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the aircraft that has won an award the most? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT SUM(total) FROM invoices WHERE billing_city = 'Chicago' AND billing_state = 'IL' \nA: What are the total amount of money in the invoices billed from Chicago, Illinois? \n Additional table information: table: store_1"} -{"text": "Q: SELECT COUNT(*) FROM HOTELS \nA: How many available hotels are there in total? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the catalog publisher that has the most catalogs. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT T1.student_id, T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) >= 2 \nA: Which student are enrolled in at least two courses? Give me the student ID and personal name. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING COUNT(*) < 3 \nA: What are the codes corresponding to document types for which there are less than 3 documents? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT t2.unit_of_measure, t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = 'chervil' \nA: What are the unit of measure and category code for the 'chervil' product? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: 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 NULLS FIRST LIMIT 1 \nA: Find the last name of the first ever contact person of the organization with the highest UK Vat number. \n Additional table information: table: e_government"} -{"text": "Q: SELECT customer_phone, customer_email FROM Customers WHERE customer_first_name = 'Aniyah' AND customer_last_name = 'Feest' \nA: What is the phone and email for customer with first name Aniyah and last name Feest? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame' \nA: Return the characteristic names of the 'sesame' product. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT DISTINCT T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800 \nA: What are the file sizes and formats for all songs with a resolution lower than 800? \n Additional table information: table: music_1"} -{"text": "Q: SELECT product FROM product WHERE max_page_size = 'A4' OR pages_per_minute_color < 5 \nA: Find products with max page size as 'A4' or pages per minute color smaller than 5. \n Additional table information: table: store_product"} -{"text": "Q: SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy' \nA: What is the number of routes whose destinations are Italian airports? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT Carrier FROM device WHERE Software_Platform <> 'Android' \nA: What are the carriers of devices whose software platforms are not 'Android'? \n Additional table information: table: device"} -{"text": "Q: SELECT color_description FROM ref_colors \nA: What are the descriptions for each color? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T1.Date_Claim_Made, T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id HAVING COUNT(*) > 2 UNION SELECT T1.Date_Claim_Made, T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id WHERE T1.Amount_Claimed = (SELECT MAX(Amount_Claimed) FROM Claims) \nA: Find the claims that led to more than two settlements or have the maximum claim value. For each of them, return the date the claim was made and the id of the claim. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT activity_name FROM Activity \nA: What activities do we have? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200 \nA: What are the countries that have both mountains that are higher than 5600 and lower than 5200? \n Additional table information: table: climbing"} -{"text": "Q: SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1 \nA: What are the details of the car with id 1? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room' \nA: Find the name of dorms which have TV Lounge but no Study Room as amenity. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T1.flno = 99 \nA: What is the aircraft name for the flight with number 99 \n Additional table information: table: flight_1"} -{"text": "Q: SELECT AVG(amount_due) FROM payments \nA: What is the average amount due for all the payments? \n Additional table information: table: products_for_hire"} -{"text": "Q: SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count > 100 AND T3.transaction_type_code = 'PUR' \nA: What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is 'PUR'? \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking' \nA: Show all headquarters without a company in banking industry. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT name, year_join FROM artist WHERE country <> 'United States' \nA: Show all artist names and the year joined who are not from United States. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT DISTINCT T2.Hardware_Model_name, T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.used_kb BETWEEN 10 AND 15 \nA: List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15. \n Additional table information: table: phone_1"} -{"text": "Q: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING SUM(access_count) > 10000 \nA: What document types do have more than 10000 total access number. \n Additional table information: table: document_management"} -{"text": "Q: SELECT T1.institution, COUNT(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id GROUP BY T1.institution_id \nA: Show institution names along with the number of proteins for each institution. \n Additional table information: table: protein_institute"} -{"text": "Q: SELECT T1.first_name, T1.last_name, T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY SUM(amount) ASC NULLS FIRST LIMIT 1 \nA: What is the full name and id of the customer who has the lowest total amount of payment? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T2.location_name, T1.location_code FROM Document_locations AS T1 JOIN Ref_locations AS T2 ON T1.location_code = T2.location_code GROUP BY T1.location_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Show the location name and code with the least documents. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT T1.claim_id, T1.date_claim_made, T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.claim_id HAVING COUNT(*) = 1 \nA: Which claims had exactly one settlement? For each, tell me the the date the claim was made, the date it was settled and the amount settled. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT apt_number FROM Apartments WHERE apt_type_code = 'Flat' \nA: Return the apartment numbers of the apartments with type code 'Flat'. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.Lastname = 'Heilo' \nA: Find all the songs performed by artist with last name 'Heilo' \n Additional table information: table: music_2"} -{"text": "Q: SELECT DISTINCT T1.fname, T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = 'Milk' OR T2.Allergy = 'Cat' \nA: What are the distinct first names and cities of the students who have allergy either to milk or to cat? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT transaction_id FROM Financial_transactions WHERE transaction_amount > (SELECT AVG(transaction_amount) FROM Financial_transactions) \nA: Show ids for all transactions whose amounts are greater than the average. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT TIME FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = 'Linda' AND Student.Lname = 'Smith' AND Restaurant.ResName = 'Subway' \nA: When did Linda Smith visit Subway? \n Additional table information: table: restaurant_1"} -{"text": "Q: SELECT COUNT(*) FROM (SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings') \nA: What is the total number of postseason games that team Boston Red Stockings participated in? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the name of the characteristic that is most common across all products. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 \nA: Return the famous titles for artists that have volumes that lasted more than 2 weeks on top. \n Additional table information: table: music_4"} -{"text": "Q: SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%' \nA: List the project details of the projects with the research outcome described with the substring 'Published'. \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT name, open_date, organized_by FROM Church \nA: Show the name, open date, and organizer for all churches. \n Additional table information: table: wedding"} -{"text": "Q: SELECT COUNT(*) FROM Rating WHERE stars > 3 \nA: What is the total number of ratings that has more than 3 stars? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID \nA: Return the names of entrepreneurs. \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT COUNT(*), dept_code FROM student GROUP BY dept_code \nA: How many students are in each department? \n Additional table information: table: college_1"} -{"text": "Q: SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80 \nA: Show the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80. \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT AVG(budget_million), MAX(budget_million), MIN(budget_million) FROM movie WHERE YEAR < 2000 \nA: What is the average, maximum, and minimum budget for all movies before 2000. \n Additional table information: table: culture_company"} -{"text": "Q: SELECT COUNT(*) FROM candidate \nA: Count the number of candidates. \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame' AND t3.characteristic_type_code = 'Grade' \nA: List all characteristics of product named 'sesame' with type code 'Grade'. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT dorm_name FROM dorm ORDER BY student_capacity DESC LIMIT 1 \nA: Find the name of the dorm with the largest capacity. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT stu_fname, stu_lname, stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1 \nA: What is the first, last name, gpa of the youngest one among students whose GPA is above 3? \n Additional table information: table: college_1"} -{"text": "Q: SELECT BirthDate FROM EMPLOYEE WHERE City = 'Edmonton' \nA: Find the birth dates corresponding to employees who live in the city of Edmonton. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT head_id, name FROM head WHERE name LIKE '%Ha%' \nA: Which head's name has the substring 'Ha'? List the id and name. \n Additional table information: table: department_management"} -{"text": "Q: SELECT T1.name FROM student AS T1 JOIN advisor AS T2 ON T1.id = T2.s_id GROUP BY T2.s_id HAVING COUNT(*) > 1 \nA: What are the names of students who have more than one advisor? \n Additional table information: table: college_2"} -{"text": "Q: SELECT Player_name FROM player ORDER BY Votes DESC LIMIT 1 \nA: What is the name of the player with the largest number of votes? \n Additional table information: table: riding_club"} -{"text": "Q: SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name = 'Ashley' \nA: What is the phone number of the performer Ashley? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the code of the location with the largest number of documents. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT COUNT(*) FROM employee \nA: How many employees are there all together? \n Additional table information: table: college_1"} -{"text": "Q: SELECT MAX(LEVEL) FROM manager WHERE Country <> 'Australia\t' \nA: What is the maximum level of managers in countries that are not 'Australia'? \n Additional table information: table: railway"} -{"text": "Q: SELECT first_name, last_name FROM employees ORDER BY birth_date DESC LIMIT 1 \nA: Who is the youngest employee in the company? List employee's first and last name. \n Additional table information: table: store_1"} -{"text": "Q: SELECT Name FROM artwork WHERE TYPE <> 'Program Talent Show' \nA: List the name of artworks whose type is not 'Program Talent Show'. \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT Name FROM People ORDER BY Name ASC NULLS FIRST \nA: Return the names of people, ordered alphabetically. \n Additional table information: table: gymnast"} -{"text": "Q: SELECT Name FROM ship WHERE NOT Ship_ID IN (SELECT Ship_ID FROM mission) \nA: What are the names of the ships that are not involved in any missions? \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT name FROM program WHERE origin <> 'Beijing' \nA: find the names of programs whose origin is not in Beijing. \n Additional table information: table: program_share"} -{"text": "Q: SELECT cName, enr FROM College WHERE enr > 10000 AND state = 'LA' \nA: What are the names and enrollment numbers for colleges that have more than 10000 enrolled and are located in Louisiana? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT Carrier, COUNT(*) FROM phone GROUP BY Carrier \nA: Show different carriers of phones together with the number of phones with each carrier. \n Additional table information: table: phone_market"} -{"text": "Q: SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa NULLS FIRST LIMIT 1 \nA: What is the name of the department with the student that has the lowest GPA? \n Additional table information: table: college_1"} -{"text": "Q: SELECT Occupation, COUNT(*) FROM player GROUP BY Occupation \nA: Show different occupations along with the number of players in each occupation. \n Additional table information: table: riding_club"} -{"text": "Q: SELECT name FROM races WHERE TIME > '12:00:00' OR TIME < '09:00:00' \nA: What are the names of races held after 12:00:00 or before 09:00:00? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT t2.All_Games, t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'Clemson' \nA: Find the location and all games score of the school that has Clemson as its team name. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT T1.name, T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY AVG(T2.salary) ASC NULLS FIRST LIMIT 1 \nA: Which team offers the lowest average salary? Give me the name and id of the team. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName \nA: Find the states where have some college students in tryout. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT allergy, allergytype FROM Allergy_type \nA: Show all allergies and their types. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT clubname FROM club \nA: What are the names of all clubs? \n Additional table information: table: club_1"} -{"text": "Q: SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the department with the most students minoring in it? \n Additional table information: table: college_3"} -{"text": "Q: SELECT DISTINCT T3.Fname FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T2.gradepoint >= 3.8 \nA: Find the distinct student first names of all students that have grade point at least 3.8 in one course. \n Additional table information: table: college_3"} -{"text": "Q: SELECT founded FROM university WHERE affiliation <> 'Public' ORDER BY founded DESC LIMIT 1 \nA: Find the founded year of the newest non public school. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT city, MAX(lat) FROM station GROUP BY city \nA: For each city, what is the highest latitude for its stations? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT DISTINCT classroom, grade FROM list \nA: For each classroom report the grade that is taught in it. Report just the classroom number and the grade number. \n Additional table information: table: student_1"} -{"text": "Q: SELECT COUNT(*) FROM Student \nA: What is the total number of students? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT COUNT(DISTINCT acc_type) FROM customer \nA: Count the number of different account types. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT Nationality FROM journalist WHERE Years_working > 10 INTERSECT SELECT Nationality FROM journalist WHERE Years_working < 3 \nA: Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working. \n Additional table information: table: news_report"} -{"text": "Q: 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' \nA: Find the names of the customers who have order status both 'On Road' and 'Shipped'. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%' \nA: What are the details for the project whose research has been published? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT T2.first_name, T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING COUNT(*) > 30 \nA: Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT pets_allowed_yn, AVG(price_range) FROM HOTELS GROUP BY pets_allowed_yn \nA: Show the average price of hotels for different pet policy. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: 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) \nA: What is the name of the project that requires the fewest number of hours, and the names of the scientists assigned to it? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT t1.catalog_name, t1.date_of_publication FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id = t2.catalog_id WHERE catalog_level_number > 5 \nA: What are the name and publication date of the catalogs with catalog level number above 5? \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT email FROM user_profiles WHERE name = 'Mary' \nA: Find the emails of the user named 'Mary'. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 5 \nA: Which catalog contents have length below 3 or above 5? Find the catalog entry names. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT COUNT(DISTINCT Governor) FROM party \nA: How many distinct governors are there? \n Additional table information: table: election"} -{"text": "Q: SELECT name, price FROM products WHERE price >= 180 ORDER BY price DESC, name ASC NULLS FIRST \nA: Select the name and price of all products with a price larger than or equal to $180, and sort first by price (in descending order), and then by name (in ascending order). \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT job_title FROM jobs WHERE min_salary > 9000 \nA: Which job titles correspond to jobs with salaries over 9000? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT College FROM match_season GROUP BY College ORDER BY COUNT(*) DESC LIMIT 3 \nA: What are the three colleges from which the most players are from? \n Additional table information: table: match_season"} -{"text": "Q: SELECT COUNT(DISTINCT product_type_code) FROM products \nA: Count the number of distinct product types. \n Additional table information: table: department_store"} -{"text": "Q: SELECT date FROM weather WHERE max_temperature_f > 85 \nA: What are the dates with a maximum temperature higher than 85? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT DISTINCT T1.customer_first_name, T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id \nA: What are the full names of customers who have accounts? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2002 AND T2.campus = 'Long Beach State University' \nA: What is the number of faculty at Long Beach State University in 2002? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT card_type_code, COUNT(DISTINCT customer_id) FROM Customers_cards GROUP BY card_type_code \nA: Show all card type codes and the number of customers holding cards in each type. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T2.Name, COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID \nA: Show names of musicals and the number of actors who have appeared in the musicals. \n Additional table information: table: musical"} -{"text": "Q: SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma' \nA: What is the average price of wines produced in appelations in Sonoma County? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > 3000 \nA: What are the names of customers who have a loan of more than 3000 in amount? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT CName FROM COURSE WHERE Days = 'MTW' \nA: Which courses are taught on days MTW? \n Additional table information: table: college_3"} -{"text": "Q: SELECT Name FROM city ORDER BY Name ASC NULLS FIRST \nA: What are the names of cities in ascending alphabetical order? \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT id FROM trip ORDER BY duration NULLS FIRST LIMIT 1 \nA: What is the id of the shortest trip? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id ORDER BY t2.age NULLS FIRST LIMIT 1 \nA: What is the name of the ship that is commanded by the youngest captain? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT CLASS FROM race GROUP BY CLASS HAVING COUNT(*) >= 2 \nA: List the race class with at least two races. \n Additional table information: table: race_track"} -{"text": "Q: SELECT Winery FROM WINE ORDER BY SCORE NULLS FIRST LIMIT 1 \nA: Which winery is the wine that has the highest score from? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT t1.product_name, COUNT(*) FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name \nA: What are all the different product names, and how many complains has each received? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4 \nA: Give the distinct department ids of departments in which a manager is in charge of 4 or more employees? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.sex = 'F' GROUP BY t1.clubname ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the name of the club that has the most female students. \n Additional table information: table: club_1"} -{"text": "Q: SELECT customer_name FROM customers WHERE payment_method <> 'Cash' \nA: What is the name of customers who do not use Cash as payment method. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID = T3.Tourist_ID WHERE T3.Tourist_Details = 'Vincent' \nA: Which tourist attractions does the visitor with detail 'Vincent' visit? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT AVG(price) FROM products \nA: What is the average price across all products? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code \nA: Find the number of departments in each school. \n Additional table information: table: college_1"} -{"text": "Q: SELECT DISTINCT main_industry FROM company \nA: What are the different main industries for all companies? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT COUNT(T1.SSN) FROM patient AS T1 JOIN prescribes AS T2 ON T1.SSN = T2.patient JOIN physician AS T3 ON T2.physician = T3.employeeid WHERE T3.name = 'John Dorian' \nA: How many patients' prescriptions are made by physician John Dorian? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 \nA: What are the famous title of the artists associated with volumes with more than 2 weeks on top? \n Additional table information: table: music_4"} -{"text": "Q: SELECT YEAR, book_title, publisher FROM book_club ORDER BY YEAR DESC \nA: What are the years, titles, and publishers for all books, ordered by year descending? \n Additional table information: table: culture_company"} -{"text": "Q: SELECT MAX(Price), MAX(Score), YEAR FROM WINE GROUP BY YEAR \nA: What are the maximum price and score of wines in each year? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT T2.Party, COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party \nA: For each party, return the name of the party and the number of delegates from that party. \n Additional table information: table: election"} -{"text": "Q: SELECT COUNT(DISTINCT transaction_type_code) FROM TRANSACTIONS \nA: How many distinct transaction types are used in the transactions? \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T2.dormid FROM dorm AS T3 JOIN has_amenity AS T4 ON T3.dormid = T4.dormid JOIN dorm_amenity AS T5 ON T4.amenid = T5.amenid GROUP BY T3.dormid ORDER BY COUNT(*) DESC LIMIT 1) \nA: Find the first name of students who are living in the dorm that has most number of amenities. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the location code with the most documents? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT name FROM airport WHERE name LIKE '%international%' \nA: Which of the airport names contains the word 'international'? \n Additional table information: table: flight_company"} -{"text": "Q: SELECT Team, Starting_Year FROM technician \nA: What is the team and starting year for each technician? \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT COUNT(*) FROM dependent WHERE sex = 'F' \nA: how many female dependents are there? \n Additional table information: table: company_1"} -{"text": "Q: SELECT T1.id, T1.Name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 2 \nA: For every medicine id, what are the names of the medicines that can interact with more than one enzyme? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT first_name, last_name FROM employees WHERE department_id = 70 OR department_id = 90 \nA: What are the first and last name for those employees who works either in department 70 or 90? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT price_range FROM HOTELS \nA: Tell me the price ranges for all the hotels. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT name FROM people WHERE height < (SELECT AVG(height) FROM people) \nA: What are the names of people who are shorter than average? \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1 \nA: what is the GDP of the city with the largest population. \n Additional table information: table: city_record"} -{"text": "Q: SELECT id, duration FROM trip ORDER BY duration DESC LIMIT 3 \nA: What are the ids and durations of the trips with the top 3 durations? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT Name FROM pilot ORDER BY Name ASC NULLS FIRST \nA: What are the names of the pilots in alphabetical order? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000 \nA: Show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000. \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT receipt_date FROM Documents WHERE document_id = 3 \nA: What is the receipt date of the document with id 3? \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT name FROM products WHERE price <= 200 \nA: Select the name of the products with a price less than or equal to $200. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT COUNT(*) FROM student \nA: Count the total number of students. \n Additional table information: table: club_1"} -{"text": "Q: 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 \nA: Which city has hosted the most events? \n Additional table information: table: city_record"} -{"text": "Q: SELECT Name FROM wrestler WHERE Days_held < 100 \nA: Return the names of wrestlers with fewer than 100 days held. \n Additional table information: table: wrestler"} -{"text": "Q: SELECT product_category_description, unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs' \nA: What is the product category description and unit of measurement of category 'Herbs'? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT AVG(total_amount_purchased), AVG(total_value_purchased) FROM Product_Suppliers WHERE supplier_id = (SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY COUNT(*) DESC LIMIT 1) \nA: What are the average amount purchased and value purchased for the supplier who supplies the most products. \n Additional table information: table: department_store"} -{"text": "Q: SELECT AVG(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.Sex = 'F' AND T2.Election_Cycle = 'Spring' \nA: What is the average age of the female students with secretary votes in the spring election cycle? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T1.first_name, T1.last_name, T1.employee_id, T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id \nA: display the full name (first and last name ) of employee with ID and name of the country presently where (s)he is working. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT song_name FROM song WHERE languages = 'english' \nA: What are the names of all songs in English? \n Additional table information: table: music_1"} -{"text": "Q: SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the sport with the most scholarship students? \n Additional table information: table: game_1"} -{"text": "Q: SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = 'Pass' \nA: What are the ids of the candidates that have an outcome code of Pass? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT fname FROM authors ORDER BY fname NULLS FIRST \nA: Sort the first names of all the authors in alphabetical order. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT apt_number, room_count FROM Apartments \nA: Return the apartment number and the number of rooms for each apartment. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT T2.name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name \nA: What is the average rating star for each reviewer? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT stu_fname, stu_gpa FROM student WHERE stu_gpa < (SELECT AVG(stu_gpa) FROM student) \nA: What is the first name and GPA of every student that has a GPA lower than average? \n Additional table information: table: college_1"} -{"text": "Q: SELECT role_description FROM Staff_Roles WHERE role_code = 'researcher' \nA: What is the complete description of the job of a researcher? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT channel_code, contact_number FROM customer_contact_channels WHERE active_to_date - active_from_date = (SELECT active_to_date - active_from_date FROM customer_contact_channels ORDER BY (active_to_date - active_from_date) DESC LIMIT 1) \nA: Return the channel code and contact number of the customer contact channel whose active duration was the longest. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT name FROM department GROUP BY departmentID ORDER BY COUNT(departmentID) DESC LIMIT 1 \nA: Which department has the largest number of employees? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT headquarter FROM manufacturers WHERE founder = 'James' \nA: What is the headquarter of the company whose founder is James? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Linda' AND t3.lname = 'Smith' \nA: How many clubs does 'Linda Smith' belong to? \n Additional table information: table: club_1"} -{"text": "Q: SELECT Country FROM manager WHERE Age > 50 OR Age < 46 \nA: Show the countries that have managers of age above 50 or below 46. \n Additional table information: table: railway"} -{"text": "Q: SELECT MAX(Price), MAX(Score) FROM WINE WHERE Appelation = 'St. Helena' \nA: Give the maximum price and score for wines produced in the appelation St. Helena. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%' ORDER BY department_id NULLS FIRST \nA: What are the full name, hire data, salary and department id for employees without the letter M in their first name, ordered by ascending department id? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT AVG(product_price), product_category_code FROM products GROUP BY product_category_code \nA: Return the average price of products that have each category code. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT T1.Name, T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING COUNT(*) <= 1 \nA: What are the names and ids of the tourist attractions that are visited at most once? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_Staff WHERE role_code = 'researcher') \nA: What are the details for all projects that did not hire any staff in a research role? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT COUNT(*) FROM Player WHERE HS > 1000 \nA: How many players have more than 1000 hours of training? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT lname FROM authors WHERE fname = 'Amal' \nA: Find the last name of the author with first name 'Amal'. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'Spanish' \nA: What is the date of enrollment of the course named 'Spanish'? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id = T2.i_id GROUP BY T2.i_id HAVING COUNT(*) > 1 \nA: What are the names of instructors who advise more than one student? \n Additional table information: table: college_2"} -{"text": "Q: SELECT T1.dorm_name, T1.student_capacity FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid GROUP BY T2.dormid ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: What is the name and capacity of the dorm with the fewest amount of amenities? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'University of Pennsylvania' \nA: How many papers are written by authors from the institution 'University of Pennsylvania'? \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT AVG(T1.HS), MAX(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' \nA: What is the average and maximum number of hours students who made the team practiced? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT asset_id, asset_details, asset_make, asset_model FROM Assets \nA: List the asset id, details, make and model for every asset. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT T1.country, T1.name, COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.country, T1.name \nA: What is the total number of routes for each country and airline in that country? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT country, COUNT(*) FROM airlines GROUP BY country ORDER BY COUNT(*) DESC \nA: List all countries and their number of airlines in the descending order of number of airlines. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT Famous_Title, Age FROM artist ORDER BY Age DESC \nA: What are the famous titles and ages of each artist, listed in descending order by age? \n Additional table information: table: music_4"} -{"text": "Q: SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = 'red' AND t3.characteristic_name = 'slow' \nA: Find the number of the products that have their color described as 'red' and have a characteristic named 'slow'. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT location_code, COUNT(*) FROM Document_locations GROUP BY location_code \nA: Show the location codes and the number of documents in each location. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT COUNT(*) FROM premises \nA: How many premises are there? \n Additional table information: table: customers_campaigns_ecommerce"} -{"text": "Q: SELECT COUNT(*) FROM Documents WHERE NOT document_id IN (SELECT document_id FROM Documents_with_expenses) \nA: Count the number of documents that do not have expenses. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT Sponsor_name FROM player WHERE Residence = 'Brandon' OR Residence = 'Birtle' \nA: Show the names of sponsors of players whose residence is either 'Brandon' or 'Birtle'. \n Additional table information: table: riding_club"} -{"text": "Q: SELECT DISTINCT start_station_name FROM trip WHERE duration < 100 \nA: List all the distinct stations from which a trip of duration below 100 started. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T1.compatible_since_year FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id = T3.id WHERE T3.name = 'CACHEbox' AND T2.name = 'Internet Explorer' \nA: When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible? \n Additional table information: table: browser_web"} -{"text": "Q: SELECT COUNT(*), T3.product_id FROM orders AS T1, 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 \nA: List the count and id of each product in all the orders. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT T1.student_id, T2.last_name FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the id and last name of the student that has the most behavior incidents? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT T2.allergytype, COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype \nA: How many students are affected by each allergy type? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT state_province_county FROM addresses WHERE line_1_number_building LIKE '%6862 Kaitlyn Knolls%' \nA: Give the state corresponding to the line number building '6862 Kaitlyn Knolls'. \n Additional table information: table: e_government"} -{"text": "Q: SELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000 \nA: Show the investors shared by entrepreneurs that requested more than 140000 and entrepreneurs that requested less than 120000. \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT DISTINCT headquarter FROM manufacturers \nA: What are the different cities listed? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT Carrier FROM device WHERE NOT Device_ID IN (SELECT Device_ID FROM stock) \nA: List the carriers of devices that have no devices in stock. \n Additional table information: table: device"} -{"text": "Q: SELECT roomName, basePrice FROM Rooms ORDER BY basePrice ASC NULLS FIRST LIMIT 1 \nA: What are the room name and base price of the room with the lowest base price? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT COUNT(*) FROM chip_model WHERE wifi = 'No' \nA: Count the number of chip model that do not have wifi. \n Additional table information: table: phone_1"} -{"text": "Q: SELECT COUNT(*) FROM campuses WHERE county = 'Los Angeles' \nA: How many campuses are there in Los Angeles county? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT AVG(age), MIN(age), CLASS FROM captain GROUP BY CLASS \nA: Return the average and minimum age of captains in each class. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT T2.name, SUM(T1.show_times_per_day) FROM schedule AS T1 JOIN cinema AS T2 ON T1.cinema_id = T2.cinema_id GROUP BY T1.cinema_id \nA: What is total number of show times per dat for each cinema? \n Additional table information: table: cinema"} -{"text": "Q: SELECT name FROM member WHERE NOT member_id IN (SELECT member_id FROM membership_register_branch) \nA: What are the names of the members that have never registered at any branch? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT date, mean_temperature_f, mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3 \nA: What is the date, average temperature and mean humidity for the days with the 3 largest maximum gust speeds? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = 'Blackville' \nA: Which city is the headquarter of the store named 'Blackville' in? \n Additional table information: table: store_product"} -{"text": "Q: SELECT T1.employee_id, T2.job_title FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.department_id = 80 \nA: what are the employee ids and job titles for employees in department 80? \n Additional table information: table: hr_1"} -{"text": "Q: 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 \nA: Give me a list of cities whose temperature in Mar is lower than that in July and which have also served as host cities? \n Additional table information: table: city_record"} -{"text": "Q: SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name = 'Open' \nA: What is the description of the claim status 'Open'? \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT T1.name_first, T1.name_last, T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which manager won the most manager award? Give me the manager's first name, last name and id. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT SUM(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan' \nA: What is the total revenue of all companies whose main office is at Tokyo or Taiwan? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT COUNT(DISTINCT Team) FROM match_season \nA: Count the number of different teams involved in match season. \n Additional table information: table: match_season"} -{"text": "Q: SELECT date_from, date_to FROM Project_Staff WHERE project_id IN (SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY COUNT(*) DESC LIMIT 1) UNION SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'leader' \nA: From what date and to what date do the staff work on a project that has the most staff and has staff in a leader role? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = 'Balls to the Wall' \nA: What is the name of the album that has the track Ball to the Wall? \n Additional table information: table: store_1"} -{"text": "Q: SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T3.number_deaths >= 10 \nA: What are the region names affected by the storm with a number of deaths of least 10? \n Additional table information: table: storm_record"} -{"text": "Q: SELECT T2.Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID ORDER BY T3.Year NULLS FIRST \nA: Show the names of artworks in ascending order of the year they are nominated in. \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the most common apartment type code. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT COUNT(*), T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name \nA: What are the names of the scientists, and how many projects are each of them working on? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT COUNT(*), city_code FROM student GROUP BY city_code HAVING COUNT(*) > 1 \nA: How many students are from each city, and which cities have more than one cities? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT id, market_share FROM browser WHERE name = 'Safari' \nA: What is the id and market share of the browser Safari? \n Additional table information: table: browser_web"} -{"text": "Q: SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1 \nA: What is the school color of the school with the largest enrollment? \n Additional table information: table: school_player"} -{"text": "Q: SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'International Finance') \nA: What is the title of the prerequisite class of International Finance course? \n Additional table information: table: college_2"} -{"text": "Q: SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Reggae' INTERSECT SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Rock' \nA: What are the album titles for albums containing both 'Reggae' and 'Rock' genre tracks? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.sex = 'F' \nA: Find all the female members of club 'Bootup Baltimore'. Show the first name and last name. \n Additional table information: table: club_1"} -{"text": "Q: SELECT AVG(price_in_euros), MIN(price_in_euros) FROM catalog_contents \nA: Give me the average and minimum price (in Euro) of the products. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT T2.star_rating_description FROM HOTELS AS T1 JOIN Ref_Hotel_Star_Ratings AS T2 ON T1.star_rating_code = T2.star_rating_code WHERE T1.price_range > 10000 \nA: Give me the star rating descriptions of the hotels that cost more than 10000. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT Name FROM mountain WHERE NOT Mountain_ID IN (SELECT Mountain_ID FROM climber) \nA: List the names of mountains that do not have any climber. \n Additional table information: table: climbing"} -{"text": "Q: SELECT dept_name FROM department ORDER BY dept_name NULLS FIRST \nA: list names of all departments ordered by their names. \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(*) FROM Customers \nA: How many customers do we have? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT apt_type_code, bathroom_count, bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY SUM(room_count) DESC LIMIT 1 \nA: Which apartment type has the largest number of total rooms? Return the apartment type code, its number of bathrooms and number of bedrooms. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Badlands' \nA: What are the first and last names of the artist who perfomed the song 'Badlands'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT city FROM station GROUP BY city ORDER BY MAX(lat) DESC \nA: List all the cities in a decreasing order of each city's stations' highest latitude. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT COUNT(*) FROM airports WHERE name LIKE '%International%' \nA: How many airports' names have the word Interanation in them? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT COUNT(*) FROM branch WHERE membership_amount > (SELECT AVG(membership_amount) FROM branch) \nA: What is the number of branches that have more than the average number of memberships? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId GROUP BY T2.Name ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which artist has the most albums? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT T2.lot_id, AVG(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id ORDER BY AVG(amount_of_transaction) NULLS FIRST \nA: Show the average amount of transactions for different lots, ordered by average amount of transactions. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT Advisor, COUNT(*) FROM STUDENT GROUP BY Advisor \nA: How many students does each advisor have? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T3.staff_first_name, T3.staff_last_name FROM problems AS T1, product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = 'rem' EXCEPT SELECT T3.staff_first_name, T3.staff_last_name FROM problems AS T1, product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = 'aut' \nA: Which staff members who reported problems from the product 'rem' but not 'aut'? Give me their first and last names. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT Hosts FROM farm_competition WHERE Theme <> 'Aliens' \nA: Return the hosts of competitions for which the theme is not Aliens? \n Additional table information: table: farm"} -{"text": "Q: SELECT MIN(T2.HS), T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID GROUP BY T1.pPos \nA: For each position, what is the minimum time students spent practicing? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT MAX(gradepoint), MIN(gradepoint) FROM GRADECONVERSION \nA: What are the maximum and minumum grade points? \n Additional table information: table: college_3"} -{"text": "Q: SELECT County_name FROM county ORDER BY Population ASC NULLS FIRST \nA: Return the names of all counties sorted by population in ascending order. \n Additional table information: table: election"} -{"text": "Q: SELECT COUNT(*) FROM game WHERE season > 2007 \nA: How many games are held after season 2007? \n Additional table information: table: game_injury"} -{"text": "Q: SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY COUNT(*) DESC LIMIT 1 \nA: Retrieve the country that has published the most papers. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = 'food' \nA: How many students have a food allergy? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT T1.Actual_Delivery_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID WHERE T2.Order_Quantity = 1 \nA: List the actual delivery date for all the orders with quantity 1 \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT AVG(price) FROM products \nA: Compute the average price of all the products. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct <> 'null' OR department_id <> 40 \nA: Return all information about employees with salaries between 8000 and 12000 for which commission is not null or where their department id is not 40. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT document_type_code, COUNT(*) FROM Documents GROUP BY document_type_code \nA: How many documents are there of each type? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Give the budget type code that is most common among documents with expenses. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT Character FROM actor ORDER BY age DESC \nA: Return the characters for actors, ordered by age descending. \n Additional table information: table: musical"} -{"text": "Q: SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'Close a policy' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'New policy application' \nA: Find the names of customers who have used both the service 'Close a policy' and the service 'New policy application'. \n Additional table information: table: insurance_fnol"} -{"text": "Q: 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' \nA: Which faculty members are playing either Canoeing or Kayaking? Tell me their first names. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT COUNT(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id WHERE T1.founded > 1880 OR T1.type = 'Private' \nA: How many proteins are associated with an institution founded after 1880 or an institution with type 'Private'? \n Additional table information: table: protein_institute"} -{"text": "Q: SELECT campus FROM campuses WHERE county = 'Los Angeles' \nA: List the campuses in Los Angeles county. \n Additional table information: table: csu_1"} -{"text": "Q: SELECT StuID FROM Student WHERE major = 600 INTERSECT SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y' \nA: What are the student ids for those on scholarship in major number 600? \n Additional table information: table: game_1"} -{"text": "Q: SELECT COUNT(DISTINCT claim_outcome_code) FROM claims_processing \nA: How many distinct claim outcome codes are there? \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT Name FROM WINE WHERE YEAR = '2008' \nA: What are the names of all wines produced in 2008? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT student_id FROM student_course_attendance WHERE course_id = 301 \nA: What are the id of students who registered course 301? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT document_id, COUNT(copy_number) FROM Draft_Copies GROUP BY document_id ORDER BY COUNT(copy_number) DESC LIMIT 1 \nA: Which document has the most draft copies? List its document id and number of draft copies. \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT COUNT(*) FROM appointment \nA: How many appointments are there? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T1.name, T1.city, T2.dst_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid GROUP BY T2.dst_apid ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name and city of the airport that the most routes end at? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT MIN(Vote_Percent), MAX(Vote_Percent) FROM election \nA: What are the minimum and maximum vote percents of elections? \n Additional table information: table: election_representative"} -{"text": "Q: SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = 'Japanese' AND T2.points > 5 \nA: Find the names of Japanese constructors that have once earned more than 5 points? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1 \nA: What is the id of the student who most recently registered course 301? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 300 \nA: What are the names of body builders whose total score is higher than 300? \n Additional table information: table: body_builder"} -{"text": "Q: SELECT COUNT(*) FROM artist \nA: Count the number of artists. \n Additional table information: table: music_4"} -{"text": "Q: SELECT T2.day_Number, T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date \nA: Return the day Number and stored date for all the documents. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT campus FROM campuses WHERE county = 'Los Angeles' \nA: What campuses are in Los Angeles county? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000 \nA: What are the locations that have both tracks with more than 90000 seats, and tracks with fewer than 70000 seats? \n Additional table information: table: race_track"} -{"text": "Q: SELECT Headquarters FROM company ORDER BY Sales_in_Billion DESC LIMIT 1 \nA: What is the headquarter of the company with the largest sales? \n Additional table information: table: company_employee"} -{"text": "Q: SELECT employee_ID FROM Employees WHERE employee_name = 'Ebba' \nA: Show the id of the employee named Ebba. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT T2.firstname, T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'EVELINA' AND T1.lastname = 'BROMLEY' \nA: Find the first and last name of all the teachers that teach EVELINA BROMLEY. \n Additional table information: table: student_1"} -{"text": "Q: SELECT COUNT(*) FROM APPELLATIONS WHERE County = 'Napa' \nA: Count the number of appelations in Napa County. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT COUNT(DISTINCT dept_name) FROM course \nA: How many departments offer courses? \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(DISTINCT crs_code) FROM CLASS \nA: What are the number of different course codes? \n Additional table information: table: college_1"} -{"text": "Q: SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: What is the description of the color used by least products? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT COUNT(*) FROM BOOKINGS \nA: How many bookings do we have? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT SUM(duration), MAX(duration) FROM trip WHERE bike_id = 636 \nA: What is the total and maximum duration of trips with bike id 636? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT AVG(T1.ROM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = 'Nokia Corporation' \nA: What is the average ROM size of phones produced by the company named 'Nokia Corporation'? \n Additional table information: table: phone_1"} -{"text": "Q: SELECT gname FROM Video_games WHERE gtype = 'Collectible card game' \nA: What are the names of all video games that are collectible cards? \n Additional table information: table: game_1"} -{"text": "Q: SELECT LOCATION FROM school ORDER BY Enrollment ASC NULLS FIRST \nA: What is the list of school locations sorted in ascending order of school enrollment? \n Additional table information: table: school_player"} -{"text": "Q: SELECT SUM(no_of_customers) FROM bank WHERE city = 'New York City' \nA: Find the number of customers in the banks at New York City. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant' \nA: Find the name of captains whose rank are either Midshipman or Lieutenant. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT directed_by, COUNT(*) FROM film GROUP BY directed_by \nA: List all directors along with the number of films directed by each director. \n Additional table information: table: cinema"} -{"text": "Q: 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 \nA: What is the color of the grape whose wine products has the highest average price? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT T1.campus, SUM(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T2.year >= 1998 AND T2.year <= 2002 GROUP BY T1.campus \nA: report the total number of degrees granted between 1998 and 2002. \n Additional table information: table: csu_1"} -{"text": "Q: SELECT mID, AVG(stars) FROM Rating WHERE NOT mID IN (SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = 'Brittany Harris') GROUP BY mID \nA: Find the average rating star for each movie that are not reviewed by Brittany Harris. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.PostalCode = '70174' \nA: Find the cities corresponding to employees who help customers with the postal code 70174. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT AVG(age), sex FROM Student GROUP BY sex \nA: What are the average ages for male and female students? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT COUNT(*) FROM university WHERE NOT school_id IN (SELECT school_id FROM basketball_match) \nA: How many schools do not participate in the basketball match? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: Return the id of the department with the fewest staff assignments. \n Additional table information: table: department_store"} -{"text": "Q: SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2 \nA: What are the names of all colleges that have two or more players? \n Additional table information: table: match_season"} -{"text": "Q: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Olin' AND t1.lname = 'Shivers' \nA: Which papers did the author 'Olin Shivers' write? Give me the paper titles. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT T1.title FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE building = 'Chandler' AND semester = 'Fall' AND YEAR = 2010 \nA: Give the title of the course offered in Chandler during the Fall of 2010. \n Additional table information: table: college_2"} -{"text": "Q: SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING COUNT(*) > 3 \nA: Find the payment method code used by more than 3 parties. \n Additional table information: table: e_government"} -{"text": "Q: SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating < 5 \nA: Find the titles of items that received any rating below 5. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 INTERSECT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010 \nA: What are the ids for courses that were offered in both Fall of 2009 and Spring of 2010? \n Additional table information: table: college_2"} -{"text": "Q: SELECT T3.Party_Theme, T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID \nA: Show the themes of parties and the names of the party hosts. \n Additional table information: table: party_host"} -{"text": "Q: SELECT MIN(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = 'PUR' AND share_count > 50 \nA: Show the minimum amount of transactions whose type code is 'PUR' and whose share count is bigger than 50. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT origin FROM Flight GROUP BY origin ORDER BY COUNT(*) DESC LIMIT 1 \nA: What place has the most flights coming from there? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT COUNT(*) FROM CUSTOMERS \nA: How many customers do we have? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1 \nA: Please show the nominee who has been nominated the greatest number of times. \n Additional table information: table: musical"} -{"text": "Q: SELECT customer_phone, customer_email FROM Customers WHERE customer_first_name = 'Aniyah' AND customer_last_name = 'Feest' \nA: Return the phone and email of the customer with the first name Aniyah and last name Feest. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Zach' AND T1.gender = 'female' \nA: Find the names of females who are friends with Zach \n Additional table information: table: network_2"} -{"text": "Q: SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which organisation type hires most research staff? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT COUNT(*) FROM Invoices \nA: How many invoices do we have? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1 \nA: Which schools have more than 1 player? Give me the school locations. \n Additional table information: table: school_player"} -{"text": "Q: SELECT project_details FROM Projects WHERE organisation_id IN (SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY COUNT(*) DESC LIMIT 1) \nA: List the project details of the projects launched by the organisation \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1) \nA: Find the name of the customers who use the most frequently used payment method. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT StuID FROM Student WHERE sex = 'F' INTERSECT SELECT StuID FROM Sportsinfo WHERE sportname = 'Football' \nA: Show student ids who are female and play football. \n Additional table information: table: game_1"} -{"text": "Q: SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500 \nA: What are the names of players who train between 500 and 1500 hours? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT customer_phone FROM available_policies \nA: Find all the phone numbers. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT DISTINCT home_city FROM driver \nA: Show all different home cities. \n Additional table information: table: school_bus"} -{"text": "Q: SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = 'game1' \nA: Which tourist attraction is associated with the photo 'game1'? Return its name. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT COUNT(DISTINCT bedType) FROM Rooms \nA: How many different types of beds are there? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT T1.course_description, T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) > 2 \nA: Return the descriptions and names of the courses that have more than two students enrolled in. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT t2.product_details FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most frequently ordered product? Tell me the detail of the product \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT Name FROM people WHERE Age = 35 OR Age = 36 \nA: Show the names of people aged either 35 or 36. \n Additional table information: table: debate"} -{"text": "Q: SELECT COUNT(*) FROM Aircraft \nA: How many aircrafts exist in the database? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT venue, name FROM event ORDER BY Event_Attendance DESC LIMIT 2 \nA: List the event venues and names that have the top 2 most number of people attended. \n Additional table information: table: news_report"} -{"text": "Q: SELECT T3.Name FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID WHERE T2.Num_of_shops > 50 \nA: Show the names of phones that are on market with number of shops greater than 50. \n Additional table information: table: phone_market"} -{"text": "Q: SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = 'Dublin' \nA: Give the different positions of players who play for the country with the capital Dublin. \n Additional table information: table: match_season"} -{"text": "Q: SELECT AVG(Money_Requested) FROM entrepreneur \nA: Return the average money requested across all entrepreneurs. \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT flno FROM Flight WHERE distance > 2000 \nA: What are the numbers of all flights that can cover a distance of more than 2000? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT founder FROM manufacturers WHERE name LIKE 'S%' \nA: Who is the founders of companies whose first letter is S? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT mID, AVG(stars) FROM Rating GROUP BY mID HAVING COUNT(*) >= 2 \nA: Find the average rating star for each movie that received at least 2 ratings. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport' \nA: Find the number of routes that have destination John F Kennedy International Airport. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT problem_id FROM problems WHERE date_problem_reported > '1978-06-26' \nA: Find the ids of the problems reported after 1978-06-26. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id \nA: What are the names of customers who never made an order. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT COUNT(*), POSITION FROM player WHERE points < 30 GROUP BY POSITION \nA: What is the number of players who have points less than 30 for each position? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT eid FROM Employee WHERE salary > 100000 \nA: What is the id of every employee who has at least a salary of 100000? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT DISTINCT T1.name, T1.position FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand = 'X' \nA: Find the name and position of physicians who prescribe some medication whose brand is X? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t3.district_name = 'Khanewal District' \nA: Find the names of all stores in Khanewal District. \n Additional table information: table: store_product"} -{"text": "Q: SELECT T2.product_name FROM problems AS T1, product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = 'Lacey' AND T3.staff_last_name = 'Bosco' INTERSECT SELECT T2.product_name FROM problems AS T1, product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = 'Kenton' AND T3.staff_last_name = 'Champlin' \nA: Which products have problems reported by both the staff named Lacey Bosco and the staff named Kenton Champlin? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT name FROM mill WHERE name LIKE '%Moulin%' \nA: Which of the mill names contains the french word 'Moulin'? \n Additional table information: table: architecture"} -{"text": "Q: SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2000 AND T2.city = 'Atlanta' \nA: Find the number of games taken place in city Atlanta in 2000. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT COUNT(*) FROM building WHERE height_feet > (SELECT AVG(height_feet) FROM building) OR floors > (SELECT AVG(floors) FROM building) \nA: Show the number of buildings with a height above the average or a number of floors above the average. \n Additional table information: table: protein_institute"} -{"text": "Q: SELECT T1.name FROM student AS T1 JOIN advisor AS T2 ON T1.id = T2.s_id GROUP BY T2.s_id HAVING COUNT(*) > 1 \nA: Find the name of the students who have more than one advisor? \n Additional table information: table: college_2"} -{"text": "Q: SELECT Name FROM WINE WHERE Price > (SELECT MAX(Price) FROM WINE WHERE YEAR = 2006) \nA: Give the names of wines with prices above any wine produced in 2006. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT Name FROM county_public_safety WHERE NOT County_ID IN (SELECT County_ID FROM city) \nA: List the names of counties that do not have any cities. \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT campus FROM degrees GROUP BY campus ORDER BY SUM(degrees) DESC LIMIT 1 \nA: Which campus has the most degrees conferred in all times? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which institution has the most papers? Find the name of the institution. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT COUNT(*) FROM Faculty WHERE Rank = 'Professor' AND building = 'NEB' \nA: How many Professors are in building NEB? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT price_range FROM HOTELS \nA: What are the price ranges of hotels? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT DISTINCT TYPE FROM vocals \nA: What are the different types of vocals? \n Additional table information: table: music_2"} -{"text": "Q: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' \nA: Find the names of states that have some college students playing in the mid position but not in the goalie position. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the country that has the most perpetrators? \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT problem_log_id, log_entry_date FROM problem_log WHERE problem_id = 10 \nA: For the problem with id 10, return the ids and dates of its problem logs. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT DISTINCT T1.first_name, T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS' \nA: Return the full name of the staff who provided a customer with the first name April and the last name Burns with a film rental. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = 'Katsuhiro' AND t1.lname = 'Ueno' \nA: Which institution does 'Katsuhiro Ueno' belong to? \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT AVG(T2.Weeks_on_Top) FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 25 \nA: Return the average number of weeks on top for volumes by artists that are at most 25 years old. \n Additional table information: table: music_4"} -{"text": "Q: SELECT id FROM instructor EXCEPT SELECT id FROM teaches \nA: Find the id of instructors who didn't teach any courses? \n Additional table information: table: college_2"} -{"text": "Q: SELECT MAX(stu_gpa), AVG(stu_gpa), MIN(stu_gpa), dept_code FROM student GROUP BY dept_code \nA: Find the max, average, and minimum gpa of all students in each department. \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(*) FROM program \nA: how many programs are there? \n Additional table information: table: program_share"} -{"text": "Q: SELECT local_authority, services FROM station \nA: list the local authorities and services provided by all stations. \n Additional table information: table: station_weather"} -{"text": "Q: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles' \nA: In which state is the college that Charles attends? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT DISTINCT transaction_type FROM Financial_Transactions \nA: What are the different types of transactions? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT COUNT(*) FROM Accounts \nA: How many accounts are there? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT COUNT(*) FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq) \nA: Count the number of courses without prerequisites. \n Additional table information: table: college_2"} -{"text": "Q: SELECT name FROM Person WHERE age < 30 \nA: Who is the person whose age is below 30? \n Additional table information: table: network_2"} -{"text": "Q: SELECT Name FROM People ORDER BY Height ASC NULLS FIRST \nA: What are the names of people in ascending order of height? \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT DISTINCT grade FROM list WHERE classroom = 103 \nA: Find the grade taught in classroom 103. \n Additional table information: table: student_1"} -{"text": "Q: SELECT hotel_id, star_rating_code FROM HOTELS ORDER BY price_range ASC NULLS FIRST \nA: Find the id and star rating of each hotel and sort them in increasing order of price. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT COUNT(*), T1.blockfloor FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockfloor \nA: How many rooms does each block floor have? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT AVG(Product_Price) FROM Products \nA: What is the average price for products? \n Additional table information: table: solvency_ii"} -{"text": "Q: SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num ORDER BY T2.emp_fname NULLS FIRST \nA: What are the first names and office locations for all professors sorted alphabetically by first name? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance NULLS FIRST \nA: What is the sum of checking and savings balances for all customers, ordered by the total balance? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT T1.name, T1.partitionid FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING COUNT(*) < 2 \nA: Find the name and partition id for users who tweeted less than twice. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT origin, COUNT(*) FROM train GROUP BY origin \nA: Find the number of trains starting from each origin. \n Additional table information: table: station_weather"} -{"text": "Q: SELECT dept_name FROM instructor WHERE name LIKE '%Soisalon%' \nA: Find the department name of the instructor whose name contains 'Soisalon'. \n Additional table information: table: college_2"} -{"text": "Q: SELECT budget_type_code, budget_type_description FROM Ref_budget_codes \nA: List all budget type codes and descriptions. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT customer_status_code, cell_mobile_phone_number, email_address FROM Customers WHERE first_name = 'Marina' OR last_name = 'Kohler' \nA: What is the status code, mobile phone number and email address of customer with last name as Kohler or first name as Marina? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT name FROM Reviewer UNION SELECT title FROM Movie \nA: Return all reviewer names and movie names together in a single list. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT product_category_code FROM products WHERE product_name = 'flax' \nA: What is the code of the category that the product with the name 'flax' belongs to? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT COUNT(DISTINCT LEVEL) FROM member \nA: What are the different membership levels? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT district_name FROM district WHERE city_area > 10 OR City_Population > 100000 \nA: Find the name all districts with city area greater than 10 or population larger than 100000 \n Additional table information: table: store_product"} -{"text": "Q: SELECT AVG(revenue), MAX(revenue), SUM(revenue) FROM manufacturers \nA: Return the average, maximum, and total revenues across all manufacturers. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T2.Country = 'Japan' ORDER BY T1.Year DESC \nA: What are the years of film market estimation for the market of Japan, ordered by year descending? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1 \nA: Find the entry name of the catalog with the highest price (in USD). \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20 \nA: What are the dates when customers with ids between 10 and 20 became customers? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1 \nA: Which district has the largest population? \n Additional table information: table: store_product"} -{"text": "Q: SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen' \nA: Find the names of procedures which physician John Wen was trained in. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT COUNT(*), classroom FROM list GROUP BY classroom \nA: How many students does one classroom have? \n Additional table information: table: student_1"} -{"text": "Q: SELECT COUNT(*) FROM STUDENT \nA: How many students are there in total? \n Additional table information: table: voter_2"} -{"text": "Q: 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 \nA: What are the names of the services that have never been used? \n Additional table information: table: e_government"} -{"text": "Q: SELECT Name FROM musical WHERE NOT Musical_ID IN (SELECT Musical_ID FROM actor) \nA: What are the names of musicals who have no actors? \n Additional table information: table: musical"} -{"text": "Q: SELECT Industry, COUNT(*) FROM Companies GROUP BY Industry \nA: Please show each industry and the corresponding number of companies in that industry. \n Additional table information: table: company_office"} -{"text": "Q: SELECT COUNT(DISTINCT Artist_ID) FROM volume \nA: Count the number of distinct artists who have volumes. \n Additional table information: table: music_4"} -{"text": "Q: SELECT Famous_Title FROM artist WHERE Artist = 'Triumfall' \nA: Return the famous titles of the artist called 'Triumfall'. \n Additional table information: table: music_4"} -{"text": "Q: SELECT COUNT(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id WHERE T2.dept_store_chain_name = 'South' \nA: Count the number of stores the chain South has. \n Additional table information: table: department_store"} -{"text": "Q: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in \nA: What are the ids of the students who are not involved in any activity \n Additional table information: table: activity_1"} -{"text": "Q: SELECT AVG(age), MIN(age) FROM artist WHERE country = 'United States' \nA: Return the average and minimum ages across artists from the United States. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance DESC LIMIT 1 \nA: What is the savings balance of the account belonging to the customer with the highest checking balance? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the last name of the musician that have produced the most number of songs? \n Additional table information: table: music_2"} -{"text": "Q: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING COUNT(*) > 1 \nA: Find the name of customers who have more than one loan. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT COUNT(*) FROM election \nA: How many elections are there? \n Additional table information: table: election_representative"} -{"text": "Q: SELECT COUNT(*) FROM EVENTS WHERE NOT event_id IN (SELECT event_id FROM Participants_in_Events) \nA: How many events did not have any participants? \n Additional table information: table: local_govt_in_alabama"} -{"text": "Q: SELECT COUNT(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000 \nA: How many employees have salary between 100000 and 200000? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT T1.lat, T1.long, T1.city FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id ORDER BY T2.duration NULLS FIRST LIMIT 1 \nA: What is the latitude, longitude, and city of the station from which the trip with smallest duration started? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT COUNT(*) FROM station \nA: How many train stations are there? \n Additional table information: table: train_station"} -{"text": "Q: SELECT T1.title, T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title \nA: For directors who had more than one movie, return the titles and produced years of all movies directed by them. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16' \nA: What are the distinct grant amount for the grants where the documents were sent before '1986-08-26 20:49:27' and grant were ended after '1989-03-16 18:27:16'? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT T1.name, T1.max_speed FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the name and max speed of the storm that affected the most regions. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT SUM(Amount_Payment) FROM Payments \nA: Compute the total amount of payment processed. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT first_name, last_name FROM employees ORDER BY birth_date DESC LIMIT 1 \nA: What si the youngest employee's first and last name? \n Additional table information: table: store_1"} -{"text": "Q: SELECT T2.customer_first_name, T2.customer_last_name, T2.customer_phone FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_number = '4560596484842' \nA: What is the first name, last name, and phone of the customer with card 4560596484842. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.crossing > 90 AND T2.preferred_foot = 'right' \nA: List the names of all players who have a crossing score higher than 90 and prefer their right foot. \n Additional table information: table: soccer_1"} -{"text": "Q: SELECT COUNT(*), role_code FROM users GROUP BY role_code \nA: Find the number of users in each role. \n Additional table information: table: document_management"} -{"text": "Q: SELECT COUNT(*) FROM student \nA: How many students are there? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T1.customer_name FROM customers AS T1, orders AS T2, 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 \nA: List the names of customers who have once canceled the purchase of the product 'food' (the item status is 'Cancel'). \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT COUNT(*) FROM All_documents WHERE document_type_code = 'CV' OR document_type_code = 'BK' \nA: How many documents have document type code CV or BK? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId WHERE T1.Name = 'AAC audio file' \nA: How many tracks are in the AAC audio file media type? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT decor, AVG(basePrice), MIN(basePrice) FROM Rooms GROUP BY decor \nA: Find the average and minimum price of the rooms in different decor. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT DISTINCT Registration_Date, Election_Cycle FROM VOTING_RECORD \nA: What are the distinct registration dates and the election cycles? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Confirmed' \nA: Which apartments have bookings with status code 'Confirmed'? Return their apartment numbers. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY AVG(salary) DESC LIMIT 1 \nA: Which department has the highest average instructor salary? \n Additional table information: table: college_2"} -{"text": "Q: SELECT MAX(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' \nA: List the maximum scores of the team Boston Red Stockings when the team won in postseason? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid HAVING COUNT(*) > 1 \nA: Which physicians are in charge of more than one patient? Give me their names. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music' \nA: Find the name of tracks which are in Movies playlist but not in music playlist. \n Additional table information: table: store_1"} -{"text": "Q: SELECT COUNT(*), country FROM airports GROUP BY country ORDER BY COUNT(*) DESC \nA: How many airports are there per country? Order the countries by decreasing number of airports. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT AVG(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID \nA: What is the average age of all gymnasts? \n Additional table information: table: gymnast"} -{"text": "Q: SELECT * FROM job_history AS T1 JOIN employees AS T2 ON T1.employee_id = T2.employee_id WHERE T2.salary >= 12000 \nA: Can you return all detailed info of jobs which was done by any of the employees who is presently earning a salary on and above 12000? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT COUNT(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population > 20000) \nA: How many cities are in counties that have populations of over 20000? \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT DISTINCT payment_method FROM customers \nA: What are all the payment methods? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT individual_first_name, individual_middle_name, individual_last_name FROM individuals ORDER BY individual_last_name NULLS FIRST \nA: What are the first, middle, and last names of all individuals, ordered by last name? \n Additional table information: table: e_government"} -{"text": "Q: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY SUM(T2.amount) DESC LIMIT 1 \nA: What is the name of the customer who has greatest total loan amount? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT AVG(Scores) FROM submission \nA: What is the average score of submissions? \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT decor FROM Rooms WHERE roomName = 'Recluse and defiance' \nA: Return the decor of the room named 'Recluse and defiance'. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT T2.dept_name, T1.dept_code FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.prof_high_degree = 'Ph.D.' GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of department where has the largest number of professors with a Ph.D. degree? \n Additional table information: table: college_1"} -{"text": "Q: SELECT SUM(T1.Order_Quantity) FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_Name = 'photo' \nA: What are the total order quantities of photo products? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.family_name = 'Zieme' AND T2.personal_name = 'Bernie' \nA: On what dates did the student with family name 'Zieme' and personal name 'Bernie' enroll in and complete the courses? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT name, damage_millions_USD FROM storm ORDER BY max_speed DESC \nA: What are the names and damage in millions for storms, ordered by their max speeds descending? \n Additional table information: table: storm_record"} -{"text": "Q: SELECT title FROM songs WHERE title LIKE '% the %' \nA: What are the names of the songs whose title has the word 'the'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT title, phone, hire_date FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards' \nA: What is the title, phone number and hire date for the employee named Nancy Edwards? \n Additional table information: table: store_1"} -{"text": "Q: SELECT t1.route_name FROM Delivery_Routes AS t1 JOIN Delivery_Route_Locations AS t2 ON t1.route_id = t2.route_id GROUP BY t1.route_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the name of route that has the highest number of deliveries. \n Additional table information: table: customer_deliveries"} -{"text": "Q: SELECT T1.first_name, T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY T2.invoice_date DESC LIMIT 5 \nA: What are the first and last names of the 5 customers who purchased something most recently? \n Additional table information: table: store_1"} -{"text": "Q: SELECT LOCATION, COUNT(*) FROM cinema GROUP BY LOCATION \nA: Show each location and the number of cinemas there. \n Additional table information: table: cinema"} -{"text": "Q: SELECT amount FROM payment ORDER BY amount DESC LIMIT 1 \nA: What is the largest payment amount? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010 \nA: Give the distinct names of wines made before 2000 or after 2010. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2 \nA: What are the employee ids for employees who have held two or more jobs? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT Pilot_name FROM pilot WHERE NOT Pilot_ID IN (SELECT Pilot_ID FROM pilot_record) \nA: List the names of pilots that do not have any record. \n Additional table information: table: pilot_record"} -{"text": "Q: SELECT COUNT(*) FROM book \nA: How many books are there? \n Additional table information: table: book_2"} -{"text": "Q: SELECT DISTINCT T1.Fname, T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_President_VOTE WHERE T1.age = 18 \nA: Find the first and last name of all the students of age 18 who have vice president votes. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT DISTINCT firstname, lastname FROM list \nA: Report the first name and last name of all the students. \n Additional table information: table: student_1"} -{"text": "Q: SELECT COUNT(*) FROM Person WHERE age > 30 AND job = 'engineer' \nA: How many people whose age is greater 30 and job is engineer? \n Additional table information: table: network_2"} -{"text": "Q: SELECT COUNT(*) FROM Customers_cards \nA: How many customer cards are there? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT MAX(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = 'Monaco Grand Prix' \nA: What is the maximum fastest lap speed in race named 'Monaco Grand Prix' in 2008 ? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT MAX(T1.duration), MAX(T2.resolution), T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages NULLS FIRST \nA: What are the maximum duration and resolution of songs grouped and ordered by languages? \n Additional table information: table: music_1"} -{"text": "Q: SELECT * FROM basketball_match \nA: What is all the information about the basketball match? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT name FROM club ORDER BY name DESC \nA: What are the names of all the clubs ordered in descending alphabetical order? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT personal_name, family_name FROM Students ORDER BY family_name NULLS FIRST \nA: What are the personal names and family names of the students? Sort the result in alphabetical order of the family name. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT T1.first_name, T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total NULLS FIRST LIMIT 10 \nA: What are the first and last names of the customers with the 10 cheapest invoices? \n Additional table information: table: store_1"} -{"text": "Q: SELECT COUNT(*), T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id \nA: For each project id, how many tasks are there? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT test_result, COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC \nA: For each distinct test result, find the number of students who got the result. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT customer_name FROM customers WHERE payment_method = 'Cash' \nA: Which customers use 'Cash' for payment method? Return the customer names. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: 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' \nA: What is the total amount of moeny paid by the customer Carole Bernhard? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID = T3.Tourist_ID WHERE T3.Tourist_Details = 'Vincent' \nA: Show the tourist attractions visited by the tourist whose detail is 'Vincent'. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t1.sex = 'F' ORDER BY t1.name NULLS FIRST \nA: What are the names of all female candidates in alphabetical order (sex is F)? \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT T1.line_1, AVG(T2.monthly_rental) FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id \nA: What are the line 1 and average monthly rentals of all student addresses? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT classroom, COUNT(DISTINCT grade) FROM list GROUP BY classroom \nA: For each classroom, report the classroom number and the number of grades using it. \n Additional table information: table: student_1"} -{"text": "Q: SELECT Age FROM people ORDER BY Height DESC LIMIT 1 \nA: What is the age of the tallest person? \n Additional table information: table: gymnast"} -{"text": "Q: SELECT dept_name FROM course GROUP BY dept_name ORDER BY SUM(credits) DESC LIMIT 1 \nA: Find the name of the department that offers the highest total credits? \n Additional table information: table: college_2"} -{"text": "Q: SELECT email_address, phone_number FROM customers ORDER BY email_address NULLS FIRST, phone_number NULLS FIRST \nA: What are the emails and phone numbers of all customers, sorted by email address and phone number? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT job_title, max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000 \nA: What are the job titles, and range of salaries for jobs with maximum salary between 12000 and 18000? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT Name FROM WINE WHERE YEAR < (SELECT MIN(YEAR) FROM WINE WHERE Winery = 'Brander') \nA: What are the names of wines whose production year are before the year of all wines by Brander winery? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC \nA: Order denominations in descending order of the count of schools with the denomination. Return each denomination with the count of schools. \n Additional table information: table: school_player"} -{"text": "Q: SELECT Writer FROM book GROUP BY Writer HAVING COUNT(*) > 1 \nA: List the writers who have written more than one book. \n Additional table information: table: book_2"} -{"text": "Q: SELECT T2.emp_fname, T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Accounting' \nA: Find the first names of all professors in the Accounting department who is teaching some course and the class room. \n Additional table information: table: college_1"} -{"text": "Q: SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height ASC NULLS FIRST \nA: What are the names of gymnasts, ordered by their heights ascending? \n Additional table information: table: gymnast"} -{"text": "Q: SELECT T2.dept_name, AVG(T1.stu_gpa) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY AVG(T1.stu_gpa) DESC LIMIT 1 \nA: What is the name and the average gpa of department whose students have the highest average gpa? \n Additional table information: table: college_1"} -{"text": "Q: SELECT Name FROM wrestler WHERE Days_held < 100 \nA: What are the names of wrestlers days held less than 100? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT COUNT(DISTINCT pPos) FROM tryout \nA: What are the different types of player positions? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT T1.name, T1.lat, MIN(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.end_station_id GROUP BY T2.end_station_id \nA: For each station, find its latitude and the minimum duration of trips that ended at the station. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT COUNT(*) FROM artist \nA: Count the number of artists. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT MAX(Number_cities), MIN(Number_cities) FROM market \nA: What are the maximum and minimum number of cities in all markets. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT COUNT(*) FROM scientists WHERE NOT ssn IN (SELECT scientist FROM AssignedTo) \nA: How many scientists do not have any projects assigned to them? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT T1.Name, T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING COUNT(*) >= 2 \nA: Which tourist attractions are visited at least twice? Give me their names and ids. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id JOIN products AS t3 ON t2.product_id = t3.product_id ORDER BY t3.product_price NULLS FIRST LIMIT 1 \nA: What is the last name of the staff member in charge of the complaint on the product with the lowest price? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id = T2.id WHERE T2.dept_name = 'History' \nA: What is the id of the instructor who advises of all students from History department? \n Additional table information: table: college_2"} -{"text": "Q: SELECT employee_id, MAX(end_date) FROM job_history GROUP BY employee_id \nA: display the employee ID for each employee and the date on which he ended his previous job. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT title FROM Movie WHERE NOT mID IN (SELECT mID FROM Rating) \nA: Find the titles of all movies that have no ratings. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT COUNT(*), time_of_day FROM broadcast GROUP BY time_of_day \nA: Count the number of programs broadcast for each time section of a day. \n Additional table information: table: program_share"} -{"text": "Q: SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC \nA: What are the different software platforms for devices, ordered by frequency descending? \n Additional table information: table: device"} -{"text": "Q: SELECT COUNT(DISTINCT customer_id) FROM Accounts \nA: Count the number of customers who hold an account. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT StuID, COUNT(*), SUM(gamesplayed) FROM Sportsinfo GROUP BY StuID \nA: Show all student IDs with the number of sports and total number of games played \n Additional table information: table: game_1"} -{"text": "Q: SELECT COUNT(*) FROM customers WHERE state = 'CA' \nA: How many customers in state of CA? \n Additional table information: table: store_1"} -{"text": "Q: SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id GROUP BY t2.swimmer_id HAVING COUNT(*) >= 2 \nA: Find the name of the swimmer who has at least 2 records. \n Additional table information: table: swimming"} -{"text": "Q: SELECT COUNT(*) FROM country WHERE NOT country_id IN (SELECT country_id FROM roller_coaster WHERE LENGTH > 3000) \nA: How many countries do not have an roller coaster longer than 3000? \n Additional table information: table: roller_coaster"} -{"text": "Q: SELECT DISTINCT (UnitPrice) FROM TRACK \nA: Find the distinct unit prices for tracks. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT COUNT(*) FROM item WHERE NOT i_id IN (SELECT i_id FROM review) \nA: Find the number of items without any review. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT COUNT(DISTINCT job) FROM Person \nA: How many different jobs are listed? \n Additional table information: table: network_2"} -{"text": "Q: SELECT COUNT(*), T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year \nA: For each year, return the year and the number of times the team Boston Red Stockings won in the postseasons. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which allergy type is most common? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT AVG(Scores) FROM submission \nA: Compute the average score of submissions. \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT artist_name FROM artist WHERE country = 'UK' INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'english' \nA: Return the names of singers who are from UK and released an English song. \n Additional table information: table: music_1"} -{"text": "Q: 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 \nA: What are the first and last names of all customers with more than 2 payments? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code WHERE T1.document_name = 'How to read a book' \nA: Find the document type name of the document named 'How to read a book'. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id = T2.i_id GROUP BY T2.i_id HAVING COUNT(*) > 1 \nA: Find the name of instructors who are advising more than one student. \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Linda' AND t3.lname = 'Smith' \nA: How many clubs does 'Linda Smith' have membership for? \n Additional table information: table: club_1"} -{"text": "Q: SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the artist, for each language, that has the most songs with a higher resolution than 500? \n Additional table information: table: music_1"} -{"text": "Q: SELECT COUNT(*) FROM store \nA: How many stores are there? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major <> 600 AND Sex = 'F' \nA: List all female students age is older than 18 who is not majoring in 600. List students' first name and last name. \n Additional table information: table: restaurant_1"} -{"text": "Q: SELECT AVG(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T1.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211' \nA: What is the average gpa of the students enrolled in the course with code ACCT-211? \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(DISTINCT card_type_code) FROM Customers_Cards \nA: How many different card types are there? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT city FROM city WHERE regional_population > 10000000 UNION SELECT city FROM city WHERE regional_population < 5000000 \nA: Which cities have regional population above 8000000 or below 5000000? \n Additional table information: table: city_record"} -{"text": "Q: SELECT country FROM stadium GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the country that has the most stadiums. \n Additional table information: table: swimming"} -{"text": "Q: 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 \nA: What is the name of the activity with the most students? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT AVG(Price), AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = 'Zinfandel' \nA: Give the average price and case of wines made from Zinfandel grapes in the year 2009. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT T1.Name, T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID \nA: What are the names of climbers and the corresponding names of mountains that they climb? \n Additional table information: table: climbing"} -{"text": "Q: SELECT COUNT(*) FROM Ref_document_types \nA: Show the number of document types. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised NULLS FIRST LIMIT 1 \nA: What is the last name of the staff who has handled the first ever complaint? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT card_number FROM member WHERE Hometown LIKE '%Kentucky%' \nA: list the card number of all members whose hometown address includes word 'Kentucky'. \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT song_name, releasedate FROM song ORDER BY releasedate DESC LIMIT 1 \nA: What is the name of the song that was released most recently? \n Additional table information: table: music_1"} -{"text": "Q: 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 \nA: Which 3 wineries produce the most wines made from white grapes? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 3 AND T2.firstname <> 'COVIN' AND T2.lastname <> 'JEROME' \nA: Which students in third grade are not taught by teacher COVIN JEROME? Give me the last names of the students. \n Additional table information: table: student_1"} -{"text": "Q: SELECT problem_log_id, problem_id FROM problem_log ORDER BY log_entry_date NULLS FIRST LIMIT 1 \nA: Find the oldest log id and its corresponding problem id. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT COUNT(DISTINCT church_id) FROM wedding WHERE YEAR = 2016 \nA: How many churches have a wedding in year 2016? \n Additional table information: table: wedding"} -{"text": "Q: SELECT district_name FROM district ORDER BY city_area ASC NULLS FIRST LIMIT 1 \nA: What is the name of the district with the smallest area? \n Additional table information: table: store_product"} -{"text": "Q: SELECT SUM(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990 \nA: Compute the total salary that the player with first name Len and last name Barker received between 1985 to 1990. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT title FROM papers WHERE title LIKE '%ML%' \nA: Find the titles of the papers that contain the word 'ML'. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT COUNT(DISTINCT sportname) FROM Sportsinfo \nA: How many different types of sports do we offer? \n Additional table information: table: game_1"} -{"text": "Q: SELECT COUNT(DISTINCT major), COUNT(DISTINCT city_code) FROM student \nA: How many different majors are there and how many different city codes are there for each student? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT * FROM instructor ORDER BY salary NULLS FIRST \nA: Give all information regarding instructors, in order of salary from least to greatest. \n Additional table information: table: college_2"} -{"text": "Q: SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC \nA: Please show the software platforms of devices in descending order of the count. \n Additional table information: table: device"} -{"text": "Q: SELECT DISTINCT name FROM genres \nA: List all different genre types. \n Additional table information: table: store_1"} -{"text": "Q: SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = '8' \nA: Find the names of catalog entries with level number 8. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT Major FROM STUDENT GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the major that is studied by the largest number of students. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT DISTINCT Major FROM Student \nA: What are the different majors? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT * FROM employees WHERE NOT department_id IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200) \nA: What are the ids for employees who do not work in departments with managers that have ids between 100 and 200? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT last_name FROM Teachers EXCEPT SELECT T1.last_name FROM Teachers AS T1 JOIN Detention AS T2 ON T1.teacher_id = T2.teacher_id \nA: Find the last names of teachers who are not involved in any detention. \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT T1.transaction_type_description, T2.date_of_transaction FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code WHERE T2.share_count < 10 \nA: Show the transaction type descriptions and dates if the share count is smaller than 10. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT name FROM races ORDER BY date DESC LIMIT 1 \nA: What is the name of the race that occurred most recently? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Accounting' INTERSECT SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Computer Info. Systems' \nA: What are the first names of all students taking accoutning and Computer Information Systems classes? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MEMBER_OF AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Find the name of the department that has the fewest members. \n Additional table information: table: college_3"} -{"text": "Q: SELECT Lname FROM FACULTY WHERE Building = 'Barton' ORDER BY Lname NULLS FIRST \nA: What are the last names of faculty in building Barton, sorted by last name? \n Additional table information: table: college_3"} -{"text": "Q: SELECT DISTINCT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = 'Spain' AND T1.year > 2000 \nA: What are the unique names of races that held after 2000 and the circuits were in Spain? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T2.dept_store_id, T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = 'marketing' INTERSECT SELECT T2.dept_store_id, T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = 'managing' \nA: What are the ids and names of department stores with both marketing and managing departments? \n Additional table information: table: department_store"} -{"text": "Q: SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = 'West Germany' \nA: Show the distinct names of mountains climbed by climbers from country 'West Germany'. \n Additional table information: table: climbing"} -{"text": "Q: SELECT DISTINCT product_color FROM Products \nA: What are the different product colors? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the code of the document type that is most common. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT DISTINCT POSITION FROM pilot WHERE Age > 30 \nA: List the distinct positions of pilots older than 30. \n Additional table information: table: pilot_record"} -{"text": "Q: SELECT phone, room, building FROM Faculty WHERE Fname = 'Jerry' AND Lname = 'Prince' \nA: What are the phone, room, and building of the faculty member called Jerry Prince? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT COUNT(*) FROM county_public_safety \nA: Count the number of countries. \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT MAX(amount_of_transaction) FROM TRANSACTIONS \nA: Show the maximum amount of transaction. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT SUM(hours) FROM projects \nA: Find the total hours of all projects. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1 \nA: Return the highest acc percent across all basketball matches. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.lastname = 'Heilo' AND T2.title = 'Der Kapitan' \nA: Which vocal type did the musician with last name 'Heilo' played in the song with title 'Der Kapitan'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT COUNT(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.Sex = 'M' AND T2.Election_Cycle = 'Fall' \nA: Count the number of male students who had class senator votes in the fall election cycle. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT cloud_cover FROM weather WHERE zip_code = 94107 GROUP BY cloud_cover ORDER BY COUNT(*) DESC LIMIT 3 \nA: What is the 3 most common cloud cover rates in the region of zip code 94107? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T1.good_or_bad_customer FROM customers AS T1 JOIN discount_coupons AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.coupon_amount = 500 \nA: Are the customers holding coupons with amount 500 bad or good? \n Additional table information: table: products_for_hire"} -{"text": "Q: SELECT amenity_name FROM dorm_amenity ORDER BY amenity_name NULLS FIRST \nA: What are the different dorm amenity names in alphabetical order? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT name, MAX(revenue), Headquarter FROM manufacturers GROUP BY Headquarter \nA: Find the name and revenue of the company that earns the highest revenue in each city. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT employee_id, job_id FROM employees WHERE salary < (SELECT MIN(salary) FROM employees WHERE job_id = 'MK_MAN') \nA: What are the employee ids and job ids for employees who make less than the lowest earning employee with title MK_MAN? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT SUM(revenue), founder FROM manufacturers GROUP BY founder \nA: Find the total revenue of companies of each founder. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT DISTINCT city FROM addresses \nA: Retrieve the list of all cities. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT T2.cell_mobile_number FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.monthly_rental ASC NULLS FIRST LIMIT 1 \nA: What is the cell phone number of the student whose address has the lowest monthly rental? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: 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 NULLS FIRST \nA: show the name of all bridges that was designed by american archtect, and sort the result by the bridge feet length. \n Additional table information: table: architecture"} -{"text": "Q: SELECT COUNT(*) FROM employees AS T1 JOIN customers AS T2 ON T2.support_rep_id = T1.id WHERE T1.first_name = 'Steve' AND T1.last_name = 'Johnson' \nA: How many customers does Steve Johnson support? \n Additional table information: table: store_1"} -{"text": "Q: SELECT gender, COUNT(*) FROM Customers GROUP BY gender \nA: How many customers are there of each gender? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT name FROM races ORDER BY date DESC LIMIT 1 \nA: What is the name of the race held most recently? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT COUNT(*), Grape FROM WINE GROUP BY Grape \nA: How many wines are there for each grape? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT AVG(room_count) FROM Apartments WHERE apt_type_code = 'Studio' \nA: What is the average number of rooms of apartments with type code 'Studio'? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id JOIN products AS t3 ON t2.product_id = t3.product_id ORDER BY t3.product_price NULLS FIRST LIMIT 1 \nA: Find the last name of the staff member who processed the complaint of the cheapest product. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id \nA: Find the names of customers who never placed an order. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT TYPE, COUNT(*) FROM ship GROUP BY TYPE \nA: For each type, how many ships are there? \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT DISTINCT classroom FROM list WHERE grade = 5 \nA: Which classrooms are used by grade 5? \n Additional table information: table: student_1"} -{"text": "Q: SELECT Comptroller, COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the people that have been comptroller the most times and the corresponding number of times. \n Additional table information: table: election"} -{"text": "Q: SELECT T3.course_name, COUNT(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id JOIN courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id \nA: For each course id, how many students are registered and what are the course names? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT COUNT(*) FROM club_rank WHERE Total < 10 \nA: How many clubs have total medals less than 10? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT T1.cust_name, T1.acc_type FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING SUM(T2.amount) > 5000 \nA: Find the name and account balance of the customers who have loans with a total amount of more than 5000. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT title FROM course WHERE dept_name = 'Statistics' INTERSECT SELECT title FROM course WHERE dept_name = 'Psychology' \nA: Find the title of course that is provided by both Statistics and Psychology departments. \n Additional table information: table: college_2"} -{"text": "Q: SELECT Name, Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus' OR How_to_Get_There = 'walk' \nA: Find the names and opening hours of the tourist attractions that we get to by bus or walk. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT title FROM course WHERE dept_name = 'Statistics' EXCEPT SELECT title FROM course WHERE dept_name = 'Psychology' \nA: Find the title of course that is provided by Statistics but not Psychology departments. \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*) FROM STUDENT \nA: Find the number of students in total. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%' \nA: Which movies have 'Deleted Scenes' as a substring in the special feature? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT AVG(age), MAX(age), sex FROM student GROUP BY sex \nA: Find the average and oldest age for students with different sex. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T1.name, COUNT(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid \nA: Return the name of each physician and the number of patients he or she treats. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT catalog_level_name, catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10 \nA: Find the name and level of catalog structure with level between 5 and 10. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct <> 'null' OR department_id <> 40 \nA: display all the information of employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid \nA: How many players enter hall of fame each year? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT order_id, customer_id FROM customer_orders WHERE order_status_code = 'Cancelled' ORDER BY order_date NULLS FIRST \nA: List the order id, customer id for orders in Cancelled status, ordered by their order dates. \n Additional table information: table: department_store"} -{"text": "Q: SELECT AVG(balance) FROM checking \nA: What is the average balance in checking accounts? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.sex = 'F' \nA: Give me the first name and last name for all the female members of the club 'Bootup Baltimore'. \n Additional table information: table: club_1"} -{"text": "Q: SELECT building, room_number FROM classroom WHERE capacity BETWEEN 50 AND 100 \nA: What are the room numbers and corresponding buildings for classrooms which can seat between 50 to 100 students? \n Additional table information: table: college_2"} -{"text": "Q: SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE lastname = 'Heilo' GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which vocal type has the band mate with last name 'Heilo' played the most? \n Additional table information: table: music_2"} -{"text": "Q: SELECT Name FROM wrestler ORDER BY Days_held ASC NULLS FIRST LIMIT 1 \nA: What is the name of the wrestler with the fewest days held? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname ORDER BY SUM(T2.amount) DESC LIMIT 1 \nA: Find the name of bank branch that provided the greatest total amount of loans. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.Customer_id GROUP BY T1.customer_id HAVING COUNT(*) > 1 \nA: Who are the customers that had more than 1 policy? List the customer details and id. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_Senator_VOTE \nA: Find the distinct first names of the students who have class senator votes. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT AVG(bikes_available) FROM status WHERE NOT station_id IN (SELECT id FROM station WHERE city = 'Palo Alto') \nA: What is the average bike availablility for stations not in Palo Alto? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T1.datetime_detention_start, datetime_detention_end FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.last_name = 'Schultz' \nA: Find the start and end dates of detentions of teachers with last name 'Schultz'. \n Additional table information: table: behavior_monitoring"} -{"text": "Q: 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%' \nA: List lesson id of all lessons taught by staff with first name as Janessa, last name as Sawayn and nickname containing letter 's'. \n Additional table information: table: driving_school"} -{"text": "Q: SELECT AVG(no_of_customers) FROM bank \nA: What is the average number of bank customers? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT COUNT(*) FROM products WHERE NOT product_id IN (SELECT product_id FROM Order_items) \nA: How many products were not included in any order? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT product_type_code, product_name FROM products WHERE product_price > 1000 OR product_price < 500 \nA: Show the product type and name for the products with price higher than 1000 or lower than 500. \n Additional table information: table: customers_and_products_contacts"} -{"text": "Q: SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: What is the status code with the least number of customers? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T1.Participant_ID, T1.Participant_Type_Code, COUNT(*) FROM Participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID GROUP BY T1.Participant_ID \nA: How many events have each participants attended? List the participant id, type and the number. \n Additional table information: table: local_govt_in_alabama"} -{"text": "Q: SELECT t1.name, t1.nationality FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' GROUP BY t2.swimmer_id HAVING COUNT(*) > 1 \nA: Find the name and nationality of the swimmer who has won (i.e., has a result of 'win') more than 1 time. \n Additional table information: table: swimming"} -{"text": "Q: SELECT nurse FROM on_call WHERE blockfloor = 1 AND blockcode = 1 \nA: What nurses are on call with block floor 1 and block code 1? Tell me their names. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT customer_details FROM Customers EXCEPT SELECT T1.customer_details FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id = T2.customer_id \nA: List the details of the customers who do not have any policies. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = 'Movies' \nA: What are the names of all tracks that are on playlists titled Movies? \n Additional table information: table: store_1"} -{"text": "Q: SELECT clublocation FROM club WHERE clubname = 'Tennis Club' \nA: What is the location of the club named 'Tennis Club'? \n Additional table information: table: club_1"} -{"text": "Q: SELECT name FROM enzyme WHERE product <> 'Heme' \nA: What are the names of enzymes whose product is not 'Heme'? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT name FROM Companies WHERE Headquarters <> 'USA' \nA: Find the names of the companies whose headquarters are not located in 'USA'. \n Additional table information: table: company_office"} -{"text": "Q: SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = 'cumin' \nA: Give the unit of measure for the product with the name 'cumin'. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 INTERSECT SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top < 2 \nA: Show the famous titles of the artists with both volumes that lasted more than 2 weeks on top and volumes that lasted less than 2 weeks on top. \n Additional table information: table: music_4"} -{"text": "Q: SELECT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds NULLS FIRST LIMIT 1 \nA: What is the forename and surname of the driver with the shortest laptime? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1 \nA: What is the name of the entrepreneur with the greatest weight? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT COUNT(*), T1.dormid FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid WHERE T1.student_capacity > 100 GROUP BY T1.dormid \nA: Find the number of amenities for each of the dorms that can accommodate more than 100 students. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT COUNT(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE '%a%' \nA: How many lessons were taught by a staff member whose first name has the letter 'a' in it? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT COUNT(DISTINCT Company) FROM entrepreneur \nA: How many distinct companies are there? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t3.district_name = 'Khanewal District' \nA: What are the names of all the stores located in Khanewal District? \n Additional table information: table: store_product"} -{"text": "Q: SELECT name, open_year FROM manufacturer WHERE num_of_shops > 10 OR Num_of_Factories < 10 \nA: Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops. \n Additional table information: table: manufacturer"} -{"text": "Q: SELECT COUNT(*) FROM exhibition WHERE YEAR >= 2005 \nA: Count the number of exhibitions that happened in or after 2005. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT gtype FROM Video_games WHERE gname = 'Call of Destiny' \nA: What is the type of video game Call of Destiny. \n Additional table information: table: game_1"} -{"text": "Q: SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported > (SELECT MAX(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = 'Rylan' AND T4.staff_last_name = 'Homenick') \nA: What are the ids of the problems reported after the date of any problems reported by Rylan Homenick? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT COUNT(*) FROM company \nA: What is the total number of companies? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed \nA: Which employees have either destroyed a document or made an authorization to do so? Return their employee ids. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent' \nA: What are the details of the project that is producing both patents and papers as outcomes? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT Name FROM technician WHERE NOT technician_id IN (SELECT technician_id FROM repair_assignment) \nA: List the names of technicians who have not been assigned to repair machines. \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT T2.customer_name FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the names of customers who have the most mailshots. \n Additional table information: table: customers_campaigns_ecommerce"} -{"text": "Q: SELECT city, COUNT(*) FROM airports GROUP BY city HAVING COUNT(*) > 1 \nA: What are the names of all cities with more than one airport and how many airports do they have? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING COUNT(*) >= 2 INTERSECT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING SUM(T2.number_city_affected) >= 10 \nA: Show storm name with at least two regions and 10 cities affected. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT name_first, name_last FROM player WHERE weight > 220 OR height < 75 \nA: What are the first name and last name of the players who have weight above 220 or height below 75? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT County_name FROM county ORDER BY County_name DESC \nA: Return the names of all counties sorted by county name in descending alphabetical order. \n Additional table information: table: election"} -{"text": "Q: SELECT T1.firstname, T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0 \nA: Find the first and last names of people who payed more than the rooms' base prices. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT MAX(followers), SUM(followers) FROM user_profiles \nA: Find the maximum and total number of followers of all users. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT TYPE FROM school GROUP BY TYPE HAVING COUNT(*) = 2 \nA: Show the types of schools that have two schools. \n Additional table information: table: school_bus"} -{"text": "Q: SELECT T2.Delegate, T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District \nA: Show the delegates and the names of county they belong to. \n Additional table information: table: election"} -{"text": "Q: SELECT LName FROM STUDENT WHERE Major = 50 \nA: What are the last names of students studying major 50? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.fname, t1.lname ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the last name of the author that has published the most papers? \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT MIN(T1.duration), MIN(T2.rating), T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is NULLS FIRST \nA: What is the shortest and most poorly rated song for each genre, ordered alphabetically by genre? \n Additional table information: table: music_1"} -{"text": "Q: SELECT T2.type, COUNT(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T2.type \nA: Show the type of school and the number of buses for each type. \n Additional table information: table: school_bus"} -{"text": "Q: SELECT COUNT(*) FROM customers GROUP BY customer_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Count the number of customers that have the customer type that is most common. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT name, LOCATION FROM station ORDER BY Annual_entry_exit NULLS FIRST, Annual_interchanges NULLS FIRST \nA: List the names and locations of all stations ordered by their yearly entry exit and interchange amounts. \n Additional table information: table: train_station"} -{"text": "Q: SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid') \nA: How many schools have some students playing in goalie and mid positions. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT COUNT(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id WHERE T2.account_name = '337' \nA: How many transaction does account with name 337 have? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: 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 \nA: Give me a list of cities whose temperature in March is lower than that in July or higher than that in Oct? \n Additional table information: table: city_record"} -{"text": "Q: SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id = T2.id ORDER BY T2.dock_count DESC LIMIT 1 \nA: Which trip started from the station with the largest dock count? Give me the trip id. \n Additional table information: table: bike_1"} -{"text": "Q: 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' \nA: What are the distinct types of mills that are built by American or Canadian architects? \n Additional table information: table: architecture"} -{"text": "Q: 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' \nA: Which customers made orders between 2009-01-01 and 2010-01-01? Find their names. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT name FROM Aircraft ORDER BY distance NULLS FIRST LIMIT 3 \nA: What are the aircrafts with top 3 shortest lengthes? List their names. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the manager name with most number of gas stations opened after 2000. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT COUNT(*) FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq) \nA: How many courses that do not have prerequisite? \n Additional table information: table: college_2"} -{"text": "Q: SELECT name FROM people WHERE height > 200 OR height < 190 \nA: What are the names of people who have a height greater than 200 or less than 190? \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode = t2.screen_mode WHERE t2.Accreditation_type = 'Provisional' INTERSECT SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode = t2.screen_mode WHERE t2.Accreditation_type = 'Full' \nA: Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types. \n Additional table information: table: phone_1"} -{"text": "Q: SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5 \nA: What are the titles of all movies that have between 3 and 5 stars? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name \nA: Select the average price of each manufacturer's products, showing the manufacturer's name. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT DISTINCT product_details FROM products \nA: What are the details of all products? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT POSITION FROM player GROUP BY name HAVING AVG(Points) >= 20 \nA: What are the positions of players whose average number of points scored by that position is larger than 20? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT name FROM procedures WHERE cost > 1000 EXCEPT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen' \nA: Find the names of all procedures which cost more than 1000 but which physician John Wen was not trained in? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT document_name, access_count FROM documents ORDER BY document_name NULLS FIRST \nA: What are the names of all the documents, as well as the access counts of each, ordered alphabetically? \n Additional table information: table: document_management"} -{"text": "Q: SELECT COUNT(DISTINCT name) FROM products WHERE NOT name IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T2.name = 'Sony') \nA: How many products are not made by Sony? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT title FROM albums WHERE title LIKE 'A%' ORDER BY title NULLS FIRST \nA: List every album whose title starts with A in alphabetical order. \n Additional table information: table: store_1"} -{"text": "Q: SELECT COUNT(DISTINCT SOURCE) FROM injury_accident \nA: How many different kinds of information sources are there for injury accidents? \n Additional table information: table: game_injury"} -{"text": "Q: SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which transportation method is used the most often to get to tourist attractions? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT T2.Building FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY COUNT(*) DESC LIMIT 1 \nA: Give the building that the instructor who teaches the greatest number of courses lives in. \n Additional table information: table: college_3"} -{"text": "Q: SELECT Country FROM mountain WHERE Height > 5000 \nA: What are the countries of mountains with height bigger than 5000? \n Additional table information: table: climbing"} -{"text": "Q: SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990 \nA: What are the publishers who have published a book in both 1989 and 1990? \n Additional table information: table: culture_company"} -{"text": "Q: SELECT Name FROM editor WHERE NOT editor_id IN (SELECT editor_id FROM journal_committee) \nA: List the names of editors that are not on any journal committee. \n Additional table information: table: journal_committee"} -{"text": "Q: SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2 \nA: Show the name of the party that has at least two records. \n Additional table information: table: election"} -{"text": "Q: SELECT DISTINCT (catalog_entry_name) FROM catalog_contents \nA: Find the names of all the catalog entries. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID WHERE T2.Name = 'The Phantom of the Opera' \nA: What are the names of actors who have been in the musical titled The Phantom of the Opera? \n Additional table information: table: musical"} -{"text": "Q: SELECT DISTINCT Major FROM Student \nA: Show all majors. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT bname FROM bank ORDER BY no_of_customers DESC LIMIT 1 \nA: What is the name of the bank branch with the greatest number of customers? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT sportname, COUNT(*) FROM Sportsinfo GROUP BY sportname \nA: How many students play each sport? \n Additional table information: table: game_1"} -{"text": "Q: SELECT T1.name, AVG(T2.rating) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id \nA: For each user, return the name and the average rating of reviews given by them. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in \nA: Show the ids of the students who don't participate in any activity. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT T1.pName, T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' \nA: Find the name and hours of the students whose tryout decision is yes. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT T1.name, T1.age, T1.job FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice' AND T2.year = (SELECT MAX(YEAR) FROM PersonFriend WHERE friend = 'Alice') \nA: Find the name, age, and job title of persons who are friends with Alice for the longest years. \n Additional table information: table: network_2"} -{"text": "Q: SELECT document_id FROM Documents WHERE document_status_code = 'done' AND document_type_code = 'Paper' \nA: List the document ids for any documents with the status code done and the type code paper. \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT COUNT(*) FROM browser WHERE market_share >= 5 \nA: How many main stream browsers whose market share is at least 5 exist? \n Additional table information: table: browser_web"} -{"text": "Q: SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count >= 100 OR amount_of_transaction >= 100 \nA: What are the dates of transactions with at least 100 share count or amount bigger than 100? \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT T4.name FROM wedding AS T1 JOIN people AS T2 ON T1.male_id = T2.people_id JOIN people AS T3 ON T1.female_id = T3.people_id JOIN church AS T4 ON T4.church_id = T1.church_id WHERE T2.age > 30 OR T3.age > 30 \nA: Show the church names for the weddings of all people older than 30. \n Additional table information: table: wedding"} -{"text": "Q: SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = 'San Francisco State University' AND T2.year = 1996 \nA: What is the campus fee for San Francisco State University in 1996? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the membership level with most number of members. \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT COUNT(DISTINCT city) FROM EMPLOYEE \nA: Find the number of different cities that employees live in. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT LOCATION FROM station GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the location with most number of train stations. \n Additional table information: table: train_station"} -{"text": "Q: SELECT t1.product_name, t1.product_price FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id = t2.product_id GROUP BY t2.product_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the name and price of the product that has been ordered the greatest number of times. \n Additional table information: table: customer_deliveries"} -{"text": "Q: SELECT COUNT(*) FROM Songs \nA: How many songs are there? \n Additional table information: table: music_2"} -{"text": "Q: SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = 'white' OR t3.characteristic_name = 'hot' \nA: How many products have their color described as 'white' or have a characteristic with the name 'hot'? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT Title, Issues FROM book \nA: What are the title and issues of the books? \n Additional table information: table: book_2"} -{"text": "Q: SELECT Police_force, COUNT(*) FROM county_public_safety GROUP BY Police_force \nA: Please show the police forces and the number of counties with each police force. \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t2.support_rate < t2.oppose_rate \nA: Find the names of the candidates whose support percentage is lower than their oppose rate. \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT COUNT(*), T1.fault_log_entry_id FROM Fault_Log AS T1 JOIN Engineer_Visits AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: How many engineer visits are required at most for a single fault log? List the number and the log entry id. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT Team, COUNT(*) FROM technician GROUP BY Team \nA: Show different teams of technicians and the number of technicians in each team. \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT T1.Writer FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID WHERE T2.Price > 4000000 \nA: Show writers who have published a book with price more than 4000000. \n Additional table information: table: book_2"} -{"text": "Q: SELECT country FROM stadium WHERE capacity > 60000 INTERSECT SELECT country FROM stadium WHERE capacity < 50000 \nA: Which country has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000? \n Additional table information: table: swimming"} -{"text": "Q: SELECT t1.name, t1.sex, MIN(oppose_rate) FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex \nA: Find the name of the candidates whose oppose percentage is the lowest for each sex. \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = 'HOU' \nA: Which clubs have one or more members from the city with code 'HOU'? Give me the names of the clubs. \n Additional table information: table: club_1"} -{"text": "Q: SELECT T2.title, MAX(T1.price) FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id \nA: What are the title and maximum price of each film? \n Additional table information: table: cinema"} -{"text": "Q: SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2 \nA: List the nominees that have been nominated more than two musicals. \n Additional table information: table: musical"} -{"text": "Q: SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance < 100 INTERSECT SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 500 \nA: Which themes have had corresponding exhibitions that have had attendance both below 100 and above 500? \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT AVG(weight), MIN(weight), sex FROM people GROUP BY sex \nA: Find the average and minimum weight for each gender. \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT T1.id, T1.Name, T1.FDA_approved FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC \nA: What are the ids, names and FDA approval status of medicines in descending order of the number of enzymes that it can interact with. \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the role code with the largest number of employees? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT Rank FROM FACULTY GROUP BY Rank ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Find the rank of the faculty that the fewest faculties belong to. \n Additional table information: table: college_3"} -{"text": "Q: SELECT COUNT(DISTINCT dormid) FROM has_amenity \nA: How many dorms have amenities? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'Red' \nA: List the names of all distinct wines that are made of red color grape. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT premises_type, COUNT(*) FROM premises GROUP BY premises_type \nA: Show each premise type and the number of premises in that type. \n Additional table information: table: customers_campaigns_ecommerce"} -{"text": "Q: SELECT COUNT(*) FROM Projects \nA: How many projects are there? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT DISTINCT T1.EMP_FNAME, T1.EMP_DOB FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE CRS_CODE = 'ACCT-211' \nA: What are the first names and date of birth of professors teaching course ACCT-211? \n Additional table information: table: college_1"} -{"text": "Q: SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which college has the most authors with submissions? \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY SUM(T2.amount) DESC LIMIT 1 \nA: Find the name of customer who has the highest amount of loans. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 4 \nA: Find the types of documents with more than 4 documents. \n Additional table information: table: document_management"} -{"text": "Q: SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T3.cost > 5000 \nA: Find the physicians who are trained in a procedure that costs more than 5000. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT AVG(Order_Quantity) FROM Invoices WHERE payment_method_code = 'MasterCard' \nA: Check the invoices record and compute the average quantities ordered with the payment method 'MasterCard'. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT Official_Name, Status FROM city ORDER BY Population DESC LIMIT 1 \nA: What is the official name and status of the city with the most residents? \n Additional table information: table: farm"} -{"text": "Q: SELECT T1.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name HAVING COUNT(*) > 1 \nA: Show the names of countries that have more than one roller coaster. \n Additional table information: table: roller_coaster"} -{"text": "Q: SELECT MAX(elevation) FROM airports WHERE country = 'Iceland' \nA: What is the maximum elevation of all airports in the country of Iceland? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT T1.driverid, T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid WHERE T3.year > 2010 GROUP BY T1.driverid ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the id and last name of the driver who participated in the most races after 2010? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'male' AND T1.job = 'doctor' \nA: Find the male friend of Alice whose job is a doctor? \n Additional table information: table: network_2"} -{"text": "Q: SELECT dorm_name FROM dorm WHERE student_capacity > 300 \nA: What are the names of all the dorms that can accomdate more than 300 students? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT AVG(age), gender FROM Person GROUP BY gender \nA: How old is each gender, on average? \n Additional table information: table: network_2"} -{"text": "Q: SELECT T2.dept_name, T1.dept_code FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.prof_high_degree = 'Ph.D.' GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which department has the most professors with a Ph.D.? \n Additional table information: table: college_1"} -{"text": "Q: SELECT billing_country, AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10 \nA: A list of the top 10 countries by average invoice size. List country name and average invoice size. \n Additional table information: table: store_1"} -{"text": "Q: SELECT DISTINCT song_name FROM song WHERE resolution > (SELECT MIN(resolution) FROM song WHERE languages = 'english') \nA: What are the different names for all songs that have a higher resolution than English songs? \n Additional table information: table: music_1"} -{"text": "Q: SELECT document_name, access_count FROM documents ORDER BY document_name NULLS FIRST \nA: Find the name and access counts of all documents, in alphabetic order of the document name. \n Additional table information: table: document_management"} -{"text": "Q: SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.song_name LIKE '%love%' \nA: What is the name and country of origin of the artist who released a song that has 'love' in its title? \n Additional table information: table: music_1"} -{"text": "Q: SELECT actual_order_id FROM actual_orders WHERE order_status_code = 'Success' \nA: Find the ids of orders whose status is 'Success'. \n Additional table information: table: customer_deliveries"} -{"text": "Q: SELECT address_line_1 FROM Course_Authors_and_Tutors \nA: List the addresses of all the course authors or tutors. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT customer_id, customer_name FROM customers ORDER BY customer_id ASC NULLS FIRST \nA: List all the customers in increasing order of IDs. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT Team, COUNT(*) FROM elimination GROUP BY Team \nA: How many eliminations did each team have? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT DISTINCT T1.creation FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T3.born_state = 'Alabama' \nA: What are the distinct creation years of the departments managed by a secretary born in state 'Alabama'? \n Additional table information: table: department_management"} -{"text": "Q: SELECT DISTINCT T3.Fname FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T2.gradepoint >= 3.8 \nA: What are the distinct first names for students with a grade point of 3.8 or above in at least one course? \n Additional table information: table: college_3"} -{"text": "Q: SELECT cName FROM College WHERE enr < 13000 AND state = 'AZ' UNION SELECT cName FROM College WHERE enr > 15000 AND state = 'LA' \nA: What are the names of colleges in LA that have more than 15,000 students and of colleges in AZ with less than 13,000 students? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student \nA: Show the ids of all the faculty members who participate in an activity and advise a student. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT name, salary FROM Employee WHERE eid = 242518965 \nA: What is the name and salary of the employee with the id 242518965? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT DISTINCT firstname, lastname FROM teachers \nA: What are the first name and last name of all the teachers? \n Additional table information: table: student_1"} -{"text": "Q: SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY AVG(salary) DESC LIMIT 1 \nA: Find the name of the department which has the highest average salary of professors. \n Additional table information: table: college_2"} -{"text": "Q: SELECT stu_fname, stu_gpa FROM student WHERE stu_gpa < (SELECT AVG(stu_gpa) FROM student) \nA: Find the first name and gpa of the students whose gpa is lower than the average gpa of all students. \n Additional table information: table: college_1"} -{"text": "Q: SELECT asset_acquired_date FROM Assets ORDER BY asset_acquired_date ASC NULLS FIRST LIMIT 1 \nA: When was the first asset acquired? \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT flno FROM Flight WHERE origin = 'Los Angeles' \nA: What are the numbers of all flights coming from Los Angeles? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT Delegate, Committee FROM election \nA: Show the delegate and committee information of elections. \n Additional table information: table: election"} -{"text": "Q: SELECT aid, name FROM Aircraft ORDER BY distance DESC LIMIT 1 \nA: What is the id and name of the aircraft that can cover the maximum distance? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id \nA: Show all customer ids and the number of accounts for each customer. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California' \nA: Find the names of customers who are not living in the state of California. \n Additional table information: table: customer_deliveries"} -{"text": "Q: SELECT DISTINCT TYPE FROM vocals \nA: Find all the vocal types. \n Additional table information: table: music_2"} -{"text": "Q: SELECT lname, age FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Milk' INTERSECT SELECT StuID FROM Has_allergy WHERE Allergy = 'Cat') \nA: What are the last names and ages of the students who are allergic to milk and cat? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT COUNT(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Atsushi' AND t1.lname = 'Ohori' \nA: How many papers have 'Atsushi Ohori' published? \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT Party_Theme, LOCATION FROM party \nA: What are the themes and locations of parties? \n Additional table information: table: party_host"} -{"text": "Q: SELECT LOCATION FROM performance GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the most common location of performances. \n Additional table information: table: performance_attendance"} -{"text": "Q: SELECT course_description FROM COURSES WHERE course_name = 'database' \nA: What are the descriptions of the courses with name 'database'? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT Country, COUNT(*) FROM climber GROUP BY Country \nA: Please show the countries and the number of climbers from each country. \n Additional table information: table: climbing"} -{"text": "Q: SELECT Name FROM ship ORDER BY Tonnage ASC NULLS FIRST \nA: List the name of ships in ascending order of tonnage. \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT COUNT(*), T1.maintenance_contract_id FROM Maintenance_Contracts AS T1 JOIN Assets AS T2 ON T1.maintenance_contract_id = T2.maintenance_contract_id GROUP BY T1.maintenance_contract_id \nA: How many assets does each maintenance contract contain? List the number and the contract id. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT COUNT(DISTINCT gtype) FROM Video_games \nA: How many video game types exist? \n Additional table information: table: game_1"} -{"text": "Q: SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid ORDER BY SUM(hours_played) DESC LIMIT 1 \nA: What is the name of the game that has been played the most? \n Additional table information: table: game_1"} -{"text": "Q: SELECT T1.invoice_date, T1.order_id, T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id \nA: Show invoice dates and order id and details for all invoices. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT name FROM building WHERE height_feet >= 200 AND floors >= 20 \nA: List the names of buildings with at least 200 feet of height and with at least 20 floors. \n Additional table information: table: protein_institute"} -{"text": "Q: SELECT DISTINCT Name FROM WINE ORDER BY Name NULLS FIRST \nA: What are the names of wines, sorted in alphabetical order? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT date_valid_from, date_valid_to FROM Customers_cards WHERE card_number = '4560596484842' \nA: Show the date valid from and the date valid to for the card with card number '4560596484842'. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT name FROM Person WHERE job = 'student' AND age = (SELECT MAX(age) FROM person WHERE job = 'student') \nA: Who is the oldest person whose job is student? \n Additional table information: table: network_2"} -{"text": "Q: SELECT DISTINCT Theme FROM journal \nA: Show the distinct themes of journals. \n Additional table information: table: journal_committee"} -{"text": "Q: SELECT Name FROM phone WHERE Carrier = 'Sprint' OR Carrier = 'TMobile' \nA: Show the names of phones with carrier either 'Sprint' or 'TMobile'. \n Additional table information: table: phone_market"} -{"text": "Q: SELECT COUNT(*) FROM Movie WHERE YEAR < 2000 \nA: How many movies were made before 2000? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS' \nA: List the names of all the channels owned by either CCTV or HBS \n Additional table information: table: program_share"} -{"text": "Q: SELECT name FROM enzyme WHERE name LIKE '%ALA%' \nA: Which enzyme names have the substring 'ALA'? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: 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' \nA: What are the first names of the professors who do not play Canoeing or Kayaking as activities? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = 'Deputy' OR t1.policy_type_code = 'Uniform' \nA: Which customers have an insurance policy with the type code 'Deputy' or 'Uniform'? Return the customer details. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT AVG(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen' \nA: What is the average cost of procedures that physician John Wen was trained in? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT Amount_Settled, Amount_Claimed FROM Claims ORDER BY Amount_Claimed DESC LIMIT 1 \nA: Among all the claims, what is the settlement amount of the claim with the largest claim amount? List both the settlement amount and claim amount. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 3 AND T2.firstname <> 'COVIN' AND T2.lastname <> 'JEROME' \nA: Find the last names of the students in third grade that are not taught by COVIN JEROME. \n Additional table information: table: student_1"} -{"text": "Q: SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = 'Japanese' AND T2.points > 5 \nA: What are the names of all the Japanese constructors that have earned more than 5 points? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT email_address, phone_number FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM complaints) \nA: What are the emails and phone numbers of custoemrs who have never filed a complaint? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id, customers AS t3 GROUP BY t3.customer_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: Which products has been complained by the customer who has filed least amount of complaints? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1 \nA: Which catalog content has the highest height? Give me the catalog entry name. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT name FROM PersonFriend GROUP BY name HAVING COUNT(*) = 1 \nA: What are the names of everybody who has exactly one friend? \n Additional table information: table: network_2"} -{"text": "Q: SELECT gameid, SUM(hours_played) FROM Plays_games GROUP BY gameid \nA: What are ids and total number of hours played for each game? \n Additional table information: table: game_1"} -{"text": "Q: SELECT COUNT(*) FROM school \nA: How many schools are there? \n Additional table information: table: school_player"} -{"text": "Q: SELECT founded FROM university WHERE affiliation <> 'Public' ORDER BY founded DESC LIMIT 1 \nA: What is the founded year of the non public school that was founded most recently? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT Date FROM debate WHERE Num_of_Audience > 150 \nA: List the dates of debates with number of audience bigger than 150 \n Additional table information: table: debate"} -{"text": "Q: SELECT T1.customer_name, T1.customer_phone FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T3.order_id = T2.order_id GROUP BY T1.customer_id ORDER BY SUM(T3.order_quantity) DESC LIMIT 1 \nA: What are the name and phone of the customer with the most ordered product quantity? \n Additional table information: table: customers_and_products_contacts"} -{"text": "Q: SELECT Name FROM representative WHERE NOT Representative_ID IN (SELECT Representative_ID FROM election) \nA: List the names of representatives that have not participated in elections listed here. \n Additional table information: table: election_representative"} -{"text": "Q: SELECT Name FROM pilot WHERE Age >= 25 \nA: What are the name of pilots aged 25 or older? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the most common position of players in match seasons. \n Additional table information: table: match_season"} -{"text": "Q: SELECT AVG(Profits_billion) FROM Companies \nA: What are the average profits of companies? \n Additional table information: table: company_office"} -{"text": "Q: SELECT cName FROM College WHERE enr > 18000 ORDER BY cName NULLS FIRST \nA: What is the name of every college in alphabetical order that has more than 18000 students enrolled? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT T2.Fname, T2.Lname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID = T2.StuID WHERE T1.DNO = 140 \nA: What are the first names and last names of the students that minor in the department with DNO 140. \n Additional table information: table: college_3"} -{"text": "Q: SELECT label FROM albums GROUP BY label ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the label with the most albums? \n Additional table information: table: music_2"} -{"text": "Q: SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which allergy is the most common? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT first_name, last_name, department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id) \nA: Find the first name and last name and department id for those employees who earn such amount of salary which is the smallest salary of any of the departments. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT AVG(Population) FROM county \nA: Show the average population of all counties. \n Additional table information: table: election"} -{"text": "Q: SELECT city, COUNT(*) FROM branch WHERE open_year < 2010 GROUP BY city \nA: For each city, how many branches opened before 2010? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT first_name, last_name, salary FROM employees WHERE commission_pct = 'null' \nA: What are the full name (first and last name) and salary for all employees who does not have any value for commission? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT employee_name, role_code, date_of_birth FROM Employees WHERE employee_Name = 'Armani' \nA: What are the name, role code, and date of birth of the employee named 'Armani'? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT T2.name FROM wedding AS T1 JOIN people AS T2 ON T1.female_id = T2.people_id WHERE T1.year = 2016 AND T2.is_male = 'F' AND T2.country = 'Canada' \nA: Show the names for all females from Canada having a wedding in year 2016. \n Additional table information: table: wedding"} -{"text": "Q: SELECT rank, COUNT(*) FROM Faculty GROUP BY rank \nA: For each faculty rank, show the number of faculty members who have it. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT salary, manager_id FROM employees WHERE manager_id <> 'null' \nA: Find the salary and manager number for those employees who is working under a manager. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T1.name, T1.height_feet FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id WHERE T2.founded > 1880 GROUP BY T1.building_id HAVING COUNT(*) >= 2 \nA: Show the names and heights of buildings with at least two institutions founded after 1880. \n Additional table information: table: protein_institute"} -{"text": "Q: SELECT name FROM captain ORDER BY age DESC \nA: Sort all captain names by their ages from old to young. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT activity_name FROM Activity \nA: List all the activities we have. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id GROUP BY T2.country_id HAVING COUNT(*) >= 3 \nA: What are the countries that contain 3 or more cities? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT DISTINCT TYPE FROM institution \nA: Show all the distinct institution types. \n Additional table information: table: protein_institute"} -{"text": "Q: SELECT clubname FROM club WHERE clublocation = 'AKW' \nA: Which clubs are located at 'AKW'? Return the club names. \n Additional table information: table: club_1"} -{"text": "Q: SELECT state, acc_type, credit_score FROM customer WHERE no_of_loans = 0 \nA: What are the states, account types, and credit scores for customers who have 0 loans? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT COUNT(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Ray' \nA: How many lessons did the customer with the first name Ray take? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T2.card_type_code, COUNT(*) FROM Financial_transactions AS T1 JOIN Customers_cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_code \nA: What are the different card types, and how many transactions have been made with each? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT DISTINCT Name FROM WINE ORDER BY price NULLS FIRST \nA: What are the names of wines, sorted by price ascending? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT t3.name FROM record AS t1 JOIN event AS t2 ON t1.event_id = t2.id JOIN stadium AS t3 ON t3.id = t2.stadium_id GROUP BY t2.stadium_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the names of stadiums that the most swimmers have been to. \n Additional table information: table: swimming"} -{"text": "Q: SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T3.Number_of_hosts > 20 \nA: Show the host names for parties with number of hosts greater than 20. \n Additional table information: table: party_host"} -{"text": "Q: SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = 'Marianne' GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the vocal type of the band mate whose first name is 'Marianne' played the most? \n Additional table information: table: music_2"} -{"text": "Q: SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student \nA: Show ids for the faculty members who don't advise any student. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT * FROM departments WHERE department_name = 'Marketing' \nA: display all the information about the department Marketing. \n Additional table information: table: hr_1"} -{"text": "Q: 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) \nA: Find the SSN and name of scientists who are assigned to the project with the longest hours. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32 \nA: Return names of songs in volumes that are by artists that are at least 32 years old. \n Additional table information: table: music_4"} -{"text": "Q: SELECT COUNT(*) FROM ship \nA: How many ships are there? \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT AVG(prominence) FROM mountain WHERE country = 'Morocco' \nA: What are the average prominence of the mountains in country 'Morocco'? \n Additional table information: table: mountain_photos"} -{"text": "Q: SELECT COUNT(*) FROM list \nA: How many students are there? \n Additional table information: table: student_1"} -{"text": "Q: SELECT T2.Governor FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 \nA: Who were the governors of the parties associated with delegates from district 1? \n Additional table information: table: election"} -{"text": "Q: SELECT SUM(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE '%London%' \nA: What are the total number of domestic passengers at all London airports? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking' \nA: What are the headquarters without companies that are in the banking industry? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT email_address, date_of_birth FROM Customers WHERE first_name = 'Carole' \nA: List email address and birthday of customer whose first name as Carole. \n Additional table information: table: driving_school"} -{"text": "Q: SELECT Total FROM body_builder ORDER BY Total ASC NULLS FIRST \nA: List the total scores of body builders in ascending order. \n Additional table information: table: body_builder"} -{"text": "Q: SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'researcher' \nA: When do all the researcher role staff start to work, and when do they stop working? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT T1.address_line_1, T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id HAVING COUNT(*) >= 2 \nA: Find the addresses and author IDs of the course authors that teach at least two courses. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = 'Fall' \nA: What are the distinct ages of students who have secretary votes in the fall election cycle? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT Author, College FROM submission \nA: What are the authors of submissions and their colleges? \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT COUNT(*) FROM rooms WHERE NOT roomid IN (SELECT DISTINCT room FROM reservations) \nA: How many rooms have not had any reservation yet? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT zip_code FROM weather GROUP BY zip_code ORDER BY AVG(mean_sea_level_pressure_inches) NULLS FIRST LIMIT 1 \nA: What is the zip code that has the lowest average mean sea level pressure? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT COUNT(DISTINCT ID) FROM teaches WHERE semester = 'Spring' AND YEAR = 2010 \nA: Find the total number of instructors who teach a course in the Spring 2010 semester. \n Additional table information: table: college_2"} -{"text": "Q: SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2 \nA: List the locations that are shared by more than two wrestlers. \n Additional table information: table: wrestler"} -{"text": "Q: SELECT COUNT(*), rank FROM captain GROUP BY rank \nA: How many captains are in each rank? \n Additional table information: table: ship_1"} -{"text": "Q: 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' \nA: What is the project detail for the project with document 'King Book'? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT DISTINCT transaction_type FROM Financial_Transactions \nA: Show all transaction types. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: 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 \nA: show the train name and station name for each train. \n Additional table information: table: train_station"} -{"text": "Q: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' \nA: Find the names of states that have some college students playing in goalie and mid positions. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy \nA: Which students are unaffected by allergies? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT product_category_code FROM products WHERE product_name = 'flax' \nA: Which category does the product named 'flax' belong to? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles' \nA: Find the state of the college which player Charles is attending. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT title, directed_by FROM film WHERE NOT film_id IN (SELECT film_id FROM schedule) \nA: What are the title and director of the films without any schedule? \n Additional table information: table: cinema"} -{"text": "Q: SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF' \nA: What are the document ids for the budget type code 'SF'? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT COUNT(*) FROM Student WHERE sex = 'M' AND StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food') \nA: Find the number of male (sex is 'M') students who have some food type allery. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT Occupation FROM player GROUP BY Occupation ORDER BY COUNT(*) DESC LIMIT 1 \nA: Please show the most common occupation of players. \n Additional table information: table: riding_club"} -{"text": "Q: SELECT Headquarters FROM company GROUP BY Headquarters HAVING COUNT(*) >= 2 \nA: Show the headquarters that have at least two companies. \n Additional table information: table: company_employee"} -{"text": "Q: SELECT COUNT(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000 \nA: Count the number of distinct delegates who are from counties with population above 50000. \n Additional table information: table: election"} -{"text": "Q: SELECT T2.emp_fname FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num GROUP BY T1.prof_num HAVING COUNT(*) > 1 \nA: What are the first names of all professors who teach more than one class? \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(*) FROM school \nA: How many schools are there? \n Additional table information: table: school_finance"} -{"text": "Q: SELECT city, state FROM bank WHERE bname = 'morningside' \nA: What city and state is the bank with the name morningside in? \n Additional table information: table: loan_1"} -{"text": "Q: 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 \nA: Return the ids and details corresponding to projects for which there are more than two documents. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T2.staff_id HAVING COUNT(*) > 1 \nA: What are the names of staff who have been assigned multiple jobs? \n Additional table information: table: department_store"} -{"text": "Q: SELECT name FROM races WHERE YEAR = 2017 \nA: What are the names of all the races that occurred in the year 2017? \n Additional table information: table: formula_1"} -{"text": "Q: 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 \nA: What is the area for the appelation which produced the most wines prior to 2010? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT COUNT(DISTINCT card_type_code) FROM Customers_Cards \nA: Show the number of card types. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT Election_Cycle, COUNT(*) FROM VOTING_RECORD GROUP BY Election_Cycle \nA: For each election cycle, report the number of voting records. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2001 ORDER BY t3.degrees NULLS FIRST LIMIT 1 \nA: How many faculty lines are there in the university that conferred the least number of degrees in year 2001? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT T1.first_name, T1.last_name, T3.city FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T1.first_name LIKE '%z%' \nA: What are the full names and cities of employees who have the letter Z in their first names? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%' \nA: Which colleges do the tryout players whose name starts with letter D go to? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Stephanie' AND t1.lname = 'Weirich' \nA: Find the titles of the papers the author 'Stephanie Weirich' wrote. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.preferred_foot = 'left' AND T2.overall_rating >= 85 AND T2.overall_rating <= 90 \nA: List the names of all left-footed players who have overall rating between 85 and 90. \n Additional table information: table: soccer_1"} -{"text": "Q: SELECT TYPE, COUNT(*) FROM mill GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most common mill type, and how many are there? \n Additional table information: table: architecture"} -{"text": "Q: SELECT COUNT(*) FROM race \nA: How many races are there? \n Additional table information: table: race_track"} -{"text": "Q: SELECT DISTINCT YEAR FROM competition WHERE Competition_type <> 'Tournament' \nA: What are the distinct years in which the competitions type is not 'Tournament'? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT artist_name FROM artist WHERE country = 'UK' INTERSECT SELECT artist_name FROM song WHERE languages = 'english' \nA: What are the names of the artists that are from the UK and sang songs in English? \n Additional table information: table: music_1"} -{"text": "Q: SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3 \nA: Show teams that have suffered more than three eliminations. \n Additional table information: table: wrestler"} -{"text": "Q: 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' \nA: Give the dates of creation for documents that have both budget type codes 'GV' and 'SF'. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = 'Editor' \nA: Find the names of all the employees whose the role name is 'Editor'. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT date_of_transaction, share_count FROM TRANSACTIONS \nA: Show all date and share count of transactions. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT T2.apt_number, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id \nA: Show the apartment numbers, start dates, and end dates of all the apartment bookings. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT COUNT(*), building FROM classroom WHERE capacity > 50 GROUP BY building \nA: Find the number of rooms with more than 50 capacity for each building. \n Additional table information: table: college_2"} -{"text": "Q: SELECT SUM(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T1.state = 'New York' \nA: What is the total amount of money loaned by banks in New York state? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT personal_name, family_name FROM Students ORDER BY family_name NULLS FIRST \nA: List the personal names and family names of all the students in alphabetical order of family name. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT zip_code FROM weather GROUP BY zip_code ORDER BY AVG(mean_sea_level_pressure_inches) NULLS FIRST LIMIT 1 \nA: What is the zip code in which the average mean sea level pressure is the lowest? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT STATEMENT_ID, COUNT(*) FROM Accounts GROUP BY STATEMENT_ID \nA: Show all statement id and the number of accounts for each statement. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT first_name, department_id FROM employees WHERE last_name = 'McEwen' \nA: Display the first name, and department number for all employees whose last name is 'McEwen'. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 INTERSECT SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top < 2 \nA: What are the famous titles of artists who have not only had volumes that spent more than 2 weeks on top but also volumes that spent less than 2 weeks on top? \n Additional table information: table: music_4"} -{"text": "Q: SELECT * FROM employees WHERE salary BETWEEN (SELECT MIN(salary) FROM employees) AND 2500 \nA: What is all the information regarding employees with salaries above the minimum and under 2500? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = 'red' AND t3.characteristic_name = 'fast' \nA: Find the name of the products that have the color description 'red' and have the characteristic name 'fast'. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T1.Name FROM Tourist_Attractions AS T1, VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Alison' EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1, VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Rosalind' \nA: Find the the names of the tourist attractions that the tourist named Alison visited but Rosalind did not visit. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT AVG(HS), MAX(HS), MIN(HS) FROM Player \nA: Find the max, average and min training hours of all players. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT T3.Name, T2.District FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID \nA: Show the names of phones and the districts of markets they are on. \n Additional table information: table: phone_market"} -{"text": "Q: SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_last_name = 'Bosco' \nA: Which problems are reported by the staff with last name 'Bosco'? Show the ids of the problems. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Contracts AS T2 ON T1.company_id = T2.maintenance_contract_company_id ORDER BY T2.contract_start_date ASC NULLS FIRST LIMIT 1 \nA: Which company started the earliest the maintenance contract? Show the company name. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT t2.date_opened, t2.date_closed FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name LIKE '%Diana%' \nA: Retrieve the open and close dates of all the policies associated with the customer whose name contains 'Diana' \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT COUNT(*) FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE T1.participant_details LIKE '%Dr.%' \nA: How many events had participants whose details had the substring 'Dr.' \n Additional table information: table: local_govt_in_alabama"} -{"text": "Q: SELECT COUNT(*) FROM building \nA: How many buildings are there? \n Additional table information: table: protein_institute"} -{"text": "Q: SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = 'Indonesia' \nA: Which players are from Indonesia? \n Additional table information: table: match_season"} -{"text": "Q: SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY COUNT(*) DESC LIMIT 2 \nA: Return the ids of the two department store chains with the most department stores. \n Additional table information: table: department_store"} -{"text": "Q: SELECT T2.Name FROM debate_people AS T1 JOIN people AS T2 ON T1.Negative = T2.People_ID GROUP BY T2.Name HAVING COUNT(*) >= 2 \nA: Show the names of people who have been on the negative side of debates at least twice. \n Additional table information: table: debate"} -{"text": "Q: SELECT name, built_year FROM mill WHERE TYPE = 'Grondzeiler' \nA: What are the names and year of construction for the mills of 'Grondzeiler' type? \n Additional table information: table: architecture"} -{"text": "Q: SELECT Name FROM editor ORDER BY Age ASC NULLS FIRST \nA: List the names of editors in ascending order of age. \n Additional table information: table: journal_committee"} -{"text": "Q: SELECT Competition_type, Country FROM competition \nA: What are the types of every competition and in which countries are they located? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT COUNT(DISTINCT Artist_ID) FROM volume \nA: Count the number of artists who have had volumes. \n Additional table information: table: music_4"} -{"text": "Q: SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1) \nA: Find all the stores in the district with the most population. \n Additional table information: table: store_product"} -{"text": "Q: SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3 \nA: Find the names and number of works of the three artists who have produced the most songs. \n Additional table information: table: music_1"} -{"text": "Q: SELECT * FROM basketball_match \nA: List all information regarding the basketball match. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT season, home_team, away_team FROM game \nA: List the season, home team, away team of all the games. \n Additional table information: table: game_injury"} -{"text": "Q: SELECT milliseconds FROM tracks WHERE name = 'Fast As a Shark' \nA: How many milliseconds long is Fast As a Shark? \n Additional table information: table: store_1"} -{"text": "Q: SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = 'Germany' \nA: Find the address of all customers that live in Germany and have invoice. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = 'Nameless , Painless' \nA: What are the first and last name of the author who published the paper titled 'Nameless, Painless'? \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'International Finance') \nA: Give the title of the prerequisite to the course International Finance. \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*) FROM products \nA: How many products are there? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT DISTINCT Country FROM manager \nA: Show the distinct countries of managers. \n Additional table information: table: railway"} -{"text": "Q: SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3 \nA: Find the names of reviewers who had given higher than 3 star ratings. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT COUNT(*) FROM student \nA: How many students are there? \n Additional table information: table: club_1"} -{"text": "Q: SELECT name, TYPE, flag FROM ship ORDER BY built_year DESC LIMIT 1 \nA: Find the name, type, and flag of the ship that is built in the most recent year. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT COUNT(DISTINCT region_id) FROM affected_region \nA: How many regions are affected? \n Additional table information: table: storm_record"} -{"text": "Q: SELECT T2.emp_fname, T4.prof_office, T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num \nA: Find the first names and offices of all instructors who have taught some course and also find the course description. \n Additional table information: table: college_1"} -{"text": "Q: SELECT T1.student_id, T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) >= 2 \nA: Find the student ID and personal name of the student with at least two enrollments. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%' \nA: What are the full name, hire date, salary, and department id for employees without the letter M in their first name? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY department_name \nA: display the department name and number of employees in each of the department. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING COUNT(*) >= 2 \nA: Show names for all aircraft with at least two flights. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT role_description FROM Staff_Roles WHERE role_code = 'researcher' \nA: What is the complete description of the researcher role. \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: 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 \nA: Return the name of the organization which has the most contact individuals. \n Additional table information: table: e_government"} -{"text": "Q: SELECT head FROM department GROUP BY departmentID ORDER BY COUNT(departmentID) NULLS FIRST LIMIT 1 \nA: Tell me the employee id of the head of the department with the least employees. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT name, email FROM user_profiles ORDER BY followers NULLS FIRST LIMIT 1 \nA: Find the name and email of the user followed by the least number of people. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT phone, postal_code FROM address WHERE address = '1031 Daugavpils Parkway' \nA: Give the phone and postal code corresponding to the address '1031 Daugavpils Parkway'. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance NULLS FIRST LIMIT 1 \nA: What is the name corresponding to the accoung with the lowest sum of checking and savings balances? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT COUNT(*), T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name \nA: Find number of tracks in each genre? \n Additional table information: table: store_1"} -{"text": "Q: SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING COUNT(*) >= 2 \nA: List categories that have at least two books after year 1989. \n Additional table information: table: culture_company"} -{"text": "Q: SELECT Fname FROM STUDENT WHERE NOT StuID IN (SELECT StuID FROM ENROLLED_IN) \nA: Find the first name of students not enrolled in any course. \n Additional table information: table: college_3"} -{"text": "Q: SELECT T1.name, T1.date, T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id \nA: What are the names and dates of races, and the names of the tracks where they are held? \n Additional table information: table: race_track"} -{"text": "Q: SELECT DISTINCT LOCATION FROM track \nA: What are distinct locations where tracks are located? \n Additional table information: table: race_track"} -{"text": "Q: SELECT truck_details FROM trucks ORDER BY truck_licence_number NULLS FIRST \nA: Show the details of all trucks in the order of their license number. \n Additional table information: table: customer_deliveries"} -{"text": "Q: SELECT T1.region_name, COUNT(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id \nA: How many storms occured in each region? \n Additional table information: table: storm_record"} -{"text": "Q: SELECT COUNT(DISTINCT student_id) FROM Student_Course_Enrolment \nA: Find the number of distinct students enrolled in courses. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT cust_name FROM customer EXCEPT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE T2.loan_type = 'Mortgages' \nA: Find the name of customers who do not have a loan with a type of Mortgages. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration NULLS FIRST LIMIT 1 \nA: What is the name of the artist who produced the shortest song? \n Additional table information: table: music_1"} -{"text": "Q: SELECT COUNT(*) FROM classroom WHERE building <> 'Lamberton' \nA: Count the number of rooms that are not in the Lamberton building. \n Additional table information: table: college_2"} -{"text": "Q: SELECT region_code, region_name FROM region ORDER BY region_code NULLS FIRST \nA: What are the codes and names for all regions, sorted by codes? \n Additional table information: table: storm_record"} -{"text": "Q: SELECT name, age, country FROM artist ORDER BY Year_Join NULLS FIRST \nA: Show all artist name, age, and country ordered by the yeared they joined. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT name, LOCATION, seating FROM track ORDER BY year_opened DESC LIMIT 1 \nA: What is the name, location and seating for the most recently opened track? \n Additional table information: table: race_track"} -{"text": "Q: SELECT name FROM instructor WHERE name LIKE '%dar%' \nA: What are the names of all instructors with names that include 'dar'? \n Additional table information: table: college_2"} -{"text": "Q: SELECT order_id, COUNT(DISTINCT product_id) FROM Order_items GROUP BY order_id \nA: How many different products correspond to each order id? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT roomName, decor FROM Rooms WHERE bedtype = 'King' ORDER BY basePrice NULLS FIRST \nA: What are the names and decor of rooms with a king bed? Sort them by their price \n Additional table information: table: inn_1"} -{"text": "Q: SELECT state FROM customers GROUP BY state ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: Give the state that has the most customers. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC LIMIT 1 \nA: List the time of elimination of the wrestlers with largest days held. \n Additional table information: table: wrestler"} -{"text": "Q: SELECT T2.Fname, T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the first name and last name of the student who have most number of sports? \n Additional table information: table: game_1"} -{"text": "Q: SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 \nA: Find all the forenames of distinct drivers who was in position 1 as standing and won? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017 \nA: Find the distinct names of all races held between 2014 and 2017? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT COUNT(*) FROM Flight \nA: How many flights do we have? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT COUNT(*) FROM products WHERE product_category_code = 'Seeds' \nA: Count the number of products in the category 'Seeds'. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT * FROM COURSE ORDER BY Credits NULLS FIRST \nA: What is all the information about courses, ordered by credits ascending? \n Additional table information: table: college_3"} -{"text": "Q: SELECT COUNT(*) FROM event \nA: How many events are there? \n Additional table information: table: swimming"} -{"text": "Q: 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 \nA: Find the the grape whose white color grapes are used to produce wines with scores higher than 90. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: What is the customer id, first and last name with least number of accounts. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT COUNT(DISTINCT FDA_approved) FROM medicine \nA: How many distinct FDA approval statuses are there for the medicines? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT grant_id, COUNT(*) FROM Documents GROUP BY grant_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: How many documents can one grant have at most? List the grant id and number. \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT employee_id, salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam') \nA: display the employee id and salary of all employees who report to Payam (first name). \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math' ORDER BY T3.tot_cred NULLS FIRST \nA: Find the name of instructors who are advisors of the students from the Math department, and sort the results by students' total credit. \n Additional table information: table: college_2"} -{"text": "Q: SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the product ID of the most frequently ordered item on invoices? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT SUM(Share_in_percent) FROM channel WHERE OWNER = 'CCTV' \nA: find the total percentage share of all channels owned by CCTV. \n Additional table information: table: program_share"} -{"text": "Q: SELECT role_code FROM Employees GROUP BY role_code HAVING COUNT(*) >= 3 \nA: Show all role codes with at least 3 employees. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT MIN(membership_amount), MAX(membership_amount) FROM branch WHERE open_year = 2011 OR city = 'London' \nA: Show minimum and maximum amount of memberships for all branches opened in 2011 or located at city London. \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT COUNT manufacturer FROM \"vehicles\".\"cars\" WHERE model = 'GE40LFR' \nA: how many times is the model ge40lfr? \n Additional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion"} -{"text": "Q: SELECT T2.Name, T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID \nA: For each nomination, show the name of the artwork and name of the festival where it is nominated. \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Christop' AND T2.staff_last_name = 'Berge' INTERSECT SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.closure_authorised_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Ashley' AND T2.staff_last_name = 'Medhurst' \nA: What are the product ids for the problems reported by Christop Berge with closure authorised by Ashley Medhurst? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT COUNT(DISTINCT state) FROM bank \nA: In how many different states are banks located? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT T1.driverid, T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid WHERE T3.year > 2010 GROUP BY T1.driverid ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the id and last name of the driver who participated in the most races after 2010? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC NULLS FIRST LIMIT 1 \nA: Find the team that attended the least number of home games in 1980. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT project_id, COUNT(*) FROM Documents GROUP BY project_id \nA: Show project ids and the number of documents in each project. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT Student.Fname, Student.Lname FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID GROUP BY Student.StuID ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which student visited restaurant most often? List student's first name and last name. \n Additional table information: table: restaurant_1"} -{"text": "Q: SELECT COUNT(*), dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code \nA: Find the number of classes in each department. \n Additional table information: table: college_1"} -{"text": "Q: SELECT Name FROM technician WHERE NOT technician_id IN (SELECT technician_id FROM repair_assignment) \nA: What are the names of the technicians that have not been assigned to repair machines? \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3 \nA: List the 3 highest salaries of the players in 2001? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT fname, lname FROM student WHERE age < (SELECT AVG(age) FROM student) \nA: Find the first and last name of students whose age is younger than the average age. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT AVG(pages_per_minute_color) FROM product \nA: What is the average number of pages per minute color? \n Additional table information: table: store_product"} -{"text": "Q: SELECT COUNT(*) FROM Band \nA: How many bands are there? \n Additional table information: table: music_2"} -{"text": "Q: SELECT date, max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f NULLS FIRST LIMIT 1 \nA: Find the day in which the difference between the max temperature and min temperature was the smallest. Also report the difference. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT * FROM item \nA: List all information in the item table. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1 \nA: What is the name of the organization that was formed most recently? \n Additional table information: table: e_government"} -{"text": "Q: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Bob' \nA: Who are Bob's friends? \n Additional table information: table: network_2"} -{"text": "Q: SELECT * FROM election \nA: Return all the information for each election record. \n Additional table information: table: election"} -{"text": "Q: SELECT T2.Name, T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested NULLS FIRST \nA: What are the names of entrepreneurs and their corresponding investors, ordered descending by the amount of money requested? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT Grape, Winery, YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR NULLS FIRST \nA: List the grape, winery and year of the wines whose price is bigger than 100 ordered by year. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT name, prominence FROM mountain EXCEPT SELECT T1.name, T1.prominence FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T3.brand = 'Sigma' \nA: Show the name and prominence of the mountains whose picture is not taken by a lens of brand 'Sigma'. \n Additional table information: table: mountain_photos"} -{"text": "Q: SELECT DISTINCT payment_type_code FROM payments \nA: What are all the distinct payment types? \n Additional table information: table: products_for_hire"} -{"text": "Q: SELECT Accreditation_level FROM phone GROUP BY Accreditation_level HAVING COUNT(*) > 3 \nA: Find the accreditation level that more than 3 phones use. \n Additional table information: table: phone_1"} -{"text": "Q: SELECT name, Assets_billion FROM Companies ORDER BY name ASC NULLS FIRST \nA: List the name and assets of each company in ascending order of company name. \n Additional table information: table: company_office"} -{"text": "Q: SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote WHERE T2.Election_Cycle = 'Spring' \nA: Who served as an advisor for students who have treasurer votes in the spring election cycle? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT AVG(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan) \nA: What is the average credit score for customers who have taken a loan? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Badlands' AND T1.StagePosition = 'back' \nA: Who is performing in the back stage position for the song 'Badlands'? Show the first name and the last name. \n Additional table information: table: music_2"} -{"text": "Q: SELECT First_year, Last_year FROM party WHERE Party_Theme = 'Spring' OR Party_Theme = 'Teqnology' \nA: What are the first year and last year of the parties whose theme is 'Spring' or 'Teqnology'? \n Additional table information: table: party_host"} -{"text": "Q: SELECT T2.Fname, T2.Lname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID = T2.StuID WHERE T1.DNO = 140 \nA: What are the full names of students minoring in department 140? \n Additional table information: table: college_3"} -{"text": "Q: SELECT id, country, city, name FROM airport ORDER BY name NULLS FIRST \nA: List the id, country, city and name of the airports ordered alphabetically by the name. \n Additional table information: table: flight_company"} -{"text": "Q: SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported < (SELECT MIN(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = 'Lysanne' AND T4.staff_last_name = 'Turcotte') \nA: Which problems were reported before the date of any problem reported by the staff Lysanne Turcotte? Give me the ids of the problems. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT customer_name, customer_id FROM customers WHERE customer_address LIKE '%TN%' \nA: What are the names and ids of customers whose address contains TN? \n Additional table information: table: department_store"} -{"text": "Q: SELECT T2.product_name FROM view_product_availability AS T1 JOIN products_for_hire AS T2 ON T1.product_id = T2.product_id WHERE T1.available_yn = 1 \nA: What are the names of products whose availability equals to 1? \n Additional table information: table: products_for_hire"} -{"text": "Q: SELECT cust_name, acc_type, acc_bal FROM customer ORDER BY credit_score DESC LIMIT 1 \nA: Find the name, account type, and account balance of the customer who has the highest credit score. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT t2.id, t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id GROUP BY t1.station_id ORDER BY AVG(high_temperature) DESC LIMIT 1 \nA: Find the id and local authority of the station with has the highest average high temperature. \n Additional table information: table: station_weather"} -{"text": "Q: SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.payment_method_code = 'Credit Card' GROUP BY T1.customer_id HAVING COUNT(*) > 2 \nA: Show the names of customers who use Credit Card payment method and have more than 2 orders. \n Additional table information: table: customers_and_products_contacts"} -{"text": "Q: SELECT roomName, bedType FROM Rooms WHERE decor = 'traditional' \nA: List the type of bed and name of all traditional rooms. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT AVG(rating), languages FROM song GROUP BY languages \nA: What is the average rating of songs for each language? \n Additional table information: table: music_1"} -{"text": "Q: SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most common competition type? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id = t2.campus WHERE t2.faculty >= 600 AND t2.faculty <= 1000 AND T1.year = 2004 \nA: List the campus that have between 600 and 1000 faculty lines in year 2004. \n Additional table information: table: csu_1"} -{"text": "Q: SELECT T2.Name, T2.age, T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID ORDER BY T3.Theme ASC NULLS FIRST \nA: Show the names and ages of editors and the theme of journals for which they serve on committees, in ascending alphabetical order of theme. \n Additional table information: table: journal_committee"} -{"text": "Q: SELECT COUNT(*) FROM Movie WHERE YEAR < 2000 \nA: How many movies were made before 2000? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT first_name, last_name FROM actor GROUP BY first_name, last_name ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the most common full name among all actors. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT team_name FROM basketball_match ORDER BY All_Home DESC \nA: List names of all teams in the basketball competition, ordered by all home scores in descending order. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT COUNT(*) FROM airlines \nA: How many airlines are there? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT role_description FROM ROLES WHERE role_name = 'Proof Reader' \nA: What is the description of the role named 'Proof Reader'? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT classroom, COUNT(DISTINCT grade) FROM list GROUP BY classroom \nA: For each classroom, show the classroom number and count the number of distinct grades that use the room. \n Additional table information: table: student_1"} -{"text": "Q: SELECT COUNT(*) FROM products WHERE product_price > (SELECT AVG(product_price) FROM products) \nA: How many products have a price higher than the average? \n Additional table information: table: customers_and_products_contacts"} -{"text": "Q: 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' \nA: What are the distinct ids of products ordered between 1975-01-01 and 1976-01-01?? \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT * FROM election \nA: Show all the information about election. \n Additional table information: table: election"} -{"text": "Q: SELECT T1.teacher_id, T2.last_name FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T1.detention_type_code = 'AFTER' GROUP BY T1.teacher_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the id and last name of the teacher that has the most detentions with detention type code 'AFTER'? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT COUNT(DISTINCT student_id) FROM Student_Course_Enrolment \nA: How many distinct students are enrolled in courses? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING COUNT(*) > 2 \nA: Which types of policy are chosen by more than 2 customers? Give me the policy type codes. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT T2.emp_fname, T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num \nA: What are the first names of all teachers who have taught a course and the corresponding course codes? \n Additional table information: table: college_1"} -{"text": "Q: SELECT name FROM club ORDER BY name DESC \nA: List all club names in descending alphabetical order. \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT AVG(Years_working) FROM journalist \nA: What is the average number of years spent working as a journalist? \n Additional table information: table: news_report"} -{"text": "Q: SELECT COUNT(*) FROM Student WHERE city_code = 'HKG' OR city_code = 'CHI' \nA: How many students live in HKG or CHI? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT shop_id, COUNT(*) FROM happy_hour GROUP BY shop_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: which shop has happy hour most frequently? List its id and number of happy hours. \n Additional table information: table: coffee_shop"} -{"text": "Q: SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001 \nA: List all the salary values players received in 2010 and 2001. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT DISTINCT instrument FROM Instruments \nA: What are the different instruments listed in the database? \n Additional table information: table: music_2"} -{"text": "Q: SELECT MIN(age), job FROM Person GROUP BY job \nA: How old is the youngest person for each job? \n Additional table information: table: network_2"} -{"text": "Q: SELECT SUM(num_of_component) FROM furniture \nA: How many furniture components are there in total? \n Additional table information: table: manufacturer"} -{"text": "Q: SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Reggae' INTERSECT SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Rock' \nA: Find the titles of albums that contain tracks of both the Reggae and Rock genres. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT T1.Name, T2.Decoration_Theme FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID \nA: Show the names of members and the decoration themes they have. \n Additional table information: table: decoration_competition"} -{"text": "Q: SELECT T3.Player_name, T3.gender FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T1.Starting_year > 2011 \nA: Show the names and genders of players with a coach starting after 2011. \n Additional table information: table: riding_club"} -{"text": "Q: SELECT SUM(number_deaths), SUM(damage_millions_USD) FROM storm WHERE max_speed > (SELECT AVG(max_speed) FROM storm) \nA: Return the total number of deaths and total damange in millions for storms that had a max speed greater than the average. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT SUM(total_pounds) FROM purchase AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T2.city = 'London' AND T1.year = 2018 \nA: How many total pounds were purchased in the year 2018 at all London branches? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT Builder, COUNT(*) FROM railway GROUP BY Builder \nA: Show different builders of railways, along with the corresponding number of railways using each builder. \n Additional table information: table: railway"} -{"text": "Q: SELECT Gender, Occupation FROM player \nA: What are the gender and occupation of players? \n Additional table information: table: riding_club"} -{"text": "Q: SELECT station_id, LOCATION, manager_name FROM gas_station ORDER BY open_year NULLS FIRST \nA: What are the gas station ids, locations, and manager names for the gas stations ordered by opening year? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = 'Indonesia' \nA: Who are the players from Indonesia? \n Additional table information: table: match_season"} -{"text": "Q: 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 \nA: Give me a list of cities whose temperature in Feb is higher than that in Jun or cities that were once host cities? \n Additional table information: table: city_record"} -{"text": "Q: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY SUM(T2.amount) NULLS FIRST \nA: List the name of all different customers who have some loan sorted by their total loan amount. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT product_details FROM products WHERE product_details LIKE '%Latte%' OR product_details LIKE '%Americano%' \nA: Find the detail of products whose detail contains the word 'Latte' or the word 'Americano' \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT Product_Name FROM Products ORDER BY Product_Price DESC LIMIT 1 \nA: What is the name of the product with the highest price? \n Additional table information: table: solvency_ii"} -{"text": "Q: SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T2.dept_name = 'Accounting' OR T2.dept_name = 'Biology' \nA: What is the number of professors who are in the Accounting or Biology departments? \n Additional table information: table: college_1"} -{"text": "Q: SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1 \nA: Return the name of the mountain with the greatest height. \n Additional table information: table: climbing"} -{"text": "Q: SELECT dept_name, building FROM department ORDER BY budget DESC \nA: List the names and buildings of all departments sorted by the budget from large to small. \n Additional table information: table: college_2"} -{"text": "Q: SELECT party_name FROM party WHERE NOT party_id IN (SELECT party_id FROM Member) \nA: Show names of parties that does not have any members. \n Additional table information: table: party_people"} -{"text": "Q: SELECT customer_id, customer_first_name FROM Customers EXCEPT SELECT T1.customer_id, T2.customer_first_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE card_type_code = 'Credit' \nA: Show the customer ids and firstname without a credit card. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT AVG(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = 'Robinson R-22' \nA: What is the average total number of passengers for all airports that the aircraft 'Robinson R-22' visits? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT t2.product_details FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which product has been ordered most number of times? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT name FROM member WHERE NOT member_id IN (SELECT member_id FROM membership_register_branch) \nA: Show member names without any registered branch. \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' \nA: What is the average age of the members of the club 'Bootup Baltimore'? \n Additional table information: table: club_1"} -{"text": "Q: SELECT MAX(Weeks_on_Top), MIN(Weeks_on_Top) FROM volume \nA: What are the maximum and minimum week on top of all volumes? \n Additional table information: table: music_4"} -{"text": "Q: SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1 \nA: List the name of film studio that have the most number of films. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT COUNT(*) FROM user_profiles \nA: How many users are there? \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT MAX(product_price), MIN(product_price), product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code NULLS FIRST \nA: What are the highest and lowest prices of products, grouped by and alphabetically ordered by product type? \n Additional table information: table: department_store"} -{"text": "Q: SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%' \nA: What are the first names for students who have an 'a' in their first name? \n Additional table information: table: college_3"} -{"text": "Q: SELECT MAX(monthly_rental), MIN(monthly_rental) FROM Student_Addresses \nA: Find the maximum and minimum monthly rental for all student addresses. \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = 'game1' \nA: What is the name of the tourist attraction that is associated with the photo 'game1'? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%' \nA: Find the name of rooms booked by some customers whose first name contains ROY. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT T3.Name, T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID \nA: What are the names of technicians and the machine series that they repair? \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = 'Daan' AND T4.last_name = 'Peeters' \nA: List all tracks bought by customer Daan Peeters. \n Additional table information: table: store_1"} -{"text": "Q: SELECT District_name, City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000 \nA: What are the district names and city populations for all districts that between 200,000 and 2,000,000 residents? \n Additional table information: table: store_product"} -{"text": "Q: SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY COUNT(*) NULLS FIRST LIMIT 5 \nA: Return the first names of the 5 staff members who have handled the most complaints. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT COUNT(*) FROM artist WHERE country = 'Bangladesh' \nA: How many artists are from Bangladesh? \n Additional table information: table: music_1"} -{"text": "Q: SELECT T2.department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY T2.department_name \nA: display the department name and number of employees in each of the department. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT COUNT(*) FROM Ref_budget_codes \nA: Count the number of budget codes. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT COUNT(*) FROM Person WHERE age > (SELECT MAX(age) FROM person WHERE job = 'engineer') \nA: How many people are older than every engineer? \n Additional table information: table: network_2"} -{"text": "Q: SELECT SUM(Amount_Settled) FROM Settlements \nA: Compute the total amount of settlement across all the settlements. \n Additional table information: table: insurance_policies"} -{"text": "Q: 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%' \nA: Give the ids of documents that have expenses and contain the letter s in their names. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT COUNT(*) FROM Restaurant JOIN Type_Of_Restaurant ON Restaurant.ResID = Type_Of_Restaurant.ResID JOIN Restaurant_Type ON Type_Of_Restaurant.ResTypeID = Restaurant_Type.ResTypeID GROUP BY Type_Of_Restaurant.ResTypeID HAVING Restaurant_Type.ResTypeName = 'Sandwich' \nA: How many restaurant is the Sandwich type restaurant? \n Additional table information: table: restaurant_1"} -{"text": "Q: SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = 'catnip' \nA: Give the color description for the product 'catnip'. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT Party FROM party WHERE NOT Party_ID IN (SELECT Party FROM election) \nA: Which parties did not have any delegates in elections? \n Additional table information: table: election"} -{"text": "Q: SELECT MAX(T1.stars), T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT MAX(YEAR) FROM Movie) \nA: What is the maximum stars and year for the most recent movie? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT DISTINCT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 1 EXCEPT SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'OTHA' AND T2.lastname = 'MOYER' \nA: Find all first-grade students who are NOT taught by OTHA MOYER. Report their first and last names. \n Additional table information: table: student_1"} -{"text": "Q: SELECT COUNT(*) FROM region \nA: How many regions do we have? \n Additional table information: table: party_people"} -{"text": "Q: SELECT T2.Birth_Date, T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC LIMIT 1 \nA: What are the birth date and birth place of the body builder with the highest total points? \n Additional table information: table: body_builder"} -{"text": "Q: SELECT t1.customer_name, t1.customer_phone FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California' \nA: Find the names and phone numbers of customers living in California state. \n Additional table information: table: customer_deliveries"} -{"text": "Q: 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 \nA: What is the project id and detail for the project with at least two documents? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT COUNT(*) FROM gymnast \nA: Count the number of gymnasts. \n Additional table information: table: gymnast"} -{"text": "Q: SELECT DISTINCT T1.supplier_name, T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id = T2.supplier_id JOIN products AS T3 ON T2.product_id = T3.product_id WHERE T3.product_name = 'red jeans' \nA: What are the distinct names and phone numbers for suppliers who have red jeans? \n Additional table information: table: department_store"} -{"text": "Q: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = 'Rock' OR T1.name = 'Jazz' \nA: What are the names of the tracks that are Rock or Jazz songs? \n Additional table information: table: store_1"} -{"text": "Q: SELECT Status FROM roller_coaster GROUP BY Status HAVING COUNT(*) > 2 \nA: List the status shared by more than two roller coaster. \n Additional table information: table: roller_coaster"} -{"text": "Q: SELECT Studio FROM film WHERE Director = 'Nicholas Meyer' INTERSECT SELECT Studio FROM film WHERE Director = 'Walter Hill' \nA: Show the studios that have produced films with director 'Nicholas Meyer' and 'Walter Hill'. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1 \nA: List the most common result of the musicals. \n Additional table information: table: musical"} -{"text": "Q: SELECT T2.Name, T1.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID \nA: Show the names of roller coasters and names of country they are in. \n Additional table information: table: roller_coaster"} -{"text": "Q: SELECT COUNT(*) FROM address WHERE district = 'California' \nA: Count the number of addressed in the California district. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT SUM(budget) FROM department WHERE dept_name = 'Marketing' OR dept_name = 'Finance' \nA: What is the sum of budgets of the Marketing and Finance departments? \n Additional table information: table: college_2"} -{"text": "Q: SELECT product_id, product_type_code FROM products ORDER BY product_price NULLS FIRST LIMIT 1 \nA: What are the product id and product type of the cheapest product? \n Additional table information: table: department_store"} -{"text": "Q: SELECT COUNT(DISTINCT Team) FROM match_season \nA: How many distinct teams are involved in match seasons? \n Additional table information: table: match_season"} -{"text": "Q: SELECT origin FROM Flight GROUP BY origin ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which origin has most number of flights? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height ASC NULLS FIRST \nA: List the names of gymnasts in ascending order by their heights. \n Additional table information: table: gymnast"} -{"text": "Q: SELECT t1.address, t1.shop_id FROM shop AS t1 JOIN happy_hour AS t2 ON t1.shop_id = t2.shop_id WHERE MONTH = 'May' \nA: What are the id and address of the shops which have a happy hour in May? \n Additional table information: table: coffee_shop"} -{"text": "Q: SELECT amount, donator_name FROM endowment ORDER BY amount DESC LIMIT 1 \nA: List the amount and donor name for the largest amount of donation. \n Additional table information: table: school_finance"} -{"text": "Q: SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1 \nA: What is the highest acc percent score in the competition? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT T1.FacID, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID \nA: Show the faculty id of each faculty member, along with the number of students he or she advises. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT T2.first_name, T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id \nA: what are the first name and last name of all candidates? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform \nA: Please show different software platforms and the corresponding number of devices using each. \n Additional table information: table: device"} -{"text": "Q: SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = 'San Francisco State University' AND t1.year = 2000 \nA: What is the campus fee of 'San Francisco State University' in year 2000? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT customer_phone FROM available_policies WHERE policy_type_code = 'Life Insurance' \nA: What are the customer phone numbers under the policy 'Life Insurance'? \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: What country is the artist who made the fewest songs from? \n Additional table information: table: music_1"} -{"text": "Q: SELECT StuID FROM Student WHERE age > 20 \nA: What are the student ids for students over 20 years old? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT COUNT(*), building FROM classroom WHERE capacity > 50 GROUP BY building \nA: How many rooms in each building have a capacity of over 50? \n Additional table information: table: college_2"} -{"text": "Q: SELECT AVG(T1.price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name \nA: Find the average prices of all products from each manufacture, and list each company's name. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT MAX(Population), MIN(Population) FROM county \nA: What are the maximum and minimum population of the counties? \n Additional table information: table: election"} -{"text": "Q: SELECT AVG(Price), AVG(Score), Appelation FROM WINE GROUP BY Appelation \nA: What are the average price and score of wines grouped by appelation? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT Name, Nationality FROM HOST ORDER BY Age DESC LIMIT 1 \nA: What are the name and the nationality of the host of the highest age? \n Additional table information: table: party_host"} -{"text": "Q: SELECT T2.title, T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars > (SELECT AVG(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.director = 'James Cameron') \nA: What are the titles and directors of the movies whose star is greater than the average stars of the movies directed by James Cameron? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT Country FROM market ORDER BY Number_cities DESC \nA: What are the countries for each market ordered by decreasing number of cities? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT T1.season, T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.injury = 'Foot injury' OR T3.injury = 'Knee problem' \nA: In which season and which stadium did any player have an injury of 'Foot injury' or 'Knee problem'? \n Additional table information: table: game_injury"} -{"text": "Q: SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student \nA: What are the ids of the faculty members who do not advise any student. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT product FROM product WHERE max_page_size = 'A4' OR pages_per_minute_color < 5 \nA: What are the products with the maximum page size eqal to A4 or a pages per minute color less than 5? \n Additional table information: table: store_product"} -{"text": "Q: SELECT AVG(budget_million), MAX(budget_million), MIN(budget_million) FROM movie WHERE YEAR < 2000 \nA: Return the average, maximum, and minimum budgets in millions for movies made before the year 2000. \n Additional table information: table: culture_company"} -{"text": "Q: SELECT T1.first_name, T1.last_name FROM customer AS T1 JOIN rental AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.rental_date ASC NULLS FIRST LIMIT 1 \nA: What is the first name and the last name of the customer who made the earliest rental? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T3.forename, T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Australian Grand Prix' EXCEPT SELECT T3.forename, T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Chinese Grand Prix' \nA: What are the forenames and surnames of drivers who participated in the races named Australian Grand Prix but not the races named Chinese Grand Prix? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT email_address FROM Students WHERE first_name = 'Emma' AND last_name = 'Rohan' \nA: What is the email of the student with first name 'Emma' and last name 'Rohan'? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT COUNT(*) FROM Customers_cards WHERE card_type_code = 'Debit' \nA: How many debit cards do we have? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT rank FROM captain GROUP BY rank ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the rank for which there are the fewest captains. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT t2.product_details, t2.product_id FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY SUM(t1.order_quantity) NULLS FIRST LIMIT 1 \nA: Find the name and ID of the product whose total order quantity is the largest. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Rock' \nA: What is the average unit price of rock tracks? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING COUNT(*) >= 2 \nA: Show all storm names except for those with at least two affected regions. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT COUNT(DISTINCT city) FROM airports WHERE country = 'Greenland' \nA: In how many cities are there airports in the country of Greenland? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT title FROM Movie WHERE YEAR = (SELECT MAX(YEAR) FROM Movie) \nA: What is the title of the newest movie? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE shipping_method_code = 'FedEx' AND order_status_code = 'Paid' \nA: Show the names of customers having an order with shipping method FedEx and order status Paid. \n Additional table information: table: customers_campaigns_ecommerce"} -{"text": "Q: 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 \nA: What are the GDP and population of the city that already served as a host more than once? \n Additional table information: table: city_record"} -{"text": "Q: SELECT COUNT(*) FROM employees WHERE country = 'Canada' \nA: How many employees are living in Canada? \n Additional table information: table: store_1"} -{"text": "Q: SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' OR T3.name = 'Psychiatry' \nA: Find the name of physicians who are affiliated with Surgery or Psychiatry department. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT match_id FROM MATCH WHERE competition = '1994 FIFA World Cup qualification' \nA: What is the match id of the competition called '1994 FIFA World Cup qualification'? \n Additional table information: table: city_record"} -{"text": "Q: SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students \nA: Find the common personal name of course authors and students. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT Price FROM WINE WHERE YEAR < 2010 \nA: What are the prices of wines produced before the year of 2010? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT Nickname FROM school_details WHERE Division <> 'Division 1' \nA: What are the nicknames of schools whose division is not 1? \n Additional table information: table: school_player"} -{"text": "Q: SELECT COUNT(DISTINCT source_system_code) FROM CMI_cross_references \nA: How many different source system code for the cmi cross references are there? \n Additional table information: table: local_govt_mdm"} -{"text": "Q: SELECT product_category_code, typical_buying_price FROM products WHERE product_name = 'cumin' \nA: Return the category code and typical price of 'cumin'. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT COUNT(*) FROM Ref_calendar \nA: Count the number of all the calendar items. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT AVG(HS) FROM Player \nA: How many hours do the players train on average? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT T2.name, T2.location FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id HAVING COUNT(*) = 1 \nA: Show the name and location of track with 1 race. \n Additional table information: table: race_track"} -{"text": "Q: SELECT T2.customer_first_name, T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = '900' \nA: What are the full names of customers with the account name 900? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop' \nA: What are the instruments are used in the song 'Le Pop'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1 \nA: What is the phone number of the customer who has filed the most recent complaint? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_Staff WHERE role_code = 'researcher') \nA: List the project details of the projects which did not hire any staff for a researcher role. \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT DISTINCT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.name = 'Thesisin' \nA: List the names of all the physicians who prescribe Thesisin as medication. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC \nA: List the total points of gymnasts in descending order. \n Additional table information: table: gymnast"} -{"text": "Q: SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC \nA: What are the companies of entrepreneurs, ordered descending by amount of money requested? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT COUNT(*) FROM ref_colors \nA: How many colors are there? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC NULLS FIRST LIMIT 1 \nA: Of all the claims, what was the earliest date when any claim was made? \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT product_id, product_name FROM products WHERE product_price < 600 OR product_price > 900 \nA: What are id and name of the products whose price is lower than 600 or higher than 900? \n Additional table information: table: department_store"} -{"text": "Q: SELECT T2.lname, T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.SportName = 'Football' OR T1.SportName = 'Lacrosse' \nA: Find the last and first name of students who are playing Football or Lacrosse. \n Additional table information: table: game_1"} -{"text": "Q: SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = 'Uganda' \nA: Show the times used by climbers to climb mountains in Country Uganda. \n Additional table information: table: climbing"} -{"text": "Q: SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Latin' OR T1.Name = 'Pop' \nA: Find the average millisecond length of Latin and Pop tracks. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT order_item_id FROM order_items WHERE product_id = 11 \nA: Find the ids of all the order items whose product id is 11. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT AVG(product_price) FROM products) \nA: What are the ids of products from the supplier with id 2, which are more expensive than the average price across all products? \n Additional table information: table: department_store"} -{"text": "Q: SELECT title, director FROM film WHERE NOT film_id IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.Market_ID WHERE country = 'China') \nA: Return the titles and directors of films that were never in the market of China. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT catalog_entry_name, capacity FROM Catalog_Contents WHERE price_in_dollars > 700 \nA: Which catalog contents has price above 700 dollars? Show their catalog entry names and capacities. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT major FROM Student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which major has most number of students? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT COUNT(*) FROM Faculty \nA: How many faculty do we have? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT Other_Details FROM LOCATIONS WHERE Location_Name = 'UK Gallery' \nA: Return the detail of the location named 'UK Gallery'. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT Title FROM ALBUM ORDER BY Title NULLS FIRST \nA: What are all the album titles, in alphabetical order? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3 \nA: Which teams had more than 3 eliminations? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500 \nA: Find the official names of cities with population bigger than 1500 or smaller than 500. \n Additional table information: table: farm"} -{"text": "Q: 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) \nA: What are the SSN and names of scientists working on the project with the most hours? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT customer_name, customer_phone, payment_method_code FROM customers ORDER BY customer_number DESC \nA: Show the name, phone, and payment method code for all customers in descending order of customer number. \n Additional table information: table: customers_and_products_contacts"} -{"text": "Q: SELECT document_name FROM documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 3 INTERSECT SELECT document_name FROM documents GROUP BY document_structure_code ORDER BY COUNT(*) DESC LIMIT 3 \nA: Find the list of documents that are both in the most three popular type and have the most three popular structure. \n Additional table information: table: document_management"} -{"text": "Q: SELECT district FROM address GROUP BY district HAVING COUNT(*) >= 2 \nA: Give the districts which have two or more addresses. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT director FROM Movie WHERE director <> 'null' GROUP BY director HAVING COUNT(*) = 1 \nA: What are the names of the directors who made exactly one movie excluding director NULL? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT headquarters FROM company WHERE main_industry = 'Banking' GROUP BY headquarters HAVING COUNT(*) >= 2 \nA: What are the headquarters with at least two companies in the banking industry? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote INTERSECT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = '8741' \nA: Find the distinct last names of all the students who have president votes and whose advisor is 8741. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT fname, lname FROM authors ORDER BY lname NULLS FIRST \nA: Retrieve all the first and last names of authors in the alphabetical order of last names. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT image_name, image_url FROM images ORDER BY image_name NULLS FIRST \nA: List all the image name and URLs in the order of their names. \n Additional table information: table: document_management"} -{"text": "Q: SELECT T1.Season, T1.Player, T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id \nA: Show the season, the player, and the name of the team that players belong to. \n Additional table information: table: match_season"} -{"text": "Q: SELECT asset_make, asset_model, asset_details FROM Assets ORDER BY asset_disposed_date ASC NULLS FIRST \nA: List the all the assets make, model, details by the disposed date ascendingly. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT COUNT(*) FROM Student \nA: How many students are there? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Demon Kitty Rag' \nA: Find the number of vocal types used in song 'Demon Kitty Rag'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number = t2.catalog_level_number ORDER BY t1.price_in_dollars NULLS FIRST LIMIT 1 \nA: Find the level name of the catalog with the lowest price (in USD). \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = 'mp3' INTERSECT SELECT song_name FROM song WHERE resolution < 1000 \nA: Return the names of songs for which format is mp3 and resolution is below 1000. \n Additional table information: table: music_1"} -{"text": "Q: SELECT CName FROM COURSE WHERE Credits = 1 \nA: List all names of courses with 1 credit? \n Additional table information: table: college_3"} -{"text": "Q: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker' \nA: Find the states of the colleges that have students in the tryout who played in striker position. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE stageposition = 'back' GROUP BY lastname ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the last name of the musicians who has played back position the most? \n Additional table information: table: music_2"} -{"text": "Q: SELECT COUNT(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Dayana Robel' \nA: Count the total number of policies used by the customer named 'Dayana Robel'. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT cloud_cover FROM weather WHERE zip_code = 94107 GROUP BY cloud_cover ORDER BY COUNT(*) DESC LIMIT 3 \nA: What are the 3 most common cloud covers in the zip code of 94107? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T1.County_name, COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id \nA: For each county, find the name of the county and the number of delegates from that county. \n Additional table information: table: election"} -{"text": "Q: SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3 \nA: What are the different ranges of the 3 mountains with the highest prominence? \n Additional table information: table: climbing"} -{"text": "Q: SELECT Team FROM player ORDER BY Team ASC NULLS FIRST \nA: What are the teams of the players, sorted in ascending alphabetical order? \n Additional table information: table: school_player"} -{"text": "Q: SELECT T1.name_full, T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: what is the full name and id of the college with the largest number of baseball players? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID WHERE T2.value_points > 70 \nA: What are the names of the technicians that are assigned to repair machines with more point values than 70? \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which marketing region has the most drama workshop groups? Give me the region code. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT T1.City_Town FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Store_Name = 'FJA Filming' \nA: Which city is the address of the store named 'FJA Filming' located in? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT COUNT(*), Grape FROM WINE GROUP BY Grape \nA: What are the numbers of wines for different grapes? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT MIN(age), MAX(age), AVG(age) FROM people \nA: Show the minimum, maximum, and average age for all people. \n Additional table information: table: wedding"} -{"text": "Q: SELECT COUNT(*) FROM addresses WHERE state_province_county = 'Colorado' \nA: Count the number of cities in the state of Colorado. \n Additional table information: table: e_government"} -{"text": "Q: SELECT COUNT(*), T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director \nA: For each director, how many reviews have they received? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT age, COUNT(*) FROM Student GROUP BY age \nA: Show all ages and corresponding number of students. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT COUNT(*), T1.dormid FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid WHERE T1.student_capacity > 100 GROUP BY T1.dormid \nA: For each dorm, how many amenities does it have? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T1.pName, T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' \nA: What are the names of all the players who received a yes during tryouts, and also what are the names of their colleges? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = 'USA' GROUP BY billing_state \nA: List the number of invoices from the US, grouped by state. \n Additional table information: table: store_1"} -{"text": "Q: SELECT T1.property_id, COUNT(*) FROM properties AS T1 JOIN residents AS T2 ON T1.property_id = T2.property_id GROUP BY T1.property_id \nA: How many residents does each property have? List property id and resident count. \n Additional table information: table: local_govt_and_lot"} -{"text": "Q: SELECT T1.teacher_id, T2.first_name FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id GROUP BY T1.teacher_id ORDER BY COUNT(*) DESC LIMIT 3 \nA: Find the ids and first names of the 3 teachers that have the most number of assessment notes? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT AVG(enrollment), MAX(enrollment), MIN(enrollment) FROM school \nA: Show the average, maximum, minimum enrollment of all schools. \n Additional table information: table: school_finance"} -{"text": "Q: SELECT stu_fname, stu_lname, stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1 \nA: What is the first and last name of the youngest student with a GPA above 3, and what is their GPA? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T1.project_details, T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the details and id of the project with the most outcomes? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 UNION SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010 \nA: Find courses that ran in Fall 2009 or in Spring 2010. \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*) FROM addresses WHERE state_province_county = 'Colorado' \nA: How many cities are there in state 'Colorado'? \n Additional table information: table: e_government"} -{"text": "Q: SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500 \nA: What are the official names of cities that have population over 1500 or less than 500? \n Additional table information: table: farm"} -{"text": "Q: SELECT clubdesc FROM club WHERE clubname = 'Tennis Club' \nA: Find the description of the club called 'Tennis Club'. \n Additional table information: table: club_1"} -{"text": "Q: SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id = t2.campus WHERE t2.faculty >= 600 AND t2.faculty <= 1000 AND T1.year = 2004 \nA: What are the campuses that had between 600 and 1000 faculty members in 2004? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' INTERSECT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room' \nA: What is the name of the dorm with both a TV Lounge and Study Room listed as amenities? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT f_id FROM files WHERE formats = 'mp4' UNION SELECT f_id FROM song WHERE resolution > 720 \nA: What are the ids of songs that are available in either mp4 format or have resolution above 720? \n Additional table information: table: music_1"} -{"text": "Q: SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%' \nA: display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT COUNT(DISTINCT state) FROM bank \nA: Find the number of different states which banks are located at. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT COUNT(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Eric' AND t3.lname = 'Tai' \nA: How many clubs does the student named 'Eric Tai' belong to? \n Additional table information: table: club_1"} -{"text": "Q: SELECT Name FROM mountain ORDER BY Name ASC NULLS FIRST \nA: Give the names of mountains in alphabetical order. \n Additional table information: table: climbing"} -{"text": "Q: SELECT T1.fault_description, T2.fault_status FROM Fault_Log AS T1 JOIN Fault_Log_Parts AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id \nA: What are all the fault descriptions and the fault status of all the faults recoreded in the logs? \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT T1.title FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING COUNT(*) = 2 \nA: Find the title of courses that have two prerequisites? \n Additional table information: table: college_2"} -{"text": "Q: SELECT T2.name, COUNT(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id \nA: How many exhibitions has each artist had? \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT dorm_name, gender FROM dorm WHERE student_capacity > 300 OR student_capacity < 100 \nA: What are the names and types of the dorms that have a capacity greater than 300 or less than 100? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 5 \nA: Find the names of the products with length smaller than 3 or height greater than 5. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT Date, Vote_Percent FROM election \nA: List the dates and vote percents of elections. \n Additional table information: table: election_representative"} -{"text": "Q: SELECT T2.first_name, T2.last_name FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.address_id WHERE T1.state_province_county = 'Wisconsin' \nA: What are the first names and last names of students with address in Wisconsin state? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims) \nA: Return the claim start date for the claims whose claimed amount is no more than the average \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT SUM(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000 \nA: Count the total number of games the team Boston Red Stockings attended from 1990 to 2000. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT COUNT(*) FROM customers WHERE city = 'Prague' \nA: How many customers live in the city of Prague? \n Additional table information: table: store_1"} -{"text": "Q: SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50 \nA: Which parties have hosts of age above 50? Give me the party locations. \n Additional table information: table: party_host"} -{"text": "Q: SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the customer id of the customer with the most accounts, and how many accounts does this person have? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1 \nA: Find the id of the appointment with the most recent start date? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Zach' AND T2.year = (SELECT MAX(YEAR) FROM PersonFriend WHERE name = 'Zach') \nA: What is the age of the friend of Zach with longest year relationship? \n Additional table information: table: network_2"} -{"text": "Q: SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID \nA: What are the names of entrepreneurs? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa' \nA: Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa. \n Additional table information: table: sakila_1"} -{"text": "Q: 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 \nA: 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. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = 'City Mall' INTERSECT SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = 'Village Store' \nA: What are the names of the districts that have both mall and village store style shops? \n Additional table information: table: store_product"} -{"text": "Q: SELECT CLASS FROM captain GROUP BY CLASS HAVING COUNT(*) > 2 \nA: Which classes have more than two captains? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM entrepreneur) \nA: List the names of people that are not entrepreneurs. \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed \nA: Show the ids of all employees who have destroyed a document. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid JOIN lives_in AS T4 ON T4.dormid = T1.dormid JOIN student AS T5 ON T5.stuid = T4.stuid WHERE T5.lname = 'Smith' \nA: What are the amenities in the dorm that a student who has the last name of Smith lives in? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT physician, department FROM affiliated_with WHERE primaryaffiliation = 1 \nA: List the physicians' employee ids together with their primary affiliation departments' ids. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT DISTINCT detention_type_code FROM Detention \nA: Return all distinct detention type codes. \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT roomName, bedType FROM Rooms WHERE decor = 'traditional' \nA: What are the bed type and name of all the rooms with traditional decor? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT name, CLASS, rank FROM captain \nA: What are the names, classes, and ranks of all captains? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT Comptroller, COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which people severed as comptroller most frequently? Give me the name of the person and the frequency count. \n Additional table information: table: election"} -{"text": "Q: SELECT transaction_id FROM TRANSACTIONS WHERE transaction_type_code = 'PUR' \nA: Show all transaction ids with transaction code 'PUR'. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT DISTINCT payment_method FROM customers \nA: Return all the distinct payment methods used by customers. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT Title FROM book ORDER BY Issues ASC NULLS FIRST \nA: List the titles of the books in ascending order of issues. \n Additional table information: table: book_2"} -{"text": "Q: SELECT T2.Name, T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'White' \nA: What are the names and scores of wines that are made of white color grapes? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION <> 'East' \nA: List the distinct police forces of counties whose location is not on east side. \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT COUNT(*), classroom FROM list GROUP BY classroom \nA: Find the number of students in one classroom. \n Additional table information: table: student_1"} -{"text": "Q: SELECT Support_rate, Consider_rate, Oppose_rate FROM candidate ORDER BY unsure_rate NULLS FIRST \nA: Please list support, consider, and oppose rates for each candidate in ascending order by unsure rate. \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT phone_number FROM customers UNION SELECT phone_number FROM staff \nA: Find the phone number of all the customers and staff. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT date, max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f NULLS FIRST LIMIT 1 \nA: What are the days that had the smallest temperature range, and what was that range? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT SUM(revenue), name FROM manufacturers GROUP BY name \nA: What is the total revenue of each manufacturer? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT date_stored FROM All_documents WHERE Document_name = 'Marry CV' \nA: When was the document named 'Marry CV' stored? Give me the date. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT name FROM Person WHERE gender = 'male' AND age = (SELECT MIN(age) FROM person WHERE gender = 'male') \nA: What is the name of the youngest male? \n Additional table information: table: network_2"} -{"text": "Q: SELECT COUNT(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id WHERE T2.account_name = '337' \nA: Count the number of financial transactions that the account with the name 337 has. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Badlands' \nA: How many different instruments are used in the song 'Badlands'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT COUNT(*) FROM postseason WHERE YEAR = 1885 AND ties = 1 \nA: Find the number of tied games (the value of 'ties' is '1') in 1885 postseason. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT AVG(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University' \nA: Find the average height of the players who belong to the college called 'Yale University'. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT apt_type_code, COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC NULLS FIRST \nA: Return each apartment type code with the number of apartments having that apartment type, in ascending order of the number of apartments. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT Nationality, COUNT(*) FROM pilot GROUP BY Nationality \nA: What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality. \n Additional table information: table: pilot_record"} -{"text": "Q: SELECT COUNT(*), class_room FROM CLASS GROUP BY class_room HAVING COUNT(*) >= 2 \nA: Find the number of classes offered for all class rooms that held at least 2 classes. \n Additional table information: table: college_1"} -{"text": "Q: 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' \nA: Which customers have both 'On Road' and 'Shipped' as order status? List the customer names. \n Additional table information: table: tracking_orders"} -{"text": "Q: 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 \nA: Find the name of the customer who made the most orders. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT other_account_details FROM Accounts WHERE account_name = '338' \nA: What are the other account details for the account with the name 338? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT Date_Claim_Made, Date_Claim_Settled FROM Claims WHERE Amount_Claimed > (SELECT AVG(Amount_Claimed) FROM Claims) \nA: Give me the claim date, settlement date for all the claims whose claimed amount is larger than the average. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the location shared by most counties? \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20 \nA: Show the ids for all the students who participate in an activity and are under 20. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Bob' \nA: Who are the friends of Bob? \n Additional table information: table: network_2"} -{"text": "Q: SELECT T2.Fname, T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the first and last name of the student who played the most sports? \n Additional table information: table: game_1"} -{"text": "Q: SELECT name, origin, OWNER FROM program \nA: What are the name, origin and owner of each program? \n Additional table information: table: program_share"} -{"text": "Q: SELECT T1.Product_Name FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name HAVING COUNT(*) >= 2 \nA: Show the names of products that are in at least two events. \n Additional table information: table: solvency_ii"} -{"text": "Q: SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = 'hot' \nA: Count the number of products with the 'hot' charactersitic. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT name FROM program ORDER BY launch NULLS FIRST \nA: What is the list of program names, sorted by the order of launch date? \n Additional table information: table: program_share"} -{"text": "Q: SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Which allergy type is the least common? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT Employees.employee_name, COUNT(*) FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id GROUP BY Circulation_History.document_id, Circulation_History.draft_number, Circulation_History.copy_number ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which employee has showed up in most circulation history documents. List the employee's name and the number of drafts and copies. \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT COUNT(DISTINCT eid) FROM Certificate \nA: What is the count of distinct employees with certificates? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT COUNT(*), SUM(student_capacity), gender FROM dorm GROUP BY gender \nA: How many dorms are there and what is the total capacity for each gender? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Tennis Club' \nA: Count the members of the club 'Tennis Club'. \n Additional table information: table: club_1"} -{"text": "Q: SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211' \nA: What are the total number of students enrolled in ACCT-211? \n Additional table information: table: college_1"} -{"text": "Q: SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000 \nA: What are the names of mountains that have a height of over 5000 or a prominence of over 1000? \n Additional table information: table: climbing"} -{"text": "Q: SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating > (SELECT AVG(rating) FROM review) \nA: Find the titles of items whose rating is higher than the average review rating of all items. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Contracts AS T2 ON T1.company_id = T2.maintenance_contract_company_id JOIN Ref_Company_Types AS T3 ON T1.company_type_code = T3.company_type_code ORDER BY T2.contract_end_date DESC LIMIT 1 \nA: What is the description of the type of the company who concluded its contracts most recently? \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001 \nA: What were all the salary values of players in 2010 and 2001? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT AVG(Working_Horses) FROM farm WHERE Total_Horses > 5000 \nA: Give the average number of working horses on farms with more than 5000 total horses. \n Additional table information: table: farm"} -{"text": "Q: SELECT director FROM Movie WHERE title = 'Avatar' \nA: Who is the director of movie Avatar? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t3.order_quantity = (SELECT MAX(order_quantity) FROM order_items) \nA: What is the name of the customer that made the order with the largest quantity? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT customer_phone FROM available_policies WHERE policy_type_code = (SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1) \nA: What are all the customer phone numbers under the most popular policy type? \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id \nA: Find distinct cities of addresses of people? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT COUNT(*) FROM student \nA: How many students exist? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT campus FROM degrees GROUP BY campus ORDER BY SUM(degrees) DESC LIMIT 1 \nA: What campus has the most degrees conferrred over its entire existence? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT Name FROM actor ORDER BY Name ASC NULLS FIRST \nA: What are the names of actors, ordered alphabetically? \n Additional table information: table: musical"} -{"text": "Q: SELECT COUNT(*) FROM invoices WHERE billing_city = 'Chicago' AND billing_state = 'IL' \nA: How many invoices were billed from Chicago, IL? \n Additional table information: table: store_1"} -{"text": "Q: SELECT T2.address_id, T1.zip_postcode FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id ORDER BY monthly_rental DESC LIMIT 1 \nA: What are the id and zip code of the address with the highest monthly rental? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Heathrow' INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Gatwick' \nA: What are the names of all aircrafts that are associated with both London Heathrow and Gatwick airports? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT Character, Duration FROM actor \nA: What are the characters and duration of actors? \n Additional table information: table: musical"} -{"text": "Q: SELECT t2.firstname FROM Performance AS t1 JOIN Band AS t2 ON t1.bandmate = t2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY firstname ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the first name of the band mate that has performed in most songs. \n Additional table information: table: music_2"} -{"text": "Q: SELECT DISTINCT name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE ratingDate = 'null' \nA: What are the different names of all reviewers whose ratings do not have a date field? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE enroll_grade = 'C' \nA: What are the first names of all students who got a grade C in a class? \n Additional table information: table: college_1"} -{"text": "Q: SELECT SUM(stu_hrs), dept_code FROM student GROUP BY dept_code \nA: Find the total number of hours have done for all students in each department. \n Additional table information: table: college_1"} -{"text": "Q: SELECT address FROM member WHERE age < 30 INTERSECT SELECT address FROM member WHERE age > 40 \nA: Which address has both members younger than 30 and members older than 40? \n Additional table information: table: coffee_shop"} -{"text": "Q: SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.sex = 'F' GROUP BY t1.clubname ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which club has the most female students as their members? Give me the name of the club. \n Additional table information: table: club_1"} -{"text": "Q: SELECT billing_country, COUNT(*) FROM invoices GROUP BY billing_country ORDER BY COUNT(*) DESC LIMIT 5 \nA: What are the top 5 countries by number of invoices and how many do they have? \n Additional table information: table: store_1"} -{"text": "Q: SELECT Name FROM editor WHERE Age = 24 OR Age = 25 \nA: Show the names of editors of age either 24 or 25. \n Additional table information: table: journal_committee"} -{"text": "Q: SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Badlands' \nA: What are the vocal types used in song 'Badlands'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT phone FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards' \nA: What is employee Nancy Edwards's phone number? \n Additional table information: table: store_1"} -{"text": "Q: SELECT COUNT(*) FROM Companies \nA: How many companies are there? \n Additional table information: table: company_office"} -{"text": "Q: SELECT T3.name, T2.title, T1.stars, T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID ORDER BY T3.name NULLS FIRST, T2.title NULLS FIRST, T1.stars NULLS FIRST \nA: What is the reviewer name, film title, movie rating, and rating date for every movie ordered by reviewer name, movie title, then finally rating? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT COUNT(*), T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which product has the most problems? Give me the number of problems and the product name. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT name FROM captain ORDER BY age NULLS FIRST LIMIT 1 \nA: Return the name of the youngest captain. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT COUNT(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code = T2.dept_code WHERE dept_name = 'Computer Info. Systems' \nA: How many courses does the department of Computer Information Systmes offer? \n Additional table information: table: college_1"} -{"text": "Q: SELECT circuitid, LOCATION FROM circuits WHERE country = 'France' OR country = 'Belgium' \nA: What are the ids and locations of all circuits in France or Belgium? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T1.product_name, T2.color_description, T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code = T2.color_code WHERE product_category_code = 'Herbs' \nA: List the names, color descriptions and product descriptions of products with category 'Herbs'. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID WHERE T1.White > 90 \nA: Show the crime rate of counties with a city having white percentage more than 90. \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT T1.course_name, T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = 'Computer Science' \nA: Find the names and descriptions of courses that belong to the subject named 'Computer Science'. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT COUNT(*), T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year \nA: What is the number of wins the team Boston Red Stockings got in the postseasons each year in history? \n Additional table information: table: baseball_1"} -{"text": "Q: 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 \nA: Find the maximum price of wins from the appelations in Central Coast area and produced before the year of 2005. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT T1.custid, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT MAX(balance) FROM checking) \nA: Find the name and id of accounts whose checking balance is below the maximum checking balance. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1 \nA: Find the GDP of the city with the largest regional population. \n Additional table information: table: city_record"} -{"text": "Q: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = 'Matthias' AND t1.lname = 'Blume' \nA: Which institution is the author 'Matthias Blume' belong to? Give me the name of the institution. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT DISTINCT T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T2.velocity < 200 \nA: What are the distinct types of the companies that have operated any flights with velocity less than 200? \n Additional table information: table: flight_company"} -{"text": "Q: SELECT employee_name, role_code, date_of_birth FROM Employees WHERE employee_Name = 'Armani' \nA: Show the name, role code, and date of birth for the employee with name 'Armani'. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT T2.email_address FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T1.zip_postcode = '918' \nA: What are the email addresses of teachers whose address has zip code '918'? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT T1.name_first, T1.name_last FROM player AS T1, player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first, T1.name_last FROM player AS T1, player_award AS T2 WHERE T2.year = 1961 \nA: Which players won awards in both 1960 and 1961? Return their first names and last names. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT rank, sex, COUNT(*) FROM Faculty GROUP BY rank, sex \nA: How many faculty members do we have for each rank and gender? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT COUNT(*), T1.claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY T1.Date_Claim_Settled DESC LIMIT 1 \nA: How many settlements were made on the claim with the most recent claim settlement date? List the number and the claim id. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT document_type_name, document_type_description FROM Ref_document_types WHERE document_type_code = 'RV' \nA: What is the name and description for document type code RV? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT name, dept_name FROM student ORDER BY tot_cred NULLS FIRST \nA: Find the name of the students and their department names sorted by their total credits in ascending order. \n Additional table information: table: college_2"} -{"text": "Q: SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T2.staff_id HAVING COUNT(*) > 1 \nA: List the name of staff who has been assigned multiple jobs. \n Additional table information: table: department_store"} -{"text": "Q: SELECT Company_name, COUNT(*) FROM phone GROUP BY Company_name ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Find the name of the company that has the least number of phone models. List the company name and the number of phone model produced by that company. \n Additional table information: table: phone_1"} -{"text": "Q: 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 \nA: Which city lives most of staffs? List the city name and number of staffs. \n Additional table information: table: driving_school"} -{"text": "Q: SELECT COUNT(*) FROM Companies WHERE Industry = 'Banking' OR Industry = 'Conglomerate' \nA: How many companies are in either 'Banking' industry or 'Conglomerate' industry? \n Additional table information: table: company_office"} -{"text": "Q: SELECT T1.id FROM trip AS T1 JOIN weather AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.zip_code HAVING AVG(T2.mean_temperature_f) > 60 \nA: Give me ids for all the trip that took place in a zip code area with average mean temperature above 60. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT AVG(Profits_billion) FROM Companies \nA: Compute the average profits companies make. \n Additional table information: table: company_office"} -{"text": "Q: SELECT Name FROM technician ORDER BY Age ASC NULLS FIRST \nA: List the names of technicians in ascending order of age. \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT COUNT(*) FROM budget WHERE budgeted < invested \nA: How many budget record has a budget amount smaller than the invested amount? \n Additional table information: table: school_finance"} -{"text": "Q: SELECT COUNT(*), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name \nA: How many products are there for each manufacturer? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT COUNT(*) FROM classroom WHERE building <> 'Lamberton' \nA: How many classrooms are not in Lamberton? \n Additional table information: table: college_2"} -{"text": "Q: SELECT city_code FROM student GROUP BY city_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the code of city where most of students are living in. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester = 'Fall' AND YEAR = 2003) \nA: What are the names of students who took a course in the Fall of 2003? \n Additional table information: table: college_2"} -{"text": "Q: SELECT T1.organisation_id, COUNT(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the id of the organization with the maximum number of outcomes and how many outcomes are there? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame' AND t3.characteristic_type_code = 'Grade' \nA: What are the names of the characteristics of the product 'sesame' that have the characteristic type code 'Grade'? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT DISTINCT T2.name, T2.friend, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT AVG(age) FROM person) \nA: Who has friends that are older than the average age? Print their friends and their ages as well \n Additional table information: table: network_2"} -{"text": "Q: SELECT cName FROM College WHERE enr > 18000 ORDER BY cName NULLS FIRST \nA: List the name of the colleges whose enrollment is greater 18000 sorted by the college's name. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT T1.name, T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance NULLS FIRST LIMIT 1 \nA: What are the names and balances of checking accounts belonging to the customer with the lowest savings balance? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT department_id, AVG(salary) FROM employees WHERE commission_pct <> 'null' GROUP BY department_id \nA: display the average salary of employees for each department who gets a commission percentage. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT name FROM manufacturers WHERE revenue < (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin') \nA: What are the names of companies with revenue less than the lowest revenue of any manufacturer in Austin? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT Hispanic FROM city WHERE Black > 10 \nA: What are the percentage of hispanics in cities with the black percentage higher than 10? \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT name, distance FROM Aircraft \nA: What are the names and distances for all airplanes? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT country_id, COUNT(*) FROM locations GROUP BY country_id \nA: display the country ID and number of cities for each country. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1 \nA: What are the ids of the students who registered for course 301 most recently? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Confirmed' \nA: Show the distinct apartment numbers of the apartments that have bookings with status code 'Confirmed'. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING COUNT(*) > 60 \nA: Find the names of rooms that have been reserved for more than 60 times. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING COUNT(*) > 3 \nA: Which complaint status has more than 3 records on file? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT T1.address_line_1, T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id HAVING COUNT(*) >= 2 \nA: Which course authors teach two or more courses? Give me their addresses and author IDs. \n Additional table information: table: e_learning"} -{"text": "Q: 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' \nA: Give the details of the project with the document name 'King Book'. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT roomName, RoomId FROM Rooms WHERE basePrice > 160 AND maxOccupancy > 2 \nA: Find all the rooms that have a price higher than 160 and can accommodate more than 2 people. Report room names and ids. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT city_code FROM Student WHERE LName = 'Kim' \nA: Give the city that the student whose family name is Kim lives in. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT name FROM procedures WHERE cost < 5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen' \nA: Find the names of all procedures such that the cost is less than 5000 and physician John Wen was trained in. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2002 ORDER BY t3.degrees DESC LIMIT 1 \nA: How many faculty lines are there in the university that conferred the most number of degrees in year 2002? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most common hometown of gymnasts? \n Additional table information: table: gymnast"} -{"text": "Q: SELECT order_id, COUNT(*) FROM Order_items GROUP BY order_id \nA: Show the order ids and the number of items in each order. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT MAX(YEAR) FROM perpetrator \nA: In which year did the most recent crime happen? \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT DISTINCT city_code FROM Student \nA: Show all cities where students live. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT partitionid FROM user_profiles WHERE name = 'Iron Man' \nA: What is the partition id of the user named 'Iron Man'. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000 \nA: What are the themes of competitions that have corresponding host cities with more than 1000 residents? \n Additional table information: table: farm"} -{"text": "Q: SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1 \nA: What is the shop name corresponding to the shop that opened in the most recent year? \n Additional table information: table: device"} -{"text": "Q: SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' ORDER BY emp_dob NULLS FIRST \nA: List the first name of all employees with job code PROF ordered by their date of birth. \n Additional table information: table: college_1"} -{"text": "Q: SELECT T2.guest_first_name, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id \nA: What are the guest first name, start date, and end date of each apartment booking? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT COUNT(*) FROM club_rank WHERE Total < 10 \nA: What is the total number of clubs that have less than 10 medals in total? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT T1.Attraction_Type_Description, T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the description and code of the attraction type most tourist attractions belong to. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most common result of the music festival? \n Additional table information: table: music_4"} -{"text": "Q: SELECT MIN(low_temperature), MAX(wind_speed_mph) FROM weekly_weather \nA: show the lowest low temperature and highest wind speed in miles per hour. \n Additional table information: table: station_weather"} -{"text": "Q: SELECT date_valid_from, date_valid_to FROM Customers_cards WHERE card_number = '4560596484842' \nA: What are the valid from and valid to dates for the card with the number 4560596484842? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT COUNT(DISTINCT Software_Platform) FROM device \nA: Count the number of different software platforms. \n Additional table information: table: device"} -{"text": "Q: SELECT MAX(height), AVG(height) FROM mountain \nA: What are the maximum and average height of the mountains? \n Additional table information: table: mountain_photos"} -{"text": "Q: SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25' \nA: Find the distinct details of invoices which are created before 1989-09-03 or after 2007-12-25. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT COUNT(DISTINCT state) FROM college WHERE enr < (SELECT AVG(enr) FROM college) \nA: How many states have smaller colleges than average? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT COUNT(DISTINCT acc_type) FROM customer \nA: How many distinct types of accounts are there? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT account_id, date_account_opened, account_name, other_account_details FROM Accounts \nA: What are the ids, date opened, name, and other details for all accounts? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 1 \nA: Find the name of the user who has the largest number of followers. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT COUNT(*) FROM enzyme \nA: What is the total count of enzymes? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT SUM(crs_credit), dept_code FROM course GROUP BY dept_code \nA: What is the total credit does each department offer? \n Additional table information: table: college_1"} -{"text": "Q: SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration < (SELECT MAX(duration) FROM pitstops WHERE raceid = 841) \nA: Find the distinct driver id and the stop number of all drivers that have a shorter pit stop duration than some drivers in the race with id 841. \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'Red' AND T2.price > 50 \nA: What are the wines that have prices higher than 50 and made of Red color grapes? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE '%gmail.com%' \nA: Count the number of customers that have an email containing 'gmail.com'. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT AVG(floors), MAX(floors), MIN(floors) FROM building \nA: What are the average, maximum, and minimum number of floors for all buildings? \n Additional table information: table: protein_institute"} -{"text": "Q: SELECT T1.text_of_notes FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.last_name = 'Schuster' \nA: Find the texts of assessment notes for teachers with last name 'Schuster'. \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE '4:%' UNION SELECT song_name FROM song WHERE languages = 'english' \nA: List the names of all songs that have 4 minute duration or are in English. \n Additional table information: table: music_1"} -{"text": "Q: 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' \nA: Give me a list of id and status of orders which belong to the customer named 'Jeramie'. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT T1.bname, T1.city FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T2.loan_type = 'Business' \nA: Find the city and name of bank branches that provide business loans. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_id \nA: What are the last names of individuals who have been contact individuals for an organization? \n Additional table information: table: e_government"} -{"text": "Q: SELECT AVG(enrollment) FROM university WHERE founded < 1850 \nA: Return the average enrollment of universities founded before 1850. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT COUNT(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Billy Cobham' \nA: How many albums has Billy Cobam released? \n Additional table information: table: store_1"} -{"text": "Q: SELECT AVG(transaction_amount), SUM(transaction_amount) FROM Financial_transactions \nA: What is the average and total transaction amount? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Google' \nA: Which papers were written by authors from the institution 'Google'? \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT age, COUNT(*) FROM Student GROUP BY age \nA: How old is each student and how many students are each age? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1 \nA: What is the name of the room that can accommodate the most people? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT T1.id, T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id JOIN injury_accident AS T3 ON T2.id = T3.game_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the id and name of the stadium where the largest number of injury accidents occurred. \n Additional table information: table: game_injury"} -{"text": "Q: SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2002 ORDER BY t3.degrees DESC LIMIT 1 \nA: How many faculty members did the university that conferred the most degrees in 2002 have? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT name FROM manufacturers EXCEPT SELECT T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T1.name = 'DVD drive' \nA: What are the names of companies that do not make DVD drives? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT Name FROM pilot ORDER BY Name ASC NULLS FIRST \nA: List all pilot names in ascending alphabetical order. \n Additional table information: table: aircraft"} -{"text": "Q: 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' \nA: What are the names and dates for documents corresponding to project that has the details 'Graph Database project'? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT COUNT(DISTINCT payment_method_code) FROM parties \nA: How many distinct payment methods are used by parties? \n Additional table information: table: e_government"} -{"text": "Q: SELECT MAX(t2.active_to_date) FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Tillman Ernser' \nA: Return the the 'active to date' of the latest contact channel used by the customer named 'Tillman Ernser'. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT T1.fname, T1.age FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE NOT T2.dormid IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge') \nA: Find the first name and age of students who are living in the dorms that do not have amenity TV Lounge. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT t1.name, t2.price_in_dollar FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID \nA: Give me the names and prices of furnitures which some companies are manufacturing. \n Additional table information: table: manufacturer"} -{"text": "Q: SELECT T3.Location, T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age NULLS FIRST \nA: Show the locations of parties and the names of the party hosts in ascending order of the age of the host. \n Additional table information: table: party_host"} -{"text": "Q: SELECT Name FROM Team \nA: What are the names of all teams? \n Additional table information: table: match_season"} -{"text": "Q: SELECT COUNT(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2000 \nA: How many players did Boston Red Stockings have in 2000? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT DISTINCT T1.name, T1.location, T1.product FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.enzyme_id = T1.id WHERE T2.interaction_type = 'inhibitor' \nA: What are the distinct name, location and products of the enzymes which has any 'inhibitor' interaction? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1 \nA: What details do we have on the students who registered for courses most recently? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id = T2.id WHERE T2.dept_name = 'History' \nA: Give id of the instructor who advises students in the History department. \n Additional table information: table: college_2"} -{"text": "Q: SELECT Team, COUNT(*) FROM technician GROUP BY Team \nA: For each team, how many technicians are there? \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT Draft_Pick_Number, Draft_Class FROM match_season WHERE POSITION = 'Defender' \nA: What are the draft pick numbers and draft classes for players who play the Defender position? \n Additional table information: table: match_season"} -{"text": "Q: SELECT cust_name FROM customer WHERE acc_type = 'saving' INTERSECT SELECT cust_name FROM customer WHERE acc_type = 'checking' \nA: Find the name of customers who have both saving and checking account types. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT document_status_code FROM Ref_Document_Status \nA: What document status codes do we have? \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT DISTINCT forename FROM drivers ORDER BY forename ASC NULLS FIRST \nA: List the forenames of all distinct drivers in alphabetical order? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T2.order_id, T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id GROUP BY T2.order_id HAVING COUNT(*) > 2 \nA: What is the order id and order details for the order more than two invoices. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT LOCATION FROM school ORDER BY Enrollment ASC NULLS FIRST \nA: List the locations of schools in ascending order of enrollment. \n Additional table information: table: school_player"} -{"text": "Q: SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE t2.Company_name = 'Nokia Corporation' AND T1.Type <> 'Text' \nA: List the hardware model name for the phons that were produced by 'Nokia Corporation' but whose screen mode type is not Text. \n Additional table information: table: phone_1"} -{"text": "Q: SELECT COUNT(*) FROM flight WHERE velocity > 200 \nA: How many flights have a velocity larger than 200? \n Additional table information: table: flight_company"} -{"text": "Q: SELECT T1.organisation_type, T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the organisation type and id of the organisation which has the most number of research staff? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT name FROM channel ORDER BY rating_in_percent DESC \nA: List all channel names ordered by their rating in percent from big to small. \n Additional table information: table: program_share"} -{"text": "Q: SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Year DESC \nA: List the names of perpetrators in descending order of the year. \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT DISTINCT Publisher FROM publication WHERE Price > 5000000 \nA: What are the distinct publishers of publications with price higher than 5000000? \n Additional table information: table: book_2"} -{"text": "Q: SELECT country FROM airlines WHERE name LIKE 'Orbit%' \nA: What are the countries of all airlines whose names start with Orbit? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT COUNT(*) FROM CUSTOMERS \nA: Count the number of customers recorded. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT COUNT(DISTINCT affiliation) FROM university \nA: Count the number of different affiliation types. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = 'Mary' OR T1.name = 'Susan' \nA: Find the id of users who are followed by Mary or Susan. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn \nA: Find the name of scientists who are assigned to some project. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT title, rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1 \nA: What are the title and rental rate of the film with the highest rental rate? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT COUNT(*) FROM Draft_Copies WHERE document_id = 2 \nA: How many draft copies does the document with id 2 have? \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT mID FROM Rating EXCEPT SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = 'Brittany Harris' \nA: What are the ids of the movies that are not reviewed by Brittany Harris. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT COUNT(*) FROM train WHERE name LIKE '%Express%' \nA: How many trains have 'Express' in their names? \n Additional table information: table: station_weather"} -{"text": "Q: SELECT T1.club_id, T1.club_name, COUNT(*) FROM club AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T1.club_id \nA: How many coaches does each club has? List the club id, name and the number of coaches. \n Additional table information: table: riding_club"} -{"text": "Q: SELECT SUM(crs_credit), dept_code FROM course GROUP BY dept_code \nA: How many credits does the department offer? \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(*) FROM driver WHERE home_city = 'Hartford' OR age < 40 \nA: How many drivers are from Hartford city or younger than 40? \n Additional table information: table: school_bus"} -{"text": "Q: SELECT COUNT fleet_series_quantity FROM \"vehicles\".\"cars\" WHERE fuel_propulsion = 'CNG' \nA: how many times is the fuel propulsion is cng? \n Additional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion"} -{"text": "Q: SELECT LName FROM Student WHERE age = (SELECT MIN(age) FROM Student) \nA: What is the last name of the youngest student? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT other_hotel_details, star_rating_code FROM HOTELS ORDER BY price_range ASC NULLS FIRST LIMIT 3 \nA: What are the details and star ratings of the three hotels with the lowest price ranges? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = 'USA' AND t2.authorder = 2 AND t1.lname = 'Turon' \nA: Which paper is published in an institution in 'USA' and have 'Turon' as its second author? \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT T1.name_first, T1.name_last FROM player AS T1, player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first, T1.name_last FROM player AS T1, player_award AS T2 WHERE T2.year = 1961 \nA: Find the players' first name and last name who won award both in 1960 and in 1961. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT Name, Arrival FROM train \nA: What are the names and arrival times of trains? \n Additional table information: table: railway"} -{"text": "Q: SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011 \nA: What are the names of all races held between 2009 and 2011? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT COUNT(*) FROM Faculty WHERE Sex = 'F' AND Rank = 'Professor' \nA: How many female Professors do we have? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT T2.party_name, COUNT(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id \nA: How many members are in each party? \n Additional table information: table: party_people"} -{"text": "Q: SELECT name, seating FROM track WHERE year_opened > 2000 ORDER BY seating NULLS FIRST \nA: What are the names and seatings for all tracks opened after 2000, ordered by seating? \n Additional table information: table: race_track"} -{"text": "Q: SELECT Fname, Lname, Age FROM Student WHERE Sex = 'F' \nA: What are the full names and ages for all female students whose sex is F? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT employee_id, first_name, last_name, salary FROM employees WHERE salary > (SELECT AVG(salary) FROM employees) AND department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%J%') \nA: display the employee number, name( first name and last name ), and salary for all employees who earn more than the average salary and who work in a department with any employee with a 'J' in their first name. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT zip_code, COUNT(*) FROM weather WHERE max_wind_Speed_mph >= 25 GROUP BY zip_code \nA: For each zip code, return how many times max wind speed reached 25? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which poll resource provided the most number of candidate information? \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = 'Matthias' AND t1.lname = 'Blume' \nA: What is the name of the institution that 'Matthias Blume' belongs to? \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT account_id, customer_id, account_name FROM Accounts \nA: Show ids, customer ids, names for all accounts. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT COUNT(*), semester, YEAR FROM SECTION GROUP BY semester, YEAR \nA: Find the number of courses provided in each semester and year. \n Additional table information: table: college_2"} -{"text": "Q: SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID \nA: What are the names of all the physicians who took appointments. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T1.Name, T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID \nA: Show names of climbers and the names of mountains they climb. \n Additional table information: table: climbing"} -{"text": "Q: SELECT T1.first_name, T1.last_name, SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY SUM(T2.total) DESC LIMIT 10 \nA: What are the top 10 customers' first and last names with the highest gross sales, and also what are the sales? \n Additional table information: table: store_1"} -{"text": "Q: SELECT city FROM airports WHERE country = 'United States' GROUP BY city HAVING COUNT(*) > 3 \nA: What is the number of cities in the United States with more than 3 airports? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT DISTINCT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.rating > 9 \nA: What are the different names and countries of origins for all artists whose song ratings are above 9? \n Additional table information: table: music_1"} -{"text": "Q: SELECT Team, COUNT(*) FROM elimination GROUP BY Team \nA: Show different teams in eliminations and the number of eliminations from each team. \n Additional table information: table: wrestler"} -{"text": "Q: SELECT SUM(revenue) FROM manufacturers WHERE headquarter = 'Austin' \nA: Find the total revenue created by the companies whose headquarter is located at Austin. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT DISTINCT salary FROM instructor WHERE salary < (SELECT MAX(salary) FROM instructor) \nA: Find the salaries of all distinct instructors that are less than the largest salary. \n Additional table information: table: college_2"} -{"text": "Q: SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id ORDER BY T3.Number_Deaths DESC LIMIT 1 \nA: Find the names of the regions which were affected by the storm that killed the greatest number of people. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Art' AND T2.customer_last_name = 'Turcotte' \nA: How many accounts does the customer with first name Art and last name Turcotte have? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T2.name = 'Airbus A340-300' \nA: What are the flight numbers for the aircraft Airbus A340-300? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name = 'China' \nA: Find the marketing region description of China? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT donator_name FROM endowment EXCEPT SELECT donator_name FROM endowment WHERE amount < 9 \nA: Show the names of all the donors except those whose donation amount less than 9. \n Additional table information: table: school_finance"} -{"text": "Q: SELECT fname, major FROM Student WHERE NOT StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Soy') \nA: What are the first name and major of the students who are able to consume soy? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT T1.course_name, T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = 'Computer Science' \nA: What are the names and descriptions of the all courses under the 'Computer Science' subject? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT Publisher FROM publication ORDER BY Price DESC LIMIT 1 \nA: List the publisher of the publication with the highest price. \n Additional table information: table: book_2"} -{"text": "Q: SELECT lname FROM student WHERE sex = 'F' AND city_code = 'BAL' UNION SELECT lname FROM student WHERE sex = 'M' AND age < 20 \nA: Find the last name of students who is either female (sex is F) and living in the city of code BAL or male (sex is M) and in age of below 20. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT brand, name FROM camera_lens ORDER BY max_aperture DESC \nA: Find the brand and name for each camera lens, and sort in descending order of maximum aperture. \n Additional table information: table: mountain_photos"} -{"text": "Q: SELECT cust_name FROM customer ORDER BY acc_bal NULLS FIRST \nA: List the name of all customers sorted by their account balance in ascending order. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT COUNT(*), major FROM student GROUP BY major \nA: How many students are there in each major? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT customer_id, customer_name FROM customers WHERE customer_address LIKE '%WY%' AND payment_method_code <> 'Credit Card' \nA: Find the id and name of customers whose address contains WY state and do not use credit card for payment. \n Additional table information: table: department_store"} -{"text": "Q: 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 \nA: What is the maximum price of wines from the appelation in the Central Coast area, which was produced before 2005? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT DISTINCT T1.first_name, T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS' \nA: What is the full name of the staff member who has rented a film to a customer with the first name April and the last name Burns? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT dept_name, budget FROM department WHERE budget > (SELECT AVG(budget) FROM department) \nA: Find the name and budget of departments whose budgets are more than the average budget. \n Additional table information: table: college_2"} -{"text": "Q: SELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the most frequent result across all musicals. \n Additional table information: table: musical"} -{"text": "Q: SELECT Name FROM journalist WHERE Nationality = 'England' OR Nationality = 'Wales' \nA: Show the names of journalists from 'England' or 'Wales'. \n Additional table information: table: news_report"} -{"text": "Q: SELECT MAX(Sales_billion), MIN(Sales_billion) FROM Companies WHERE Industry <> 'Banking' \nA: Find the maximum and minimum sales of the companies that are not in the 'Banking' industry. \n Additional table information: table: company_office"} -{"text": "Q: SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1 \nA: Which countries have more than one mountain? \n Additional table information: table: climbing"} -{"text": "Q: SELECT COUNT(*) FROM Vehicles \nA: How many vehicles exist? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'statistics' ORDER BY T2.registration_date NULLS FIRST \nA: List the id of students who registered course statistics in the order of registration date. \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT main_industry, SUM(market_value) FROM company GROUP BY main_industry \nA: What are the main indstries and total market value for each industry? \n Additional table information: table: gas_company"} -{"text": "Q: 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 \nA: What are the statement ids, statement details, and account details, for all accounts? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT COUNT(DISTINCT label) FROM albums \nA: What are the unique labels for the albums? \n Additional table information: table: music_2"} -{"text": "Q: SELECT LOCATION, COUNT(*) FROM gas_station GROUP BY LOCATION ORDER BY COUNT(*) NULLS FIRST \nA: For each location, how many gas stations are there in order? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details NULLS FIRST \nA: What are the details of all organizations that are described as Sponsors and sort the results in ascending order? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT name FROM artist ORDER BY year_join DESC LIMIT 1 \nA: Return the name of the artist who has the latest join year. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT part_id, chargeable_amount FROM Parts ORDER BY chargeable_amount ASC NULLS FIRST LIMIT 1 \nA: Which part has the least chargeable amount? List the part id and amount. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1 \nA: What are the names of shops that have more than a single kind of device in stock? \n Additional table information: table: device"} -{"text": "Q: SELECT T1.name, T1.long, AVG(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id GROUP BY T2.start_station_id \nA: For each station, return its longitude and the average duration of trips that started from the station. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T2.Location, T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft \nA: Please list the location and the winning aircraft name. \n Additional table information: table: aircraft"} -{"text": "Q: SELECT Name FROM roller_coaster ORDER BY LENGTH ASC NULLS FIRST \nA: List the names of roller coasters by ascending order of length. \n Additional table information: table: roller_coaster"} -{"text": "Q: SELECT AVG(T2.Number_cities) FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T1.Low_Estimate > 10000 \nA: What is the average number of cities of markets with low film market estimate bigger than 10000? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT dept_name FROM instructor WHERE name LIKE '%Soisalon%' \nA: What is the name of the department with an instructure who has a name like 'Soisalon'? \n Additional table information: table: college_2"} -{"text": "Q: SELECT gtype FROM Video_games WHERE gname = 'Call of Destiny' \nA: What type of game is Call of Destiny? \n Additional table information: table: game_1"} -{"text": "Q: SELECT COUNT(*), T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand \nA: Find the number of medications prescribed for each brand. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT name FROM CLub WHERE NOT Club_ID IN (SELECT Club_ID FROM player) \nA: List the names of clubs that do not have any players. \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT COUNT(DISTINCT scientist) FROM assignedto \nA: How many different scientists are assigned to any project? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT T1.Total_Points FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age ASC NULLS FIRST LIMIT 1 \nA: Return the total points of the gymnast with the lowest age. \n Additional table information: table: gymnast"} -{"text": "Q: SELECT T3.Name, T2.Date, T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID \nA: Show the names of people, and dates and venues of debates they are on the affirmative side. \n Additional table information: table: debate"} -{"text": "Q: SELECT AVG(Quantity) FROM stock \nA: What is the average quantity of stocks? \n Additional table information: table: device"} -{"text": "Q: SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' AND salary > 80000 \nA: Find the names of all instructors in Comp. Sci. department with salary > 80000. \n Additional table information: table: college_2"} -{"text": "Q: SELECT fname, age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = 'Football' INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = 'Lacrosse') \nA: Find the first name and age of the students who are playing both Football and Lacrosse. \n Additional table information: table: game_1"} -{"text": "Q: SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'University of Pennsylvania' \nA: Find the number of papers published by the institution 'University of Pennsylvania'. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT COUNT(*) FROM climber \nA: Count the number of climbers. \n Additional table information: table: climbing"} -{"text": "Q: SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990 \nA: Show publishers with a book published in 1989 and a book in 1990. \n Additional table information: table: culture_company"} -{"text": "Q: SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id JOIN products AS T3 ON T2.product_id = T3.product_id GROUP BY T3.product_id HAVING COUNT(DISTINCT T1.customer_id) >= 2 \nA: What are the distinct names of products purchased by at least two different customers? \n Additional table information: table: department_store"} -{"text": "Q: SELECT Low_Estimate, High_Estimate FROM film_market_estimation \nA: What are the low and high estimates of film markets? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT login_name, family_name FROM Course_Authors_and_Tutors \nA: What are the login names and family names of course author and tutors? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT product_category_description FROM ref_product_categories WHERE product_category_code = 'Spices' \nA: What is the description of the product category with the code 'Spices'? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'inhibitor' INTERSECT SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'activitor' \nA: What are the medicine and trade names that can interact as an inhibitor and activitor with enzymes? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT T2.school_name, T1.budgeted, T1.invested FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T1.year >= 2002 \nA: Show each school name, its budgeted amount, and invested amount in year 2002 or after. \n Additional table information: table: school_finance"} -{"text": "Q: SELECT COUNT(DISTINCT T1.name), T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.Headquarter \nA: How many different products are produced in each headquarter city? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT DISTINCT T1.Director FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID WHERE T2.Year = 1995 \nA: Show the distinct director of films with market estimation in the year of 1995. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT DISTINCT city FROM addresses \nA: Show all distinct cities in the address record. \n Additional table information: table: customers_and_products_contacts"} -{"text": "Q: SELECT Fname FROM FACULTY WHERE Rank = 'Professor' ORDER BY Fname NULLS FIRST \nA: Find the first names of faculties of rank Professor in alphabetic order. \n Additional table information: table: college_3"} -{"text": "Q: SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2 \nA: What are the names of studios that have made two or more films? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT budget_type_code, COUNT(*) FROM Documents_with_expenses GROUP BY budget_type_code \nA: Show budget type codes and the number of documents in each budget type. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT city FROM addresses WHERE zip_postcode = 255 \nA: Which city is post code 255 located in? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT COUNT(*) FROM dorm_amenity \nA: Find the number of distinct amenities. \n Additional table information: table: dorm_1"} -{"text": "Q: 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' \nA: List all company names with a book published by Alyson. \n Additional table information: table: culture_company"} -{"text": "Q: SELECT ResTypeDescription FROM Restaurant_Type WHERE ResTypeName = 'Sandwich' \nA: What is the description of the restaurant type Sandwich? \n Additional table information: table: restaurant_1"} -{"text": "Q: SELECT COUNT(*) FROM club \nA: How many clubs are there? \n Additional table information: table: club_1"} -{"text": "Q: SELECT song_name FROM song WHERE rating < (SELECT MAX(rating) FROM song WHERE genre_is = 'blues') \nA: What are the names of the songs that have a lower rating than at least one blues song? \n Additional table information: table: music_1"} -{"text": "Q: SELECT COUNT(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005 \nA: What is the total number of gas stations that opened between 2000 and 2005? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT T1.Player, T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Columbus Crew' \nA: What are the players who played for Columbus Crew, and how many years did each play for? \n Additional table information: table: match_season"} -{"text": "Q: 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 \nA: What is the placement date of the order whose invoice number is 10? \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT SUM(access_count) FROM documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the total access count of documents that are of the most common document type? \n Additional table information: table: document_management"} -{"text": "Q: SELECT Grape, Winery, YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR NULLS FIRST \nA: What are the grapes, wineries and years for wines with price higher than 100, sorted by year? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT Name FROM actor ORDER BY Name ASC NULLS FIRST \nA: List the name of actors in ascending alphabetical order. \n Additional table information: table: musical"} -{"text": "Q: SELECT t2.team_name, t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t1.founded NULLS FIRST LIMIT 1 \nA: What is the team name and acc regular season score of the school that was founded for the longest time? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT AVG(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.city_code = 'NYC' AND T2.Election_Cycle = 'Spring' \nA: What is the average age of students who have city code 'NYC' and have secretary votes for the spring election cycle? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT first_name, last_name FROM Teachers ORDER BY last_name NULLS FIRST \nA: Find the first names and last names of teachers in alphabetical order of last name. \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT T2.allergytype, COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype \nA: Show all allergy type with number of students affected. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT Name FROM musical WHERE Nominee = 'Bob Fosse' \nA: Return the names of musicals who have the nominee Bob Fosse. \n Additional table information: table: musical"} -{"text": "Q: SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.firstname = 'Marianne' \nA: What are the names of all songs produced by the artist with the first name 'Marianne'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT region_name FROM region ORDER BY region_name NULLS FIRST \nA: What are the names of the regions in alphabetical order? \n Additional table information: table: storm_record"} -{"text": "Q: SELECT date_of_latest_logon FROM Students WHERE family_name = 'Jaskolski' OR family_name = 'Langosh' \nA: Find the latest logon date of the students whose family name is 'Jaskolski' or 'Langosh'. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT MIN(age), AVG(age), MAX(age) FROM Student \nA: Show the minimum, average, and maximum age of all students. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT first_name, middle_name, last_name FROM Staff \nA: List the first name middle name and last name of all staff. \n Additional table information: table: driving_school"} -{"text": "Q: SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = 'white' \nA: What are the names of products with 'white' as their color description? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT city FROM branch WHERE open_year = 2001 AND membership_amount > 100 \nA: What are the cities that have a branch that opened in 2001 and a branch with more than 100 members? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC \nA: What are the names of all pilots 30 years old or young in descending alphabetical order? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%' \nA: Find the category descriptions of the products whose descriptions include letter 't'. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT CLASS FROM race GROUP BY CLASS ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the race class with most number of races. \n Additional table information: table: race_track"} -{"text": "Q: SELECT role_description FROM ROLES WHERE role_code = 'ED' \nA: What is the description of role code ED? \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3 \nA: What are names for top three branches with most number of membership? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name HAVING COUNT(*) >= 2 \nA: What are characteristic names used at least twice across all products? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T2.Author, T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID \nA: Show the authors of submissions and the acceptance results of their submissions. \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT name FROM procedures WHERE cost > 1000 EXCEPT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen' \nA: Among the procedures that cost more than 1000, which were not specialized in by physician John Wen? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT name FROM player WHERE points > (SELECT AVG(points) FROM player) \nA: what are the name of players who get more than the average points. \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Bob' \nA: Find the name of persons who are friends with Bob. \n Additional table information: table: network_2"} -{"text": "Q: SELECT rank, company, market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion NULLS FIRST, profits_billion NULLS FIRST \nA: What is the rank, company, and market value of every comapny in the banking industry ordered by sales and profits? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Afghanistan' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Albania' \nA: Find the name of the storm that affected both Afghanistan and Albania regions. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1 \nA: Find the name of the most expensive hardware product. \n Additional table information: table: department_store"} -{"text": "Q: SELECT COUNT(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia' \nA: Count the number of cities in Australia. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT director FROM Movie WHERE title = 'Avatar' \nA: Who directed Avatar? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1 \nA: Which submission received the highest score in acceptance result. Show me the result. \n Additional table information: table: workshop_paper"} -{"text": "Q: 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 NULLS FIRST LIMIT 1 \nA: What is the last name of the first individual contacted from the organization with the maximum UK Vat number across all organizations? \n Additional table information: table: e_government"} -{"text": "Q: SELECT COUNT(*) FROM Lessons WHERE lesson_status_code = 'Cancelled' \nA: How many lessons were in cancelled state? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT eid FROM Employee WHERE salary > 100000 \nA: Show ids for all employees with at least 100000 salary. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT T1.director, T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars = 5 \nA: What are the names of directors who directed movies with 5 star rating? Also return the title of these movies. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT detention_summary FROM Detention \nA: Return all detention summaries. \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT service_id, event_details FROM EVENTS \nA: List the service id and details for the events. \n Additional table information: table: local_govt_in_alabama"} -{"text": "Q: SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T2.decor ORDER BY COUNT(T2.decor) ASC NULLS FIRST LIMIT 1 \nA: What is the least popular kind of decor? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT destination FROM Flight GROUP BY destination ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: What destination has the fewest number of flights? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT COUNT(*) FROM enzyme \nA: How many kinds of enzymes are there? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT AVG(T2.fastestlapspeed), T1.name, T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year NULLS FIRST \nA: What are the average fastest lap speed in races held after 2004 grouped by race name and ordered by year? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT COUNT(*) FROM school \nA: Count the number of schools. \n Additional table information: table: school_player"} -{"text": "Q: SELECT account_id, customer_id, account_name FROM Accounts \nA: What are the account ids, customer ids, and account names for all the accounts? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: 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' \nA: What is the average price for a lesson taught by Janessa Sawayn? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = 'Fail' \nA: Return the completion date for all the tests that have 'Fail' result. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT COUNT(DISTINCT state) FROM college WHERE enr > (SELECT AVG(enr) FROM college) \nA: How many states have a college with more students than average? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT T2.Railway_ID, T1.Builder FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID GROUP BY T2.Railway_ID ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the id and builder of the railway that are associated with the most trains. \n Additional table information: table: railway"} -{"text": "Q: SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Country <> 'China' \nA: What are the names of perpetrators whose country is not 'China'? \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT DISTINCT District_name FROM district ORDER BY city_area DESC \nA: What are the different district names in order of descending city area? \n Additional table information: table: store_product"} -{"text": "Q: SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id = t3.manufacturer_id WHERE t1.num_of_component < 6 INTERSECT SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id = t3.manufacturer_id WHERE t1.num_of_component > 10 \nA: Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components. \n Additional table information: table: manufacturer"} -{"text": "Q: SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars = 4 \nA: What are the ids of all reviewers who did not give 4 stars? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T3.product_name, COUNT(*) FROM orders AS T1, 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 \nA: List the name and count of each product in all orders. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT city FROM city ORDER BY regional_population DESC LIMIT 3 \nA: What are the three largest cities in terms of regional population? \n Additional table information: table: city_record"} -{"text": "Q: SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150 \nA: Find the name of rooms whose base price is between 120 and 150. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT DISTINCT blockcode FROM room WHERE unavailable = 0 \nA: Tell me the distinct block codes where some rooms are available. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT district FROM address GROUP BY district HAVING COUNT(*) >= 2 \nA: Which districts have at least two addresses? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1 \nA: Return the phone number of the customer who filed the complaint that was raised most recently. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT T2.title, AVG(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY AVG(T1.stars) NULLS FIRST LIMIT 1 \nA: What are the movie titles and average rating of the movies with the lowest average rating? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT lname, sex FROM Student WHERE StuID IN (SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = 'Call of Destiny' INTERSECT SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = 'Works of Widenius') \nA: Find the last name and gender of the students who are playing both Call of Destiny and Works of Widenius games. \n Additional table information: table: game_1"} -{"text": "Q: SELECT SUM(duration), MAX(duration) FROM trip WHERE bike_id = 636 \nA: What is the total and maximum duration for all trips with the bike id 636? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT LOCATION FROM gas_station ORDER BY open_year NULLS FIRST \nA: What are the locations of all the gas stations ordered by opening year? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT AVG(hours) FROM projects \nA: Find the average hours of all projects. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT name FROM projects WHERE hours BETWEEN 100 AND 300 \nA: What are the names of projects that require between 100 and 300 hours? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT * FROM student_course_registrations WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance) \nA: What are all info of students who registered courses but not attended courses? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1 \nA: Which problem log was created most recently? Give me the log id. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING AVG(bikes_available) > 10 EXCEPT SELECT name FROM station WHERE city = 'San Jose' \nA: What are names of stations that have average bike availability above 10 and are not located in San Jose city? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = 'Heilo' \nA: What are all the instruments used by the musician with the last name 'Heilo'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = 'Spain' AND T1.year > 2017 \nA: What are the names of the races held after 2017 in Spain? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T2.emp_fname, T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code \nA: Find the first names of all instructors who have taught some course and the course description. \n Additional table information: table: college_1"} -{"text": "Q: SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id \nA: How many accounts are there for each customer id? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: 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' \nA: What is the zip code of the customer Carole Bernhard? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.age > 18 \nA: Count the number of members in club 'Bootup Baltimore' whose age is above 18. \n Additional table information: table: club_1"} -{"text": "Q: SELECT COUNT(DISTINCT allergy) FROM Allergy_type \nA: How many allergy entries are there? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament' \nA: What are the countries that participated in both friendly and tournament type competitions? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer' \nA: What is the date of birth of every customer whose status code is 'Good Customer'? \n Additional table information: table: driving_school"} -{"text": "Q: 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' \nA: Which country and state does staff with first name as Janessa and last name as Sawayn lived? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT dept_name FROM department ORDER BY budget NULLS FIRST LIMIT 1 \nA: Give the name of the department with the lowest budget. \n Additional table information: table: college_2"} -{"text": "Q: SELECT T2.order_id, T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id GROUP BY T2.order_id HAVING COUNT(*) > 2 \nA: Return the order ids and details for orderes with two or more invoices. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT name FROM patient EXCEPT SELECT T1.name FROM patient AS T1 JOIN Prescribes AS T2 ON T2.Patient = T1.SSN JOIN Medication AS T3 ON T2.Medication = T3.Code WHERE T3.name = 'Procrastin-X' \nA: Find the names of patients who are not using the medication of Procrastin-X. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT name FROM stadium WHERE NOT id IN (SELECT stadium_id FROM event) \nA: Find the names of stadiums which have never had any event. \n Additional table information: table: swimming"} -{"text": "Q: SELECT COUNT(*) FROM Documents WHERE document_status_code = 'done' \nA: How many documents have the status code done? \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT order_id FROM shipments WHERE shipment_date = (SELECT MAX(shipment_date) FROM shipments) \nA: Find the id of the order which is shipped most recently. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT T1.Season, T1.Player, T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id \nA: Who are the different players, what season do they play in, and what is the name of the team they are on? \n Additional table information: table: match_season"} -{"text": "Q: SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the marketing region code that has the most drama workshop groups? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT name FROM event ORDER BY YEAR DESC \nA: List all the event names by year from the most recent to the oldest. \n Additional table information: table: swimming"} -{"text": "Q: SELECT rID FROM Reviewer WHERE name LIKE '%Mike%' \nA: What is the id of the reviewer whose name includes the word 'Mike'? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT code, name, MIN(price) FROM products GROUP BY name \nA: Select the code of the product that is cheapest in each product category. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT COUNT(*) FROM customers \nA: How many customers are there? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' \nA: Find the last names of the members of the club 'Bootup Baltimore'. \n Additional table information: table: club_1"} -{"text": "Q: SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers \nA: What are the phone numbers of all customers and suppliers. \n Additional table information: table: department_store"} -{"text": "Q: SELECT COUNT(DISTINCT Currency_Code) FROM Drama_Workshop_Groups \nA: How many distinct currency codes are there for all drama workshop groups? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT Country FROM mountain WHERE Height > 5000 \nA: Return the countries of the mountains that have a height larger than 5000. \n Additional table information: table: climbing"} -{"text": "Q: SELECT AVG(room_count) FROM Apartments WHERE apt_type_code = 'Studio' \nA: Find the average room count of the apartments that have the 'Studio' type code. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT COUNT(DISTINCT rank) FROM captain \nA: How many different captain ranks are there? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT date_of_enrolment, date_of_completion FROM Student_Course_Enrolment \nA: What are all the dates of enrollment and completion in record? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING COUNT(*) >= 2 \nA: Show the ids for all the faculty members who have at least 2 students. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT T1.forename, T1.surname, T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING COUNT(*) > 8 UNION SELECT T1.forename, T1.surname, T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING COUNT(*) > 5 \nA: What are the drivers' first, last names and id who had more than 8 pit stops or participated in more than 5 race results? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn \nA: What are the names of scientists who are assigned to any project? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Latin' OR T1.Name = 'Pop' \nA: What is the average duration in milliseconds of tracks that belong to Latin or Pop genre? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most common maximum page size? \n Additional table information: table: store_product"} -{"text": "Q: SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = 'lead' \nA: What are the names of the songs without a lead vocal? \n Additional table information: table: music_2"} -{"text": "Q: SELECT t1.customer_name, t2.order_date FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = 'Delivered' \nA: What are the customer name and date of the orders whose status is 'Delivered'. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT MIN(seating), MAX(seating), AVG(seating) FROM track \nA: Return the minimum, maximum, and average seating across all tracks. \n Additional table information: table: race_track"} -{"text": "Q: SELECT COUNT(DISTINCT rating) FROM film \nA: Count the number of different film ratings. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T2.Store_Name FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.City_Town = 'Feliciaberg' \nA: What are the names of the drama workshop groups with address in Feliciaberg city? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT Headquarters, Industry FROM company \nA: What are the headquarters and industries of all companies? \n Additional table information: table: company_employee"} -{"text": "Q: SELECT T1.resident_id, T1.other_details, COUNT(*) FROM Residents AS T1 JOIN Residents_Services AS T2 ON T1.resident_id = T2.resident_id GROUP BY T1.resident_id ORDER BY COUNT(*) DESC \nA: How many services has each resident requested? List the resident id, details, and the count in descending order of the count. \n Additional table information: table: local_govt_and_lot"} -{"text": "Q: SELECT COUNT(*) FROM STUDENTS WHERE NOT student_id IN (SELECT student_id FROM Behavior_Incident) \nA: How many students are not involved in any behavior incident? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT AVG(T1.price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name \nA: What are the average prices of products for each manufacturer? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT state FROM bank GROUP BY state ORDER BY SUM(no_of_customers) DESC LIMIT 1 \nA: Find the state which has the most number of customers. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT Product_Type_Code FROM Products WHERE Product_Price > 4500 INTERSECT SELECT Product_Type_Code FROM Products WHERE Product_Price < 3000 \nA: Show the product type codes that have both products with price higher than 4500 and products with price lower than 3000. \n Additional table information: table: solvency_ii"} -{"text": "Q: SELECT name FROM mill WHERE LOCATION <> 'Donceel' \nA: What are the names of the mills which are not located in 'Donceel'? \n Additional table information: table: architecture"} -{"text": "Q: SELECT T2.employee_name, T3.employee_name FROM Documents_to_be_destroyed AS T1 JOIN Employees AS T2 ON T1.Destruction_Authorised_by_Employee_ID = T2.employee_id JOIN Employees AS T3 ON T1.Destroyed_by_Employee_ID = T3.employee_id \nA: List the names of the employees who authorized the destruction of documents and the employees who destroyed the corresponding documents. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT AVG(order_quantity) FROM order_items \nA: What is the average amount of items ordered in each order? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT COUNT(DISTINCT product_type_code) FROM products_for_hire \nA: How many different product types are there? \n Additional table information: table: products_for_hire"} -{"text": "Q: SELECT T1.course_name FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_Id GROUP BY T1.course_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the course with the most registered students? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT T2.title, AVG(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY AVG(T1.stars) DESC LIMIT 1 \nA: Find the movies with the highest average rating. Return the movie titles and average rating. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT MIN(order_date) FROM Customer_Orders WHERE order_status_code = 'Cancelled') \nA: Find the ids of all distinct customers who made order after some orders that were Cancelled. \n Additional table information: table: department_store"} -{"text": "Q: SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T1.Title = 'Balls to the Wall' \nA: Which artist does the album 'Balls to the Wall' belong to? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT flno, distance FROM Flight ORDER BY price DESC LIMIT 1 \nA: What is the flight number and its distance for the one with the maximum price? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT COUNT(DISTINCT name) FROM projects \nA: How many different projects are there? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT T2.Name, T1.ArtistId FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistID GROUP BY T1.ArtistId HAVING COUNT(*) >= 3 ORDER BY T2.Name NULLS FIRST \nA: Please list the name and id of all artists that have at least 3 albums in alphabetical order. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT T1.Name FROM Tourist_Attractions AS T1, VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Vincent' INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1, VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Marcelle' \nA: What are the names of the tourist attractions Vincent and Marcelle visit? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1 \nA: List the name of the shop with the latest open year. \n Additional table information: table: device"} -{"text": "Q: SELECT flno FROM Flight ORDER BY distance ASC NULLS FIRST LIMIT 3 \nA: Show the flight number of flights with three lowest distances. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT COUNT(*) FROM Addresses WHERE state_province_county = 'Georgia' \nA: How many employees live in Georgia? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT minister, party_name FROM party ORDER BY took_office DESC \nA: Who are the ministers and what parties do they belong to, listed descending by the times they took office? \n Additional table information: table: party_people"} -{"text": "Q: SELECT allergytype FROM Allergy_type WHERE allergy = 'Cat' \nA: What is the type of allergy Cat? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT MAX(t1.low_temperature), AVG(t1.precipitation) FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id WHERE t2.network_name = 'Amersham' \nA: Give me the maximum low temperature and average precipitation at the Amersham station. \n Additional table information: table: station_weather"} -{"text": "Q: SELECT MAX(settlement_amount), MIN(settlement_amount) FROM settlements \nA: Find the maximum and minimum settlement amount. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT * FROM departments WHERE department_name = 'Marketing' \nA: What is all the information about the Marketing department? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1 \nA: List the countries that have more than one mountain. \n Additional table information: table: climbing"} -{"text": "Q: SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY AVG(room_count) DESC LIMIT 3 \nA: Show the top 3 apartment type codes sorted by the average number of rooms in descending order. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly' \nA: What are the countries that have never participated in any friendly-type competitions? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT TYPE FROM artwork GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 \nA: List the most common type of artworks. \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT card_number, name, hometown FROM member ORDER BY LEVEL DESC \nA: What are the card numbers, names, and hometowns of every member ordered by descending level? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT COUNT(*) FROM customers WHERE city = 'Prague' \nA: How many customers live in Prague city? \n Additional table information: table: store_1"} -{"text": "Q: SELECT name FROM instructor WHERE salary > (SELECT MIN(salary) FROM instructor WHERE dept_name = 'Biology') \nA: Find names of instructors with salary greater than that of some (at least one) instructor in the Biology department. \n Additional table information: table: college_2"} -{"text": "Q: SELECT payment_method FROM Customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the payment method that is used most frequently. \n Additional table information: table: customer_deliveries"} -{"text": "Q: SELECT T1.cmi_details FROM Customer_Master_Index AS T1 JOIN CMI_Cross_References AS T2 ON T1.master_customer_id = T2.master_customer_id WHERE T2.source_system_code = 'Tax' \nA: what are the details of the cmi masters that have the cross reference code 'Tax'? \n Additional table information: table: local_govt_mdm"} -{"text": "Q: SELECT allergytype, COUNT(*) FROM Allergy_type GROUP BY allergytype \nA: What are the allergy types and how many allergies correspond to each one? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT Name FROM Team \nA: Show all team names. \n Additional table information: table: match_season"} -{"text": "Q: SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees) \nA: How many universities have a campus fee greater than the average? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT COUNT(DISTINCT school_id) FROM basketball_match \nA: How many schools are in the basketball match? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT rID FROM Reviewer WHERE name = 'Daniel Lewis' \nA: What is the reviewer id of Daniel Lewis? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 3 INTERSECT SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 4 \nA: What are the names of reviewers who had rated 3 star and 4 star? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT Name FROM city ORDER BY White DESC LIMIT 5 \nA: What are the names of the five cities with the greatest proportion of white people? \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT T1.id, T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the id and name of the browser that is compatible with the most web accelerators? \n Additional table information: table: browser_web"} -{"text": "Q: SELECT MAX(used_kb), MIN(used_kb), AVG(used_kb) FROM screen_mode \nA: List the maximum, minimum and average number of used kb in screen mode. \n Additional table information: table: phone_1"} -{"text": "Q: SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1 \nA: Show the result of the submission with the highest score. \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT * FROM products WHERE price BETWEEN 60 AND 120 \nA: Find all information of all the products with a price between $60 and $120. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT station_id, LOCATION, manager_name FROM gas_station ORDER BY open_year NULLS FIRST \nA: Show gas station id, location, and manager_name for all gas stations ordered by open year. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT DISTINCT channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Tillman Ernser' \nA: Which contact channel has been used by the customer with name 'Tillman Ernser'? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1 \nA: What is the last date that a staff member left a project? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT AVG(age), gender FROM Person GROUP BY gender \nA: What is the average age for each gender? \n Additional table information: table: network_2"} -{"text": "Q: SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.rating DESC LIMIT 3 \nA: What are the names of the singers who sang the top 3 most highly rated songs and what countries do they hail from? \n Additional table information: table: music_1"} -{"text": "Q: SELECT COUNT(DISTINCT name) FROM products WHERE NOT name IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T2.name = 'Sony') \nA: Find number of products which Sony does not make. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id HAVING COUNT(*) >= 2 \nA: Show the names of counties that have at least two delegates. \n Additional table information: table: election"} -{"text": "Q: SELECT COUNT(*) FROM Employees \nA: How many employees do we have? \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT cust_name FROM customer WHERE credit_score < (SELECT AVG(credit_score) FROM customer) \nA: What are the names of customers with credit score less than the average credit score across customers? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT bname FROM bank WHERE state = 'New York' \nA: Find the branch names of banks in the New York state. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT SUM(credits), dept_name FROM course GROUP BY dept_name \nA: Find the total credits of courses provided by different department. \n Additional table information: table: college_2"} -{"text": "Q: SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff \nA: What are the last names that are used by customers and staff? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT product_name, product_category_code FROM products ORDER BY product_price DESC LIMIT 1 \nA: What is the name and category code of the product with the highest price? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT AVG(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = 'Robinson R-22' \nA: What is the average total number of passengers of airports that are associated with aircraft 'Robinson R-22'? \n Additional table information: table: aircraft"} -{"text": "Q: 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' \nA: Which orders are made by the customer named 'Jeramie'? Give me the order ids and status. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT T2.title, T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars > (SELECT AVG(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.director = 'James Cameron') \nA: What are the titles and directors of all movies that have a rating higher than the average James Cameron film rating? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = 'City Mall' INTERSECT SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = 'Village Store' \nA: Find the names of districts where have both city mall and village store type stores. \n Additional table information: table: store_product"} -{"text": "Q: SELECT employee_id, first_name, last_name, salary FROM employees WHERE salary > (SELECT AVG(salary) FROM employees) AND department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%J%') \nA: What are the ids, full names, and salaries for employees making more than average and who work in a department with employees who have the letter J in their first name? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC LIMIT 1 \nA: What is the time of elimination for the wrestler with the most days held? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT customer_name FROM Customers ORDER BY date_became_customer NULLS FIRST LIMIT 5 \nA: Find the name of the first 5 customers. \n Additional table information: table: customer_deliveries"} -{"text": "Q: SELECT COUNT(DISTINCT class_section) FROM CLASS WHERE crs_code = 'ACCT-211' \nA: What is the number of different class sections offered in the course ACCT-211? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T2.pName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = (SELECT cName FROM college ORDER BY enr DESC LIMIT 1) \nA: Find the name of the tryout players who are from the college with largest size. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT T1.theme, T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.ticket_price > (SELECT AVG(ticket_price) FROM exhibition) \nA: Return the names of artists and the themes of their exhibitions that had a ticket price higher than average. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT COUNT(*) FROM Songs \nA: Count the number of songs. \n Additional table information: table: music_2"} -{"text": "Q: SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.label = 'Universal Music Group' \nA: What are the names of all the songs whose album is under the label of 'Universal Music Group'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT AVG(credit_score) FROM customer WHERE NOT cust_id IN (SELECT cust_id FROM loan) \nA: What is the average credit score for customers who have never taken a loan? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT T1.name, T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance < T2.balance \nA: Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT COUNT(*) FROM Student WHERE age = 18 \nA: How many students are 18 years old? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT COUNT(DISTINCT brand) FROM camera_lens \nA: How many different kinds of lens brands are there? \n Additional table information: table: mountain_photos"} -{"text": "Q: SELECT DISTINCT T1.customer_first_name, T1.customer_last_name, T1.phone_number FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id \nA: What are the distinct first names, last names, and phone numbers for customers with accounts? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT main_industry, SUM(market_value) FROM company GROUP BY main_industry \nA: Show all main industry and total market value in each industry. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT title FROM course WHERE dept_name = 'Statistics' INTERSECT SELECT title FROM course WHERE dept_name = 'Psychology' \nA: What is the title of a course that is listed in both the Statistics and Psychology departments? \n Additional table information: table: college_2"} -{"text": "Q: SELECT DISTINCT building FROM Faculty \nA: What buildings have faculty offices? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT Shop_Name FROM shop ORDER BY Open_Year ASC NULLS FIRST \nA: Return the names of shops, ordered by year of opening ascending. \n Additional table information: table: device"} -{"text": "Q: SELECT T2.lot_details FROM INVESTORS AS T1 JOIN LOTS AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = 'l' \nA: Return the lot details of lots that belong to investors with details 'l'? \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT date_of_notes FROM Assessment_Notes \nA: What are the dates of the assessment notes? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT COUNT(DISTINCT President_Vote) FROM VOTING_RECORD \nA: How many distinct president votes are recorded? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T1.party_name, T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id \nA: What are the names of parties and their respective regions? \n Additional table information: table: party_people"} -{"text": "Q: SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' AND t3.sex = 'M' \nA: Find all the male members of club 'Hopkins Student Enterprises'. Show the first name and last name. \n Additional table information: table: club_1"} -{"text": "Q: SELECT event_name FROM party_events GROUP BY event_name HAVING COUNT(*) > 2 \nA: Which event names were used more than twice for party events? \n Additional table information: table: party_people"} -{"text": "Q: SELECT FacID FROM Faculty WHERE Sex = 'M' \nA: Show ids for all the male faculty. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Aaron' AND t1.lname = 'Turon' \nA: Find all the papers published by 'Aaron Turon'. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1 \nA: What is the song in the volume with the maximum weeks on top? \n Additional table information: table: music_4"} -{"text": "Q: SELECT COUNT(*) FROM party_events \nA: Count the number of party events. \n Additional table information: table: party_people"} -{"text": "Q: SELECT name FROM accounts ORDER BY name NULLS FIRST \nA: List all customers\u2019 names in the alphabetical order. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT AVG(enr) FROM College \nA: How many students, on average, does each college have enrolled? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT document_type_code FROM documents WHERE document_name = 'David CV' \nA: Return the type code of the document named 'David CV'. \n Additional table information: table: document_management"} -{"text": "Q: SELECT classroom, COUNT(*) FROM list GROUP BY classroom \nA: Report the number of students in each classroom. \n Additional table information: table: student_1"} -{"text": "Q: SELECT name FROM enzyme ORDER BY name DESC \nA: What are the names of enzymes in descending order? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT COUNT(*), dept_name FROM student GROUP BY dept_name \nA: Find the total number of students in each department. \n Additional table information: table: college_2"} -{"text": "Q: SELECT T1.Name, T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID ORDER BY T2.Height DESC LIMIT 1 \nA: Show the name and population of the country that has the highest roller coaster. \n Additional table information: table: roller_coaster"} -{"text": "Q: SELECT Date, Name, venue FROM event ORDER BY Event_Attendance DESC \nA: Show the dates, places, and names of events in descending order of the attendance. \n Additional table information: table: news_report"} -{"text": "Q: SELECT Adults FROM Reservations WHERE CheckIn = '2010-10-23' AND FirstName = 'CONRAD' AND LastName = 'SELBIG' \nA: Find the number of adults for the room reserved and checked in by CONRAD SELBIG on Oct 23, 2010. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT TYPE, AVG(Tonnage) FROM ship GROUP BY TYPE \nA: Show different types of ships and the average tonnage of ships of each type. \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT country FROM stadium GROUP BY country HAVING COUNT(*) <= 3 \nA: Which country has at most 3 stadiums listed? \n Additional table information: table: swimming"} -{"text": "Q: SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math' ORDER BY T3.tot_cred NULLS FIRST \nA: What are the names of all instructors who advise students in the math depart sorted by total credits of the student. \n Additional table information: table: college_2"} -{"text": "Q: SELECT T3.location, T3.Representative_Name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id ORDER BY T2.Assets_billion DESC LIMIT 3 \nA: find the location and Representative name of the gas stations owned by the companies with top 3 Asset amounts. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT name FROM Employee EXCEPT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Boeing 737-800' \nA: What are the names of all employees who are not certified to fly Boeing 737-800s? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT project_id FROM Documents GROUP BY project_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Return the id of the project that has the fewest corresponding documents. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1 \nA: Which authors have submitted to more than one workshop? \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT investor_id, AVG(share_count) FROM TRANSACTIONS GROUP BY investor_id ORDER BY AVG(share_count) NULLS FIRST \nA: Show the average share count of transactions each each investor, ordered by average share count. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT T1.customer_name FROM customers AS T1, orders AS T2, 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 \nA: List the names of the customers who have once bought product 'food'. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT T1.name, T1.num_employees FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id WHERE T2.temporary_acting = 'Yes' \nA: Show the name and number of employees for the departments managed by heads whose temporary acting value is 'Yes'? \n Additional table information: table: department_management"} -{"text": "Q: SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id = T2.id ORDER BY T2.dock_count DESC LIMIT 1 \nA: What is the id of the trip that started from the station with the highest dock count? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT LastName FROM CUSTOMER EXCEPT SELECT T1.LastName FROM CUSTOMER AS T1 JOIN Invoice AS T2 ON T1.CustomerId = T2.CustomerId WHERE T2.total > 20 \nA: What are the last names of customers without invoice totals exceeding 20? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT name FROM student WHERE dept_name = 'History' ORDER BY tot_cred DESC LIMIT 1 \nA: What is the name of the student who has the highest total credits in the History department. \n Additional table information: table: college_2"} -{"text": "Q: SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown HAVING COUNT(*) >= 2 \nA: Give the hometowns from which two or more gymnasts are from. \n Additional table information: table: gymnast"} -{"text": "Q: SELECT phone, room, building FROM Faculty WHERE Fname = 'Jerry' AND Lname = 'Prince' \nA: Show the phone, room, and building for the faculty named Jerry Prince. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT TYPE, COUNT(*) FROM operate_company GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most common company type, and how many are there? \n Additional table information: table: flight_company"} -{"text": "Q: SELECT first_name, last_name, salary FROM employees WHERE salary < 6000 \nA: List the full name (first and last name), and salary for those employees who earn below 6000. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT gender_code, COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC \nA: Sort the gender codes in descending order of their corresponding number of guests. Return both the gender codes and counts. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT name, openning_year FROM cinema ORDER BY openning_year DESC \nA: Show all the cinema names and opening years in descending order of opening year. \n Additional table information: table: cinema"} -{"text": "Q: SELECT TYPE, COUNT(*) FROM store GROUP BY TYPE \nA: Find all types of store and number of them. \n Additional table information: table: store_product"} -{"text": "Q: SELECT name FROM accounts ORDER BY name NULLS FIRST \nA: What are the names of all the customers in alphabetical order? \n Additional table information: table: small_bank_1"} -{"text": "Q: 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 \nA: For each customer who has at least two orders, find the customer name and number of orders made. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_id \nA: Find the last name of the individuals that have been contact individuals of an organization. \n Additional table information: table: e_government"} -{"text": "Q: SELECT sex, COUNT(*) FROM Faculty WHERE rank = 'AsstProf' GROUP BY sex \nA: Show the number of male and female assistant professors. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT name, job FROM Person ORDER BY name NULLS FIRST \nA: What are the names and job titles of every person ordered alphabetically by name? \n Additional table information: table: network_2"} -{"text": "Q: SELECT Shop_Name, LOCATION FROM shop ORDER BY Shop_Name ASC NULLS FIRST \nA: Return the names and locations of shops, ordered by name in alphabetical order. \n Additional table information: table: device"} -{"text": "Q: SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop' \nA: How many vocal types are used in the song 'Le Pop'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT T1.surname, T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING COUNT(*) = 11 INTERSECT SELECT T1.surname, T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING COUNT(*) > 5 \nA: What are the drivers' last names and id who had 11 pit stops and participated in more than 5 race results? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT Grape, Appelation FROM WINE \nA: List the grapes and appelations of all wines. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT COUNT(*) FROM addresses WHERE country = 'USA' \nA: How many addresses are there in country USA? \n Additional table information: table: customers_and_products_contacts"} -{"text": "Q: SELECT Name FROM mountain WHERE NOT Mountain_ID IN (SELECT Mountain_ID FROM climber) \nA: What are the names of countains that no climber has climbed? \n Additional table information: table: climbing"} -{"text": "Q: SELECT title, rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1 \nA: Which film has the highest rental rate? And what is the rate? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id GROUP BY t3.city ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the city where the most customers live. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: 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 \nA: What is the name of the activity that has the most faculty members involved in? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT song_name FROM song WHERE languages = 'english' \nA: Find the names of all English songs. \n Additional table information: table: music_1"} -{"text": "Q: SELECT zip_code FROM weather GROUP BY zip_code HAVING AVG(mean_humidity) < 70 INTERSECT SELECT zip_code FROM trip GROUP BY zip_code HAVING COUNT(*) >= 100 \nA: What are the zip codes that have an average mean humidity below 70 and had at least 100 trips come through there? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT building FROM Faculty WHERE rank = 'Professor' GROUP BY building HAVING COUNT(*) >= 10 \nA: Show all the buildings that have at least 10 professors. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT DISTINCT grade FROM list WHERE classroom = 103 \nA: Which grade is studying in classroom 103? \n Additional table information: table: student_1"} -{"text": "Q: SELECT DISTINCT name FROM instructor ORDER BY name NULLS FIRST \nA: List the distinct names of the instructors, ordered by name. \n Additional table information: table: college_2"} -{"text": "Q: SELECT T2.lot_id, AVG(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id \nA: Show the average amount of transactions for different lots. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT BirthDate FROM EMPLOYEE WHERE City = 'Edmonton' \nA: What are the birth dates of employees living in Edmonton? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT role_description FROM ROLES WHERE role_code = (SELECT role_code FROM users WHERE user_login = 1 GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1) \nA: Find the description of the most popular role among the users that have logged in. \n Additional table information: table: document_management"} -{"text": "Q: SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code HAVING COUNT(DISTINCT dept_name) < 5 \nA: Find the number of different departments in each school whose number of different departments is less than 5. \n Additional table information: table: college_1"} -{"text": "Q: SELECT grant_id, COUNT(*) FROM Documents GROUP BY grant_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: For each grant id, how many documents does it have, and which one has the most? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = 'Rock' OR T3.name = 'MPEG audio file' \nA: What are the names of all tracks that belong to the Rock genre and whose media type is MPEG? \n Additional table information: table: store_1"} -{"text": "Q: SELECT building FROM Faculty GROUP BY building ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the building that has the largest number of faculty members. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall' ORDER BY T3.amenity_name NULLS FIRST \nA: Find the name of amenities Smith Hall dorm have. ordered the results by amenity names. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT COUNT(*) FROM College \nA: How many different colleges are there? \n Additional table information: table: soccer_2"} -{"text": "Q: 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 \nA: Which cities have lower temperature in March than in July and have been once host cities? \n Additional table information: table: city_record"} -{"text": "Q: SELECT T1.name, T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T2.balance DESC LIMIT 3 \nA: What are names and savings balances of the three accounts with the highest savings balances? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT COUNT(DISTINCT dept_address) FROM department WHERE school_code = 'BUS' \nA: What are the different locations of the school with the code BUS? \n Additional table information: table: college_1"} -{"text": "Q: SELECT name FROM building EXCEPT SELECT T1.name FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id WHERE T2.founded = 2003 \nA: Show the names of buildings except for those having an institution founded in 2003. \n Additional table information: table: protein_institute"} -{"text": "Q: 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 \nA: What is the city with the most customers? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.Lastname = 'Heilo' \nA: What are the names of the songs by the artist whose last name is 'Heilo'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT SUM(share_count) FROM TRANSACTIONS \nA: What is the total share of transactions? \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: 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 \nA: Find the first and last name of the faculty who is involved in the largest number of activities. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT first_name, last_name, salary FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T3.city = 'London' \nA: display the full name (first and last name), and salary of those employees who working in any department located in London. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1 \nA: What is all the information on the airport with the largest number of international passengers? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT billing_state, COUNT(*), SUM(total) FROM invoices WHERE billing_state = 'CA' \nA: What is the number of invoices and total money billed in them from CA? \n Additional table information: table: store_1"} -{"text": "Q: SELECT theme, YEAR FROM exhibition WHERE ticket_price < 15 \nA: What are the theme and year for all exhibitions that have a ticket price under 15? \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT Allergy, COUNT(*) FROM Has_allergy GROUP BY Allergy \nA: Show all allergies with number of students affected. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT location_name, location_description FROM Ref_locations WHERE location_code = 'x' \nA: What are the name and description for location code x? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT Industry, COUNT(*) FROM Companies GROUP BY Industry \nA: Whah are the name of each industry and the number of companies in that industry? \n Additional table information: table: company_office"} -{"text": "Q: SELECT COUNT(*) FROM region AS t1 JOIN party AS t2 ON t1.region_id = t2.region_id JOIN party_events AS t3 ON t2.party_id = t3.party_id WHERE t1.region_name = 'United Kingdom' AND t3.Event_Name = 'Annaual Meeting' \nA: How many Annual Meeting events happened in the United Kingdom region? \n Additional table information: table: party_people"} -{"text": "Q: SELECT customer_id, customer_name FROM customers WHERE customer_address LIKE '%WY%' AND payment_method_code <> 'Credit Card' \nA: What are the ids and names of customers with addressed that contain WY and who do not use a credit card for payment? \n Additional table information: table: department_store"} -{"text": "Q: SELECT COUNT(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = 'Defender' \nA: How many distinct official languages are there among countries of players whose positions are defenders. \n Additional table information: table: match_season"} -{"text": "Q: SELECT COUNT(*) FROM roller_coaster \nA: How many roller coasters are there? \n Additional table information: table: roller_coaster"} -{"text": "Q: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Davis' AND t3.lname = 'Steven' \nA: What are the names of the clubs that have 'Davis Steven' as a member? \n Additional table information: table: club_1"} -{"text": "Q: SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars >= 4 ORDER BY T1.year NULLS FIRST \nA: Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1 \nA: Please show the team that has the most number of technicians. \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT DISTINCT city FROM addresses \nA: List all the distinct cities \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT COUNT(*) FROM region \nA: Count the number of regions. \n Additional table information: table: party_people"} -{"text": "Q: SELECT DISTINCT T1.fname, T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = 'Milk' OR T2.Allergy = 'Cat' \nA: Find the different first names and cities of the students who have allergy to milk or cat. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT Name FROM team WHERE NOT Team_id IN (SELECT Team FROM match_season) \nA: What are the names of teams that do no have match season record? \n Additional table information: table: match_season"} -{"text": "Q: SELECT LOCATION FROM school WHERE NOT School_ID IN (SELECT School_ID FROM Player) \nA: Which schools do not have any player? Give me the school locations. \n Additional table information: table: school_player"} -{"text": "Q: SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which customer uses the most policies? Give me the customer name. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT date_incident_start, date_incident_end FROM Behavior_Incident WHERE incident_type_code = 'NOISE' \nA: What are the start and end dates for incidents with incident type code 'NOISE'? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT t1.product_name, t1.typical_buying_price, t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = 'yellow' \nA: What are the name and typical buying and selling prices of the products that have color described as 'yellow'? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Height DESC LIMIT 1 \nA: Which company was started by the entrepreneur with the greatest height? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1 \nA: Find the physician who prescribed the highest dose. What is his or her name? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T1.fault_short_name, T3.skill_description FROM Part_Faults AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.part_fault_id = T2.part_fault_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id \nA: For all the faults of different parts, what are all the decriptions of the skills required to fix them? List the name of the faults and the skill description. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT country FROM airlines GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the country with the most number of home airlines? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT DISTINCT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.rating > 9 \nA: List the name and country of origin for all singers who have produced songs with rating above 9. \n Additional table information: table: music_1"} -{"text": "Q: SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported < (SELECT MIN(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = 'Lysanne' AND T4.staff_last_name = 'Turcotte') \nA: What are the ids of the problems reported before the date of any problem reported by Lysanne Turcotte? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code \nA: How many bookings does each booking status have? List the booking status code and the number of corresponding bookings. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT Name FROM TRACK WHERE Name LIKE '%you%' \nA: Find the names of all the tracks that contain the word 'you'. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT date, theme, sales FROM journal EXCEPT SELECT T1.date, T1.theme, T1.sales FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID \nA: List the date, theme and sales of the journal which did not have any of the listed editors serving on committee. \n Additional table information: table: journal_committee"} -{"text": "Q: SELECT AVG(capacity), MIN(capacity), MAX(capacity) FROM cinema WHERE openning_year >= 2011 \nA: Show the average, minimum, and maximum capacity for all the cinemas opened in year 2011 or later. \n Additional table information: table: cinema"} -{"text": "Q: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = 'Rock' \nA: What is the name of all tracks in the Rock genre? \n Additional table information: table: store_1"} -{"text": "Q: SELECT vehicle_id FROM Vehicles \nA: What are the ids of all vehicles? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT DISTINCT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Google' \nA: Find the first names and last names of the authors whose institution affiliation is 'Google'. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT T2.name, COUNT(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid \nA: What is the name of each aircraft and how many flights does each one complete? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T2.name = 'Creative Labs' INTERSECT SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T2.name = 'Sony' \nA: Find the name of product that is produced by both companies Creative Labs and Sony. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT T1.stu_fname, T1.stu_lname, T4.crs_description FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code \nA: Find names of all students who took some course and the course description. \n Additional table information: table: college_1"} -{"text": "Q: SELECT name, dept_name FROM student ORDER BY tot_cred NULLS FIRST \nA: What are the names of students and their respective departments, ordered by number of credits from least to greatest? \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*) FROM Person WHERE age > 30 AND job = 'engineer' \nA: HOw many engineers are older than 30? \n Additional table information: table: network_2"} -{"text": "Q: SELECT star_rating_code, AVG(price_range) FROM HOTELS GROUP BY star_rating_code \nA: What is the average price range of hotels for each each star rating code? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT T2.Name, T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID ORDER BY T2.Name ASC NULLS FIRST \nA: Show the names of members and the location of performances they attended in ascending alphabetical order of their names. \n Additional table information: table: performance_attendance"} -{"text": "Q: SELECT gname FROM Video_games WHERE gtype = 'Collectible card game' \nA: Show all video games with type Collectible card game. \n Additional table information: table: game_1"} -{"text": "Q: SELECT Pilot_name FROM pilot WHERE Team = 'Bradley' OR Team = 'Fordham' \nA: Show the names of pilots from team 'Bradley' or 'Fordham'. \n Additional table information: table: pilot_record"} -{"text": "Q: SELECT head FROM department GROUP BY departmentID ORDER BY COUNT(departmentID) NULLS FIRST LIMIT 1 \nA: What is the employee id of the head whose department has the least number of employees? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT * FROM Assessment_Notes ORDER BY date_of_notes ASC NULLS FIRST \nA: List all information about the assessment notes sorted by date in ascending order. \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = 'Heilo' AND T3.title = 'Badlands' \nA: What instrument did the musician with last name 'Heilo' use in the song 'Badlands'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT AVG(International_Passengers) FROM airport \nA: What is the average number of international passengers for an airport? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4 \nA: What are the facility codes of the apartments with more than four bedrooms? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT name, CLASS, date FROM race \nA: Show name, class, and date for all races. \n Additional table information: table: race_track"} -{"text": "Q: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) INTERSECT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30) \nA: What are the names of every person who has a friend over 40 and under 30? \n Additional table information: table: network_2"} -{"text": "Q: SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3 \nA: Show the details of the top 3 most expensive hotels. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT T1.staff_name, T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1 \nA: Return the name and job title of the staff with the latest date assigned. \n Additional table information: table: department_store"} -{"text": "Q: SELECT location_code FROM Document_locations GROUP BY location_code HAVING COUNT(*) >= 3 \nA: Show the location codes with at least 3 documents. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT project_id FROM Documents GROUP BY project_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: What is the id of the project with least number of documents? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT name, service FROM train ORDER BY TIME NULLS FIRST \nA: Show the name and service for all trains in order by time. \n Additional table information: table: train_station"} -{"text": "Q: SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211' AND T1.stu_lname LIKE 'S%' \nA: What is the first name of the student whose last name starting with the letter S and is taking ACCT-211 class? \n Additional table information: table: college_1"} -{"text": "Q: SELECT payment_method_code, COUNT(*) FROM INVOICES GROUP BY payment_method_code \nA: List the distinct payment method codes with the number of orders made \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT pPos FROM tryout GROUP BY pPos ORDER BY COUNT(*) DESC LIMIT 1 \nA: What was the most popular position at tryouts? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor \nA: How many entrepreneurs correspond to each investor? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT semester, YEAR FROM SECTION GROUP BY semester, YEAR ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the year and semester with the most courses? \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = 'Lucas' AND T1.last_name = 'Mancini' \nA: How many orders does Lucas Mancini has? \n Additional table information: table: store_1"} -{"text": "Q: SELECT store_id FROM customer GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which store has most the customers? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT COUNT(DISTINCT state) FROM college WHERE enr > (SELECT AVG(enr) FROM college) \nA: What is the number of states that has some college whose enrollment is larger than the average enrollment? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT building_short_name FROM Apartment_Buildings WHERE building_manager = 'Emma' \nA: Which buildings does 'Emma' manage? Give me the short names of the buildings. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT COUNT(DISTINCT u_id) FROM review \nA: How many different users wrote some reviews? \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination \nA: For each denomination, return the denomination and the count of schools with that denomination. \n Additional table information: table: school_player"} -{"text": "Q: SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'GELL' AND T1.lastname = 'TAMI' \nA: What are the last names of the teachers who teach the student called GELL TAMI? \n Additional table information: table: student_1"} -{"text": "Q: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'female' \nA: Find the female friends of Alice. \n Additional table information: table: network_2"} -{"text": "Q: SELECT MAX(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE '%5%' \nA: What are the account details with the largest value or with value having char '5' in it? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT COUNT(DISTINCT Name) FROM PHOTOS \nA: How many distinct names are associated with all the photos? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT T2.title, T1.mID FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the movie that has been reviewed the most? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT SUM(T1.Order_Quantity) FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_Name = 'photo' \nA: Compute the total order quantities of the product 'photo'. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT T2.Name, T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID \nA: Show the names of trains and locations of railways they are in. \n Additional table information: table: railway"} -{"text": "Q: SELECT T1.driverid, T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the ids and last names of all drivers who participated in the most races? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT COUNT(*), T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand \nA: How many medications are prescribed for each brand? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT AVG(Order_Quantity) FROM Invoices WHERE payment_method_code = 'MasterCard' \nA: What is the average quantities ordered with payment method code 'MasterCard' on invoices? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT DISTINCT (BillingCountry) FROM INVOICE \nA: Find the different billing countries for all invoices. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT customer_id, SUM(amount_paid) FROM Payments GROUP BY customer_id ORDER BY SUM(amount_paid) DESC LIMIT 1 \nA: What is the maximum total amount paid by a customer? List the customer id and amount. \n Additional table information: table: products_for_hire"} -{"text": "Q: SELECT Product_Name FROM Products WHERE NOT Product_ID IN (SELECT Product_ID FROM Products_in_Events) \nA: List the names of products that are not in any event. \n Additional table information: table: solvency_ii"} -{"text": "Q: SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Tokohu University' \nA: How many papers are published by the institution 'Tokohu University'? \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT Stories FROM buildings ORDER BY Height DESC LIMIT 1 \nA: Find the stories of the building with the largest height. \n Additional table information: table: company_office"} -{"text": "Q: SELECT MIN(salary), department_id FROM employees GROUP BY department_id \nA: return the smallest salary for every departments. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T2.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance NULLS FIRST LIMIT 1 \nA: What is the name and checking balance of the account which has the lowest savings balance? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park' \nA: Count the number of games taken place in park 'Columbia Park' in 1907. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT name, distance FROM Aircraft \nA: Show name and distance for all aircrafts. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3 \nA: what are the top 3 highest support rates? \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT payment_method_code, party_phone FROM parties WHERE party_email = 'enrico09@example.com' \nA: Find the payment method and phone of the party with email 'enrico09@example.com'. \n Additional table information: table: e_government"} -{"text": "Q: SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the payment method that is used most frequently. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT AVG(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Provisional' \nA: Show the average room count of the apartments that have booking status code 'Provisional'. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT t1.color_code, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = 'chervil' \nA: What is the color code and description of the product named 'chervil'? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT DISTINCT main_industry FROM company \nA: Show all main industry for all companies. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT COUNT(DISTINCT incident_type_code) FROM Behavior_Incident \nA: How many distinct incident type codes are there? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT AVG(rating), languages FROM song GROUP BY languages \nA: What is the average song rating for each language? \n Additional table information: table: music_1"} -{"text": "Q: SELECT price_range FROM HOTELS WHERE star_rating_code = '5' \nA: Show the price ranges of hotels with 5 star ratings. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname ORDER BY SUM(T2.amount) DESC LIMIT 1 \nA: What is the name of the bank branch that has lent the greatest amount? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration < (SELECT MAX(duration) FROM pitstops WHERE raceid = 841) \nA: What is the id and stop number for each driver that has a shorter pit stop than the driver in the race with id 841? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name = 'China' \nA: What is the description of the marketing region China? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT COUNT(*) FROM film WHERE title LIKE '%Dummy%' \nA: How many films have the word 'Dummy' in their titles? \n Additional table information: table: cinema"} -{"text": "Q: SELECT composer FROM tracks WHERE name = 'Fast As a Shark' \nA: What is the composer who created the track 'Fast As a Shark'? \n Additional table information: table: store_1"} -{"text": "Q: SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3 \nA: What are the names of the reviewers who have rated a movie more than 3 stars before? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T1.FacID, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID \nA: What are the faculty id and the number of students each faculty has? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT COUNT(*) FROM park WHERE city = 'Atlanta' \nA: How many parks are there in Atlanta city? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT DISTINCT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 1 EXCEPT SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'OTHA' AND T2.lastname = 'MOYER' \nA: What are the first and last names of the first-grade students who are NOT taught by teacher OTHA MOYER? \n Additional table information: table: student_1"} -{"text": "Q: SELECT DISTINCT Visit_Date FROM VISITS \nA: Find all the distinct visit dates. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT DISTINCT firstname FROM list WHERE classroom = 107 \nA: List the first names of all the students in room 107. \n Additional table information: table: student_1"} -{"text": "Q: SELECT dorm_name FROM dorm WHERE student_capacity > 300 \nA: Find the name of dorms that can accommodate more than 300 students. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the most prominent max page size among all the products. \n Additional table information: table: store_product"} -{"text": "Q: 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) \nA: What are the names of scientists who are not working on the project with the most hours? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT SUM(T1.crs_credit), T1.dept_code FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code GROUP BY T1.dept_code \nA: What are the total number of credits offered by each department? \n Additional table information: table: college_1"} -{"text": "Q: SELECT amount FROM payment ORDER BY amount DESC LIMIT 1 \nA: Return the amount of the largest payment. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Ryley Goldner' \nA: Show the positions of the players from the team with name 'Ryley Goldner'. \n Additional table information: table: match_season"} -{"text": "Q: SELECT AVG(acc_bal), acc_type FROM customer WHERE credit_score < 50 GROUP BY acc_type \nA: For each account type, find the average account balance of customers with credit score lower than 50. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING COUNT(*) > 3 \nA: Return complaint status codes have more than 3 corresponding complaints? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT id, name, market_share FROM browser \nA: List the ids, names and market shares of all browsers. \n Additional table information: table: browser_web"} -{"text": "Q: SELECT COUNT(*), T3.school_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T2.dept_code = T3.dept_code GROUP BY T3.school_code \nA: Find the number of classes in each school. \n Additional table information: table: college_1"} -{"text": "Q: SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id \nA: What are the names of departments that have at least one employee. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the investor who have invested in the greatest number of entrepreneurs. \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY COUNT(*) DESC LIMIT 2 \nA: What are the ids of the two department store chains with the largest number of department stores? \n Additional table information: table: department_store"} -{"text": "Q: SELECT name FROM PersonFriend WHERE friend = 'Alice' AND YEAR = (SELECT MIN(YEAR) FROM PersonFriend WHERE friend = 'Alice') \nA: What are the names of all people who are friends with Alice for the shortest amount of time? \n Additional table information: table: network_2"} -{"text": "Q: SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games \nA: What are the ids of all students who played video games and sports? \n Additional table information: table: game_1"} -{"text": "Q: SELECT Name FROM journalist WHERE NOT journalist_ID IN (SELECT journalist_ID FROM news_report) \nA: List the names of journalists who have not reported any event. \n Additional table information: table: news_report"} -{"text": "Q: SELECT name FROM projects WHERE hours BETWEEN 100 AND 300 \nA: Find the name of projects that require between 100 and 300 hours of work. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171 \nA: How many courses do the student whose id is 171 attend? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT campus FROM campuses WHERE county = 'Los Angeles' \nA: What campuses are located in the county of Los Angeles? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT Party FROM people GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the party that has the most people. \n Additional table information: table: debate"} -{"text": "Q: SELECT COUNT(*) FROM company WHERE Headquarters = 'USA' \nA: How many companies are headquartered in the US? \n Additional table information: table: company_employee"} -{"text": "Q: SELECT Company, Investor FROM entrepreneur \nA: What are the companies and investors that correspond to each entrepreneur? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT COUNT(*) FROM student WHERE sex = 'F' AND age < 25 \nA: How many female students (sex is F) whose age is below 25? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT account_id, date_account_opened, account_name, other_account_details FROM Accounts \nA: Show the id, the date of account opened, the account name, and other account detail for all accounts. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE '%court%' \nA: Find all the building full names containing the word 'court'. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT DISTINCT label FROM Albums \nA: What are the different album labels listed? \n Additional table information: table: music_2"} -{"text": "Q: SELECT title FROM Movie WHERE NOT mID IN (SELECT mID FROM Rating) \nA: What are the titles of all movies that have not been rated? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport' \nA: What is the number of routes that end at John F Kennedy International Airport? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT COUNT(*), rank FROM captain GROUP BY rank \nA: Count the number of captains that have each rank. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT COUNT(DISTINCT t3.product_id) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = 'Rodrick Heaney' \nA: How many types of products have Rodrick Heaney bought in total? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT AVG(elevation), country FROM airports GROUP BY country \nA: For each country, what is the average elevation of that country's airports? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = 'Lucas' AND T1.last_name = 'Mancini' \nA: What is the total amount of money spent by Lucas Mancini? \n Additional table information: table: store_1"} -{"text": "Q: SELECT T3.EMP_FNAME, T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM = T3.EMP_NUM WHERE DEPT_NAME = 'Biology' \nA: What are the first and last name of all biology professors? \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(*) FROM Student WHERE Advisor = 1121 \nA: Advisor 1121 has how many students? \n Additional table information: table: restaurant_1"} -{"text": "Q: SELECT COUNT(DISTINCT StuID) FROM Plays_games \nA: How many different students play games? \n Additional table information: table: game_1"} -{"text": "Q: SELECT T1.name, T1.city, T2.src_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T2.src_apid ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name and city of the airport from most of the routes start? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT COUNT(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.maxOccupancy = T1.Adults + T1.Kids \nA: How many times the number of adults and kids staying in a room reached the maximum capacity of the room? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT COUNT(DISTINCT Country) FROM climber \nA: How many distinct countries are the climbers from? \n Additional table information: table: climbing"} -{"text": "Q: SELECT customer_id FROM customers WHERE customer_name LIKE '%Diana%' \nA: What are the IDs of customers who have 'Diana' in part of their names? \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT billing_country, SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8 \nA: What are the names of the top 8 countries by total invoice size and what are those sizes? \n Additional table information: table: store_1"} -{"text": "Q: SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC NULLS FIRST \nA: List the themes of parties in ascending order of number of hosts. \n Additional table information: table: party_host"} -{"text": "Q: SELECT name FROM Employee EXCEPT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Boeing 737-800' \nA: Show names for all employees who do not have certificate of Boeing 737-800. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT name, Num_of_Component FROM furniture ORDER BY market_rate NULLS FIRST LIMIT 1 \nA: Find the name and component amount of the least popular furniture. \n Additional table information: table: manufacturer"} -{"text": "Q: SELECT t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex ORDER BY AVG(t2.unsure_rate) DESC LIMIT 1 \nA: which gender got the highest average uncertain ratio. \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population < 100000 \nA: Find the delegates who are from counties with population below 100000. \n Additional table information: table: election"} -{"text": "Q: SELECT T2.customer_first_name, T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 2 \nA: What are the first names and ids for customers who have two or more accounts? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: 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' \nA: Give me a list of distinct product ids from orders placed between 1975-01-01 and 1976-01-01? \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT title FROM course WHERE dept_name = 'Statistics' EXCEPT SELECT title FROM course WHERE dept_name = 'Psychology' \nA: What are the titles of courses that are in the Statistics department but not the Psychology department? \n Additional table information: table: college_2"} -{"text": "Q: SELECT T1.driverid, COUNT(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING COUNT(*) <= 30 \nA: Find the driver id and number of races of all drivers who have at most participated in 30 races? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T1.name FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 GROUP BY T2.f1 HAVING COUNT(*) > (SELECT COUNT(*) FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 WHERE T1.name = 'Tyler Swift') \nA: Find the names of the users whose number of followers is greater than that of the user named 'Tyler Swift'. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT fname, lname FROM student WHERE age < (SELECT AVG(age) FROM student) \nA: What is the first and last name of all students who are younger than average? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1 \nA: Find the id of the order made most recently. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT Carrier FROM phone GROUP BY Carrier ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the most frequently used carrier of the phones. \n Additional table information: table: phone_market"} -{"text": "Q: SELECT RESULT, COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC \nA: How many music festivals have had each kind of result, ordered descending by count? \n Additional table information: table: music_4"} -{"text": "Q: SELECT Fname, Lname FROM FACULTY WHERE sex = 'M' AND Building = 'NEB' \nA: Find the first names and last names of male (sex is M) faculties who live in building NEB. \n Additional table information: table: college_3"} -{"text": "Q: SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T2.Position = 'Right Wing' \nA: Show the names of clubs that have players with position 'Right Wing'. \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16' \nA: What are the different grant amounts for documents sent before '1986-08-26 20:49:27' and after the grant ended on '1989-03-16 18:27:16'? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: 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' \nA: What are the dates of the orders made by the customer named 'Jeramie'? \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT date_from FROM Project_Staff ORDER BY date_from ASC NULLS FIRST LIMIT 1 \nA: When did the first staff member start working? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT * FROM student_course_registrations WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance) \nA: What are all details of the students who registered but did not attend any course? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT AVG(age), job FROM Person GROUP BY job \nA: What is average age for different job title? \n Additional table information: table: network_2"} -{"text": "Q: SELECT MIN(distance), AVG(distance), MAX(distance) FROM Aircraft \nA: What is the minimum, average, and maximum distance of all aircrafts. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT T2.name, T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'History' \nA: What are the names and salaries of instructors who advises students in the History department? \n Additional table information: table: college_2"} -{"text": "Q: SELECT DISTINCT product_size FROM Products \nA: Show all product sizes. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT category, COUNT(*) FROM book_club GROUP BY category \nA: How many books fall into each category? \n Additional table information: table: culture_company"} -{"text": "Q: SELECT location_code, COUNT(*) FROM Document_locations GROUP BY location_code \nA: What is the code of each location and the number of documents in that location? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid' \nA: Find the names of schools that have some students playing in goalie and mid positions. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT COUNT(*), AVG(age), city_code FROM student WHERE sex = 'M' GROUP BY city_code \nA: Find the average age and number of male students (with sex M) from each city. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT Issue_Date FROM volume ORDER BY Weeks_on_Top ASC NULLS FIRST LIMIT 1 \nA: Return the issue date of the volume that has spent the fewest weeks on top. \n Additional table information: table: music_4"} -{"text": "Q: SELECT name, headquarter, founder FROM manufacturers ORDER BY revenue DESC LIMIT 1 \nA: What are the names, headquarters and founders of the company with the highest revenue? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT COUNT(DISTINCT region_id) FROM affected_region \nA: Count the number of different affected regions. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT milliseconds FROM tracks WHERE name = 'Fast As a Shark' \nA: How long does track Fast As a Shark has? \n Additional table information: table: store_1"} -{"text": "Q: SELECT DISTINCT channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Tillman Ernser' \nA: Find the contact channel code that was used by the customer named 'Tillman Ernser'. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT T1.driverid, T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE POSITION = '1' GROUP BY T1.driverid HAVING COUNT(*) >= 2 \nA: What is the id, first name, and last name of the driver who was in the first position for laptime at least twice? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT SUM(revenue), name FROM manufacturers GROUP BY name \nA: Find the total revenue for each manufacturer. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT name FROM Person WHERE age = (SELECT MAX(age) FROM person) \nA: What is the name of the person who is the oldest? \n Additional table information: table: network_2"} -{"text": "Q: SELECT T1.name_first, T1.name_last, T1.player_id, COUNT(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the first name, last name and id of the player with the most all star game experiences? Also list the count. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.distance > 5000 GROUP BY T1.eid ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the salary and name of the employee who has the most number of certificates on aircrafts with distance more than 5000? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT name_first, name_last FROM player WHERE death_year = '' \nA: What are the first name and last name of the players whose death record is empty? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie') \nA: What is the count of states with college students playing in the mid position but not as goalies? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT COUNT(*) FROM stadium \nA: How many stadiums are there? \n Additional table information: table: swimming"} -{"text": "Q: SELECT COUNT(*) FROM exhibition WHERE YEAR >= 2005 \nA: How many exhibition are there in year 2005 or after? \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4 \nA: Find the ids of the departments where any manager is managing 4 or more employees. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT AVG(T1.lat), AVG(T1.long) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id \nA: What is the average latitude and longitude of all starting stations for the trips? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT DISTINCT title FROM Movie EXCEPT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Chris Jackson' \nA: Find the titles of all movies not reviewed by Chris Jackson. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT COUNT(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54' \nA: How many project members were leaders or started working before '1989-04-24 23:51:54'? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT department_id, SUM(salary) FROM employees GROUP BY department_id HAVING COUNT(*) >= 2 \nA: What are total salaries and department id for each department that has more than 2 employees? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT COUNT(*) FROM customers \nA: Find the number of customers in total. \n Additional table information: table: customer_deliveries"} -{"text": "Q: SELECT product_category, COUNT(*) FROM mailshot_campaigns GROUP BY product_category \nA: Show all distinct product categories along with the number of mailshots in each category. \n Additional table information: table: customers_campaigns_ecommerce"} -{"text": "Q: SELECT Name FROM Products \nA: What are the names of all products? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT T2.Store_Name FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.City_Town = 'Feliciaberg' \nA: Return the the names of the drama workshop groups that are located in Feliciaberg city. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC \nA: List names of all pilot aged 30 or younger in descending alphabetical order. \n Additional table information: table: aircraft"} -{"text": "Q: SELECT card_type_code FROM Customers_cards GROUP BY card_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the code of the card type that is most common. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT allergy, allergytype FROM Allergy_type \nA: What are the allergies and their types? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT COUNT(*), T1.blockfloor FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockfloor \nA: Find the number of rooms located on each block floor. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT COUNT(*) FROM Products \nA: How many products are there? \n Additional table information: table: solvency_ii"} -{"text": "Q: SELECT role_code, role_name, role_description FROM ROLES \nA: What are all the role codes, role names, and role descriptions? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT COUNT(*) FROM services \nA: Count the total number of available services. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT first_name, last_name FROM Maintenance_Engineers WHERE NOT engineer_id IN (SELECT engineer_id FROM Engineer_Visits) \nA: Which engineers have never visited to maintain the assets? List the engineer first name and last name. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT Player FROM match_season WHERE College = 'UCLA' \nA: Show the players from college UCLA. \n Additional table information: table: match_season"} -{"text": "Q: SELECT roomName, RoomId FROM Rooms WHERE basePrice > 160 AND maxOccupancy > 2 \nA: What are the room names and ids of all the rooms that cost more than 160 and can accommodate more than two people. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT Num_of_Audience FROM festival_detail WHERE YEAR = 2008 OR YEAR = 2010 \nA: Show the number of audience in year 2008 or 2010. \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT problem_id FROM problems WHERE date_problem_reported > '1978-06-26' \nA: What are the ids of the problems which are reported after 1978-06-26? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%' \nA: Find the players whose names contain letter 'a'. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT COUNT(*) FROM Student WHERE sex = 'M' AND StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food') \nA: How many male students (sex is 'M') are allergic to any type of food? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT Fname FROM Student WHERE Major = 600 \nA: Show first name for all students with major 600. \n Additional table information: table: game_1"} -{"text": "Q: SELECT role_description FROM ROLES WHERE role_name = 'Proof Reader' \nA: Show the description for role name 'Proof Reader'. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT roomName FROM Rooms WHERE basePrice > (SELECT AVG(basePrice) FROM Rooms) \nA: Find the name of rooms whose price is higher than the average price. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = 'Heilo' AND T3.title = 'Le Pop' \nA: What instruments did the musician with the last name 'Heilo' play in the song 'Le Pop'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId \nA: What are the names of artists who have not released any albums? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT COUNT(*), T3.product_id FROM orders AS T1, 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 \nA: For each product, return its id and the number of times it was ordered. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING AVG(total_amount_purchased) > 50000 OR AVG(total_amount_purchased) < 30000 \nA: What are the ids of suppliers which have an average amount purchased of above 50000 or below 30000? \n Additional table information: table: department_store"} -{"text": "Q: SELECT AVG(access_count) FROM documents GROUP BY document_structure_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Find the average access count of documents with the least popular structure. \n Additional table information: table: document_management"} -{"text": "Q: SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the name of the shop that has the most kind of devices in stock. \n Additional table information: table: device"} -{"text": "Q: SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = 'white' OR t3.characteristic_name = 'hot' \nA: Count the products that have the color description 'white' or have the characteristic name 'hot'. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT city, state FROM bank WHERE bname = 'morningside' \nA: Find the city and state of the bank branch named morningside. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT DISTINCT product_name FROM product ORDER BY product_id NULLS FIRST \nA: What is the list of distinct product names sorted by product id? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT COUNT(*) FROM authors \nA: Count the number of authors. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT SUM(amount_piad), AVG(amount_piad) FROM claim_headers \nA: What are the total amount and average amount paid in claim headers? \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT T3.Player_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T2.Rank = 1 \nA: Show the names of players coached by the rank 1 coach. \n Additional table information: table: riding_club"} -{"text": "Q: SELECT name FROM airports WHERE city = 'Goroka' \nA: What are the names of the airports in the city of Goroka? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT roomName FROM Rooms ORDER BY basePrice NULLS FIRST \nA: List the name of all rooms sorted by their prices. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT class_code FROM CLASS WHERE class_room = 'KLR209' \nA: What are the codes of all the courses that are located in room KLR209? \n Additional table information: table: college_1"} -{"text": "Q: SELECT AVG(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T1.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211' \nA: What is the average GPA of students taking ACCT-211? \n Additional table information: table: college_1"} -{"text": "Q: SELECT fname, age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = 'Football' INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = 'Lacrosse') \nA: What are the first names and ages of all students who are playing both Football and Lacrosse? \n Additional table information: table: game_1"} -{"text": "Q: SELECT clublocation FROM club WHERE clubname = 'Hopkins Student Enterprises' \nA: Where is the club 'Hopkins Student Enterprises' located? \n Additional table information: table: club_1"} -{"text": "Q: SELECT email, phone FROM customers WHERE first_name = 'Astrid' AND last_name = 'Gruber' \nA: What is the email and phone number of Astrid Gruber the customer? \n Additional table information: table: store_1"} -{"text": "Q: SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate < 100) \nA: Show the names of cities in counties that have a crime rate less than 100. \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT gtype, COUNT(*) FROM Video_games GROUP BY gtype \nA: Show all video game types and the number of video games in each type. \n Additional table information: table: game_1"} -{"text": "Q: SELECT name FROM scientists ORDER BY name NULLS FIRST \nA: What are the names of all the scientists in alphabetical order? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT SUM(acc_bal) FROM customer WHERE state = 'Utah' OR state = 'Texas' \nA: What are the total account balances for each customer from Utah or Texas? \n Additional table information: table: loan_1"} -{"text": "Q: 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 \nA: Which activity has the most faculty members participating in? Find the activity name. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT * FROM employees WHERE salary BETWEEN (SELECT MIN(salary) FROM employees) AND 2500 \nA: display all the information of the employees whose salary if within the range of smallest salary and 2500. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT COUNT(*) FROM COURSE \nA: Count the number of courses. \n Additional table information: table: college_3"} -{"text": "Q: SELECT name, lat, city FROM station ORDER BY lat NULLS FIRST LIMIT 1 \nA: What are the name, latitude, and city of the station with the lowest latitude? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT customer_details FROM customers ORDER BY customer_details NULLS FIRST \nA: Sort the customer names in alphabetical order. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT SUM(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = 'San Francisco State University' \nA: How many people graduated from San Francisco State University in 2004? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT email_address, phone_number FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM complaints) \nA: Find the email and phone number of the customers who have never filed a complaint before. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT Destruction_Authorised_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID \nA: What are the id of each employee and the number of document destruction authorised by that employee? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT T2.directed_by FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.directed_by ORDER BY SUM(T1.show_times_per_day) DESC LIMIT 1 \nA: Show director with the largest number of show times in total. \n Additional table information: table: cinema"} -{"text": "Q: SELECT T2.cmi_cross_ref_id, T2.master_customer_id, COUNT(*) FROM Business_Rates AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id GROUP BY T2.cmi_cross_ref_id \nA: How many business rates are related to each cmi cross reference? List cross reference id, master customer id and the n \n Additional table information: table: local_govt_mdm"} -{"text": "Q: SELECT lot_details, investor_id FROM LOTS \nA: Return the lot details and investor ids. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT Accreditation_type, COUNT(*) FROM phone GROUP BY Accreditation_type \nA: How many phones belongs to each accreditation type? \n Additional table information: table: phone_1"} -{"text": "Q: SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = 'Appropriations' INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = 'Economic Matters' \nA: What are the names of parties that have both delegates on 'Appropriations' committee and \n Additional table information: table: election"} -{"text": "Q: SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) > 1 \nA: Find the locations that have more than one movie theater with capacity above 300. \n Additional table information: table: cinema"} -{"text": "Q: 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 \nA: Show the station name with at least two trains. \n Additional table information: table: train_station"} -{"text": "Q: SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee \nA: Show different nominees and the number of musicals they have been nominated. \n Additional table information: table: musical"} -{"text": "Q: SELECT average_attendance FROM stadium WHERE capacity_percentage > 100 \nA: What is the average attendance of stadiums with capacity percentage higher than 100%? \n Additional table information: table: game_injury"} -{"text": "Q: SELECT age FROM Person WHERE job = 'doctor' AND name = 'Zach' \nA: How old is the doctor named Zach? \n Additional table information: table: network_2"} -{"text": "Q: SELECT COUNT(*), t1.network_name, t1.services FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id GROUP BY t2.station_id \nA: Find the number of trains for each station, as well as the station network name and services. \n Additional table information: table: station_weather"} -{"text": "Q: SELECT Author FROM submission WHERE College = 'Florida' OR College = 'Temple' \nA: Show the names of authors from college 'Florida' or 'Temple' \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT theme, YEAR FROM exhibition ORDER BY ticket_price DESC \nA: Show theme and year for all exhibitions in an descending order of ticket price. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT AVG(Gold) FROM club_rank \nA: What is the average number of gold medals for a club? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT T3.course_name, COUNT(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id JOIN courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id \nA: How many registed students do each course have? List course name and the number of their registered students? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT T1.bname, T1.city FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T2.loan_type = 'Business' \nA: What are the names and cities of bank branches that offer loans for business? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT instrument FROM instruments GROUP BY instrument ORDER BY COUNT(*) DESC LIMIT 1 \nA: What instrument is used the most? \n Additional table information: table: music_2"} -{"text": "Q: SELECT Roles.role_description, COUNT(Employees.employee_id) FROM ROLES JOIN Employees ON Employees.role_code = Roles.role_code GROUP BY Employees.role_code HAVING COUNT(Employees.employee_id) > 1 \nA: List roles that have more than one employee. List the role description and number of employees. \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 INTERSECT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010 \nA: Find courses that ran in Fall 2009 and in Spring 2010. \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*) FROM market WHERE Number_cities < 300 \nA: How many markets have number of cities smaller than 300? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT song_name FROM song ORDER BY resolution NULLS FIRST \nA: What are the names of all songs that are ordered by their resolution numbers? \n Additional table information: table: music_1"} -{"text": "Q: SELECT MAX(support_rate), MIN(consider_rate), MIN(oppose_rate) FROM candidate \nA: Return the maximum support rate, minimum consider rate, and minimum oppose rate across all candidates? \n Additional table information: table: candidate_poll"} -{"text": "Q: 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' \nA: Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT f_id, genre_is, artist_name FROM song WHERE languages = 'english' ORDER BY rating NULLS FIRST \nA: List the id, genre and artist name of English songs ordered by rating. \n Additional table information: table: music_1"} -{"text": "Q: SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which nationality has the most hosts? \n Additional table information: table: party_host"} -{"text": "Q: SELECT T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: Which school has the fewest professors? \n Additional table information: table: college_1"} -{"text": "Q: SELECT bedType, COUNT(*) FROM Rooms GROUP BY bedType \nA: Find the number of rooms for each bed type. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT T2.first_name, T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name = 'Nancy' AND T1.last_name = 'Edwards' \nA: find the full name of employees who report to Nancy Edwards? \n Additional table information: table: store_1"} -{"text": "Q: SELECT LOCATION FROM bridge WHERE name = 'Kolob Arch' OR name = 'Rainbow Bridge' \nA: What is the location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'? \n Additional table information: table: architecture"} -{"text": "Q: SELECT COUNT(*) FROM instruments WHERE instrument = 'drums' \nA: How many songs use drums as an instrument? \n Additional table information: table: music_2"} -{"text": "Q: SELECT name, LOCATION FROM enzyme \nA: What are the names and locations of all enzymes listed? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT AVG(num_employees) FROM department WHERE ranking BETWEEN 10 AND 15 \nA: What is the average number of employees of the departments whose rank is between 10 and 15? \n Additional table information: table: department_management"} -{"text": "Q: SELECT departure_date, arrival_date FROM Flight WHERE origin = 'Los Angeles' AND destination = 'Honolulu' \nA: What are the departure and arrival dates of all flights from LA to Honolulu? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_piad = (SELECT MIN(amount_piad) FROM claim_headers) \nA: What is the name of the customer who has made the minimum amount of payment in one claim? \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT name FROM media_types \nA: What are the names of all the media types? \n Additional table information: table: store_1"} -{"text": "Q: SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25' \nA: What are the distinct details of invoices created before 1989-09-03 or after 2007-12-25? \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT COUNT(*), T3.school_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T2.dept_code = T3.dept_code GROUP BY T3.school_code \nA: How many classes exist for each school? \n Additional table information: table: college_1"} -{"text": "Q: SELECT lname, age FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Milk' INTERSECT SELECT StuID FROM Has_allergy WHERE Allergy = 'Cat') \nA: Find the last name and age of the student who has allergy to both milk and cat. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1 \nA: Return the duration of the actor with the greatest age. \n Additional table information: table: musical"} -{"text": "Q: 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 \nA: Give me the the first and last name of the faculty who advises the most students. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT t2.All_Games, t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'Clemson' \nA: What are the all games score and location of the school called Clemson? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 2 \nA: Give the codes of document types that have more than 2 corresponding documents. \n Additional table information: table: document_management"} -{"text": "Q: SELECT T1.name, T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance < T2.balance \nA: What are the names of customers who have a savings balance lower than their checking balance, and what is the total of their checking and savings balances? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT region_name FROM region WHERE region_name <> 'Denmark' \nA: Return the names of all regions other than Denmark. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT COUNT(*) FROM film \nA: Count the number of films. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT POSITION FROM pilot WHERE Join_Year < 2000 INTERSECT SELECT POSITION FROM pilot WHERE Join_Year > 2005 \nA: Show the pilot positions that have both pilots joining after year 2005 and pilots joining before 2000. \n Additional table information: table: pilot_record"} -{"text": "Q: SELECT Name FROM phone ORDER BY Price ASC NULLS FIRST \nA: List the names of phones in ascending order of price. \n Additional table information: table: phone_market"} -{"text": "Q: SELECT minister FROM party ORDER BY left_office DESC LIMIT 1 \nA: Which minister left office the latest? \n Additional table information: table: party_people"} -{"text": "Q: 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 \nA: Which is the email of the party that has used the services the most number of times? \n Additional table information: table: e_government"} -{"text": "Q: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2 \nA: List the names of aircrafts and that won matches at least twice. \n Additional table information: table: aircraft"} -{"text": "Q: SELECT account_id, account_details FROM Accounts \nA: Show all account ids and account details. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype = 'food' \nA: Show all allergies with type food. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = 'advanced database' \nA: Which course author teaches the 'advanced database' course? Give me his or her login name. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most common role for the staff? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1 \nA: What is the height of the mountain climbined by the climbing who had the most points? \n Additional table information: table: climbing"} -{"text": "Q: SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.age < 20 \nA: What is the total number of hours per week and number of games played by students under 20? \n Additional table information: table: game_1"} -{"text": "Q: SELECT city, COUNT(*) FROM station GROUP BY city HAVING COUNT(*) >= 15 \nA: What is the name of every city that has at least 15 stations and how many stations does it have? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = '8' \nA: What are the names of catalog entries with level number 8? \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker' \nA: Find the names of the students who are in the position of striker and got a yes tryout decision. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT MIN(age), AVG(age), MAX(age) FROM Student \nA: What is the minimum, mean, and maximum age across all students? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT COUNT(*) FROM products \nA: Count the number of products. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT Player_name FROM player ORDER BY Votes ASC NULLS FIRST \nA: List the names of players in ascending order of votes. \n Additional table information: table: riding_club"} -{"text": "Q: SELECT name, city, country FROM airports ORDER BY elevation DESC LIMIT 1 \nA: What is the name, city, and country of the airport with the highest elevation? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id = T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type = T4.organisation_type WHERE T2.grant_amount > 5000 AND T4.organisation_type_description = 'Research' \nA: What are the send dates for all documents that have a grant amount of more than 5000 and are involved in research? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT T1.staff_name, T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1 \nA: What is the name and job title of the staff who was assigned the latest? \n Additional table information: table: department_store"} -{"text": "Q: SELECT song_name FROM song WHERE rating < (SELECT MAX(rating) FROM song WHERE genre_is = 'blues') \nA: What are the names of all songs that have a lower rating than some song of blues genre? \n Additional table information: table: music_1"} -{"text": "Q: SELECT role_code, COUNT(*) FROM Employees GROUP BY role_code \nA: What is the code of each role and the number of employees in each role? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT LOCATION FROM station GROUP BY LOCATION HAVING COUNT(*) = 1 \nA: Show all locations with only 1 station. \n Additional table information: table: train_station"} -{"text": "Q: SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code \nA: What are the descriptions of all the project outcomes? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT name FROM person EXCEPT SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.job = 'student' \nA: What are the names of the people who have no friends who are students? \n Additional table information: table: network_2"} -{"text": "Q: SELECT T2.dept_name, AVG(T1.stu_gpa) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY AVG(T1.stu_gpa) DESC LIMIT 1 \nA: Which department has the highest average student GPA, and what is the average gpa? \n Additional table information: table: college_1"} -{"text": "Q: SELECT city FROM airports GROUP BY city HAVING COUNT(*) = 2 \nA: What are the cities with exactly two airports? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT COUNT(*), project_id FROM Documents WHERE document_type_code = 'BK' GROUP BY project_id \nA: Count the number of documents with the type code BK that correspond to each product id. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Tracy' AND t3.lname = 'Kim' \nA: For how many clubs is 'Tracy Kim' a member? \n Additional table information: table: club_1"} -{"text": "Q: SELECT train_number, TIME FROM train WHERE origin = 'Chennai' AND destination = 'Guruvayur' \nA: Find the number and time of the train that goes from Chennai to Guruvayur. \n Additional table information: table: station_weather"} -{"text": "Q: SELECT country, COUNT(*) FROM people GROUP BY country \nA: Show all countries and the number of people from each country. \n Additional table information: table: wedding"} -{"text": "Q: SELECT other_hotel_details, star_rating_code FROM HOTELS ORDER BY price_range ASC NULLS FIRST LIMIT 3 \nA: Show the details and star ratings of the 3 least expensive hotels. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT DISTINCT YEAR FROM competition WHERE Competition_type <> 'Tournament' \nA: What are the different years for all competitions that are not of type equal to tournament? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT RoomId, roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3 \nA: What are the name and id of the three highest priced rooms? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the software platform that is most common amongst all devices? \n Additional table information: table: device"} -{"text": "Q: SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed \nA: Show the ids of all employees who have authorized destruction. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees) \nA: What are the employee ids for employees who make more than the average? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT COUNT(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = 'voluptatem' \nA: How many problems are there for product voluptatem? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses \nA: Return the ids of documents that do not have expenses. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT physician, department FROM affiliated_with WHERE primaryaffiliation = 1 \nA: What are each physician's employee id and department id primarily affiliated. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT DISTINCT T1.name, T1.position FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand = 'X' \nA: Which physicians prescribe a medication of brand X? Tell me the name and position of those physicians. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT SUM(credits), dept_name FROM course GROUP BY dept_name \nA: How many total credits are offered by each department? \n Additional table information: table: college_2"} -{"text": "Q: SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker' \nA: What are the names of all students who successfully tried out for the position of striker? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT job_title, max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000 \nA: display job Title, the difference between minimum and maximum salaries for those jobs which max salary within the range 12000 to 18000. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT Name FROM climber ORDER BY Points DESC \nA: List the names of climbers in descending order of points. \n Additional table information: table: climbing"} -{"text": "Q: SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID \nA: List the name of physicians who took some appointment. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT COUNT(*) FROM actor \nA: How many actors are there? \n Additional table information: table: musical"} -{"text": "Q: SELECT T1.event_id, T1.event_details FROM EVENTS AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID = T2.Event_ID GROUP BY T1.Event_ID HAVING COUNT(*) > 1 \nA: What are the ids and details of events that have more than one participants? \n Additional table information: table: local_govt_in_alabama"} -{"text": "Q: SELECT Competition_type, COUNT(*) FROM competition GROUP BY Competition_type \nA: What are the types of competition and number of competitions for that type? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t2.customer_details = 'Dayana Robel' \nA: Find all the policy type codes associated with the customer 'Dayana Robel' \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT COUNT(*) FROM Rooms WHERE bedType = 'King' \nA: How many rooms have a king bed? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT T1.Name FROM Tourist_Attractions AS T1, VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Vincent' INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1, VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Marcelle' \nA: Which tourist attractions do the tourists Vincent and Marcelle visit? Tell me the names of the attractions. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT AVG(rating), MAX(rating) FROM review \nA: Find the average and maximum rating of all reviews. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT T1.activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID \nA: Show all the activity names and the number of faculty involved in each activity. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT T2.star_rating_description FROM HOTELS AS T1 JOIN Ref_Hotel_Star_Ratings AS T2 ON T1.star_rating_code = T2.star_rating_code WHERE T1.price_range > 10000 \nA: What are the star rating descriptions of the hotels with price above 10000? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT title FROM papers WHERE title LIKE '%ML%' \nA: Which papers have the substring 'ML' in their titles? Return the titles of the papers. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = 'Clara') AND first_name <> 'Clara' \nA: What are the full names and hire dates for employees in the same department as someone with the first name Clara, not including Clara? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT Date_of_ceremony, RESULT FROM music_festival \nA: What are the dates of ceremony and results for each music festival? \n Additional table information: table: music_4"} -{"text": "Q: SELECT COUNT(*) FROM Statements \nA: Count the number of statements. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = 'USA' GROUP BY billing_state \nA: How many invoices were billed from each state? \n Additional table information: table: store_1"} -{"text": "Q: SELECT College FROM match_season GROUP BY College ORDER BY COUNT(*) DESC LIMIT 3 \nA: Show the top 3 most common colleges of players in match seasons. \n Additional table information: table: match_season"} -{"text": "Q: SELECT FirstName, LastName FROM CUSTOMER WHERE Email = 'luisg@embraer.com.br' \nA: What is the first name and last name of the customer that has email 'luisg@embraer.com.br'? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT Accreditation_type, COUNT(*) FROM phone GROUP BY Accreditation_type \nA: Find the number of phones for each accreditation type. \n Additional table information: table: phone_1"} -{"text": "Q: SELECT COUNT(*) FROM party \nA: How many parties are there? \n Additional table information: table: party_host"} -{"text": "Q: SELECT project_id, COUNT(*) FROM Documents GROUP BY project_id \nA: How many documents correspond with each project id? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT COUNT(*), crs_code FROM CLASS GROUP BY crs_code \nA: How many sections does each course has? \n Additional table information: table: college_1"} -{"text": "Q: SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public' \nA: Find the schools that were either founded after 1850 or public. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING COUNT(*) > 4 \nA: Find the policy type used by more than 4 customers. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT COUNT(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009 \nA: Count the number of times the team 'Boston Red Stockings' lost in 2009 postseason. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT Name FROM county_public_safety WHERE NOT County_ID IN (SELECT County_ID FROM city) \nA: What are the names of counties that do not contain any cities? \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT AVG(age) FROM Student WHERE StuID IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food' INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'animal') \nA: How old are the students with allergies to food and animal types on average? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id \nA: What are the names of products that have never been ordered? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT COUNT(*), AVG(age), city_code FROM student WHERE sex = 'M' GROUP BY city_code \nA: What is the average age and how many male students are there in each city? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.Customer_id GROUP BY T1.customer_id HAVING COUNT(*) > 1 \nA: Find the the customer details and id for the customers who had more than one policy. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT document_type_code FROM Ref_Document_Types \nA: What document type codes do we have? \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT COUNT(*) FROM branch WHERE membership_amount > (SELECT AVG(membership_amount) FROM branch) \nA: How many branches where have more than average number of memberships are there? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT AVG(age), MIN(age) FROM artist WHERE country = 'United States' \nA: What is the average and minimum age of all artists from United States. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT amenity_name FROM dorm_amenity ORDER BY amenity_name NULLS FIRST \nA: List in alphabetic order all different amenities. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = 'Taizhou ( Zhejiang )' \nA: IN which year did city 'Taizhou ( Zhejiang )' serve as a host city? \n Additional table information: table: city_record"} -{"text": "Q: SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Boeing 737-800' \nA: What are the names of all employees who have a certificate to fly Boeing 737-800? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT T2.city, COUNT(*), T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the city name, id, and number of addresses corresponding to the city with the most addressed? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC \nA: What are the name of the players who received a card in descending order of the hours of training? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT name FROM products WHERE price <= 200 \nA: What are the names of products with price at most 200? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' OR T3.name = 'Psychiatry' \nA: Which physicians are affiliated with either Surgery or Psychiatry department? Give me their names. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.dribbling = (SELECT MAX(overall_rating) FROM Player_Attributes) \nA: What are the names of players who have the best dribbling? \n Additional table information: table: soccer_1"} -{"text": "Q: SELECT AVG(revenue), MAX(revenue), SUM(revenue) FROM manufacturers \nA: What are the average, maximum and total revenues of all companies? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT COUNT(DISTINCT id) FROM teaches \nA: Count the number of distinct instructors who have taught a course. \n Additional table information: table: college_2"} -{"text": "Q: SELECT job_id FROM job_history WHERE end_date - start_date > 300 GROUP BY job_id HAVING COUNT(*) >= 2 \nA: What are the job ids for jobs done more than once for a period of more than 300 days? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T1.role_description, T2.role_code, COUNT(*) FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code GROUP BY T2.role_code \nA: How many employees does each role have? List role description, id and number of employees. \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK' \nA: What is the name of the language that the film 'AIRPORT POLLOCK' is in? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT AVG(age) FROM Person \nA: What is the average age for all people in the table? \n Additional table information: table: network_2"} -{"text": "Q: SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Democratic' INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Liberal' \nA: Find the committees that have delegates both from from the democratic party and the liberal party. \n Additional table information: table: election"} -{"text": "Q: SELECT SUM(amount), T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname \nA: Find the total amount of loans offered by each bank branch. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT AVG(T1.age), T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name \nA: Find the average age of students living in each dorm and the name of dorm. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT decor, AVG(basePrice), MIN(basePrice) FROM Rooms GROUP BY decor \nA: What is the average minimum and price of the rooms for each different decor. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT gname, gtype FROM Video_games ORDER BY gname NULLS FIRST \nA: What are the names of all the video games and their types in alphabetical order? \n Additional table information: table: game_1"} -{"text": "Q: SELECT cName FROM College WHERE enr < 13000 AND state = 'AZ' UNION SELECT cName FROM College WHERE enr > 15000 AND state = 'LA' \nA: Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT email, phone FROM customers WHERE first_name = 'Astrid' AND last_name = 'Gruber' \nA: What is Astrid Gruber's email and phone number? \n Additional table information: table: store_1"} -{"text": "Q: SELECT CName FROM COURSE ORDER BY Credits NULLS FIRST \nA: What are the course names, ordered by credits? \n Additional table information: table: college_3"} -{"text": "Q: SELECT COUNT(*) FROM claims_processing_stages \nA: How many claim processing stages are there in total? \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students \nA: What are the personal names used both by some course authors and some students? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1 \nA: What are the categories of music festivals for which there have been more than 1 music festival? \n Additional table information: table: music_4"} -{"text": "Q: SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.range = 'Toubkal Atlas' INTERSECT SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.range = 'Lasta Massif' \nA: List the brands of lenses that took both a picture of mountains with range 'Toubkal Atlas' and a picture of mountains with range 'Lasta Massif' \n Additional table information: table: mountain_photos"} -{"text": "Q: SELECT lastname FROM list WHERE classroom = 111 \nA: Find the last names of students studying in room 111. \n Additional table information: table: student_1"} -{"text": "Q: SELECT Open_Date, Open_Year FROM shop WHERE Shop_Name = 'Apple' \nA: What are the open dates and years for the shop named Apple? \n Additional table information: table: device"} -{"text": "Q: SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Confirmed' INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Provisional' \nA: Show the apartment numbers of apartments with bookings that have status code both 'Provisional' and 'Confirmed' \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT Name FROM People ORDER BY Name ASC NULLS FIRST \nA: What are the names of people in ascending alphabetical order? \n Additional table information: table: gymnast"} -{"text": "Q: SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = 'Walter Hill' \nA: Show the studios that have not produced films with director 'Walter Hill'. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999 \nA: Show all director names who have a movie in both year 1999 and 2000. \n Additional table information: table: culture_company"} -{"text": "Q: SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.lastname = 'Heilo' AND T2.title = 'Der Kapitan' \nA: What are the types of vocals that the musician with the last name 'Heilo' played in 'Der Kapitan'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT T2.Location, T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft \nA: What is the location and name of the winning aircraft? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1 \nA: What is the product with the highest height? Give me the catalog entry name. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_status = 'Cancelled' \nA: What is the total number of products that are in orders with status 'Cancelled'? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT COUNT(DISTINCT id) FROM teaches \nA: How many different instructors have taught some course? \n Additional table information: table: college_2"} -{"text": "Q: SELECT school, LOCATION FROM university WHERE affiliation = 'Public' \nA: List all public schools and their locations. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT subject_name FROM SUBJECTS \nA: What are the names of all the subjects. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT DISTINCT (Famous_Release_date) FROM artist \nA: Give the distinct famous release dates for all artists. \n Additional table information: table: music_4"} -{"text": "Q: SELECT emp_fname, emp_lname FROM employee ORDER BY emp_dob NULLS FIRST LIMIT 1 \nA: What are the first and last names of the employee with the earliest date of birth? \n Additional table information: table: college_1"} -{"text": "Q: SELECT Name FROM WINE ORDER BY Score NULLS FIRST LIMIT 1 \nA: What is the name of the highest rated wine? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA' \nA: How many professors who has a either Ph.D. or MA degree? \n Additional table information: table: college_1"} -{"text": "Q: SELECT Name FROM pilot ORDER BY Age DESC \nA: What are the names of all pilots listed by descending age? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT title FROM Movie WHERE YEAR = (SELECT MAX(YEAR) FROM Movie) \nA: What is the name of the most recent movie? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T1.Actual_Delivery_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID WHERE T2.Order_Quantity = 1 \nA: What are the actual delivery dates of orders with quantity 1? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT T1.Name, T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = 'film festival' \nA: What are the names and descriptions of the photos taken at the tourist attraction 'film festival'? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT COUNT(DISTINCT Publication_Date) FROM publication \nA: What is the number of distinct publication dates? \n Additional table information: table: book_2"} -{"text": "Q: SELECT COUNT(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.gender = 'M' \nA: Find the total number of students living in the male dorm (with gender M). \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT COUNT(*) FROM customer_orders WHERE order_details = 'Second time' \nA: How many orders have detail 'Second time'? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT COUNT(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid WHERE t1.clubname = 'Bootup Baltimore' \nA: Count the number of different positions in the club 'Bootup Baltimore'. \n Additional table information: table: club_1"} -{"text": "Q: SELECT T2.name, T2.position FROM department AS T1 JOIN physician AS T2 ON T1.head = T2.EmployeeID GROUP BY departmentID ORDER BY COUNT(departmentID) NULLS FIRST LIMIT 1 \nA: Find the name and position of the head of the department with the least employees. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT COUNT(*) FROM airport WHERE NOT id IN (SELECT airport_id FROM flight WHERE pilot = 'Thompson') \nA: How many airports haven't the pilot 'Thompson' driven an aircraft? \n Additional table information: table: flight_company"} -{"text": "Q: SELECT campus FROM campuses WHERE LOCATION = 'Chico' \nA: What campuses are located in Chico? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT organization_name FROM organizations WHERE organization_name LIKE '%Party%' \nA: Find the name of organizations whose names contain 'Party'. \n Additional table information: table: e_government"} -{"text": "Q: SELECT DISTINCT Reign FROM wrestler WHERE LOCATION <> 'Tokyo , Japan' \nA: Give the different reigns of wrestlers who are not located in Tokyo, Japan. \n Additional table information: table: wrestler"} -{"text": "Q: SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1 \nA: What are the denomination more than one school have? \n Additional table information: table: school_player"} -{"text": "Q: SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park' \nA: How many games were played in park 'Columbia Park' in 1907? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT SUM(acc_bal) FROM customer WHERE state = 'Utah' OR state = 'Texas' \nA: Find the total account balance of each customer from Utah or Texas. \n Additional table information: table: loan_1"} -{"text": "Q: 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 \nA: On which day was the order placed whose shipment tracking number is 3452? \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING COUNT(*) > 1 \nA: What are the names of customers who have taken out more than one loan? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT T1.Name, T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING COUNT(*) <= 1 \nA: Show the names and ids of tourist attractions that are visited at most once. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT COUNT(*) FROM climber \nA: How many climbers are there? \n Additional table information: table: climbing"} -{"text": "Q: SELECT Address FROM LOCATIONS WHERE Location_Name = 'UK Gallery' \nA: Find the address of the location named 'UK Gallery'. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT MAX(Milliseconds), MIN(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Pop' \nA: What are the duration of the longest and shortest pop tracks in milliseconds? \n Additional table information: table: chinook_1"} -{"text": "Q: 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 \nA: Which cities' temperature in March is lower than that in July or higher than that in Oct? \n Additional table information: table: city_record"} -{"text": "Q: SELECT Headquarters FROM company GROUP BY Headquarters ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the most common headquarter for companies. \n Additional table information: table: company_employee"} -{"text": "Q: SELECT AVG(Age) FROM artist \nA: Return the average age across all artists. \n Additional table information: table: music_4"} -{"text": "Q: SELECT T1.name_first, T1.name_last, T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 3 \nA: Find the first name, last name and id for the top three players won the most player awards. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT title FROM course GROUP BY title HAVING COUNT(*) > 1 \nA: What are the titles of courses that are offered in more than one department? \n Additional table information: table: college_2"} -{"text": "Q: SELECT zip_code FROM weather GROUP BY zip_code HAVING AVG(mean_humidity) < 70 INTERSECT SELECT zip_code FROM trip GROUP BY zip_code HAVING COUNT(*) >= 100 \nA: Give me the zip code where the average mean humidity is below 70 and at least 100 trips took place. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 23 \nA: What are the issue dates of volumes associated with the artist aged 23 or younger? \n Additional table information: table: music_4"} -{"text": "Q: SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Boeing 737-800' INTERSECT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Airbus A340-300' \nA: What are the names of all employees who can fly both the Boeing 737-800 and the Airbus A340-300? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT T1.City_Town, COUNT(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T1.City_Town \nA: Show all cities along with the number of drama workshop groups in each city. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT AVG(International_Passengers) FROM airport \nA: What is the average number of international passengers of all airports? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT T1.City_Town, COUNT(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T1.City_Town \nA: How many drama workshop groups are there in each city? Return both the city and the count. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT COUNT(*) FROM College WHERE enr > 15000 \nA: How many colleges has more than 15000 students? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT COUNT(DISTINCT class_code) FROM CLASS \nA: How many different classes are there? \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(*), nationality FROM constructors GROUP BY nationality \nA: For each nationality, how many different constructors are there? \n Additional table information: table: formula_1"} -{"text": "Q: 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' \nA: Find the name of the ships that are steered by both a captain with Midshipman rank and a captain with Lieutenant rank. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT name, headquarter, revenue FROM manufacturers ORDER BY revenue DESC \nA: What are the names, headquarters and revenues for manufacturers, sorted by revenue descending? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = 'Pass' \nA: Which tests have 'Pass' results? Return the dates when the tests were taken. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%' \nA: What is the type of the document whose description starts with the word 'Initial'? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT COUNT(*), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name \nA: Find the number of products for each manufacturer, showing the name of each company. \n Additional table information: table: manufactory_1"} -{"text": "Q: 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 \nA: What is the last name of the contact individual from the Labour party organization who was contacted most recently? \n Additional table information: table: e_government"} -{"text": "Q: SELECT DISTINCT fault_status FROM Fault_Log_Parts \nA: How many fault status codes are recorded in the fault log parts table? \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT AVG(HS), MAX(HS), MIN(HS) FROM Player \nA: What is the average, maximum, and minimum for the number of hours spent training? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton' \nA: How many rooms does the Lamberton building have? \n Additional table information: table: college_2"} -{"text": "Q: 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) \nA: Find name of the project that needs the least amount of time to finish and the name of scientists who worked on it. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT name, operating_system FROM web_client_accelerator EXCEPT SELECT T1.name, T1.operating_system FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T3.name = 'Opera' \nA: Show the accelerator names and supporting operating systems that are not compatible with the browser named 'Opera'. \n Additional table information: table: browser_web"} -{"text": "Q: SELECT employee_name FROM Employees EXCEPT SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id \nA: List the employees who have not showed up in any circulation history of documents. List the employee's name. \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn \nA: List the names of patients who have made appointments. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT city FROM addresses WHERE NOT city IN (SELECT DISTINCT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id) \nA: Find the list of cities that no customer is living in. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Badlands' AND T1.StagePosition = 'back' \nA: What are the first and last names of the performer who was in the back stage position for the song 'Badlands'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1 \nA: What is the id of the problem log that is created most recently? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT product_name, product_id FROM products WHERE product_price BETWEEN 600 AND 700 \nA: Return the names and ids of all products whose price is between 600 and 700. \n Additional table information: table: department_store"} -{"text": "Q: SELECT membership_card FROM member WHERE address = 'Hartford' INTERSECT SELECT membership_card FROM member WHERE address = 'Waterbury' \nA: What is the membership card held by both members living in Hartford and ones living in Waterbury address? \n Additional table information: table: coffee_shop"} -{"text": "Q: SELECT Date, Venue FROM debate \nA: What are the date and venue of each debate? \n Additional table information: table: debate"} -{"text": "Q: SELECT minister FROM party ORDER BY left_office DESC LIMIT 1 \nA: Return the minister who left office at the latest time. \n Additional table information: table: party_people"} -{"text": "Q: SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Democratic' INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Liberal' \nA: Which committees have delegates from both democratic party and liberal party? \n Additional table information: table: election"} -{"text": "Q: SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1 \nA: Find the names of the courses that have just one student enrollment. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT event_id FROM EVENTS EXCEPT SELECT T1.event_id FROM Participants_in_Events AS T1 JOIN Participants AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE Participant_Details = 'Kenyatta Kuhn' \nA: Which events id does not have any participant with detail 'Kenyatta Kuhn'? \n Additional table information: table: local_govt_in_alabama"} -{"text": "Q: SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC \nA: display all the information for all employees who have the letters D or S in their first name and also arrange the result in descending order by salary. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T3.Fname, T3.LName, T2.gradepoint FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID \nA: What are the full names and gradepoints for all enrollments? \n Additional table information: table: college_3"} -{"text": "Q: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) INTERSECT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30) \nA: Find the name of the person who has friends with age above 40 and under age 30? \n Additional table information: table: network_2"} -{"text": "Q: SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE YEAR = 2009 OR YEAR = 2010 \nA: What are the names of the students who took classes in 2009 or 2010? \n Additional table information: table: college_2"} -{"text": "Q: SELECT Police_force FROM county_public_safety WHERE LOCATION = 'East' INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = 'West' \nA: Which police forces operate in both counties that are located in the East and in the West? \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id ORDER BY t2.age NULLS FIRST LIMIT 1 \nA: Find the name of the ship that is steered by the youngest captain. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT AVG(T1.stars), T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT MIN(YEAR) FROM Movie) \nA: What is the average rating stars and title for the oldest movie? \n Additional table information: table: movie_1"} -{"text": "Q: 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 \nA: 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. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT COUNT(*) FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid WHERE T3.Title = 'Flash' \nA: Hom many musicians performed in the song 'Flash'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT MAX(weight), MIN(weight) FROM Player \nA: What is the maximum and minimum height of all players? \n Additional table information: table: soccer_1"} -{"text": "Q: SELECT advisor FROM Student GROUP BY advisor ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which advisor has most number of students? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT T1.artist_name, T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate LIKE '%Mar%' \nA: List the name and gender for all artists who released songs in March. \n Additional table information: table: music_1"} -{"text": "Q: SELECT T1.name, T1.lat, MIN(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.end_station_id GROUP BY T2.end_station_id \nA: For each end station id, what is its name, latitude, and minimum duration for trips ended there? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT DISTINCT T1.customer_first_name, T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id \nA: Show distinct first and last names for all customers with an account. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT MAX(stu_gpa), AVG(stu_gpa), MIN(stu_gpa), dept_code FROM student GROUP BY dept_code \nA: What is the highest, lowest, and average student GPA for every department? \n Additional table information: table: college_1"} -{"text": "Q: SELECT address_line_1 FROM Course_Authors_and_Tutors \nA: What is the address of each course author or tutor? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT COUNT(*) FROM club \nA: How many clubs are there? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT name FROM station WHERE lat < 37.5 \nA: What are the names of all stations with a latitude smaller than 37.5? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989 \nA: Which publishers did not publish a book in 1989? \n Additional table information: table: culture_company"} -{"text": "Q: SELECT cName FROM college ORDER BY enr DESC LIMIT 3 \nA: What are the names of schools with the top 3 largest size? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT Destroyed_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID \nA: What are the id of each employee and the number of document destroyed by that employee? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT COUNT(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE T1.EMP_LNAME = 'Graztevski' \nA: How many classes does the professor whose last name is Graztevski teach? \n Additional table information: table: college_1"} -{"text": "Q: SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count > 100 OR amount_of_transaction > 1000 \nA: Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT COUNT(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Atsushi' AND t1.lname = 'Ohori' \nA: How many papers are 'Atsushi Ohori' the author of? \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT title, Studio FROM film WHERE Studio LIKE '%Universal%' \nA: Find the titles and studios of the films that are produced by some film studios that contained the word 'Universal'. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT T3.EMP_FNAME, T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM = T3.EMP_NUM WHERE DEPT_NAME = 'Biology' \nA: What is the first and last name of the professor in biology department? \n Additional table information: table: college_1"} -{"text": "Q: SELECT apt_type_code, MAX(room_count), MIN(room_count) FROM Apartments GROUP BY apt_type_code \nA: Return each apartment type code along with the maximum and minimum number of rooms among each type. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2 \nA: List the names of studios that have at least two films. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT County_name FROM county ORDER BY Population DESC LIMIT 1 \nA: Show the name of the county with the biggest population. \n Additional table information: table: election"} -{"text": "Q: SELECT t4.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id JOIN event AS t3 ON t2.event_id = t3.id JOIN stadium AS t4 ON t4.id = t3.stadium_id WHERE t1.nationality = 'Australia' \nA: Find the names of stadiums that some Australian swimmers have been to. \n Additional table information: table: swimming"} -{"text": "Q: SELECT T1.customer_id, T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 3 \nA: What are the id and details of the customers who have at least 3 events? \n Additional table information: table: local_govt_and_lot"} -{"text": "Q: SELECT T1.Product_Name FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name HAVING COUNT(*) >= 2 ORDER BY T1.Product_Name NULLS FIRST \nA: Show the names of products that are in at least two events in ascending alphabetical order of product name. \n Additional table information: table: solvency_ii"} -{"text": "Q: SELECT subject_name FROM SUBJECTS \nA: List all the subject names. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT YEAR, AVG(attendance) FROM home_game GROUP BY YEAR \nA: What is the average number of attendance at home games for each year? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_number = 'Suite 634' \nA: What is the booking status code of the apartment with apartment number 'Suite 634'? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT COUNT(*) FROM savings WHERE balance > (SELECT AVG(balance) FROM savings) \nA: Find the number of accounts with a savings balance that is higher than the average savings balance. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT name FROM event ORDER BY YEAR DESC LIMIT 1 \nA: What is the name of the event that happened in the most recent year? \n Additional table information: table: swimming"} -{"text": "Q: SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC \nA: List the total points of gymnasts in descending order of floor exercise points. \n Additional table information: table: gymnast"} -{"text": "Q: SELECT T1.FirstName, T1.SupportRepId FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) >= 10 \nA: What are the first names and support rep ids for employees serving 10 or more customers? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT T1.Claim_id, COUNT(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id \nA: How many settlements does each claim correspond to? List the claim id and the number of settlements. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT name, city, country FROM airports ORDER BY elevation DESC LIMIT 1 \nA: Find the name, city, and country of the airport that has the highest latitude. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT T2.balance, T3.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance DESC \nA: Find the name, checking balance and savings balance of all accounts in the bank sorted by their total checking and savings balance in descending order. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = 'Shanghai' \nA: What is the temperature of 'Shanghai' city in January? \n Additional table information: table: city_record"} -{"text": "Q: SELECT T2.Lname FROM DEPARTMENT AS T1 JOIN FACULTY AS T2 ON T1.DNO = T3.DNO JOIN MEMBER_OF AS T3 ON T2.FacID = T3.FacID WHERE T1.DName = 'Computer Science' \nA: Find the last names of faculties who are members of computer science department. \n Additional table information: table: college_3"} -{"text": "Q: SELECT COUNT(*) FROM Employees \nA: Find the number of employees we have. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC \nA: Show names of actors in descending order of the year their musical is awarded. \n Additional table information: table: musical"} -{"text": "Q: SELECT SUM(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name <> 'Brown' \nA: Find the total savings balance of all accounts except the account with name \u2018Brown\u2019. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT COUNT(*) FROM customer WHERE active = '1' \nA: Count the number of customers who are active. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT name FROM stadium WHERE capacity < (SELECT AVG(capacity) FROM stadium) \nA: Find the names of stadiums whose capacity is smaller than the average capacity. \n Additional table information: table: swimming"} -{"text": "Q: SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 1996 \nA: What is the average fee for a CSU campus in the year of 1996? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT COUNT(*) FROM Vehicles \nA: How many vehicle in total? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.start_date = (SELECT MAX(start_date) FROM policies) \nA: Which customer is associated with the latest policy? \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT T2.Dname, T2.Room FROM COURSE AS T1 JOIN DEPARTMENT AS T2 ON T1.DNO = T2.DNO WHERE T1.CName = 'INTRODUCTION TO COMPUTER SCIENCE' \nA: Find the department name and room of the course INTRODUCTION TO COMPUTER SCIENCE. \n Additional table information: table: college_3"} -{"text": "Q: SELECT DISTINCT allergytype FROM Allergy_type \nA: Show all allergy types. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION <> 'East' \nA: What are the different police forces of counties that are not located in the East? \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT COUNT(*) FROM debate \nA: How many debates are there? \n Additional table information: table: debate"} -{"text": "Q: SELECT COUNT(DISTINCT last_name) FROM actor \nA: How many different last names do the actors and actresses have? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT Date FROM perpetrator ORDER BY Killed DESC \nA: List the date of perpetrators in descending order of the number of people killed. \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT AVG(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.city_code = 'NYC' AND T2.Election_Cycle = 'Spring' \nA: Find the average age of students who live in the city with code 'NYC' and have secretary votes in the spring election cycle. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant' \nA: What are the names of captains that have either the rank Midshipman or Lieutenant? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING COUNT(*) > 1 \nA: Find the dates on which more than one revisions were made. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_outcomes) \nA: Which projects have no outcome? List the project details. \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT first_name, last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163) \nA: What is the full name ( first name and last name ) for those employees who gets more salary than the employee whose id is 163? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T1.Marketing_Region_Name FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code = T2.Marketing_Region_Code WHERE T2.Store_Name = 'Rob Dinning' \nA: What is the name of the marketing region that the store Rob Dinning belongs to? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT product FROM product WHERE product <> (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1) \nA: What are the names of all products that are not the most frequently-used maximum page size? \n Additional table information: table: store_product"} -{"text": "Q: SELECT DISTINCT T2.problem_id, T2.problem_log_id FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T1.staff_first_name = 'Rylan' AND T1.staff_last_name = 'Homenick' \nA: Which problem id and log id are assigned to the staff named Rylan Homenick? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Dameon' AND T2.staff_last_name = 'Frami' UNION SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Jolie' AND T2.staff_last_name = 'Weber' \nA: What are the id of problems reported by the staff named Dameon Frami or Jolie Weber? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT DISTINCT Location_Name FROM LOCATIONS \nA: What are the distinct location names? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT city_code, COUNT(*) FROM Student GROUP BY city_code \nA: Show all cities and corresponding number of students. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT Category FROM music_festival WHERE RESULT = 'Awarded' \nA: Return the categories of music festivals that have the result 'Awarded'. \n Additional table information: table: music_4"} -{"text": "Q: SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = 'Human Resource' OR T2.role_name = 'Manager' \nA: What are the employee ids of the employees whose role name is 'Human Resource' or 'Manager'? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = 'operating system' OR T2.course_name = 'data structure' \nA: What are the addresses of the course authors who teach either 'operating system' or 'data structure' course. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which film has the most copies in the inventory? List both title and id. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT hire_date FROM employees WHERE NOT first_name LIKE '%M%' \nA: when is the hire date for those employees whose first name does not containing the letter M? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT COUNT(*) FROM DEPARTMENT WHERE Division = 'AS' \nA: How many departments are in the division AS? \n Additional table information: table: college_3"} -{"text": "Q: SELECT T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Which kind of part has the least number of faults? List the part name. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT COUNT(*), T1.company_id FROM Third_Party_Companies AS T1 JOIN Assets AS T2 ON T1.company_id = T2.supplier_company_id GROUP BY T1.company_id \nA: How many assets does each third party company supply? List the count and the company id. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT COUNT(*) FROM region \nA: How many regions do we have? \n Additional table information: table: storm_record"} -{"text": "Q: SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the most popular room in the hotel. The most popular room is the room that had seen the largest number of reservations. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT COUNT(*) FROM Companies WHERE Industry = 'Banking' OR Industry = 'Conglomerate' \nA: Find the number of companies whose industry is 'Banking' or 'Conglomerate', \n Additional table information: table: company_office"} -{"text": "Q: SELECT T1.Name, MAX(T1.Price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name \nA: Select the name of each manufacturer along with the name and price of its most expensive product. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT DISTINCT building FROM Faculty \nA: Show all the distinct buildings that have faculty rooms. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT bname FROM bank ORDER BY no_of_customers DESC LIMIT 1 \nA: Find the branch name of the bank that has the most number of customers. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop' \nA: What instruments does the the song 'Le Pop' use? \n Additional table information: table: music_2"} -{"text": "Q: SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'MARROTTE' AND T2.lastname = 'KIRK' \nA: Which are the first and last names of the students taught by MARROTTE KIRK? \n Additional table information: table: student_1"} -{"text": "Q: SELECT organization_name FROM organizations ORDER BY date_formed ASC NULLS FIRST \nA: What are the names of organizations, ordered by the date they were formed, ascending? \n Additional table information: table: e_government"} -{"text": "Q: SELECT T1.Name, T3.Visit_Date FROM Tourist_Attractions AS T1, VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Vincent' OR T2.Tourist_Details = 'Vivian' \nA: For each tourist attraction, return its name and the date when the tourists named Vincent or Vivian visited there. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM entrepreneur) \nA: What are the names of people who are not entrepreneurs? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT district_name FROM district WHERE city_area > 10 OR City_Population > 100000 \nA: What are the names of all districts with a city area greater than 10 or have more than 100000 people living there? \n Additional table information: table: store_product"} -{"text": "Q: SELECT star_rating_code, AVG(price_range) FROM HOTELS GROUP BY star_rating_code \nA: Show the average price of hotels for each star rating code. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT T2.name, T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T1.register_year = 2016 \nA: What are the member names and hometowns of those who registered at a branch in 2016? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT Area, County FROM APPELLATIONS \nA: List the area and county of all appelations. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT T1.region_name, COUNT(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id \nA: Show the name for regions and the number of storms for each region. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT Advisor, COUNT(*) FROM Student GROUP BY Advisor ORDER BY COUNT(Advisor) DESC LIMIT 1 \nA: Which Advisor has most of students? List advisor and the number of students. \n Additional table information: table: restaurant_1"} -{"text": "Q: SELECT AVG(bedroom_count) FROM Apartments \nA: Find the average number of bedrooms of all the apartments. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT AVG(t1.age), AVG(Years_working), t2.work_type FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_id = t2.journalist_id GROUP BY t2.work_type \nA: Find the average age and experience working length of journalists working on different role type. \n Additional table information: table: news_report"} -{"text": "Q: SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC NULLS FIRST LIMIT 1 \nA: Find the name of the product that has the smallest capacity. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT COUNT(*) FROM products WHERE product_category_code = 'Spices' AND typical_buying_price > 1000 \nA: How many products are in the 'Spices' category and have a typical price of over 1000? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT Publication_Date FROM publication ORDER BY Price DESC \nA: What are the dates of publications in descending order of price? \n Additional table information: table: book_2"} -{"text": "Q: SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = '660 Shea Crescent' OR T2.How_to_Get_There = 'walk' \nA: Find the names of the tourist attractions that is either accessible by walk or at address 660 Shea Crescent. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT AVG(price) FROM Flight WHERE origin = 'Los Angeles' AND destination = 'Honolulu' \nA: What is the average price for flights from Los Angeles to Honolulu. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT T3.Shop_Name, T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID \nA: What are the names of device shops, and what are the carriers that they carry devices in stock for? \n Additional table information: table: device"} -{"text": "Q: SELECT Title FROM book WHERE NOT Book_ID IN (SELECT Book_ID FROM publication) \nA: List the titles of books that are not published. \n Additional table information: table: book_2"} -{"text": "Q: SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId GROUP BY T2.MediaTypeId ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: What is the name of the media type that is least common across all tracks? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT T1.name, COUNT(*) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id \nA: For each user, find their name and the number of reviews written by them. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT T1.Store_Phone, T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID \nA: Give me all the phone numbers and email addresses of the workshop groups where services are performed. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT COUNT(*) FROM student WHERE sex = 'F' AND age < 25 \nA: How many girl students who are younger than 25? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T2.name, T2.year FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T1.driverid = T3.driverid WHERE T3.forename = 'Lewis' \nA: Give me a list of names and years of races that had any driver whose forename is Lewis? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT Name FROM ship WHERE Nationality = 'United States' OR Nationality = 'United Kingdom' \nA: Show the name of ships whose nationality is either United States or United Kingdom. \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT DISTINCT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'University of Oxford' \nA: Who belong to the institution 'University of Oxford'? Show the first names and last names. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT AVG(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = 'Monaco Grand Prix' \nA: What is the average fastest lap speed in race named 'Monaco Grand Prix' in 2008 ? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121 \nA: What are the ids of the courses that are registered or attended by the student whose id is 121? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT T2.organisation_id, T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING SUM(T1.grant_amount) > 6000 \nA: Find the organisation ids and details of the organisations which are involved in \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT STATEMENT_ID, COUNT(*) FROM Accounts GROUP BY STATEMENT_ID \nA: What are the different statement ids on accounts, and the number of accounts for each? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT DISTINCT T1.name, T1.location, T1.product FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.enzyme_id = T1.id WHERE T2.interaction_type = 'inhibitor' \nA: What are the different names, locations, and products of the enzymes that are capable inhibitor interactions? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT start_station_name, end_station_name FROM trip ORDER BY id NULLS FIRST LIMIT 3 \nA: Give me the start station and end station for the trips with the three oldest id. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT city FROM city ORDER BY regional_population DESC LIMIT 3 \nA: Which three cities have the largest regional population? \n Additional table information: table: city_record"} -{"text": "Q: SELECT allergytype FROM Allergy_type WHERE allergy = 'Cat' \nA: What is allergy type of a cat allergy? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT Name FROM artwork ORDER BY Name ASC NULLS FIRST \nA: List the name of artworks in ascending alphabetical order. \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT order_id, customer_id FROM customer_orders WHERE order_status_code = 'Cancelled' ORDER BY order_date NULLS FIRST \nA: What are the order ids and customer ids for orders that have been Cancelled, sorted by their order dates? \n Additional table information: table: department_store"} -{"text": "Q: SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the color description that is most common across all products. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T1.engineer_id, T1.first_name, T1.last_name FROM Maintenance_Engineers AS T1 JOIN Engineer_Visits AS T2 ON T1.engineer_id = T2.engineer_id GROUP BY T1.engineer_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Among those engineers who have visited, which engineer makes the least number of visits? List the engineer id, first name and last name. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011 \nA: What are the names of races held between 2009 and 2011? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT COUNT(*) FROM ship \nA: how many ships are there? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT DISTINCT Director FROM film \nA: What are the different film Directors? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which role is most common for the staff? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT name FROM artist WHERE NOT artist_id IN (SELECT artist_id FROM exhibition) \nA: Show names for artists without any exhibition. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1 \nA: Return the poll source corresponding to the candidate who has the oppose rate. \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT date_of_birth FROM Guests WHERE gender_code = 'Male' \nA: Return the date of birth for all the guests with gender code 'Male'. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS' \nA: What are the names of the channels owned by CCTV or HBS? \n Additional table information: table: program_share"} -{"text": "Q: SELECT T1.title, T1.director FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title ORDER BY T1.director NULLS FIRST, T1.title NULLS FIRST \nA: For all directors who directed more than one movie, return the titles of all movies directed by them, along with the director name. Sort by director name, then movie title. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT COUNT(DISTINCT FacID) FROM Faculty_participates_in \nA: Give me the number of faculty members who participate in an activity \n Additional table information: table: activity_1"} -{"text": "Q: SELECT DISTINCT firstname FROM list WHERE classroom = 107 \nA: What are the first names of students studying in room 107? \n Additional table information: table: student_1"} -{"text": "Q: SELECT COUNT(*) FROM customer WHERE active = '1' \nA: How many customers have an active value of 1? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T2.guest_first_name, T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T1.booking_status_code = 'Confirmed' \nA: Show the first names and last names of all the guests that have apartment bookings with status code 'Confirmed'. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT mascot FROM school WHERE enrollment > (SELECT AVG(enrollment) FROM school) \nA: What are the mascots for schools with enrollments above the average? \n Additional table information: table: school_finance"} -{"text": "Q: SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*) >= 2 \nA: What are the investors that have invested in at least two entrepreneurs? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT DISTINCT Region FROM club ORDER BY Region ASC NULLS FIRST \nA: List the distinct region of clubs in ascending alphabetical order. \n Additional table information: table: sports_competition"} -{"text": "Q: 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' \nA: Give the ids for documents that have the budget description 'Government'. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT Song FROM volume WHERE Weeks_on_Top > 1 \nA: Give the songs included in volumes that have more than 1 week on top. \n Additional table information: table: music_4"} -{"text": "Q: SELECT DISTINCT T1.supplier_name, T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id = T2.supplier_id JOIN products AS T3 ON T2.product_id = T3.product_id WHERE T3.product_name = 'red jeans' \nA: List the names and phone numbers of all the distinct suppliers who supply red jeans. \n Additional table information: table: department_store"} -{"text": "Q: SELECT Delegate FROM election WHERE District = 1 \nA: Show the delegate from district 1 in election. \n Additional table information: table: election"} -{"text": "Q: SELECT COUNT(*) FROM Documents WHERE NOT document_id IN (SELECT document_id FROM Documents_with_expenses) \nA: How many documents do not have any expense? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT COUNT(DISTINCT T2.camera_lens_id) FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.country = 'Ethiopia' \nA: How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'? \n Additional table information: table: mountain_photos"} -{"text": "Q: SELECT name FROM storm WHERE NOT storm_id IN (SELECT storm_id FROM affected_region) \nA: Show the name of storms which don't have affected region in record. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT COUNT(*) FROM review \nA: Find the number of reviews. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT MAX(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff') \nA: Return the id of the staff whose Staff Department Assignment was earlier than that of any Clerical Staff. \n Additional table information: table: department_store"} -{"text": "Q: SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE '2%' \nA: Find the names of all the products whose stock number starts with '2'. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT Festival_Name FROM festival_detail WHERE YEAR = 2007 \nA: What are the names of festivals held in year 2007? \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT DISTINCT T1.Fname, T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.President_VOTE WHERE T1.sex = 'F' \nA: What are the first and last names of all the female students who have president votes? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T1.id, T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id GROUP BY T1.id HAVING COUNT(*) >= 2 \nA: What are the id and name of the mountains that have at least 2 photos? \n Additional table information: table: mountain_photos"} -{"text": "Q: SELECT name FROM Employee WHERE salary > (SELECT AVG(salary) FROM Employee) \nA: Show names for all employees with salary more than the average. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'female' \nA: What are all the friends of Alice who are female? \n Additional table information: table: network_2"} -{"text": "Q: SELECT MAX(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE '%5%' \nA: Return the account details with the greatest value, as well as those that include the character 5. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING AVG(total_amount_purchased) > 50000 OR AVG(total_amount_purchased) < 30000 \nA: Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000. \n Additional table information: table: department_store"} -{"text": "Q: SELECT SUM(number_deaths), SUM(damage_millions_USD) FROM storm WHERE max_speed > (SELECT AVG(max_speed) FROM storm) \nA: What is the total number of deaths and damage for all storms with a max speed greater than the average? \n Additional table information: table: storm_record"} -{"text": "Q: SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7 \nA: What are the different names for each station that has ever had 7 bikes available? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which allergy type has most number of allergies? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000 \nA: What are the years of opening for tracks with seating between 4000 and 5000? \n Additional table information: table: race_track"} -{"text": "Q: SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121 \nA: Find the id of courses which are registered or attended by student whose id is 121? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT DISTINCT headquarter FROM manufacturers \nA: Give the distinct headquarters of manufacturers. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT Kids FROM Reservations WHERE CheckIn = '2010-09-21' AND FirstName = 'DAMIEN' AND LastName = 'TRACHSEL' \nA: Return the number of kids for the room reserved and checked in by DAMIEN TRACHSEL on Sep 21, 2010. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT Country FROM perpetrator WHERE Injured > 50 INTERSECT SELECT Country FROM perpetrator WHERE Injured < 20 \nA: Show the countries that have both perpetrators with injures more than 50 and perpetrators with injures smaller than 20. \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT COUNT(*) FROM tryout WHERE pPos = 'goalie' \nA: How many students whose are playing the role of goalie? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT COUNT(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Eric' AND t3.lname = 'Tai' \nA: Count the number of clubs for which the student named 'Eric Tai' is a member. \n Additional table information: table: club_1"} -{"text": "Q: SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating > 8 INTERSECT SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating < 5 \nA: Find the titles of items that received both a rating higher than 8 and a rating below 5. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the name of the organization that has published the largest number of papers. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker' \nA: What are the states of the colleges where students who tried out for the striker position attend? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT problem_id FROM problems WHERE date_problem_reported < '1978-06-26' \nA: Which problems are reported before 1978-06-26? Give me the ids of the problems. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT unit_price FROM tracks WHERE name = 'Fast As a Shark' \nA: How much is the track Fast As a Shark? \n Additional table information: table: store_1"} -{"text": "Q: 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' \nA: Find the name of the scientist who worked on both a project named 'Matter of Time' and a project named 'A Puzzling Parallax'. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT document_id, receipt_date FROM Documents \nA: List all document ids and receipt dates of documents. \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = 'Heilo' \nA: How many different instruments does the musician with the last name 'Heilo' use? \n Additional table information: table: music_2"} -{"text": "Q: SELECT venue FROM MATCH ORDER BY date DESC \nA: List venues of all matches in the order of their dates starting from the most recent one. \n Additional table information: table: city_record"} -{"text": "Q: SELECT creation FROM department GROUP BY creation ORDER BY COUNT(*) DESC LIMIT 1 \nA: In which year were most departments established? \n Additional table information: table: department_management"} -{"text": "Q: SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the investor that has invested in the most number of entrepreneurs? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT first_name, last_name, salary, department_id, MAX(salary) FROM employees GROUP BY department_id \nA: display the department ID, full name (first and last name), salary for those employees who is highest salary in every department. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT COUNT(DISTINCT t3.characteristic_name) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame' \nA: How many distinct characteristic names does the product 'cumin' have? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT campus FROM campuses WHERE YEAR >= 1935 AND YEAR <= 1939 \nA: What campuses opened between 1935 and 1939? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT Major, COUNT(*) FROM Student GROUP BY Major ORDER BY COUNT(Major) ASC NULLS FIRST LIMIT 1 \nA: Which major has least number of students? List the major and the number of students. \n Additional table information: table: restaurant_1"} -{"text": "Q: SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id GROUP BY t2.ship_id HAVING COUNT(*) > 1 \nA: What are the names of ships that have more than one captain? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1 \nA: Show the height of the mountain climbed by the climber with the maximum points. \n Additional table information: table: climbing"} -{"text": "Q: SELECT open_date FROM church GROUP BY open_date HAVING COUNT(*) >= 2 \nA: Show the opening year in whcih at least two churches opened. \n Additional table information: table: wedding"} -{"text": "Q: SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'OTHA' AND T2.lastname = 'MOYER' \nA: Find all students taught by OTHA MOYER. Output the first and last names of the students. \n Additional table information: table: student_1"} -{"text": "Q: SELECT major, COUNT(*) FROM Student GROUP BY major \nA: How many students are there for each major? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = 'Lucas' AND T1.last_name = 'Mancini' \nA: How many orders does Luca Mancini have in his invoices? \n Additional table information: table: store_1"} -{"text": "Q: SELECT first_name FROM customer WHERE NOT customer_id IN (SELECT customer_id FROM rental WHERE rental_date > '2005-08-23 02:06:01') \nA: What are the first names of customers who have not rented any films after '2005-08-23 02:06:01'? \n Additional table information: table: sakila_1"} -{"text": "Q: 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 \nA: What is the id, name and nationality of the architect who built most mills? \n Additional table information: table: architecture"} -{"text": "Q: SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_from LIKE '2016%' \nA: What are the names and genders of staff who were assigned in 2016? \n Additional table information: table: department_store"} -{"text": "Q: SELECT Company_name FROM phone GROUP BY Company_name HAVING COUNT(*) > 1 \nA: List the name of the company that produced more than one phone model. \n Additional table information: table: phone_1"} -{"text": "Q: SELECT COUNT(DISTINCT transaction_type) FROM Financial_Transactions \nA: Show the number of transaction types. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1 \nA: Which park had most attendances in 2008? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT id FROM teaches WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT id FROM teaches WHERE semester = 'Spring' AND YEAR = 2010 \nA: Find the id of instructors who taught a class in Fall 2009 but not in Spring 2010. \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code WHERE T4.dept_name = 'Accounting' \nA: How many students are enrolled in some classes that are taught by an accounting professor? \n Additional table information: table: college_1"} -{"text": "Q: SELECT AVG(total_amount_purchased), AVG(total_value_purchased) FROM Product_Suppliers WHERE supplier_id = (SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY COUNT(*) DESC LIMIT 1) \nA: Return the average total amount purchased and total value purchased for the supplier who supplies the greatest number of products. \n Additional table information: table: department_store"} -{"text": "Q: SELECT T1.course_name FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_Id GROUP BY T1.course_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: which course has most number of registered students? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT Name FROM WINE WHERE YEAR = '2008' \nA: Find the names of all wines produced in 2008. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT Join_Year FROM pilot ORDER BY Rank ASC NULLS FIRST LIMIT 1 \nA: What is the joined year of the pilot of the highest rank? \n Additional table information: table: pilot_record"} -{"text": "Q: SELECT COUNT(*) FROM useracct \nA: How many users are there? \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT COUNT(*), role_code FROM users GROUP BY role_code \nA: What are the different role codes for users, and how many users have each? \n Additional table information: table: document_management"} -{"text": "Q: SELECT DISTINCT product_name FROM products ORDER BY product_name NULLS FIRST \nA: List the names of all distinct products in alphabetical order. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT name FROM station WHERE lat < 37.5 \nA: What are the names of stations that have latitude lower than 37.5? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T1.emp_lname, T1.emp_hiredate FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num WHERE T2.prof_office = 'DRE 102' \nA: Find the last name and hire date of the professor who is in office DRE 102. \n Additional table information: table: college_1"} -{"text": "Q: SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the city with the most number of stores. \n Additional table information: table: store_product"} -{"text": "Q: SELECT DISTINCT LOCATION FROM cinema \nA: Find the distinct locations that has a cinema. \n Additional table information: table: cinema"} -{"text": "Q: SELECT DISTINCT customer_details FROM Customers \nA: Return the distinct customer details. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT T1.activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID \nA: How many faculty members participate in each activity? Return the activity names and the number of faculty members. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT gender FROM TEACHERS WHERE last_name = 'Medhurst' \nA: What is the gender of the teacher with last name 'Medhurst'? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT gender_code, COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC \nA: Show each gender code and the corresponding count of guests sorted by the count in descending order. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT COUNT(DISTINCT Hometown) FROM people \nA: Count the number of different hometowns of these people. \n Additional table information: table: gymnast"} -{"text": "Q: SELECT location_code FROM Document_locations GROUP BY location_code HAVING COUNT(*) >= 3 \nA: What are the codes of the locations with at least three documents? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT COUNT(DISTINCT claim_outcome_code) FROM claims_processing \nA: Count the number of distinct claim outcome codes. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT T3.name, T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id \nA: List the name of a building along with the name of a company whose office is in the building. \n Additional table information: table: company_office"} -{"text": "Q: SELECT COUNT(DISTINCT language_id) FROM film \nA: How many languages are in these films? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT Nationality, COUNT(*) FROM HOST GROUP BY Nationality \nA: Show different nationalities along with the number of hosts of each nationality. \n Additional table information: table: party_host"} -{"text": "Q: SELECT student_id FROM student_course_attendance \nA: List the id of students who attended some courses? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT student_id FROM students WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance) \nA: What are the ids of every student who has never attended a course? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT COUNT(*), account_id FROM Financial_transactions \nA: How many transaction does each account have? Show the number and account id. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT SUM(faculty) FROM faculty WHERE YEAR = 2002 \nA: How many faculty is there in total in the year of 2002? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT Name FROM wrestler ORDER BY Days_held ASC NULLS FIRST LIMIT 1 \nA: Return the name of the wrestler who had the lowest number of days held. \n Additional table information: table: wrestler"} -{"text": "Q: SELECT T1.organisation_type, T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the type and id of the organization that has the most research staff? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900 \nA: Show the denomination shared by schools founded before 1890 and schools founded after 1900 \n Additional table information: table: school_player"} -{"text": "Q: SELECT city FROM airports GROUP BY city HAVING COUNT(*) = 2 \nA: Find the cities which have exactly two airports. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT dorm_name FROM dorm WHERE gender = 'F' \nA: Find the name of dorms only for female (F gender). \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT SUM(Num_of_Audience) FROM festival_detail \nA: What are the total number of the audiences who visited any of the festivals? \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' \nA: What are the names of all the states with college students playing in the mid position but no goalies? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT player_api_id FROM Player WHERE height >= 180 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE overall_rating > 85 \nA: List all of the player ids with a height of at least 180cm and an overall rating higher than 85. \n Additional table information: table: soccer_1"} -{"text": "Q: SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the transaction type code that occurs the most frequently. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT COUNT(*) FROM products WHERE NOT product_id IN (SELECT product_id FROM Order_items) \nA: Count the number of products that were never ordered. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT COUNT(*) FROM inventory WHERE store_id = 1 \nA: Count the number of items store 1 has in stock. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT name, LOCATION, year_opened FROM track WHERE seating > (SELECT AVG(seating) FROM track) \nA: Show the name, location, open year for all tracks with a seating higher than the average. \n Additional table information: table: race_track"} -{"text": "Q: SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' \nA: Return the last name for the members of the club named 'Hopkins Student Enterprises'. \n Additional table information: table: club_1"} -{"text": "Q: SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = 'Mary' INTERSECT SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = 'Susan' \nA: Find the id of users who are followed by Mary and Susan. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT Age FROM people ORDER BY Height DESC LIMIT 1 \nA: Return the age of the person with the greatest height. \n Additional table information: table: gymnast"} -{"text": "Q: SELECT COUNT(DISTINCT last_name) FROM actor \nA: Count the number of different last names actors have. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT COUNT(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing' \nA: How many manufacturers have headquarters in either Tokyo or Beijing? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT T1.account_id, T2.account_name FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id HAVING COUNT(*) >= 4 \nA: Show the account id and name with at least 4 transactions. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT COUNT(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid WHERE t1.clubname = 'Bootup Baltimore' \nA: How many different roles are there in the club 'Bootup Baltimore'? \n Additional table information: table: club_1"} -{"text": "Q: SELECT AVG(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.Sex = 'F' AND T2.Election_Cycle = 'Spring' \nA: Find the average age of female (sex is F) students who have secretary votes in the spring election cycle. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT AVG(distance), AVG(price) FROM Flight WHERE origin = 'Los Angeles' \nA: What is the average distance and price for all flights from LA? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT AVG(T1.age) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.student_capacity = (SELECT MAX(student_capacity) FROM dorm) \nA: Find the average age of students who are living in the dorm with the largest capacity. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT COUNT(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan' \nA: How many friends does Dan have? \n Additional table information: table: network_2"} -{"text": "Q: SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 2 \nA: What are the ids and full names of customers who hold two or more cards? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T2.Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown \nA: What are the hometowns of gymnasts and the corresponding number of gymnasts? \n Additional table information: table: gymnast"} -{"text": "Q: SELECT Time_of_purchase, age, address FROM member ORDER BY Time_of_purchase NULLS FIRST \nA: Find the purchase time, age and address of each member, and show the results in the order of purchase time. \n Additional table information: table: coffee_shop"} -{"text": "Q: SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_id \nA: Find the personal names of students not enrolled in any course. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT Advisor FROM STUDENT WHERE city_code = 'BAL' \nA: Who are the advisors for students that live in a city with city code 'BAL'? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1 \nA: Tell me the name of the most pricy product. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT TIME FROM elimination WHERE Eliminated_By = 'Punk' OR Eliminated_By = 'Orton' \nA: What are the times of elimination for any instances in which the elimination was done by Punk or Orton? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT T1.Name, AVG(T2.Speed) FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name \nA: Show the names of countries and the average speed of roller coasters from each country. \n Additional table information: table: roller_coaster"} -{"text": "Q: SELECT COUNT(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = 'Defender' \nA: Count the number of different official languages corresponding to countries that players who play Defender are from. \n Additional table information: table: match_season"} -{"text": "Q: SELECT Name FROM scientists WHERE NOT ssn IN (SELECT scientist FROM AssignedTo) \nA: What are the names of scientists who have not been assigned a project? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT LOCATION, COUNT(*) FROM gas_station GROUP BY LOCATION ORDER BY COUNT(*) NULLS FIRST \nA: Show all locations and the number of gas stations in each location ordered by the count. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the most common apartment type code among apartments with more than 1 bathroom. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Australian Grand Prix' INTERSECT SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Chinese Grand Prix' \nA: What is the id and first name of all the drivers who participated in the Australian Grand Prix and the Chinese Grand Prix? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT name FROM instructor WHERE salary > (SELECT MAX(salary) FROM instructor WHERE dept_name = 'Biology') \nA: What are the names of all instructors with a higher salary than any of the instructors in the Biology department? \n Additional table information: table: college_2"} -{"text": "Q: SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music' \nA: What are the names of all tracks that are on the Movies playlist but not in the music playlist? \n Additional table information: table: store_1"} -{"text": "Q: SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500 \nA: Which statuses correspond to both cities that have a population over 1500 and cities that have a population lower than 500? \n Additional table information: table: farm"} -{"text": "Q: SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%' \nA: Find the first names of students whose first names contain letter 'a'. \n Additional table information: table: college_3"} -{"text": "Q: 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' \nA: How long is the total lesson time taught by staff with first name as Janessa and last name as Sawayn? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT COUNT(DISTINCT POSITION) FROM player \nA: Count the number of distinct player positions. \n Additional table information: table: school_player"} -{"text": "Q: SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) >= 2 \nA: Which locations have 2 or more cinemas with capacity over 300? \n Additional table information: table: cinema"} -{"text": "Q: SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Show the role code with the least employees. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT AVG(pages_per_minute_color) FROM product \nA: What is the average pages per minute color? \n Additional table information: table: store_product"} -{"text": "Q: SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 2005 \nA: What is the average fee on a CSU campus in 2005? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1 \nA: Find the author who achieved the highest score in a submission. \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT COUNT(*), sex FROM student WHERE age > (SELECT AVG(age) FROM student) GROUP BY sex \nA: Find the number of students whose age is older than the average age for each gender. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT country, COUNT(*) FROM stadium GROUP BY country \nA: How many stadiums does each country have? \n Additional table information: table: swimming"} -{"text": "Q: SELECT school_code FROM department WHERE dept_name = 'Accounting' \nA: What is the code of the school where the accounting department belongs to? \n Additional table information: table: college_1"} -{"text": "Q: SELECT DISTINCT product_name FROM products ORDER BY product_name NULLS FIRST \nA: Sort all the distinct products in alphabetical order. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT roomName, decor FROM Rooms WHERE bedtype = 'King' ORDER BY basePrice NULLS FIRST \nA: List the names and decor of rooms that have a king bed. Sort the list by their price. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT Census_Ranking FROM city WHERE Status <> 'Village' \nA: What are the census rankings of cities that do not have the status 'Village'? \n Additional table information: table: farm"} -{"text": "Q: SELECT MIN(salary), dept_name FROM instructor GROUP BY dept_name HAVING AVG(salary) > (SELECT AVG(salary) FROM instructor) \nA: Find the minimum salary for the departments whose average salary is above the average payment of all instructors. \n Additional table information: table: college_2"} -{"text": "Q: SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2 \nA: Show the name of colleges that have at least two players. \n Additional table information: table: match_season"} -{"text": "Q: SELECT COUNT(DISTINCT label) FROM albums \nA: How many unique labels are there for albums? \n Additional table information: table: music_2"} -{"text": "Q: SELECT clubdesc FROM club WHERE clubname = 'Pen and Paper Gaming' \nA: Find the description of the club 'Pen and Paper Gaming'. \n Additional table information: table: club_1"} -{"text": "Q: SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = 'Editor' \nA: Show the names of employees with role name Editor. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT COUNT(*) FROM users WHERE user_login = 1 \nA: How many users are logged in? \n Additional table information: table: document_management"} -{"text": "Q: SELECT COUNT(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines' \nA: Find the number of different airports which are the destinations of the American Airlines. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT T1.coupon_amount FROM Discount_Coupons AS T1 JOIN customers AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.good_or_bad_customer = 'good' INTERSECT SELECT T1.coupon_amount FROM Discount_Coupons AS T1 JOIN customers AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.good_or_bad_customer = 'bad' \nA: What are the coupon amount of the coupons owned by both good and bad customers? \n Additional table information: table: products_for_hire"} -{"text": "Q: SELECT T1.duration, T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = 'pop' ORDER BY T2.song_name NULLS FIRST \nA: What is the duration, file size, and song format for every pop song, ordered by title alphabetically? \n Additional table information: table: music_1"} -{"text": "Q: SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested DESC \nA: Return the weights of entrepreneurs, ordered descending by amount of money requested. \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT name FROM storm WHERE NOT storm_id IN (SELECT storm_id FROM affected_region) \nA: What are the names of storms that did not affect any regions? \n Additional table information: table: storm_record"} -{"text": "Q: SELECT YEAR FROM SECTION GROUP BY YEAR ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the year which offers the largest number of courses. \n Additional table information: table: college_2"} -{"text": "Q: SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'Red' AND T2.price > 50 \nA: What are the names of wines made from red grapes and with prices above 50? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid HAVING SUM(hours_played) >= 1000 \nA: What are the names of all the games that have been played for at least 1000 hours? \n Additional table information: table: game_1"} -{"text": "Q: SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID WHERE T2.Rank_in_Round > 3 \nA: Show the names of members that have a rank in round higher than 3. \n Additional table information: table: decoration_competition"} -{"text": "Q: SELECT COUNT(*) FROM participants WHERE participant_type_code = 'Organizer' \nA: How many participants belong to the type 'Organizer'? \n Additional table information: table: local_govt_in_alabama"} -{"text": "Q: SELECT AVG(Num_of_Factories) FROM manufacturer WHERE num_of_shops > 20 \nA: Find the average number of factories for the manufacturers that have more than 20 shops. \n Additional table information: table: manufacturer"} -{"text": "Q: SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees) \nA: How many universities have a campus fee higher than average? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT T1.student_id, T2.first_name FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the id and first name of the student that has the most number of assessment notes? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT Studio FROM film GROUP BY Studio HAVING AVG(Gross_in_dollar) >= 4500000 \nA: List the studios which average gross is above 4500000. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT Grape, Appelation FROM WINE \nA: What are the grapes and appelations of each wine? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.player = 'Walter Samuel' INTERSECT SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.player = 'Thiago Motta' \nA: List the name of the stadium where both the player 'Walter Samuel' and the player 'Thiago Motta' got injured. \n Additional table information: table: game_injury"} -{"text": "Q: SELECT T2.name, COUNT(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year > 2015 GROUP BY T2.branch_id \nA: Show all branch names with the number of members in each branch registered after 2015. \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT AVG(velocity) FROM flight WHERE pilot = 'Thompson' \nA: What is the velocity of the pilot named 'Thompson'? \n Additional table information: table: flight_company"} -{"text": "Q: SELECT T3.Party_Theme, T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID \nA: For each party, return its theme and the name of its host. \n Additional table information: table: party_host"} -{"text": "Q: SELECT Name FROM Representative WHERE Party <> 'Republican' \nA: What are the names of representatives whose party is not 'Republican'? \n Additional table information: table: election_representative"} -{"text": "Q: SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = 'Pass' \nA: Find the enrollment date for all the tests that have 'Pass' result. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT SUM(gamesplayed) FROM Sportsinfo WHERE sportname = 'Football' AND onscholarship = 'Y' \nA: How many games are played for all football games by students on scholarship? \n Additional table information: table: game_1"} -{"text": "Q: SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T3.number_deaths >= 10 \nA: Return the names of the regions affected by storms that had a death count of at least 10. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which sport has most number of students on scholarship? \n Additional table information: table: game_1"} -{"text": "Q: SELECT T1.duration, T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = 'pop' ORDER BY T2.song_name NULLS FIRST \nA: List the duration, file size and format of songs whose genre is pop, ordered by title? \n Additional table information: table: music_1"} -{"text": "Q: SELECT COUNT(*) FROM Visitors WHERE NOT Tourist_ID IN (SELECT Tourist_ID FROM Visits) \nA: Count the number of tourists who did not visit any place. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT fname, lname FROM Faculty WHERE Rank = 'Instructor' \nA: What are the first name and last name of all the instructors? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT name FROM instructor ORDER BY salary DESC LIMIT 1 \nA: Who is the instructor with the highest salary? \n Additional table information: table: college_2"} -{"text": "Q: SELECT AVG(no_of_customers) FROM bank \nA: Find the average number of customers cross all banks. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT name, city, country FROM airports ORDER BY elevation NULLS FIRST LIMIT 1 \nA: Find the name, city, and country of the airport that has the lowest altitude. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code \nA: How many departments are in each school? \n Additional table information: table: college_1"} -{"text": "Q: SELECT city FROM station GROUP BY city ORDER BY MAX(lat) DESC \nA: For each city, list their names in decreasing order by their highest station latitude. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T2.Hardware_Model_name, T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type = 'Graphics' \nA: List the hardware model name and company name for the phone whose screen mode type is 'Graphics.' \n Additional table information: table: phone_1"} -{"text": "Q: SELECT T1.title, T1.i_id FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY AVG(T2.rank) DESC LIMIT 1 \nA: Find the name and id of the good with the highest average rank. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT semester, YEAR FROM takes GROUP BY semester, YEAR ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: Which semeseter and year had the fewest students? \n Additional table information: table: college_2"} -{"text": "Q: SELECT T1.course_description, T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) > 2 \nA: What are the descriptions and names of the courses that have student enrollment bigger than 2? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT T1.first_name, T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY T2.invoice_date DESC LIMIT 5 \nA: Find out 5 customers who most recently purchased something. List customers' first and last name. \n Additional table information: table: store_1"} -{"text": "Q: SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = 'keyboard' \nA: What are the distinct names of customers who have purchased a keyboard? \n Additional table information: table: department_store"} -{"text": "Q: SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995 \nA: Return the types of film market estimations in 1995. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT T1.emp_fname, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T3.dept_code = T2.dept_code WHERE T3.dept_name = 'History' AND T2.prof_high_degree = 'Ph.D.' \nA: What are the first names and office of the professors who are in the history department and have a Ph.D? \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(DISTINCT school_code) FROM department \nA: how many schools exist in total? \n Additional table information: table: college_1"} -{"text": "Q: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.fname, t1.lname ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which author has written the most papers? Find his or her last name. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT T1.emp_lname, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History' \nA: What is the last name and office of the professor from the history department? \n Additional table information: table: college_1"} -{"text": "Q: SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name HAVING AVG(T1.price) >= 150 \nA: What are the names and average prices of products for manufacturers whose products cost on average 150 or more? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT COUNT(*) FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = 'USPS' \nA: How many documents were shipped by USPS? \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT COUNT(*) FROM Person WHERE gender = 'female' \nA: How many females are in the network? \n Additional table information: table: network_2"} -{"text": "Q: SELECT Name FROM country WHERE Languages <> 'German' \nA: List the names of countries whose language is not 'German'. \n Additional table information: table: roller_coaster"} -{"text": "Q: SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211' AND T1.stu_lname LIKE 'S%' \nA: What is the first name of the student whose last name starts with the letter S and is taking ACCT-211? \n Additional table information: table: college_1"} -{"text": "Q: SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000 \nA: Show all director names who have a movie in the year 1999 or 2000. \n Additional table information: table: culture_company"} -{"text": "Q: SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the name of the party that has the most delegates. \n Additional table information: table: election"} -{"text": "Q: SELECT T3.name, T2.title, T1.date, T1.price FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id JOIN cinema AS T3 ON T1.cinema_id = T3.cinema_id \nA: Show cinema name, film title, date, and price for each record in schedule. \n Additional table information: table: cinema"} -{"text": "Q: SELECT country FROM competition WHERE competition_type = 'Tournament' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1 \nA: which country did participated in the most number of Tournament competitions? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = 'walk' OR T2.How_to_Get_There = 'bus' \nA: Find the details of all the markets that are accessible by walk or bus. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: 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 \nA: Find the name of the customers who have at most two orders. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT document_name FROM documents WHERE NOT document_code IN (SELECT document_code FROM document_sections) \nA: Find all the name of documents without any sections. \n Additional table information: table: document_management"} -{"text": "Q: SELECT COUNT(DISTINCT gender) FROM dorm \nA: How many different genders are there in the dorms? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT product_name, product_id FROM products WHERE product_price BETWEEN 600 AND 700 \nA: What are the names and ids of products costing between 600 and 700? \n Additional table information: table: department_store"} -{"text": "Q: SELECT T2.first_name, T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name = 'Nancy' AND T1.last_name = 'Edwards' \nA: What is the first and last name of the employee who reports to Nancy Edwards? \n Additional table information: table: store_1"} -{"text": "Q: SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Morning' INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Night' \nA: Who are the owners of the programs that broadcast both in the morning and at night? \n Additional table information: table: program_share"} -{"text": "Q: SELECT * FROM Student_Addresses ORDER BY monthly_rental DESC \nA: Find all information about student addresses, and sort by monthly rental in descending order. \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT Name FROM WINE WHERE score > 90 \nA: What are the names of wines with scores higher than 90? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT Age FROM Student WHERE Fname = 'Linda' AND Lname = 'Smith' \nA: What is the age of student Linda Smith? \n Additional table information: table: restaurant_1"} -{"text": "Q: SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = 'saving' \nA: Find the name of customers who do not have an saving account. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING AVG(bikes_available) > 10 EXCEPT SELECT name FROM station WHERE city = 'San Jose' \nA: What are the names of all stations that have more than 10 bikes available and are not located in San Jose? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE '%Monadic%' \nA: Which authors have written a paper with title containing the word 'Monadic'? Return their last names. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT COUNT(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.level = 6 \nA: What are the total purchases for members rated at level 6? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT COUNT(*), formats FROM files GROUP BY formats \nA: For each file format, return the number of artists who released songs in that format. \n Additional table information: table: music_1"} -{"text": "Q: SELECT T1.id, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 3 \nA: What are the ids and trade names of the medicine that can interact with at least 3 enzymes? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT T2.product_description FROM products_booked AS T1 JOIN products_for_hire AS T2 ON T1.product_id = T2.product_id WHERE T1.booked_amount = 102.76 \nA: What is the product description of the product booked with an amount of 102.76? \n Additional table information: table: products_for_hire"} -{"text": "Q: SELECT SUM(Amount_Payment) FROM Payments \nA: What is the total amount of payment? \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT COUNT(*), city FROM employees WHERE title = 'IT Staff' GROUP BY city \nA: Find the number of employees whose title is IT Staff from each city? \n Additional table information: table: store_1"} -{"text": "Q: SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'A' AND T2.class_code = 10018 \nA: What is the last name of the student who got a grade A in the class with code 10018. \n Additional table information: table: college_1"} -{"text": "Q: 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 \nA: When was the order placed whose shipment tracking number is 3452? Give me the date. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING COUNT(*) > 3 \nA: Find the list of attribute data types possessed by more than 3 attribute definitions. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT COUNT(DISTINCT school_id) FROM basketball_match \nA: Count the number of schools that have had basketball matches. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING COUNT(*) >= 2 \nA: What are the names of storms that did not affect two or more regions? \n Additional table information: table: storm_record"} -{"text": "Q: SELECT T2.title, AVG(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY AVG(T1.stars) NULLS FIRST LIMIT 1 \nA: What are the titles and average ratings for all movies that have the lowest average rating? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT Fname FROM STUDENT WHERE NOT StuID IN (SELECT StuID FROM ENROLLED_IN) \nA: What are the first names of all students that are not enrolled in courses? \n Additional table information: table: college_3"} -{"text": "Q: SELECT COUNT(DISTINCT cName) FROM tryout \nA: How many different colleges do attend the tryout test? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT T3.name, T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id \nA: For each company, return the company name and the name of the building its office is located in. \n Additional table information: table: company_office"} -{"text": "Q: SELECT LName FROM Student WHERE age = (SELECT MIN(age) FROM Student) \nA: Provide the last name of the youngest student. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT SUM(amount) FROM payment \nA: What is the total amount of all payments? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT DISTINCT District FROM election \nA: What are the distinct districts for elections? \n Additional table information: table: election"} -{"text": "Q: SELECT DISTINCT T1.service_type_code FROM services AS T1 JOIN organizations AS T2 ON T1.organization_id = T2.organization_id WHERE T2.organization_details = 'Denesik and Sons Party' \nA: What is the distinct service types that are provided by the organization which has detail 'Denesik and Sons Party'? \n Additional table information: table: local_govt_and_lot"} -{"text": "Q: SELECT location_name, location_description FROM Ref_locations WHERE location_code = 'x' \nA: Give me the name and description of the location with code x. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT order_id FROM shipments WHERE shipment_tracking_number = '3452' \nA: Which order's shipment tracking number is '3452'? Give me the id of the order. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT billing_country, COUNT(*) FROM invoices GROUP BY billing_country ORDER BY COUNT(*) DESC LIMIT 5 \nA: A list of the top 5 countries by number of invoices. List country name and number of invoices. \n Additional table information: table: store_1"} -{"text": "Q: SELECT Status FROM roller_coaster GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1 \nA: Please show the most common status of roller coasters. \n Additional table information: table: roller_coaster"} -{"text": "Q: SELECT publisher FROM book_club GROUP BY publisher ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the publisher with most number of books? \n Additional table information: table: culture_company"} -{"text": "Q: SELECT * FROM departments WHERE department_name = 'Marketing' \nA: What is all the information about the Marketing department? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T1.title, T3.name FROM course AS T1 JOIN teaches AS T2 ON T1.course_id = T2.course_id JOIN instructor AS T3 ON T2.id = T3.id WHERE YEAR = 2008 ORDER BY T1.title NULLS FIRST \nA: Show all titles and their instructors' names for courses in 2008, in alphabetical order by title. \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*), nationality FROM constructors GROUP BY nationality \nA: What are the numbers of constructors for different nationalities? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T1.country, T1.name, COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.country, T1.name \nA: For each country and airline name, how many routes are there? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop' \nA: What are the vocal types used in song 'Le Pop'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50 \nA: What are the times of elimination for wrestlers with over 50 days held? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Mortgages' INTERSECT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Auto' \nA: Find the name of customers who have loans of both Mortgages and Auto. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000 \nA: Show year where a track with a seating at least 5000 opened and a track with seating no more than 4000 opened. \n Additional table information: table: race_track"} -{"text": "Q: SELECT Winery FROM WINE ORDER BY SCORE NULLS FIRST LIMIT 1 \nA: What is the winery at which the wine with the highest score was made? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT name FROM person EXCEPT SELECT name FROM PersonFriend \nA: Who is the person that has no friend? \n Additional table information: table: network_2"} -{"text": "Q: SELECT T1.emp_lname, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History' \nA: What are the last name and office of all history professors? \n Additional table information: table: college_1"} -{"text": "Q: SELECT date_joined_staff FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn' \nA: When did the staff member named Janessa Sawayn join the company? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT COUNT(DISTINCT Status) FROM city \nA: Count the number of different statuses. \n Additional table information: table: farm"} -{"text": "Q: SELECT name, LOCATION FROM cinema ORDER BY capacity DESC LIMIT 1 \nA: What are the name and location of the cinema with the largest capacity? \n Additional table information: table: cinema"} -{"text": "Q: SELECT email_address, date_of_birth FROM Customers WHERE first_name = 'Carole' \nA: What are the email addresses and date of births for all customers who have a first name of Carole? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT model_name FROM chip_model EXCEPT SELECT chip_model FROM phone WHERE Accreditation_type = 'Full' \nA: Find the names of the chip models that are not used by any phone with full accreditation type. \n Additional table information: table: phone_1"} -{"text": "Q: SELECT COUNT(*), gender FROM artist GROUP BY gender \nA: How many artists are male and how many are female? \n Additional table information: table: music_1"} -{"text": "Q: SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie' \nA: Which college has any student who is a goalie and succeeded in the tryout. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the range that has the most number of mountains. \n Additional table information: table: climbing"} -{"text": "Q: SELECT T1.Total_Points FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age ASC NULLS FIRST LIMIT 1 \nA: What is the total point count of the youngest gymnast? \n Additional table information: table: gymnast"} -{"text": "Q: SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code \nA: Show the booking status code and the corresponding number of bookings. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT AVG(Injured) FROM perpetrator \nA: What is the average number of people injured by all perpetrators? \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1 \nA: What is the starting year for the oldest technician? \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the customer id, first and last name with most number of accounts. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: 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' \nA: List first name and last name of customers lived in city Lockmanfurt. \n Additional table information: table: driving_school"} -{"text": "Q: SELECT COUNT(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Art' AND T2.customer_last_name = 'Turcotte' \nA: Count the number of cards the customer with the first name Art and last name Turcotte has. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT name FROM driver WHERE NOT driver_id IN (SELECT driver_id FROM school_bus) \nA: Show the names of the drivers without a school bus. \n Additional table information: table: school_bus"} -{"text": "Q: SELECT AVG(Age) FROM manager \nA: What is the average age for all managers? \n Additional table information: table: railway"} -{"text": "Q: SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall' \nA: Find the name of amenities Smith Hall dorm have. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND faculty > (SELECT MAX(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = 'Orange') \nA: What are the names of the campus that have more faculties in 2002 than the maximum number in Orange county? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT Product_Price FROM Products WHERE Product_Name = 'Dining' OR Product_Name = 'Trading Policy' \nA: Show the prices of the products named 'Dining' or 'Trading Policy'. \n Additional table information: table: solvency_ii"} -{"text": "Q: SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the last name of the artist who sang the most songs? \n Additional table information: table: music_2"} -{"text": "Q: SELECT Builder FROM railway ORDER BY Builder ASC NULLS FIRST \nA: List the builders of railways in ascending alphabetical order. \n Additional table information: table: railway"} -{"text": "Q: SELECT sportname, COUNT(*) FROM Sportsinfo GROUP BY sportname \nA: Show all sport name and the number of students. \n Additional table information: table: game_1"} -{"text": "Q: 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' \nA: Which students are advised by Michael Goodrich? Give me their first and last names. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT payment_method_code, COUNT(*) FROM INVOICES GROUP BY payment_method_code \nA: Show all payment method codes and the number of orders for each code. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT name, email FROM user_profiles WHERE followers > 1000 \nA: Find the name and email of the users who have more than 1000 followers. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID \nA: Which physicians have never taken any appointment? Find their names. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT DISTINCT fname FROM student \nA: Find each student's first name. \n Additional table information: table: club_1"} -{"text": "Q: SELECT AVG(T1.sales) FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID WHERE T2.work_type = 'Photo' \nA: What is the average sales of the journals that have an editor whose work type is 'Photo'? \n Additional table information: table: journal_committee"} -{"text": "Q: SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4 \nA: What are the unique ids of those departments where any manager is managing 4 or more employees. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the name of track with most number of races. \n Additional table information: table: race_track"} -{"text": "Q: SELECT T2.name, T2.year FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T1.driverid = T3.driverid WHERE T3.forename = 'Lewis' \nA: What are the names and years of all races that had a driver with the last name Lewis? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT DISTINCT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age < (SELECT AVG(age) FROM person) \nA: Who has friends that are younger than the average age? \n Additional table information: table: network_2"} -{"text": "Q: SELECT card_number, name, hometown FROM member ORDER BY LEVEL DESC \nA: Show card number, name, and hometown for all members in a descending order of level. \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT COUNT(DISTINCT school_code) FROM department \nA: How many schools are there in the department? \n Additional table information: table: college_1"} -{"text": "Q: SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = 'Fall' \nA: Find the distinct ages of students who have secretary votes in the fall election cycle. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT name, distance FROM Aircraft WHERE aid = 12 \nA: What is the name and distance for aircraft with id 12? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1 \nA: List the names of departments where some physicians are primarily affiliated with. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC \nA: What are the ages of the gymnasts, ordered descending by their total points? \n Additional table information: table: gymnast"} -{"text": "Q: SELECT LOCATION FROM school ORDER BY Founded DESC \nA: What is the list of school locations sorted in descending order of school foundation year? \n Additional table information: table: school_player"} -{"text": "Q: SELECT T1.interaction_type FROM medicine_enzyme_interaction AS T1 JOIN medicine AS T2 ON T1.medicine_id = T2.id JOIN enzyme AS T3 ON T1.enzyme_id = T3.id WHERE T3.name = 'ALA synthase' AND T2.name = 'Aripiprazole' \nA: What is the interaction type of the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT MAX(Milliseconds), MIN(Milliseconds) FROM TRACK \nA: What are the durations of the longest and the shortest tracks in milliseconds? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT DISTINCT (catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE '%Murray%' \nA: Find all the catalog publishers whose name contains 'Murray' \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT complaint_status_code, COUNT(*) FROM complaints WHERE complaint_type_code = 'Product Failure' GROUP BY complaint_status_code \nA: Of complaints with the type code 'Product Failure', how many had each different status code? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT Industry FROM Companies WHERE Headquarters = 'USA' INTERSECT SELECT Industry FROM Companies WHERE Headquarters = 'China' \nA: Which industries have both companies with headquarter in 'USA' and companies with headquarter in 'China'? \n Additional table information: table: company_office"} -{"text": "Q: SELECT COUNT(*), T1.blockcode FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockcode \nA: How many rooms are located for each block code? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT interaction_type, COUNT(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the most common types of interactions between enzymes and medicine, and how many types are there? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly' \nA: Find the countries that have never participated in any competition with Friendly type. \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT T2.company, COUNT(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id \nA: Show the company name with the number of gas station. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate \nA: Show ids for all employees who don't have a certificate. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'statistics' ORDER BY T2.date_of_attendance NULLS FIRST \nA: What are the ids of the students who attended courses in the statistics department in order of attendance date. \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT COUNT(*) FROM ALBUM \nA: How many albums are there? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT AVG(Horizontal_Bar_Points) FROM gymnast \nA: What is the average horizontal bar points for all gymnasts? \n Additional table information: table: gymnast"} -{"text": "Q: SELECT course_name FROM courses ORDER BY course_name NULLS FIRST \nA: List the names of courses in alphabetical order? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT COUNT(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE = 'ACCT-211' \nA: How many professors are teaching class with code ACCT-211? \n Additional table information: table: college_1"} -{"text": "Q: SELECT DISTINCT payment_method_code FROM INVOICES \nA: What are the distinct payment method codes in all the invoices? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT t3.name, t3.time FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id JOIN train AS t3 ON t2.train_id = t3.id WHERE t1.local_authority = 'Chiltern' \nA: Find names and times of trains that run through stations for the local authority Chiltern. \n Additional table information: table: station_weather"} -{"text": "Q: SELECT AVG(Snatch) FROM body_builder \nA: What is the average snatch score of body builders? \n Additional table information: table: body_builder"} -{"text": "Q: SELECT minister FROM party WHERE party_name <> 'Progress Party' \nA: Which ministers are not a part of the Progress Party? \n Additional table information: table: party_people"} -{"text": "Q: SELECT built_year FROM ship GROUP BY built_year ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the year in which most ships were built? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT product FROM product WHERE max_page_size = 'A4' AND pages_per_minute_color < 5 \nA: Find products with max page size as 'A4' and pages per minute color smaller than 5. \n Additional table information: table: store_product"} -{"text": "Q: SELECT T1.forename, T1.surname, T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING COUNT(*) > 8 UNION SELECT T1.forename, T1.surname, T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING COUNT(*) > 5 \nA: What are the drivers' first names,last names, and ids for all those that had more than 8 stops or participated in more than 5 races? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT aid FROM Aircraft WHERE distance > 1000 \nA: Show ids for all aircrafts with more than 1000 distance. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Pending' ORDER BY T2.customer_id NULLS FIRST \nA: What are the distinct names of customers with an order status of Pending, sorted by customer id? \n Additional table information: table: department_store"} -{"text": "Q: SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Accounting' INTERSECT SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Computer Info. Systems' \nA: Find the first name of student who is taking classes from accounting and Computer Info. Systems departments \n Additional table information: table: college_1"} -{"text": "Q: SELECT name FROM enzyme WHERE product <> 'Heme' \nA: What are the names of enzymes who does not produce 'Heme'? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT COUNT(*) FROM Customers_cards WHERE card_type_code = 'Debit' \nA: Count the number of customer cards of the type Debit. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50 \nA: Show the locations of parties with hosts older than 50. \n Additional table information: table: party_host"} -{"text": "Q: SELECT hire_date FROM employees WHERE NOT first_name LIKE '%M%' \nA: On what dates were employees without the letter M in their first names hired? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT LOCATION FROM cinema EXCEPT SELECT LOCATION FROM cinema WHERE capacity > 800 \nA: Show all the locations where no cinema has capacity over 800. \n Additional table information: table: cinema"} -{"text": "Q: SELECT AVG(price) FROM wine WHERE NOT Appelation IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma') \nA: What is the average price for wines not produced in Sonoma county? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010 \nA: Find the cities which were once a host city after 2010? \n Additional table information: table: city_record"} -{"text": "Q: SELECT Name FROM technician ORDER BY Age ASC NULLS FIRST \nA: What are the names of the technicians by ascending order of age? \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT T1.name, AVG(trust) FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id GROUP BY T2.target_u_id \nA: Find each target user's name and average trust score. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT T1.Marketing_Region_Name FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code = T2.Marketing_Region_Code WHERE T2.Store_Name = 'Rob Dinning' \nA: Return the name of the marketing region the store Rob Dinning is located in. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT T1.id FROM trip AS T1 JOIN weather AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.zip_code HAVING AVG(T2.mean_temperature_f) > 60 \nA: For each zip code, find the ids of all trips that have a higher average mean temperature above 60? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT Area, County FROM APPELLATIONS \nA: What are the areas and counties for all appelations? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT T1.supplier_name, T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id = T2.supplier_id JOIN addresses AS T3 ON T2.address_id = T3.address_id ORDER BY T3.address_details NULLS FIRST \nA: List the name and phone number of all suppliers in the alphabetical order of their addresses. \n Additional table information: table: department_store"} -{"text": "Q: SELECT COUNT(*) FROM Project_outcomes WHERE outcome_code = 'Patent' \nA: How many Patent outcomes are generated from all the projects? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT member_name FROM member WHERE party_id = 3 INTERSECT SELECT member_name FROM member WHERE party_id = 1 \nA: Show the member names which are in both the party with id 3 and the party with id 1. \n Additional table information: table: party_people"} -{"text": "Q: SELECT AVG(price) FROM products WHERE manufacturer = 2 \nA: Compute the average price of all products with manufacturer code equal to 2. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT * FROM employees WHERE department_id = 'null' \nA: Return all the information for all employees without any department number. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT COUNT(*) FROM Accounts \nA: Count the number of accounts. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T2.customer_last_name, T1.customer_id, T2.phone_number FROM Orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the customer last name, id and phone number with most number of orders? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT Date, LOCATION FROM performance \nA: What are the dates and locations of performances? \n Additional table information: table: performance_attendance"} -{"text": "Q: SELECT MIN(seating), MAX(seating), AVG(seating) FROM track \nA: What is the minimum, maximum, and average seating for all tracks. \n Additional table information: table: race_track"} -{"text": "Q: SELECT first_name, last_name, salary FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T3.city = 'London' \nA: What are full names and salaries of employees working in the city of London? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT name FROM captain ORDER BY age DESC \nA: What are the names of captains, sorted by age descending? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT SUM(total) FROM invoices WHERE billing_city = 'Chicago' AND billing_state = 'IL' \nA: List total amount of invoice from Chicago, IL. \n Additional table information: table: store_1"} -{"text": "Q: SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type = 'Graphics' OR t2.Company_name = 'Nokia Corporation' \nA: List the hardware model name for the phones that were produced by 'Nokia Corporation' or whose screen mode type is 'Graphics.' \n Additional table information: table: phone_1"} -{"text": "Q: SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2 \nA: Who are the nominees who have been nominated more than two times? \n Additional table information: table: musical"} -{"text": "Q: SELECT birth_country FROM player GROUP BY birth_country ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 3 \nA: What are the three countries that the least players are from? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = 'Clara') AND first_name <> 'Clara' \nA: display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara excluding Clara. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT apt_number FROM Apartments WHERE apt_type_code = 'Flat' \nA: Which apartments have type code 'Flat'? Give me their apartment numbers. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT name FROM manufacturers EXCEPT SELECT T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T1.name = 'DVD drive' \nA: Find the name of companies that do not make DVD drive. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT T1.City_Town FROM Addresses AS T1 JOIN Customers AS T2 ON T1.Address_ID = T2.Address_ID EXCEPT SELECT T1.City_Town FROM Addresses AS T1 JOIN Performers AS T2 ON T1.Address_ID = T2.Address_ID \nA: Which cities have at least one customer but no performer? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT institution, LOCATION FROM institution WHERE founded > 1990 AND TYPE = 'Private' \nA: Show the names and locations of institutions that are founded after 1990 and have the type 'Private'. \n Additional table information: table: protein_institute"} -{"text": "Q: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE '%Monadic%' \nA: Find the last names of all the authors that have written a paper with title containing the word 'Monadic'. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT AVG(Price), YEAR FROM WINE GROUP BY YEAR \nA: What is the average prices of wines for each each? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT LOCATION FROM performance WHERE Attendance > 2000 INTERSECT SELECT LOCATION FROM performance WHERE Attendance < 1000 \nA: Show the locations that have both performances with more than 2000 attendees and performances with less than 1000 attendees. \n Additional table information: table: performance_attendance"} -{"text": "Q: SELECT MAX(Age), MIN(Age) FROM STUDENT WHERE Major = 600 \nA: Tell me the ages of the oldest and youngest students studying major 600. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT COUNT(*), Competition FROM MATCH GROUP BY Competition \nA: Find the number of matches in different competitions. \n Additional table information: table: city_record"} -{"text": "Q: SELECT COUNT(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city <> 'San Francisco' \nA: Count the number of trips that did not end in San Francisco city. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT Famous_Title FROM artist WHERE NOT Artist_ID IN (SELECT Artist_ID FROM volume) \nA: What are the famous titles of artists who do not have any volumes? \n Additional table information: table: music_4"} -{"text": "Q: SELECT T1.Product_Name, COUNT(*) FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name ORDER BY COUNT(*) DESC \nA: Show the names of products and the number of events they are in, sorted by the number of events in descending order. \n Additional table information: table: solvency_ii"} -{"text": "Q: SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the transportation method most people choose to get to tourist attractions. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT t2.firstname FROM Performance AS t1 JOIN Band AS t2 ON t1.bandmate = t2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY firstname ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the first name of the band mate who perfomed in the most songs? \n Additional table information: table: music_2"} -{"text": "Q: SELECT Song FROM volume WHERE Weeks_on_Top > 1 \nA: What are the songs in volumes with more than 1 week on top? \n Additional table information: table: music_4"} -{"text": "Q: SELECT name FROM channel ORDER BY rating_in_percent DESC \nA: Give me a list of all the channel names sorted by the channel rating in descending order. \n Additional table information: table: program_share"} -{"text": "Q: SELECT id FROM trip WHERE duration >= (SELECT AVG(duration) FROM trip WHERE zip_code = 94103) \nA: Find the id for the trips that lasted at least as long as the average duration of trips in zip code 94103. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' \nA: Find the first name of students who are living in the Smith Hall. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT Player FROM match_season WHERE College = 'UCLA' \nA: Who are the players from UCLA? \n Additional table information: table: match_season"} -{"text": "Q: SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Monterey' AND T2.price < 50 \nA: Give the neames of wines with prices below 50 and with appelations in Monterey county. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT name FROM head WHERE born_state <> 'California' \nA: What are the names of the heads who are born outside the California state? \n Additional table information: table: department_management"} -{"text": "Q: SELECT roomName FROM Rooms ORDER BY basePrice NULLS FIRST \nA: Sort all the rooms according to the price. Just report the room names. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995 \nA: What are the types of film market estimations in year 1995? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT COUNT(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005 \nA: How many gas station are opened between 2000 and 2005? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Tennis Club' \nA: Compute the average age of the members in the club 'Tennis Club'. \n Additional table information: table: club_1"} -{"text": "Q: SELECT t1.payment_method FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY SUM(t3.order_quantity) NULLS FIRST LIMIT 1 \nA: What is the payment method of the customer that has purchased the least quantity of items? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT name_first, name_last FROM player WHERE death_year = '' \nA: Find all the players' first name and last name who have empty death record. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT AVG(active_to_date - active_from_date) FROM customer_contact_channels \nA: What is the average time span of contact channels in the database? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT Competition_type, COUNT(*) FROM competition GROUP BY Competition_type \nA: List the types of competition and the number of competitions of each type. \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'A' AND T2.class_code = 10018 \nA: What is the last name of the student who received an A in the class with the code 10018? \n Additional table information: table: college_1"} -{"text": "Q: SELECT Name FROM people WHERE NOT People_id IN (SELECT Affirmative FROM debate_people) \nA: List the names of people that have not been on the affirmative side of debates. \n Additional table information: table: debate"} -{"text": "Q: SELECT SUM(enr) FROM college WHERE NOT cName IN (SELECT cName FROM tryout WHERE pPos = 'goalie') \nA: What is the total number of students enrolled in schools without any goalies? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT T2.dept_name, T2.dept_address FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the name and address of the department that has the highest number of students. \n Additional table information: table: college_1"} -{"text": "Q: SELECT T1.name, T2.balance + T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance > (SELECT AVG(balance) FROM savings) \nA: Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of party with most number of members? \n Additional table information: table: party_people"} -{"text": "Q: SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.major = '600' GROUP BY t1.clubname ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which club has the most members majoring in '600'? \n Additional table information: table: club_1"} -{"text": "Q: SELECT COUNT(*) FROM cinema \nA: Count the number of cinemas. \n Additional table information: table: cinema"} -{"text": "Q: SELECT city, COUNT(*) FROM station GROUP BY city HAVING COUNT(*) >= 15 \nA: List the name and the number of stations for all the cities that have at least 15 stations. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT DISTINCT product_size FROM Products \nA: What are the different product sizes? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT T2.role_name, T2.role_description FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T1.employee_name = 'Ebba' \nA: Show the name and description of the role played by the employee named Ebba. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT Team, Starting_Year FROM technician \nA: What are the team and starting year of technicians? \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT COUNT(*) FROM Tasks \nA: How many tasks are there in total? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT card_id, customer_id, card_type_code, card_number FROM Customers_cards \nA: Show ids, customer ids, card type codes, card numbers for all cards. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T1.Royal_Family_Details, T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID = T2.Tourist_Attraction_ID \nA: Which tourist attractions are related to royal family? Tell me their details and how we can get there. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T3.Type = 'Text' OR T1.RAM_MiB > 32 \nA: List the hardware model name for the phones that have screen mode type 'Text' or RAM size greater than 32. \n Additional table information: table: phone_1"} -{"text": "Q: SELECT customer_event_id, date_moved_in, property_id FROM customer_events \nA: List the customer event id and the corresponding move in date and property id. \n Additional table information: table: local_govt_and_lot"} -{"text": "Q: SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' \nA: Who are the members of the club named 'Hopkins Student Enterprises'? Show the last name. \n Additional table information: table: club_1"} -{"text": "Q: SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2003 ORDER BY T2.faculty DESC LIMIT 1 \nA: What campus has the most faculties in 2003? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT SUM(balance) FROM checking \nA: Find the total balance across checking accounts. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT COUNT(*) FROM Video_games \nA: How many video games exist? \n Additional table information: table: game_1"} -{"text": "Q: SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid' \nA: What are the names of all schools that have students trying out for the position of goal and 'mid'-field. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT COUNT(*) FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 100 OR T2.ticket_price < 10 \nA: Count the number of exhibitions that have had an attendnance of over 100 or a ticket prices under 10. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT COUNT(*), country FROM airport GROUP BY country \nA: how many airports are there in each country? \n Additional table information: table: flight_company"} -{"text": "Q: SELECT venue FROM MATCH ORDER BY date DESC \nA: What are the venues of all the matches? Sort them in the descending order of match date. \n Additional table information: table: city_record"} -{"text": "Q: SELECT MAX(T2.resolution), MIN(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE '3:%' \nA: What are the maximum and minimum resolution of songs whose duration is 3 minutes? \n Additional table information: table: music_1"} -{"text": "Q: SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Gatwick' \nA: What are the names of all the aircrafts associated with London Gatwick airport? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested DESC \nA: What are the weights of entrepreneurs in descending order of money requested? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT Memory_in_G, Carrier FROM phone \nA: What are the memories and carriers of phones? \n Additional table information: table: phone_market"} -{"text": "Q: SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%' \nA: Which colleges does each player with a name that starts with the letter D who tried out go to? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928 \nA: Show names of ships involved in a mission launched after 1928. \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: In which year did the least people enter hall of fame? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT T1.thing_id, T1.type_of_Thing_Code, T2.organization_details FROM Things AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_id \nA: List the id and type of each thing, and the details of the organization that owns it. \n Additional table information: table: local_govt_and_lot"} -{"text": "Q: SELECT COUNT(DISTINCT StuID) FROM Sportsinfo \nA: How many students play sports? \n Additional table information: table: game_1"} -{"text": "Q: SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor \nA: What are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT Major FROM STUDENT WHERE Sex = 'M' \nA: What are the majors of male (sex is M) students? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT dorm_name FROM dorm EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' \nA: What are the names of the dorm that does not have a TV Lounge? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT Wheels, LOCATION FROM railway \nA: List the wheels and locations of the railways. \n Additional table information: table: railway"} -{"text": "Q: SELECT COUNT(patient) FROM stay WHERE room = 112 \nA: Count the number of patients who stayed in room 112. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas' \nA: What are the headquarters that have both a company in the banking and 'oil and gas' industries? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'flax' \nA: Find the number of characteristics that the product 'flax' has. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT Address FROM LOCATIONS WHERE Location_Name = 'UK Gallery' \nA: What is the address of the location 'UK Gallery'? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT DISTINCT T3.name FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.title = 'Gone with the Wind' \nA: Find the names of all reviewers who rated Gone with the Wind. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT origin, COUNT(*) FROM Flight GROUP BY origin \nA: Show all origins and the number of flights from each origin. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT T3.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name HAVING COUNT(*) > 1 \nA: Show the names of journalists that have reported more than one event. \n Additional table information: table: news_report"} -{"text": "Q: SELECT problem_log_id, log_entry_description FROM problem_log \nA: What are the log id and entry description of each problem? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT T1.first_name, T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id \nA: Display the first name and department name for each employee. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT COUNT(DISTINCT pPos) FROM tryout \nA: What are the unique types of player positions in the tryout? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT SUM(city_population) FROM district ORDER BY city_area DESC LIMIT 3 \nA: Find the total population of the top 3 districts with the largest area. \n Additional table information: table: store_product"} -{"text": "Q: SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = 'San Francisco State University' AND T2.year = 1996 \nA: What is the campus fee of 'San Francisco State University' in year 1996? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT role_name, role_description FROM ROLES WHERE role_code = 'MG' \nA: What are the name and description for role code 'MG'? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT AVG(followers) FROM user_profiles WHERE UID IN (SELECT UID FROM tweets) \nA: Find the average number of followers for the users who had some tweets. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT T2.name, T1.category_id, COUNT(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id \nA: What are the names and ids of the different categories, and how many films are in each? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'KAWA' AND T2.lastname = 'GORDON' \nA: How many students does KAWA GORDON teaches? \n Additional table information: table: student_1"} -{"text": "Q: SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = 'San Jose State University' AND T2.year = 1996 \nA: What is the campus fee for San Jose State University in 1996? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT AVG(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen' \nA: Compute the mean price of procedures physician John Wen was trained in. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'CHRISSY' AND T1.lastname = 'NABOZNY' \nA: Find the number of teachers who teach the student called CHRISSY NABOZNY. \n Additional table information: table: student_1"} -{"text": "Q: SELECT T1.campus, SUM(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T2.year >= 1998 AND T2.year <= 2002 GROUP BY T1.campus \nA: how many degrees were conferred between 1998 and 2002? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT MAX(T1.duration), MAX(T2.resolution), T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages NULLS FIRST \nA: What are the maximum duration and resolution of all songs, for each language, ordered alphabetically by language? \n Additional table information: table: music_1"} -{"text": "Q: SELECT name FROM camera_lens WHERE name LIKE '%Digital%' \nA: List the camera lens names containing substring 'Digital'. \n Additional table information: table: mountain_photos"} -{"text": "Q: SELECT T1.customer_name FROM customers AS T1, orders AS T2, 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 \nA: Which customers have ever canceled the purchase of the product 'food' (the item status is 'Cancel')? \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT COUNT(*) FROM services \nA: How many services are there? \n Additional table information: table: e_government"} -{"text": "Q: SELECT T2.dept_name FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: What is the name of department where has the smallest number of professors? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T1.id, T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id \nA: For each trip, return its ending station's installation date. \n Additional table information: table: bike_1"} -{"text": "Q: 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 NULLS FIRST, T1.Name NULLS FIRST \nA: 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. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT T1.part_id, T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id JOIN Skills_Required_To_Fix AS T3 ON T2.part_fault_id = T3.part_fault_id GROUP BY T1.part_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which part fault requires the most number of skills to fix? List part id and name. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT AVG(Number_of_hosts) FROM party \nA: What is the average number of hosts for parties? \n Additional table information: table: party_host"} -{"text": "Q: SELECT SUM(Share_in_percent) FROM channel WHERE OWNER = 'CCTV' \nA: What is the total share (in percent) of all the channels owned by CCTV? \n Additional table information: table: program_share"} -{"text": "Q: SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid ORDER BY SUM(hours_played) DESC LIMIT 1 \nA: Show the game name that has most number of hours played. \n Additional table information: table: game_1"} -{"text": "Q: SELECT name FROM captain ORDER BY age NULLS FIRST LIMIT 1 \nA: What is the name of the youngest captain? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate \nA: What are the ids of all employees that don't have certificates? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT T1.Festival_ID, T3.Festival_Name, COUNT(*) FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID GROUP BY T1.Festival_ID \nA: Show the id, name of each festival and the number of artworks it has nominated. \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT COUNT(*) FROM accounts \nA: Count the number of accounts. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT COUNT(*) FROM journalist \nA: How many journalists are there? \n Additional table information: table: news_report"} -{"text": "Q: SELECT T1.name, T1.city, T2.dst_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid GROUP BY T2.dst_apid ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the name and city of the airport which is the destination of the most number of routes. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT advisor FROM Student GROUP BY advisor HAVING COUNT(*) >= 2 \nA: Show all advisors who have at least two students. \n Additional table information: table: game_1"} -{"text": "Q: SELECT customer_name, customer_id FROM customers WHERE customer_address LIKE '%TN%' \nA: Return the names and ids of customers who have TN in their address. \n Additional table information: table: department_store"} -{"text": "Q: SELECT kids FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY' \nA: How many kids stay in the rooms reserved by ROY SWEAZY? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT T1.title, T1.credits, T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING COUNT(*) > 1 \nA: Find the title, credit, and department name of courses that have more than one prerequisites? \n Additional table information: table: college_2"} -{"text": "Q: SELECT customer_phone FROM available_policies WHERE policy_type_code = 'Life Insurance' \nA: What are the phone numbers of customers using the policy with the code 'Life Insurance'? \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT T3.Pilot_name, T2.Model FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID \nA: Show the names of pilots and models of aircrafts they have flied with. \n Additional table information: table: pilot_record"} -{"text": "Q: SELECT * FROM employees WHERE hire_date > '1987-09-07' \nA: Which employees were hired after September 7th, 1987? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008 \nA: Show the locations shared by shops with open year later than 2012 and shops with open year before 2008. \n Additional table information: table: device"} -{"text": "Q: SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Badlands' \nA: How many instruments does the song 'Badlands' use? \n Additional table information: table: music_2"} -{"text": "Q: SELECT Fname, Lname FROM FACULTY WHERE sex = 'M' AND Building = 'NEB' \nA: What are the full names of faculties with sex M and who live in building NEB? \n Additional table information: table: college_3"} -{"text": "Q: SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1 \nA: Please show the categories of the music festivals with count more than 1. \n Additional table information: table: music_4"} -{"text": "Q: SELECT T1.interaction_type FROM medicine_enzyme_interaction AS T1 JOIN medicine AS T2 ON T1.medicine_id = T2.id JOIN enzyme AS T3 ON T1.enzyme_id = T3.id WHERE T3.name = 'ALA synthase' AND T2.name = 'Aripiprazole' \nA: What is the type of interaction for the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT SUM(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T1.state = 'New York' \nA: Find the total amount of loans provided by bank branches in the state of New York. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT T2.Name, T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID \nA: What are the names of wrestlers and the elimination moves? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT COUNT(*) FROM COURSE \nA: How many courses are there in total? \n Additional table information: table: college_3"} -{"text": "Q: SELECT name FROM Person WHERE gender = 'male' ORDER BY age NULLS FIRST \nA: Find the name and age of all males in order of their age. \n Additional table information: table: network_2"} -{"text": "Q: SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported > (SELECT MAX(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = 'Rylan' AND T4.staff_last_name = 'Homenick') \nA: Find the ids of the problems reported after the date of any problems reported by the staff Rylan Homenick. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT Name FROM technician WHERE Team <> 'NYY' \nA: What is the name of the technician whose team is not 'NYY'? \n Additional table information: table: machine_repair"} -{"text": "Q: 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 \nA: Find the last name of the latest contact individual of the organization 'Labour Party'. \n Additional table information: table: e_government"} -{"text": "Q: SELECT name FROM stadium ORDER BY capacity DESC LIMIT 1 \nA: Find the name of the stadium that has the maximum capacity. \n Additional table information: table: swimming"} -{"text": "Q: SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Weight DESC LIMIT 1 \nA: What is the name of the perpetrator with the biggest weight. \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT AVG(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' \nA: What is average salary of the players in the team named 'Boston Red Stockings' ? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT name FROM PersonFriend WHERE friend = 'Alice' AND YEAR = (SELECT MIN(YEAR) FROM PersonFriend WHERE friend = 'Alice') \nA: Find the name of persons who are friends with Alice for the shortest years. \n Additional table information: table: network_2"} -{"text": "Q: SELECT Name FROM HOST WHERE NOT Host_ID IN (SELECT Host_ID FROM party_host) \nA: List the names of hosts who did not serve as a host of any party in our record. \n Additional table information: table: party_host"} -{"text": "Q: SELECT DISTINCT LOCATION FROM cinema \nA: What are all the locations with a cinema? \n Additional table information: table: cinema"} -{"text": "Q: SELECT name FROM player WHERE points > (SELECT AVG(points) FROM player) \nA: What are the names of all players that got more than the average number of points? \n Additional table information: table: sports_competition"} -{"text": "Q: 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 \nA: Find the name of the activity that has the largest number of student participants. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT payment_method_code, COUNT(*) FROM customers GROUP BY payment_method_code \nA: For each payment method, return how many customers use it. \n Additional table information: table: department_store"} -{"text": "Q: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = 'BAL' \nA: Find the names of all the clubs that have at least a member from the city with city code 'BAL'. \n Additional table information: table: club_1"} -{"text": "Q: SELECT AVG(age) FROM Student WHERE StuID IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food' INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'animal') \nA: Find the average age of the students who have allergies with food and animal types. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT T2.Name, T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested NULLS FIRST \nA: List the names of entrepreneurs and their companies in descending order of money requested? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT customer_status_code, COUNT(*) FROM Customers GROUP BY customer_status_code \nA: For each customer status code, how many customers are classified that way? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Psychiatry' \nA: Find the name of physicians who are affiliated with both Surgery and Psychiatry departments. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = 'Rock' OR T1.name = 'Jazz' \nA: List the name of tracks belongs to genre Rock or genre Jazz. \n Additional table information: table: store_1"} -{"text": "Q: SELECT T1.Allergy, T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = 'Lisa' ORDER BY T1.Allergy NULLS FIRST \nA: What are the allergies and their types that the student with first name Lisa has? And order the result by name of allergies. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT COUNT(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id JOIN building AS T3 ON T3.building_id = T1.building_id WHERE T3.floors >= 20 \nA: How many proteins are associated with an institution in a building with at least 20 floors? \n Additional table information: table: protein_institute"} -{"text": "Q: SELECT service_name FROM services ORDER BY service_name NULLS FIRST \nA: Give me a list of all the service names sorted alphabetically. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 \nA: What are all the different first names of the drivers who are in position as standing and won? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T1.source_system_code, T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Benefits_Overpayments AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id ORDER BY T2.council_tax_id NULLS FIRST \nA: What is the tax source system code related to the benefits and overpayments? List the code and the benifit id, order by benifit id. \n Additional table information: table: local_govt_mdm"} -{"text": "Q: SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id = T4.course_id WHERE T3.title = 'International Finance') \nA: What are the names of students who have taken the prerequisite for the course International Finance? \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*) FROM Employee \nA: What is the number of employees? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT document_type_code FROM Documents WHERE document_id = 2 \nA: List the document type code for the document with the id 2. \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT COUNT(*) FROM institution WHERE NOT institution_id IN (SELECT institution_id FROM protein) \nA: How many institutions do not have an associated protein in our record? \n Additional table information: table: protein_institute"} -{"text": "Q: SELECT COUNT(*) FROM camera_lens WHERE NOT id IN (SELECT camera_lens_id FROM photos) \nA: How many camera lenses are not used in taking any photos? \n Additional table information: table: mountain_photos"} -{"text": "Q: SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id = t2.campus WHERE t2.year = 1956 AND totalenrollment_ay > 400 AND FTE_AY > 200 \nA: What campus started in year 1956, has more than 200 full time students, and more than 400 students enrolled? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT COUNT(DISTINCT team) FROM elimination \nA: How many different teams have had eliminated wrestlers? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3 \nA: What are the names for the 3 branches that have the most memberships? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3.Lname = 'Smith' AND T3.Fname = 'Linda' \nA: What are the names of all games played by Linda Smith? \n Additional table information: table: game_1"} -{"text": "Q: SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = 'walk' \nA: What are the details of the shops that can be accessed by walk? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT payment_date FROM payments WHERE amount_paid > 300 OR payment_type_code = 'Check' \nA: What are the payment date of the payment with amount paid higher than 300 or with payment type is 'Check' \n Additional table information: table: products_for_hire"} -{"text": "Q: SELECT Name FROM Artwork WHERE NOT Artwork_ID IN (SELECT Artwork_ID FROM nomination) \nA: List the name of artworks that are not nominated. \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT Zip_code FROM county WHERE County_name = 'Howard' \nA: What is the zip code the county named 'Howard' is located in? \n Additional table information: table: election"} -{"text": "Q: SELECT Lifespan FROM representative WHERE State = 'New York' OR State = 'Indiana' \nA: What are the life spans of representatives from New York state or Indiana state? \n Additional table information: table: election_representative"} -{"text": "Q: SELECT phone_number, email_address FROM Customers WHERE amount_outstanding > 2000 \nA: What are the phone numbers and email addresses of all customers who have an outstanding balance of more than 2000? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T3.cost > 5000 \nA: Which physicians are trained in procedures that are more expensive than 5000? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown <> 'Santo Domingo' \nA: Return the names of gymnasts who did not grow up in Santo Domingo. \n Additional table information: table: gymnast"} -{"text": "Q: SELECT publisher, COUNT(*) FROM book_club GROUP BY publisher \nA: How many books are there for each publisher? \n Additional table information: table: culture_company"} -{"text": "Q: SELECT DISTINCT T3.name, T2.title, T1.stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.director = T3.name \nA: What are the different reviewer names, movie titles, and stars for every rating where the reviewer had the same name as the director? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id \nA: Find distinct cities of address of students? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT title, YEAR, director FROM movie ORDER BY budget_million NULLS FIRST \nA: What are the titles, years, and directors of all movies, ordered by budget in millions? \n Additional table information: table: culture_company"} -{"text": "Q: SELECT T1.customer_id, T1.first_name, COUNT(*) FROM Customers AS T1 JOIN bookings AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id \nA: How many bookings did each customer make? List the customer id, first name, and the count. \n Additional table information: table: products_for_hire"} -{"text": "Q: SELECT COUNT(DISTINCT Name) FROM PHOTOS \nA: Count the number of distinct names associated with the photos. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT transaction_id FROM Financial_transactions WHERE transaction_amount > (SELECT AVG(transaction_amount) FROM Financial_transactions) \nA: What are the ids for transactions that have an amount greater than the average amount of a transaction? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%' \nA: What are the name of rooms booked by customers whose first name has 'ROY' in part? \n Additional table information: table: inn_1"} -{"text": "Q: 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 \nA: Which city does has most number of customers? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1 \nA: What is the starting year of the oldest technicians? \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT T2.day_Number, T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date \nA: What is the day Number and date of all the documents? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: What is the type with the fewest games? \n Additional table information: table: game_1"} -{"text": "Q: SELECT COUNT(DISTINCT roomtype) FROM room \nA: How many different types of rooms are there? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT building_address, building_phone FROM Apartment_Buildings WHERE building_manager = 'Brenden' \nA: Show the addresses and phones of all the buildings managed by 'Brenden'. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the name of the customer who has the most orders. \n Additional table information: table: customers_and_products_contacts"} -{"text": "Q: SELECT COUNT(DISTINCT LOCATION) FROM perpetrator \nA: How many distinct locations of perpetrators are there? \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT T2.customer_first_name, T2.customer_last_name, T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = '162' \nA: Give the full name and phone of the customer who has the account name 162. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT DISTINCT T1.stageposition FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE Firstname = 'Solveig' \nA: Find all the stage positions of the musicians with first name 'Solveig' \n Additional table information: table: music_2"} -{"text": "Q: SELECT region_name FROM region ORDER BY region_name NULLS FIRST \nA: List all region names in alphabetical order. \n Additional table information: table: storm_record"} -{"text": "Q: 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 \nA: Show the station name and number of trains in each station. \n Additional table information: table: train_station"} -{"text": "Q: SELECT Team FROM player ORDER BY Age DESC LIMIT 5 \nA: List the teams of the players with the top 5 largest ages. \n Additional table information: table: school_player"} -{"text": "Q: SELECT COUNT(*) FROM storm WHERE Number_Deaths > 0 \nA: How many storms had death records? \n Additional table information: table: storm_record"} -{"text": "Q: SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID GROUP BY T1.Device_ID HAVING COUNT(*) > 1 \nA: Show the carriers of devices in stock at more than one shop. \n Additional table information: table: device"} -{"text": "Q: SELECT T1.State_County FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Marketing_Region_Code = 'CA' \nA: Find the states or counties where the stores with marketing region code 'CA' are located. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT LOCATION FROM perpetrator ORDER BY Killed DESC LIMIT 1 \nA: What is the location of the perpetrator with the largest kills. \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT Nationality, COUNT(*) FROM journalist GROUP BY Nationality \nA: Show the different nationalities and the number of journalists of each nationality. \n Additional table information: table: news_report"} -{"text": "Q: SELECT Shop_Name FROM shop WHERE NOT Shop_ID IN (SELECT Shop_ID FROM stock) \nA: What are the names of shops that do not have any devices in stock? \n Additional table information: table: device"} -{"text": "Q: SELECT clublocation FROM club WHERE clubname = 'Tennis Club' \nA: Where us the club named 'Tennis Club' located? \n Additional table information: table: club_1"} -{"text": "Q: SELECT project_id FROM Documents GROUP BY project_id HAVING COUNT(*) >= 2 \nA: What are project ids of projects that have 2 or more corresponding documents? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT product_name, product_category_code FROM products ORDER BY product_price DESC LIMIT 1 \nA: Find the name and category of the most expensive product. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT song_name, releasedate FROM song ORDER BY releasedate DESC LIMIT 1 \nA: What is the name of the song that was released in the most recent year? \n Additional table information: table: music_1"} -{"text": "Q: SELECT COUNT(DISTINCT Birth_Place) FROM people \nA: How many distinct birth places are there? \n Additional table information: table: body_builder"} -{"text": "Q: SELECT DISTINCT Registration_Date, Election_Cycle FROM VOTING_RECORD \nA: Report the distinct registration date and the election cycle. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20 \nA: What are the ids of the students who are under 20 years old and are involved in at least one activity. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT Character, Duration FROM actor \nA: Return the characters and durations for each actor. \n Additional table information: table: musical"} -{"text": "Q: SELECT Major FROM STUDENT WHERE Sex = 'M' \nA: List the major of each male student. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T1.date_in_location_from, T1.date_in_locaton_to FROM Document_locations AS T1 JOIN All_documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = 'Robin CV' \nA: Find the starting date and ending data in location for the document named 'Robin CV'. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT Stories FROM buildings ORDER BY Height DESC LIMIT 1 \nA: What is the stories of highest building? \n Additional table information: table: company_office"} -{"text": "Q: SELECT T1.Name, T2.Name FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID \nA: What are the names of cities, as well as the names of the counties they correspond to? \n Additional table information: table: county_public_safety"} -{"text": "Q: 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 \nA: Which cities have higher temperature in Feb than in Jun or have once served as host cities? \n Additional table information: table: city_record"} -{"text": "Q: SELECT name FROM Person ORDER BY age DESC \nA: Find the names of all person sorted in the descending order using age. \n Additional table information: table: network_2"} -{"text": "Q: SELECT COUNT(*) FROM actor \nA: Count the number of actors. \n Additional table information: table: musical"} -{"text": "Q: SELECT MIN(T1.duration), MIN(T2.rating), T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is NULLS FIRST \nA: What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre? \n Additional table information: table: music_1"} -{"text": "Q: SELECT COUNT(*) FROM railway \nA: How many railways are there? \n Additional table information: table: railway"} -{"text": "Q: SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Indiana University' \nA: List the titles of the papers whose authors are from the institution 'Indiana University'. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT COUNT(DISTINCT class_section) FROM CLASS WHERE crs_code = 'ACCT-211' \nA: How many sections does course ACCT-211 has? \n Additional table information: table: college_1"} -{"text": "Q: 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' \nA: Show the movie titles and book titles for all companies in China. \n Additional table information: table: culture_company"} -{"text": "Q: SELECT fname, sex FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Milk' EXCEPT SELECT StuID FROM Has_allergy WHERE Allergy = 'Cat') \nA: Find the first name and gender of the student who has allergy to milk but not cat. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Initial Application' \nA: For grants that have descriptions of Regular and Initial Applications, what are their start dates? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT T2.Visit_Date, T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID = T2.Tourist_ID WHERE T1.Tourist_Details = 'Vincent' \nA: Find the visit date and details of the tourist whose detail is 'Vincent' \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT Room FROM FACULTY WHERE Rank = 'Professor' AND Building = 'NEB' \nA: Find the rooms of faculties with rank professor who live in building NEB. \n Additional table information: table: college_3"} -{"text": "Q: 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 \nA: What are the first and last name of the faculty who has the most students? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.attribute_value = (SELECT attribute_value FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_value ORDER BY COUNT(*) DESC LIMIT 1) \nA: Find the entry names of the catalog with the attribute that have the most entries. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT COUNT(DISTINCT party_name) FROM party \nA: How many parties do we have? \n Additional table information: table: party_people"} -{"text": "Q: SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: What is the id of the department with the least number of staff? \n Additional table information: table: department_store"} -{"text": "Q: SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM perpetrator) \nA: List the names of people that are not perpetrators. \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT origin FROM train GROUP BY origin HAVING COUNT(*) > 1 \nA: Find the origins from which more than 1 train starts. \n Additional table information: table: station_weather"} -{"text": "Q: SELECT DISTINCT asset_model FROM Assets \nA: What are all the distinct asset models? \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = 'Appropriations' INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = 'Economic Matters' \nA: Which parties have delegates in both the 'Appropriations' committee and the 'Economic Matters' committee? \n Additional table information: table: election"} -{"text": "Q: SELECT T2.product_name, SUM(T1.product_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name \nA: What are the different product names, and what is the sum of quantity ordered for each product? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2 \nA: What are the names of all aircrafts that have won a match at least twice? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT AVG(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = 'AIB' \nA: What is the average points of players from club with name 'AIB'. \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Aaron' AND t1.lname = 'Turon' \nA: Find the titles of all the papers written by 'Aaron Turon'. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT DISTINCT building_description FROM Apartment_Buildings \nA: Show all distinct building descriptions. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2 \nA: Find the booking start date and end date for the apartments that have more than two bedrooms. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200 \nA: Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200. \n Additional table information: table: climbing"} -{"text": "Q: SELECT name FROM student WHERE NOT id IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.dept_name = 'Biology') \nA: What are the names of students who haven't taken any Biology courses? \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(DISTINCT customer_id) FROM Accounts \nA: How many customers have opened an account? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id GROUP BY t2.program_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which program is broadcast most frequently? Give me the program name. \n Additional table information: table: program_share"} -{"text": "Q: SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC \nA: Sort all the industries in descending order of the count of companies in each industry \n Additional table information: table: company_office"} -{"text": "Q: SELECT campus FROM campuses WHERE LOCATION = 'Northridge' AND county = 'Los Angeles' UNION SELECT campus FROM campuses WHERE LOCATION = 'San Francisco' AND county = 'San Francisco' \nA: Find the name of the campuses that is in Northridge, Los Angeles or in San Francisco, San Francisco. \n Additional table information: table: csu_1"} -{"text": "Q: SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = 'Julio' \nA: What are the names of the courses taught by the tutor whose personal name is 'Julio'? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT name, city FROM branch WHERE NOT branch_id IN (SELECT branch_id FROM membership_register_branch) \nA: List the branch name and city without any registered members. \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT T1.name FROM nurse AS T1 JOIN appointment AS T2 ON T1.employeeid = T2.prepnurse GROUP BY T1.employeeid ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the nurse has the most appointments? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 AND T2.points > 20 \nA: Find all the forenames of distinct drivers who won in position 1 as driver standing and had more than 20 points? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT Membership_card FROM member GROUP BY Membership_card HAVING COUNT(*) > 5 \nA: Which membership card has more than 5 members? \n Additional table information: table: coffee_shop"} -{"text": "Q: SELECT name FROM web_client_accelerator WHERE name LIKE '%Opera%' \nA: Which accelerator name contains substring 'Opera'? \n Additional table information: table: browser_web"} -{"text": "Q: SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_President_VOTE \nA: Find the distinct last names of the students who have class president votes. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1 \nA: What is the entry name of the most expensive catalog (in USD)? \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT Amount_Settled, Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC NULLS FIRST LIMIT 1 \nA: Find the claimed amount in the claim with the least amount settled. Show both the settlement amount and claim amount. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT date, cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5 \nA: What are the dates that have the 5 highest cloud cover rates and what are the rates? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT name FROM useracct WHERE NOT u_id IN (SELECT u_id FROM review) \nA: Find the names of users who did not leave any review. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT MONTH FROM happy_hour GROUP BY MONTH ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which month has the most happy hours? \n Additional table information: table: coffee_shop"} -{"text": "Q: SELECT Store_Name FROM Drama_Workshop_Groups \nA: Show all the Store_Name of drama workshop groups. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT COUNT(*) FROM county \nA: How many counties are there in total? \n Additional table information: table: election"} -{"text": "Q: SELECT Name FROM company ORDER BY Sales_in_Billion ASC NULLS FIRST \nA: List the names of companies by ascending number of sales. \n Additional table information: table: company_employee"} -{"text": "Q: SELECT T1.name, T1.area, T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed > 60 INTERSECT SELECT T1.name, T1.area, T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed < 55 \nA: What are the country names, area and population which has both roller coasters with speed higher \n Additional table information: table: roller_coaster"} -{"text": "Q: SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id GROUP BY T2.member_in_charge_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of member in charge of greatest number of events? \n Additional table information: table: party_people"} -{"text": "Q: SELECT COUNT(*) FROM Player WHERE HS > 1000 \nA: How many different players trained for more than 1000 hours? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT MAX(Transit_Passengers), MIN(Transit_Passengers) FROM airport \nA: What is the maximum and mininum number of transit passengers for all airports? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT document_type_code, document_type_name, document_type_description FROM Ref_document_types \nA: Show all document type codes, document type names, document type descriptions. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals' \nA: List players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT SUM(access_count) FROM documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the total access count of all documents in the most popular document type. \n Additional table information: table: document_management"} -{"text": "Q: SELECT T1.name, T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the salaray and name of the employee that is certified to fly the most planes? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT rID FROM Rating WHERE stars <> 4 \nA: What are the ids of all reviewers who have not given 4 stars at least once? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT sales_details FROM sales UNION SELECT purchase_details FROM purchases \nA: What are the details of all sales and purchases? \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the name of the department that has the biggest number of students minored in? \n Additional table information: table: college_3"} -{"text": "Q: SELECT T2.role_name, T2.role_description FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T1.employee_name = 'Ebba' \nA: What is the role name and role description for employee called Ebba? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT SUM(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.facility_code = 'Gym' \nA: Show the total number of rooms of all apartments with facility code 'Gym'. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT T1.account_id, T2.account_name FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id HAVING COUNT(*) >= 4 \nA: What are the ids and names of accounts with 4 or more transactions? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT patient FROM stay WHERE room = 111 ORDER BY staystart DESC LIMIT 1 \nA: What is the id of the patient who stayed in room 111 most recently? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT College, COUNT(*) FROM submission GROUP BY College \nA: Show different colleges along with the number of authors of submission from each college. \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT policy_type_code, COUNT(*) FROM policies GROUP BY policy_type_code \nA: Find the number of records of each policy type and its type code. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT T1.driverid, T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the id and surname of the driver who participated the most number of races? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT t1.product_name, COUNT(*) FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name \nA: List the name of all products along with the number of complaints that they have received. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = 'Rock' OR T3.name = 'MPEG audio file' \nA: List the name of tracks belongs to genre Rock or media type is MPEG audio file. \n Additional table information: table: store_1"} -{"text": "Q: SELECT COUNT(*) FROM (SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 3) \nA: How many cities are there that have more than 3 airports? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT T1.employee_id, T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id \nA: What are all the employee ids and the names of the countries in which they work? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id HAVING COUNT(*) >= 2 \nA: Which counties have two or more delegates? Give me the county names. \n Additional table information: table: election"} -{"text": "Q: SELECT POSITION FROM player GROUP BY name HAVING AVG(Points) >= 20 \nA: List the position of players with average number of points scored by players of that position bigger than 20. \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT DISTINCT name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE ratingDate = 'null' \nA: Find the names of all reviewers who have ratings with a NULL value for the date. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT employee_id, first_name, last_name FROM employees WHERE department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%T%') \nA: What are the ids and full names for employees who work in a department that has someone with a first name that contains the letter T? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT name FROM procedures WHERE cost < 5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen' \nA: What procedures cost less than 5000 and have John Wen as a trained physician? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT MAX(home_games), MIN(home_games), AVG(home_games) FROM stadium \nA: What are the maximum, minimum and average home games each stadium held? \n Additional table information: table: game_injury"} -{"text": "Q: SELECT COUNT(DISTINCT bike_id) FROM trip \nA: How many different bike ids are there? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT COUNT(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54' \nA: How many project staff worked as leaders or started working before '1989-04-24 23:51:54'? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT email_address, phone_number FROM customers ORDER BY email_address NULLS FIRST, phone_number NULLS FIRST \nA: Find the emails and phone numbers of all the customers, ordered by email address and phone number. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID \nA: What are the names of perpetrators? \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT building_address, building_phone FROM Apartment_Buildings WHERE building_manager = 'Brenden' \nA: What are the address and phone number of the buildings managed by 'Brenden'? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code = 'ORG' \nA: Return the description of the budget type that has the code ORG. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT T1.name, T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid ORDER BY COUNT(*) DESC LIMIT 1 \nA: what is the salary and name of the employee who has the most number of aircraft certificates? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT rID FROM Rating WHERE stars <> 4 \nA: Find the ids of reviewers who didn't only give 4 star. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT POSITION, AVG(Points) FROM player GROUP BY POSITION \nA: For each position, what is the average number of points for players in that position? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = 'Rock' AND T3.name = 'MPEG audio file' \nA: List the name of tracks belongs to genre Rock and whose media type is MPEG audio file. \n Additional table information: table: store_1"} -{"text": "Q: SELECT * FROM Albums WHERE YEAR = 2010 \nA: What information is there on albums from 2010? \n Additional table information: table: music_2"} -{"text": "Q: SELECT T1.White, T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID \nA: Show white percentages of cities and the crime rates of counties they are in. \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT COUNT(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE = 'ACCT-211' \nA: How many professors teach a class with the code ACCT-211? \n Additional table information: table: college_1"} -{"text": "Q: SELECT name, price FROM Products ORDER BY price ASC NULLS FIRST LIMIT 1 \nA: Select the name and price of the cheapest product. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT AVG(transaction_amount), SUM(transaction_amount) FROM Financial_transactions \nA: Return the average transaction amount, as well as the total amount of all transactions. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the most common nationality of hosts. \n Additional table information: table: party_host"} -{"text": "Q: SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100 \nA: Give me the descriptions of the service types that cost more than 100. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: 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 \nA: find the name of driver who is driving the school bus with the longest working history. \n Additional table information: table: school_bus"} -{"text": "Q: SELECT name FROM airports WHERE country = 'Cuba' OR country = 'Argentina' \nA: What are the names of all airports in Cuba or Argentina? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1 \nA: When was the school with the largest enrollment founded? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT name FROM Employee ORDER BY salary ASC NULLS FIRST LIMIT 3 \nA: Show the name of employees with three lowest salaries. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT MAX(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff') \nA: What is id of the staff who had a Staff Department Assignment earlier than any Clerical Staff? \n Additional table information: table: department_store"} -{"text": "Q: SELECT T1.crs_code FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num WHERE T3.stu_lname = 'Smithson' \nA: What is the code of the course which the student whose last name is Smithson took? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.project_id HAVING COUNT(*) > 2 \nA: What are the task details, task ids, and project ids for the progrects that are detailed as 'omnis' or have at least 3 outcomes? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT school_name FROM school WHERE NOT school_id IN (SELECT school_id FROM endowment) \nA: List the names of the schools without any endowment. \n Additional table information: table: school_finance"} -{"text": "Q: SELECT AVG(price_range) FROM HOTELS WHERE star_rating_code = '5' AND pets_allowed_yn = 1 \nA: What is the average price range of five star hotels that allow pets? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT T1.student_details FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the details of the student who registered for the most number of courses? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT problem_log_id, log_entry_date FROM problem_log WHERE problem_id = 10 \nA: Find all the ids and dates of the logs for the problem whose id is 10. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT SUM(acc_bal), state FROM customer WHERE credit_score > 100 GROUP BY state \nA: What is the total account balance for customers with a credit score of above 100 for the different states? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT transaction_type_code, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY transaction_type_code \nA: Show the average transaction amount for different transaction types. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT AVG(enr) FROM College WHERE state = 'FL' \nA: What is average enrollment of colleges in the state FL? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT name FROM instructor WHERE NOT id IN (SELECT id FROM teaches WHERE semester = 'Spring') \nA: Find the names of instructors who didn't each any courses in any Spring semester. \n Additional table information: table: college_2"} -{"text": "Q: SELECT SUM(T1.Money_Requested) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 1.85 \nA: What is the total money requested by entrepreneurs with height more than 1.85? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT COUNT(*) FROM member WHERE Membership_card = 'Black' \nA: How many members have the black membership card? \n Additional table information: table: coffee_shop"} -{"text": "Q: SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1 \nA: What is the famous release date of the artist with the oldest age? \n Additional table information: table: music_4"} -{"text": "Q: SELECT T3.Name, T2.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID ORDER BY T2.Event_Attendance ASC NULLS FIRST \nA: Show the names of journalists and the names of the events they reported in ascending order \n Additional table information: table: news_report"} -{"text": "Q: SELECT T3.service_id, T4.Service_Type_Code FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID JOIN EVENTS AS T3 ON T2.Event_ID = T3.Event_ID JOIN services AS T4 ON T3.service_id = T4.service_id GROUP BY T3.service_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Which service id and type has the least number of participants? \n Additional table information: table: local_govt_in_alabama"} -{"text": "Q: SELECT AVG(UnitPrice) FROM TRACK \nA: What is the average unit price of all the tracks? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT origin, COUNT(*) FROM Flight GROUP BY origin \nA: For each origin, how many flights came from there? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT COUNT(*) FROM customers WHERE state = 'CA' \nA: How many customers are from California? \n Additional table information: table: store_1"} -{"text": "Q: SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the teams with the most technicians? \n Additional table information: table: machine_repair"} -{"text": "Q: 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 \nA: What is the first and last name of the student participating in the most activities? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = 'back' \nA: What are the names of the songs that do not have back vocals? \n Additional table information: table: music_2"} -{"text": "Q: SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2 \nA: display the ID for those employees who did two or more jobs in the past. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT grade, COUNT(DISTINCT classroom), COUNT(*) FROM list GROUP BY grade \nA: For each grade, report the grade, the number of classrooms in which it is taught and the total number of students in the grade. \n Additional table information: table: student_1"} -{"text": "Q: SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Le Pop' \nA: What is the first and last name of artist who performed 'Le Pop'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination \nA: Please show different denominations and the corresponding number of schools. \n Additional table information: table: school_player"} -{"text": "Q: SELECT MAX(stars), MIN(stars) FROM Rating \nA: What is the lowest and highest rating star? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT bedType, COUNT(*) FROM Rooms GROUP BY bedType \nA: What are the number of rooms for each bed type? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT email FROM employees WHERE commission_pct = 'null' AND salary BETWEEN 7000 AND 12000 AND department_id = 50 \nA: display the emails of the employees who have no commission percentage and salary within the range 7000 to 12000 and works in that department which number is 50. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT Name FROM technician WHERE Age = 36 OR Age = 37 \nA: What are the names of the technicians aged either 36 or 37? \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT DISTINCT T2.emp_fname, T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Computer Info. Systems' \nA: Find the first names and degree of all professors who are teaching some class in Computer Info. Systems department. \n Additional table information: table: college_1"} -{"text": "Q: SELECT T2.first_name, T2.last_name, T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the full name and id of the actor or actress who starred in the greatest number of films. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3 \nA: List the distinct ranges of the mountains with the top 3 prominence. \n Additional table information: table: climbing"} -{"text": "Q: SELECT role_code FROM Employees GROUP BY role_code HAVING COUNT(*) >= 3 \nA: What are the roles with three or more employees? Give me the role codes. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT first_name, last_name, department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id) \nA: What are the full names and department ids for the lowest paid employees across all departments. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT COUNT(*) FROM entrepreneur \nA: How many entrepreneurs are there? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT Date_Claim_Made, Date_Claim_Settled FROM Settlements \nA: What are the claim dates and settlement dates of all the settlements? \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the code of the role that have the most employees. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' INTERSECT SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Night' \nA: what are the names of the channels that broadcast in both morning and night? \n Additional table information: table: program_share"} -{"text": "Q: SELECT name FROM Employee WHERE salary > (SELECT AVG(salary) FROM Employee) \nA: What are the names of all employees who have a salary higher than average? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT AVG(distance), AVG(price) FROM Flight WHERE origin = 'Los Angeles' \nA: What is the average distance and average price for flights from Los Angeles. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT dorm_name FROM dorm EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' \nA: Find the name of dorms that do not have amenity TV Lounge. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT Headquarters, COUNT(*) FROM company GROUP BY Headquarters \nA: Show the different headquarters and number of companies at each headquarter. \n Additional table information: table: company_employee"} -{"text": "Q: SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT MIN(Price) FROM wine WHERE Winery = 'John Anthony') \nA: What are the distinct names of wines with prices higher than any wine from John Anthony winery. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT StuID FROM Student WHERE Sex = 'M' \nA: What are the student ids for all male students? \n Additional table information: table: allergy_1"} -{"text": "Q: 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' \nA: Find the id of the customers who have order status both 'On Road' and 'Shipped'. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT first_name, last_name FROM Customers \nA: What are the first and last names for all customers? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT t3.address_content FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t1.customer_name = 'Maudie Kertzmann' \nA: What is the address content of the customer named 'Maudie Kertzmann'? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT date_stored FROM All_documents WHERE Document_name = 'Marry CV' \nA: What is the date when the document 'Marry CV' was stored? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT name, CLASS, date FROM race \nA: What are the names, classes, and dates for all races? \n Additional table information: table: race_track"} -{"text": "Q: SELECT fname, lname FROM Student WHERE NOT StuID IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food') \nA: List the first and last name of the students who do not have any food type allergy. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT origin FROM Flight WHERE destination = 'Honolulu' \nA: Show origins of all flights with destination Honolulu. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT DISTINCT CLASS FROM race \nA: What are the distinct classes that races can have? \n Additional table information: table: race_track"} -{"text": "Q: 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 \nA: How many companies operates airlines in each airport? \n Additional table information: table: flight_company"} -{"text": "Q: SELECT company, main_industry FROM company WHERE headquarters <> 'USA' \nA: Show the company name and the main industry for all companies whose headquarters are not from USA. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT name, year_join FROM artist WHERE country <> 'United States' \nA: What are the names and year of joining for artists that do not have the country 'United States'? \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT COUNT(*) FROM Faculty WHERE Rank = 'Professor' AND building = 'NEB' \nA: Count the number of Professors who have office in building NEB. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT T2.FirstName, T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.FirstName = 'Leonie' \nA: What is the first name and last name employee helps the customer with first name Leonie? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT student_capacity, gender FROM dorm WHERE dorm_name LIKE '%Donor%' \nA: Find the capacity and gender type of the dorm whose name has substring \u2018Donor\u2019. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the airport that is the destination of the most number of routes that start in China? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT COUNT(*), major FROM student GROUP BY major \nA: Find the number of students in each major. \n Additional table information: table: dorm_1"} -{"text": "Q: 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 \nA: What is the county that produces the most wines scoring higher than 90? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT Major FROM STUDENT WHERE Sex = 'F' GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the major that is studied by the most female students. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT company, main_industry FROM company WHERE headquarters <> 'USA' \nA: What are the companies and main industries of all companies that are not headquartered in the United States? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT COUNT(DISTINCT nationality) FROM swimmer \nA: How many different countries are all the swimmers from? \n Additional table information: table: swimming"} -{"text": "Q: SELECT T3.name, T2.title, T1.stars, T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID ORDER BY T3.name NULLS FIRST, T2.title NULLS FIRST, T1.stars NULLS FIRST \nA: Return reviewer name, movie title, stars, and ratingDate. And sort the data first by reviewer name, then by movie title, and lastly by number of stars. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT SUM(settlement_amount), AVG(settlement_amount) FROM settlements \nA: Return the sum and average of all settlement amounts. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT T1.Name, T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = 'film festival' \nA: Find the names and descriptions of the photos taken at the tourist attraction called 'film festival'. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE lastname = 'Heilo' GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the type of vocals that the band member with the last name 'Heilo' played the most? \n Additional table information: table: music_2"} -{"text": "Q: SELECT COUNT(DISTINCT Hometown) FROM people \nA: How many distinct hometowns did these people have? \n Additional table information: table: gymnast"} -{"text": "Q: SELECT Payment_Method_Code, Date_Payment_Made, Amount_Payment FROM Payments ORDER BY Date_Payment_Made ASC NULLS FIRST \nA: What are the method, date and amount of each payment? Sort the list in ascending order of date. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT T2.Author, COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author \nA: Show each author and the number of workshops they submitted to. \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT DISTINCT T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Sarah Martinez' \nA: Find the names of all directors whose movies are rated by Sarah Martinez. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Boeing 737-800' \nA: Show names for all employees who have certificate of Boeing 737-800. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Bob' \nA: What are the names of all of Bob's friends? \n Additional table information: table: network_2"} -{"text": "Q: SELECT AVG(ticket_price), MIN(ticket_price), MAX(ticket_price) FROM exhibition WHERE YEAR < 2009 \nA: Show the average, minimum, and maximum ticket prices for exhibitions for all years before 2009. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT T1.Store_Phone, T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T2.Product_Name = 'film' \nA: What are the names of workshop groups in which services with product name 'film' are performed? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT SUM(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010 \nA: What is the total salary expenses of team Boston Red Stockings in 2010? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT COUNT(*) FROM Student_Tests_Taken WHERE test_result = 'Fail' \nA: How many tests have result 'Fail'? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the name of the user who gives the most reviews. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT train_number, name FROM train ORDER BY TIME NULLS FIRST \nA: show all train numbers and names ordered by their time from early to late. \n Additional table information: table: station_weather"} -{"text": "Q: SELECT date_became_customer FROM Customers WHERE first_name = 'Carole' AND last_name = 'Bernhard' \nA: When did customer with first name as Carole and last name as Bernhard became a customer? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) <= 20 \nA: What are the last names of employees who serve at most 20 customers? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT COUNT(*) FROM head WHERE age > 56 \nA: How many heads of the departments are older than 56 ? \n Additional table information: table: department_management"} -{"text": "Q: SELECT T1.source_system_code, T1.master_customer_id, T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Parking_Fines AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id \nA: Wat is the tax source system code and master customer id of the taxes related to each parking fine id? \n Additional table information: table: local_govt_mdm"} -{"text": "Q: SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' \nA: Who are the members of the club named 'Bootup Baltimore'? Give me their last names. \n Additional table information: table: club_1"} -{"text": "Q: SELECT T1.first_name, T1.last_name, COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 10 \nA: Find out the top 10 customers by total number of orders. List customers' first and last name and the number of total orders. \n Additional table information: table: store_1"} -{"text": "Q: SELECT COUNT(*) FROM airports WHERE name LIKE '%International%' \nA: Find the number of airports whose name contain the word 'International'. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT campus FROM campuses WHERE county = 'Los Angeles' \nA: Report the name of all campuses in Los Angeles county. \n Additional table information: table: csu_1"} -{"text": "Q: SELECT customer_details FROM customers EXCEPT SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id \nA: What are the names of customers who do not have any policies? \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT name FROM program WHERE origin <> 'Beijing' \nA: Which programs' origins are not 'Beijing'? Give me the program names. \n Additional table information: table: program_share"} -{"text": "Q: SELECT fname, sex FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Milk' EXCEPT SELECT StuID FROM Has_allergy WHERE Allergy = 'Cat') \nA: What are the first name and gender of the students who have allergy to milk but can put up with cats? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT product_type_code, AVG(product_price) FROM products GROUP BY product_type_code \nA: What is the average price for each type of product? \n Additional table information: table: department_store"} -{"text": "Q: SELECT POSITION, Team FROM pilot \nA: What are the positions and teams of pilots? \n Additional table information: table: pilot_record"} -{"text": "Q: SELECT Payment_ID, Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa' \nA: Which Payments were processed with Visa? List the payment Id, the date and the amount. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT COUNT(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.city_code = 'NYC' AND T2.Election_Cycle = 'Spring' \nA: Find the number of students whose city code is NYC and who have class senator votes in the spring election cycle. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT title FROM albums \nA: What are the titles of all the albums? \n Additional table information: table: store_1"} -{"text": "Q: SELECT Status, AVG(Population) FROM city GROUP BY Status \nA: Please show the different statuses of cities and the average population of cities with each status. \n Additional table information: table: farm"} -{"text": "Q: SELECT T1.theme, T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.ticket_price > (SELECT AVG(ticket_price) FROM exhibition) \nA: What is the theme and artist name for the exhibition with a ticket price higher than the average? \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT COUNT(*) FROM park WHERE state = 'NY' \nA: How many parks are there in the state of NY? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT * FROM people \nA: List all info about all people. \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM checking) \nA: Find the name of accounts whose checking balance is below the average checking balance. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT T2.name, T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math' \nA: Find the name and salary of instructors who are advisors of the students from the Math department. \n Additional table information: table: college_2"} -{"text": "Q: SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE '2%' \nA: Which catalog contents have a product stock number that starts from '2'? Show the catalog entry names. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT name FROM patient EXCEPT SELECT T1.name FROM patient AS T1 JOIN Prescribes AS T2 ON T2.Patient = T1.SSN JOIN Medication AS T3 ON T2.Medication = T3.Code WHERE T3.name = 'Procrastin-X' \nA: What are the names of patients who are not taking the medication of Procrastin-X. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT AVG(access_count) FROM documents \nA: Find the average access count across all documents? \n Additional table information: table: document_management"} -{"text": "Q: SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the denomination of the school the most players belong to? \n Additional table information: table: school_player"} -{"text": "Q: SELECT T1.Name, T3.Visit_Date FROM Tourist_Attractions AS T1, VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Vincent' OR T2.Tourist_Details = 'Vivian' \nA: What are the names of the tourist attractions and the dates when the tourists named Vincent or Vivian visited there? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT crs_credit, crs_description FROM course WHERE crs_code = 'CIS-220' \nA: What is the description for the CIS-220 and how many credits does it have? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T1.staff_name, T1.staff_id FROM Staff AS T1 JOIN Fault_Log AS T2 ON T1.staff_id = T2.recorded_by_staff_id EXCEPT SELECT T3.staff_name, T3.staff_id FROM Staff AS T3 JOIN Engineer_Visits AS T4 ON T3.staff_id = T4.contact_staff_id \nA: What is the name and id of the staff who recorded the fault log but has not contacted any visiting engineers? \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT Name FROM GENRE \nA: List the names of all music genres. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1 \nA: What is the owner of the channel that has the highest rating ratio? \n Additional table information: table: program_share"} -{"text": "Q: 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 \nA: Give the color of the grape whose wine products have the highest average price? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT fname, lname FROM Student WHERE NOT StuID IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food') \nA: What is the full name of each student who is not allergic to any type of food. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT t2.document_structure_description FROM documents AS t1 JOIN document_structures AS t2 ON t1.document_structure_code = t2.document_structure_code GROUP BY t1.document_structure_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the structure of the document with the least number of accesses? \n Additional table information: table: document_management"} -{"text": "Q: SELECT COUNT(*) FROM Documents_with_expenses \nA: How many documents have expenses? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT name FROM manufacturers WHERE revenue > (SELECT AVG(revenue) FROM manufacturers) \nA: What are the names of manufacturers with revenue greater than the average of all revenues? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT COUNT(*) FROM county \nA: Count the total number of counties. \n Additional table information: table: election"} -{"text": "Q: SELECT main_industry, COUNT(*) FROM company GROUP BY main_industry ORDER BY SUM(market_value) DESC LIMIT 1 \nA: List the main industry with highest total market value and its number of companies. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT document_type_code FROM Ref_document_types WHERE document_type_name = 'Paper' \nA: What is the document type code for document type 'Paper'? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT DISTINCT T1.Director FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID WHERE T2.Year = 1995 \nA: Who are the different directors of films which had market estimation in 1995? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT school, LOCATION FROM university WHERE affiliation = 'Public' \nA: What are the public schools and what are their locations? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT country FROM airlines GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which countries has the most number of airlines? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which building has the largest number of company offices? Give me the building name. \n Additional table information: table: company_office"} -{"text": "Q: SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING COUNT(DISTINCT T3.product_id) >= 3 \nA: What are the distinct names of customers who have purchased at least three different products? \n Additional table information: table: department_store"} -{"text": "Q: SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName \nA: What are the different states that have students trying out? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT T2.premises_type, T1.address_type_code FROM customer_addresses AS T1 JOIN premises AS T2 ON T1.premise_id = T2.premise_id \nA: Show the premise type and address type code for all customer addresses. \n Additional table information: table: customers_campaigns_ecommerce"} -{"text": "Q: SELECT DISTINCT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age < (SELECT AVG(age) FROM person) \nA: What are the different names of friends who are younger than the average age for a friend? \n Additional table information: table: network_2"} -{"text": "Q: SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the shop that has the most different kinds of devices in stock? \n Additional table information: table: device"} -{"text": "Q: SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1 \nA: What is the author of the submission with the highest score? \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the document type code with most number of documents? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT t1.Effective_Date FROM claims AS t1 JOIN settlements AS t2 ON t1.claim_id = t2.claim_id GROUP BY t1.claim_id ORDER BY SUM(t2.settlement_amount) DESC LIMIT 1 \nA: What is the effective date of the claim that has the largest amount of total settlement? \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT MAX(Number_cities), MIN(Number_cities) FROM market \nA: Return the maximum and minimum number of cities across all markets. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID \nA: What are the names of climbers and the corresponding heights of the mountains that they climb? \n Additional table information: table: climbing"} -{"text": "Q: SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = 'Central Coast' \nA: Find the appelations that produce wines after the year of 2008 but not in Central Coast area. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT destination, COUNT(*) FROM Flight GROUP BY destination \nA: What are the destinations and number of flights to each one? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT title FROM Movie WHERE director = 'Steven Spielberg' \nA: Find the titles of all movies directed by steven spielberg. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id HAVING COUNT(*) >= 2 \nA: Show the region name with at least two storms. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT Pilot_name FROM pilot ORDER BY Rank ASC NULLS FIRST \nA: List the names of pilots in ascending order of rank. \n Additional table information: table: pilot_record"} -{"text": "Q: SELECT asset_model FROM Assets WHERE NOT asset_id IN (SELECT asset_id FROM Fault_Log) \nA: Which assets did not incur any fault log? List the asset model. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T2.decor ORDER BY COUNT(T2.decor) ASC NULLS FIRST LIMIT 1 \nA: What kind of decor has the least number of reservations? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT job_title, AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id GROUP BY T2.job_title \nA: What is the average salary for each job title? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T2.title, T1.stars, T2.director, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T2.director \nA: Find the title and score of the movie with the lowest rating among all movies directed by each director. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers \nA: Return the phone numbers for all customers and suppliers. \n Additional table information: table: department_store"} -{"text": "Q: SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = 'Pass' \nA: Find id of candidates whose assessment code is 'Pass'? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT COUNT(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population > 20000) \nA: Show the number of cities in counties that have a population more than 20000. \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed NULLS FIRST \nA: List the ids of all distinct orders ordered by placed date. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT problem_log_id, log_entry_description FROM problem_log \nA: List all the log ids and their descriptions from the problem logs. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT COUNT(*) FROM airlines \nA: What is the total number of airlines? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id = T2.course_id JOIN student AS T3 ON T2.id = T3.id WHERE T1.dept_name = 'Statistics' \nA: What are the names of students who have taken Statistics courses? \n Additional table information: table: college_2"} -{"text": "Q: SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1 \nA: Find the first names of the teachers that teach first grade. \n Additional table information: table: student_1"} -{"text": "Q: SELECT Author FROM submission WHERE College = 'Florida' OR College = 'Temple' \nA: Which authors with submissions are from college 'Florida' or 'Temple'? \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT SUM(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = 'Rodrick Heaney' \nA: What is the total quantity of products purchased by 'Rodrick Heaney'? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT T1.asset_id, T1.asset_details FROM Assets AS T1 JOIN Asset_Parts AS T2 ON T1.asset_id = T2.asset_id GROUP BY T1.asset_id HAVING COUNT(*) = 2 INTERSECT SELECT T1.asset_id, T1.asset_details FROM Assets AS T1 JOIN Fault_Log AS T2 ON T1.asset_id = T2.asset_id GROUP BY T1.asset_id HAVING COUNT(*) < 2 \nA: Which assets have 2 parts and have less than 2 fault logs? List the asset id and detail. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = 'BAL' \nA: Which clubs have one or more members from the city with code 'BAL'? Give me the names of the clubs. \n Additional table information: table: club_1"} -{"text": "Q: SELECT problem_log_id, problem_id FROM problem_log ORDER BY log_entry_date NULLS FIRST LIMIT 1 \nA: What is the oldest log id and its corresponding problem id? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT Name FROM wrestler WHERE NOT Wrestler_ID IN (SELECT Wrestler_ID FROM elimination) \nA: What are the names of wrestlers who have never been eliminated? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT MAX(cost), MIN(cost), AVG(cost) FROM procedures \nA: What are the highest cost, lowest cost and average cost of procedures? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT title FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq) \nA: What are the titles of courses without prerequisites? \n Additional table information: table: college_2"} -{"text": "Q: SELECT address FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards' \nA: What is the address of employee Nancy Edwards? \n Additional table information: table: store_1"} -{"text": "Q: SELECT name FROM ship ORDER BY built_year NULLS FIRST, CLASS NULLS FIRST \nA: List all ship names in the order of built year and class. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT text FROM tweets ORDER BY createdate NULLS FIRST \nA: List the text of all tweets in the order of date. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT country FROM customers WHERE first_name = 'Roberto' AND last_name = 'Almeida' \nA: In which country does Roberto Almeida? \n Additional table information: table: store_1"} -{"text": "Q: SELECT T2.customer_name FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE outcome_code = 'Order' GROUP BY T1.customer_id HAVING COUNT(*) >= 2 \nA: Show the names of customers who have at least 2 mailshots with outcome code 'Order'. \n Additional table information: table: customers_campaigns_ecommerce"} -{"text": "Q: SELECT COUNT(*), gender FROM Person WHERE age < 40 GROUP BY gender \nA: Find the number of people who is under 40 for each gender. \n Additional table information: table: network_2"} -{"text": "Q: SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn \nA: What are names of patients who made an appointment? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T1.stu_fname, T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'C' OR T2.enroll_grade = 'A' \nA: Find names of all students who took some course and got A or C. \n Additional table information: table: college_1"} -{"text": "Q: SELECT employee_id, first_name, last_name FROM employees WHERE department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%T%') \nA: display the employee number and name( first name and last name ) for all employees who work in a department with any employee whose name contains a \u2019T\u2019. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT Name, Other_Details FROM Staff \nA: What is the name and detail of each staff member? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT T2.address, T1.email FROM customer AS T1 JOIN address AS T2 ON T2.address_id = T1.address_id WHERE T1.first_name = 'LINDA' \nA: Where does the customer with the first name Linda live? And what is her email? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id JOIN medicine AS T3 ON T2.medicine_id = T3.id WHERE T3.name = 'Amisulpride' AND T2.interaction_type = 'inhibitor' \nA: What are the names of the enzymes used in the medicine Amisulpride that acts as inhibitors? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT TYPE, COUNT(*) FROM ship GROUP BY TYPE \nA: Show different types of ships and the number of ships of each type. \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT COUNT(*) FROM station AS T1, trip AS T2, station AS T3 JOIN trip AS T4 ON T1.id = T2.start_station_id AND T2.id = T4.id AND T3.id = T4.end_station_id WHERE T1.city = 'Mountain View' AND T3.city = 'Palo Alto' \nA: How many trips stated from a station in Mountain View and ended at one in Palo Alto? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT destination, COUNT(*) FROM Flight GROUP BY destination \nA: Show all destinations and the number of flights to each destination. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT COUNT(DISTINCT President_Vote) FROM VOTING_RECORD \nA: Find the distinct number of president votes. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT SUM(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = 'Rodrick Heaney' \nA: Tell me the total quantity of products bought by the customer called 'Rodrick Heaney'. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT T2.balance, T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T1.name = 'Brown' \nA: Find the checking balance and saving balance in the Brown\u2019s account. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT address_content FROM addresses WHERE city = 'East Julianaside' AND state_province_county = 'Texas' UNION SELECT address_content FROM addresses WHERE city = 'Gleasonmouth' AND state_province_county = 'Arizona' \nA: Find all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT Fname, Lname, phone FROM Faculty WHERE Sex = 'F' \nA: What are the first name, last name, and phone number of all the female faculty members? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes' \nA: What are the different states that had students successfully try out? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT Event_ID FROM Participants_in_Events GROUP BY Event_ID ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the id of the event with the most participants? \n Additional table information: table: local_govt_in_alabama"} -{"text": "Q: SELECT fname, lname FROM Faculty WHERE Rank = 'Instructor' \nA: Show the first name and last name for all the instructors. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT name FROM Companies ORDER BY Market_Value_billion DESC \nA: List the names of companies in descending order of market value. \n Additional table information: table: company_office"} -{"text": "Q: SELECT name FROM building ORDER BY height_feet DESC LIMIT 1 \nA: What is the name of the tallest building? \n Additional table information: table: protein_institute"} -{"text": "Q: SELECT * FROM employees WHERE NOT department_id IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200) \nA: Find the ids of the employees who does not work in those departments where some employees works whose manager id within the range 100 and 200. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT song_name FROM song WHERE genre_is = 'modern' OR languages = 'english' \nA: What are the names of the songs that are modern or sung in English? \n Additional table information: table: music_1"} -{"text": "Q: SELECT T1.name, T1.id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING AVG(T2.bikes_available) > 14 UNION SELECT name, id FROM station WHERE installation_date LIKE '12/%' \nA: What are the names and ids of stations that had more than 14 bikes available on average or were installed in December? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT CName FROM COURSE WHERE Days = 'MTW' \nA: What are the course names for courses taught on MTW? \n Additional table information: table: college_3"} -{"text": "Q: SELECT T1.WiFi, T3.Type FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T2.Hardware_Model_name = 'LG-P760' \nA: What are the wifi and screen mode type of the hardware model named 'LG-P760'? \n Additional table information: table: phone_1"} -{"text": "Q: SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which status code is the most common of all the bookings? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT COUNT(*) FROM address WHERE district = 'California' \nA: How many addresses are in the district of California? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT eid, salary FROM Employee WHERE name = 'Mark Young' \nA: What is the id and salary of the employee named Mark Young? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT MAX(T1.HS), pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos \nA: For each position, what is the maximum number of hours for students who spent more than 1000 hours training? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT Major FROM STUDENT WHERE Sex = 'F' GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most common major among female (sex is F) students? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T2.invoice_number, T2.invoice_date FROM Financial_transactions AS T1 JOIN Invoices AS T2 ON T1.invoice_number = T2.invoice_number GROUP BY T1.invoice_number ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the invoice number and invoice date corresponding to the invoice with the greatest number of transactions? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Country = 'China' OR T2.Country = 'Japan' \nA: What are the names of perpetrators in country 'China' or 'Japan'? \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT COUNT(*) FROM Ref_colors WHERE NOT color_code IN (SELECT color_code FROM products) \nA: How many colors are never used by any product? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT Theme FROM farm_competition ORDER BY YEAR ASC NULLS FIRST \nA: What are the themes of farm competitions sorted by year in ascending order? \n Additional table information: table: farm"} -{"text": "Q: SELECT product_details FROM products WHERE product_details LIKE '%Latte%' OR product_details LIKE '%Americano%' \nA: Which product's detail contains the word 'Latte' or 'Americano'? Return the full detail. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT DName FROM DEPARTMENT WHERE Building = 'Mergenthaler' \nA: What is the name of the department in the Building Mergenthaler? \n Additional table information: table: college_3"} -{"text": "Q: SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop' \nA: How many instruments does the song 'Le Pop' use? \n Additional table information: table: music_2"} -{"text": "Q: SELECT COUNT(*) FROM player WHERE birth_country = 'USA' AND bats = 'R' \nA: How many players born in USA are right-handed batters? That is, have the batter value 'R'. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT T1.Service_Type_Description, T1.Service_Type_Code FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T1.Service_Type_Code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the description and code of the service type that is performed the most times. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT name FROM Aircraft WHERE distance > (SELECT AVG(distance) FROM Aircraft) \nA: Show names for all aircrafts with distances more than the average. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT sex, COUNT(*) FROM Faculty WHERE rank = 'AsstProf' GROUP BY sex \nA: How many male and female assistant professors do we have? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT document_type_name, document_type_description FROM Ref_document_types WHERE document_type_code = 'RV' \nA: Give me the name and description of the document type code RV. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID \nA: Find the names of all instructors who have taught some course and the course_id. \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(DISTINCT city) FROM bank \nA: Find the number of different cities which banks are located at. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT T2.Name, T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID \nA: Give the names of wrestlers and their elimination moves. \n Additional table information: table: wrestler"} -{"text": "Q: SELECT T3.Name FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID WHERE T2.Num_of_Audience > 200 \nA: Show the names of people that are on affirmative side of debates with number of audience bigger than 200. \n Additional table information: table: debate"} -{"text": "Q: SELECT Song FROM volume ORDER BY Song NULLS FIRST \nA: Please list all songs in volumes in ascending alphabetical order. \n Additional table information: table: music_4"} -{"text": "Q: SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = 'Brazil' \nA: What are the different first names for customers from Brazil who have also had an invoice? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT COUNT(*) FROM Accounts \nA: How many accounts do we have? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T1.White, T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID \nA: What are the white percentages of cities, and the corresponding crime rates of the counties they correspond to? \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT County_name FROM county ORDER BY Population ASC NULLS FIRST LIMIT 3 \nA: What are the 3 counties that have the smallest population? Give me the county names. \n Additional table information: table: election"} -{"text": "Q: SELECT COUNT(*) FROM Apartment_Bookings \nA: How many apartment bookings are there in total? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT T1.name, T1.email FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 GROUP BY T2.f1 HAVING COUNT(*) > 1 \nA: Find the name and email for the users who have more than one follower. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT name, salary FROM Employee ORDER BY salary NULLS FIRST \nA: Show name and salary for all employees sorted by salary. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT lname FROM authors ORDER BY lname NULLS FIRST \nA: Give me a list of all the last names of authors sorted in alphabetical order \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT Author FROM submission WHERE NOT Submission_ID IN (SELECT Submission_ID FROM acceptance) \nA: List the authors who do not have submission to any workshop. \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance \nA: What are the id of students who registered courses or attended courses? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT T2.Author, COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author \nA: How many workshops did each author submit to? Return the author name and the number of workshops. \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT order_id FROM shipments WHERE shipment_tracking_number = '3452' \nA: Find the id of the order whose shipment tracking number is '3452'. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT Model_name FROM chip_model WHERE Launch_year BETWEEN 2002 AND 2004 \nA: the names of models that launched between 2002 and 2004. \n Additional table information: table: phone_1"} -{"text": "Q: SELECT T2.party_name FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id HAVING COUNT(*) >= 2 \nA: Return the names of parties that have two or more events. \n Additional table information: table: party_people"} -{"text": "Q: SELECT T1.Name FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId GROUP BY T2.GenreId ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the name of the genre that is most frequent across all tracks. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT player, number_of_matches, SOURCE FROM injury_accident WHERE injury <> 'Knee problem' \nA: What are the player name, number of matches, and information source for players who do not suffer from injury of 'Knee problem'? \n Additional table information: table: game_injury"} -{"text": "Q: SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'laurel' \nA: Count the number of characteristics of the product named 'laurel'. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: 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 \nA: Show all train names and times in stations in London in descending order by train time. \n Additional table information: table: train_station"} -{"text": "Q: SELECT t2.section_title FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code WHERE t1.document_name = 'David CV' \nA: Give the section titles of the document with the name 'David CV'. \n Additional table information: table: document_management"} -{"text": "Q: SELECT T1.id, T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id JOIN injury_accident AS T3 ON T2.id = T3.game_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the id and name of the stadium where the most injury accidents happened? \n Additional table information: table: game_injury"} -{"text": "Q: SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id = T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type = T4.organisation_type WHERE T2.grant_amount > 5000 AND T4.organisation_type_description = 'Research' \nA: Find out the send dates of the documents with the grant amount of more than 5000 were granted by organisation type described \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT T2.Season, T2.Player, T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country \nA: For each player, what are their name, season, and country that they belong to? \n Additional table information: table: match_season"} -{"text": "Q: 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%' \nA: What is the name of the project that has a scientist assigned to it whose name contains 'Smith'? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT COUNT(*) FROM inst \nA: Count the number of institutions. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT T1.first_name, T1.last_name, SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY SUM(T2.total) DESC LIMIT 10 \nA: List the top 10 customers by total gross sales. List customers' first and last name and total gross sales. \n Additional table information: table: store_1"} -{"text": "Q: SELECT founder FROM manufacturers WHERE name = 'Sony' \nA: Who is the founder of Sony? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT name, address_road, city FROM branch ORDER BY open_year NULLS FIRST \nA: Show name, address road, and city for all branches sorted by open year. \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT T2.product_type_code, T2.product_name, T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3 \nA: Give me the product type, name and price for all the products supplied by supplier id 3. \n Additional table information: table: department_store"} -{"text": "Q: SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID WHERE T2.value_points > 70 \nA: Show names of technicians who are assigned to repair machines with value point more than 70. \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%' \nA: Find the balance of the checking account belonging to an owner whose name contains 'ee'. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT name, price FROM products \nA: Select the names and the prices of all the products in the store. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT product FROM product WHERE product <> (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1) \nA: Find the name of the products that are not using the most frequently-used max page size. \n Additional table information: table: store_product"} -{"text": "Q: SELECT T1.title, T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T2.inventory_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the title and inventory id of the film that is rented most often. \n Additional table information: table: sakila_1"} -{"text": "Q: 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' \nA: What are the distinct customers who have orders with status 'On Road'? Give me the customer details? \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t2.position = 'President' \nA: Who is the president of the club 'Bootup Baltimore'? Give me the first and last name. \n Additional table information: table: club_1"} -{"text": "Q: SELECT COUNT(*), rank FROM captain WHERE age < 50 GROUP BY rank \nA: How many captains with younger than 50 are in each rank? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT country FROM airlines WHERE name LIKE 'Orbit%' \nA: Find the country of the airlines whose name starts with 'Orbit'. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT COUNT(*) FROM manufacturers WHERE founder = 'Andy' \nA: Return the number of companies created by Andy. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT DISTINCT lot_details FROM LOTS \nA: Show all distinct lot details. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT SUM(beds) FROM Rooms WHERE bedtype = 'King' \nA: Find the total number of king beds available. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT SUM(T1.Money_Requested) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 1.85 \nA: Give the total money requested by entrepreneurs who are taller than 1.85. \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT Name FROM Projects WHERE NOT Code IN (SELECT Project FROM AssignedTo) \nA: Select the project names which are not assigned yet. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'male' AND T1.job = 'doctor' \nA: Who are the friends of Alice that are doctors? \n Additional table information: table: network_2"} -{"text": "Q: SELECT T1.problem_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T2.product_name = 'voluptatem' AND T1.date_problem_reported > '1995' \nA: What are the ids of the problems that are from the product 'voluptatem' and are reported after 1995? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT company, rank FROM company ORDER BY Sales_billion DESC \nA: What is the name and rank of every company ordered by descending number of sales? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT COUNT(*), T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.age > 20 GROUP BY T3.dorm_name \nA: Find the number of students who is older than 20 in each dorm. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Heathrow' INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Gatwick' \nA: Show the names of aircrafts that are associated with both an airport named 'London Heathrow' and an airport named 'London Gatwick' \n Additional table information: table: aircraft"} -{"text": "Q: SELECT T1.title FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE building = 'Chandler' AND semester = 'Fall' AND YEAR = 2010 \nA: What is the title of the course that was offered at building Chandler during the fall semester in the year of 2010? \n Additional table information: table: college_2"} -{"text": "Q: SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = 'Female' AND T2.languages = 'bangla' \nA: What countries are the female artists who sung in the language Bangla from? \n Additional table information: table: music_1"} -{"text": "Q: SELECT address FROM member EXCEPT SELECT address FROM member WHERE Membership_card = 'Black' \nA: Which address do not have any member with the black membership card? \n Additional table information: table: coffee_shop"} -{"text": "Q: SELECT DISTINCT payment_method_code FROM INVOICES \nA: Show me the distinct payment method codes from the invoice record. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT dorm_name FROM dorm ORDER BY student_capacity DESC LIMIT 1 \nA: What are the names of the dorm with the largest capacity? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = 'lead' \nA: How many songs have vocals of type lead? \n Additional table information: table: music_2"} -{"text": "Q: SELECT DISTINCT T2.name, T2.friend, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT AVG(age) FROM person) \nA: Whare the names, friends, and ages of all people who are older than the average age of a person? \n Additional table information: table: network_2"} -{"text": "Q: SELECT name FROM club ORDER BY Start_year ASC NULLS FIRST \nA: What are the names of all the clubs starting with the oldest? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT song_name FROM song WHERE genre_is = 'modern' OR languages = 'english' \nA: Find the names of songs whose genre is modern or language is English. \n Additional table information: table: music_1"} -{"text": "Q: SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which people severed as governor most frequently? \n Additional table information: table: election"} -{"text": "Q: SELECT building_short_name FROM Apartment_Buildings WHERE building_manager = 'Emma' \nA: Show the short names of the buildings managed by 'Emma'. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC \nA: What are the names of body builders in descending order of total scores? \n Additional table information: table: body_builder"} -{"text": "Q: SELECT MAX(T2.fastestlapspeed), T1.name, T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year NULLS FIRST \nA: For each race name, What is the maximum fastest lap speed for races after 2004 ordered by year? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT employee_name FROM Employees WHERE role_code = 'HR' \nA: Which employees have the role with code 'HR'? Find their names. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT T2.account_name, T1.account_id, COUNT(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id \nA: Show the account name, id and the number of transactions for each account. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT * FROM customer_master_index ORDER BY cmi_details DESC \nA: List all information about customer master index, and sort them by details in descending order. \n Additional table information: table: local_govt_mdm"} -{"text": "Q: SELECT T1.Name, T2.Name FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID \nA: Show names of cities and names of counties they are in. \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT COUNT(*) FROM driver \nA: How many drivers are there? \n Additional table information: table: school_bus"} -{"text": "Q: SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_claimed = (SELECT MAX(amount_claimed) FROM claim_headers) \nA: What is the name of the customer who has made the largest amount of claim in a single claim? \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT Publication_Date FROM publication GROUP BY Publication_Date ORDER BY COUNT(*) DESC LIMIT 1 \nA: Please show the most common publication date. \n Additional table information: table: book_2"} -{"text": "Q: SELECT name FROM people WHERE height > 200 OR height < 190 \nA: find the names of people who are taller than 200 or lower than 190. \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT MAX(T2.gradepoint), MIN(T2.gradepoint) FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.city_code = 'NYC' \nA: Give the maximum and minimum gradepoints for students living in NYC? \n Additional table information: table: college_3"} -{"text": "Q: SELECT ResTypeName FROM Restaurant_Type \nA: List all restaurant types. \n Additional table information: table: restaurant_1"} -{"text": "Q: SELECT COUNT(DISTINCT Company) FROM entrepreneur \nA: Count the number of different companies. \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT name FROM races WHERE YEAR = 2017 \nA: Find the names of all races held in 2017. \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T1.customer_name, T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'New' INTERSECT SELECT T1.customer_name, T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Pending' \nA: What are the names and addressed of customers who have both New and Pending orders? \n Additional table information: table: department_store"} -{"text": "Q: SELECT T2.Name, T1.Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID \nA: Show the names of members and names of colleges they go to. \n Additional table information: table: decoration_competition"} -{"text": "Q: SELECT rid FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'United States') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States') \nA: What is the id of the routes whose source and destination airports are in the United States? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT DISTINCT gtype FROM Video_games \nA: Show all video game types. \n Additional table information: table: game_1"} -{"text": "Q: SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rank > 3 INTERSECT SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id HAVING AVG(T2.rating) > 5 \nA: Find the names of items whose rank is higher than 3 and whose average rating is above 5. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.age < 20 \nA: Show total hours per week and number of games played for students under 20. \n Additional table information: table: game_1"} -{"text": "Q: SELECT MIN(salary), dept_name FROM instructor GROUP BY dept_name HAVING AVG(salary) > (SELECT AVG(salary) FROM instructor) \nA: What is the lowest salary in departments with average salary greater than the overall average. \n Additional table information: table: college_2"} -{"text": "Q: SELECT rank, company, market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion NULLS FIRST, profits_billion NULLS FIRST \nA: find the rank, company names, market values of the companies in the banking industry order by their sales and profits in billion. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id = T2.course_id JOIN student AS T3 ON T2.id = T3.id WHERE T1.dept_name = 'Statistics' \nA: Find the name of students who took some course offered by Statistics department. \n Additional table information: table: college_2"} -{"text": "Q: SELECT open_year FROM branch GROUP BY open_year HAVING COUNT(*) >= 2 \nA: What are the opening years in which at least two shops opened? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT SUM(beds) FROM Rooms WHERE bedtype = 'King' \nA: How many king beds are there? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which kind of policy type was chosen by the most customers? \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT T1.organisation_id, T1.organisation_type, T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which organisation hired the most number of research staff? List the organisation id, type and detail. \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT T1.club_id, T1.gold FROM match_result AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T1.club_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: How many gold medals has the club with the most coaches won? \n Additional table information: table: riding_club"} -{"text": "Q: SELECT CName FROM COURSE WHERE Credits = 1 \nA: What are the names of courses with 1 credit? \n Additional table information: table: college_3"} -{"text": "Q: SELECT lname FROM authors ORDER BY lname NULLS FIRST \nA: Retrieve all the last names of authors in alphabetical order. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1 \nA: Show the denomination shared by more than one school. \n Additional table information: table: school_player"} -{"text": "Q: SELECT daily_hire_cost FROM Products_for_hire WHERE product_name LIKE '%Book%' \nA: What are the daily hire costs for the products with substring 'Book' in its name? \n Additional table information: table: products_for_hire"} -{"text": "Q: SELECT T1.emp_fname, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T3.dept_code = T2.dept_code WHERE T3.dept_name = 'History' AND T2.prof_high_degree = 'Ph.D.' \nA: Find the first name and office of the professor who is in the history department and has a Ph.D. degree. \n Additional table information: table: college_1"} -{"text": "Q: SELECT T2.Pilot_name, COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name \nA: Show the names of pilots and the number of records they have. \n Additional table information: table: pilot_record"} -{"text": "Q: SELECT Case_burden FROM county_public_safety ORDER BY Population DESC \nA: Show the case burden of counties in descending order of population. \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT t2.claim_status_name FROM claims_processing AS t1 JOIN claims_processing_stages AS t2 ON t1.claim_stage_id = t2.claim_stage_id GROUP BY t1.claim_stage_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the claim processing stage that most of the claims are on? \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT f_id FROM files WHERE formats = 'mp4' INTERSECT SELECT f_id FROM song WHERE resolution < 1000 \nA: What is the id of the files that are available in the format of mp4 and a resolution smaller than 1000? \n Additional table information: table: music_1"} -{"text": "Q: 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 \nA: What is the area of the appelation that produces the highest number of wines before the year of 2010? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT fname, lname FROM employee WHERE salary > 30000 \nA: Return the first names and last names of employees who earn more than 30000 in salary. \n Additional table information: table: company_1"} -{"text": "Q: SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = '254 Ottilie Junction' OR T2.How_to_Get_There = 'bus' \nA: What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT T1.Name, T2.Tourist_Attraction_ID, COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID \nA: Show different tourist attractions' names, ids, and the corresponding number of visits. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT T1.first_name, T1.last_name, COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 10 \nA: What are the top 10 customers' first and last names by total number of orders and how many orders did they make? \n Additional table information: table: store_1"} -{"text": "Q: SELECT T1.first_name, T1.last_name, T2.department_name, T3.city, T3.state_province FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id \nA: What are the full names, departments, cities, and state provinces for each employee? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T1.staff_id, T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from NULLS FIRST LIMIT 1 \nA: Find the id and name of the staff who has been assigned for the shortest period. \n Additional table information: table: department_store"} -{"text": "Q: SELECT allergytype, COUNT(*) FROM Allergy_type GROUP BY allergytype \nA: Show all allergy types and the number of allergies in each type. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT Nationality, Age FROM journalist \nA: What are the nationalities and ages of journalists? \n Additional table information: table: news_report"} -{"text": "Q: SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 2 ORDER BY COUNT(*) NULLS FIRST \nA: What are the cities that have more than 2 airports sorted by number of airports? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT name FROM CLub WHERE NOT Club_ID IN (SELECT Club_ID FROM player) \nA: What are the names of all clubs that do not have any players? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT SUM(enrollment), MIN(enrollment) FROM university \nA: What is the total and minimum enrollment of all schools? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT Reign, Days_held FROM wrestler \nA: What are the reigns and days held of all wrestlers? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT DISTINCT building FROM classroom WHERE capacity > 50 \nA: What are the distinct buildings with capacities of greater than 50? \n Additional table information: table: college_2"} -{"text": "Q: SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1 \nA: What is the name of the highest mountain? \n Additional table information: table: climbing"} -{"text": "Q: SELECT T2.investor_id FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id HAVING COUNT(*) >= 2 \nA: Show the ids of the investors who have at least two transactions. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT apt_number, room_count FROM Apartments \nA: What are the apartment number and the room count of each apartment? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Rock' \nA: How many tracks belong to rock genre? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT COUNT(*) FROM station WHERE city = 'Mountain View' \nA: How many stations does Mountain View city has? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Louisville , Kentucky' INTERSECT SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Hiram , Georgia' \nA: What are the names of the branches that have some members with a hometown in Louisville, Kentucky and also those from Hiram, Goergia? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = 'AC/DC' \nA: What are the titles of albums by the artist 'AC/DC'? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT text FROM tweets WHERE text LIKE '%intern%' \nA: Return the text of tweets about the topic 'intern'. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT Name FROM People ORDER BY Weight ASC NULLS FIRST \nA: Return the names of people, ordered by weight ascending. \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT dorm_name FROM dorm WHERE gender = 'F' \nA: What are the names of the all-female dorms? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT document_status_description FROM Ref_Document_Status WHERE document_status_code = 'working' \nA: What is the description of document status code 'working'? \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT T2.dept_store_id, T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = 'marketing' INTERSECT SELECT T2.dept_store_id, T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = 'managing' \nA: What is the id and name of the department store that has both marketing and managing department? \n Additional table information: table: department_store"} -{"text": "Q: SELECT location_code, location_name FROM Ref_locations \nA: List all location codes and location names. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Jazz' \nA: Find the average unit price of jazz tracks. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT COUNT(*) FROM Students WHERE personal_name LIKE '%son%' \nA: How many students have personal names that contain the word 'son'? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner' \nA: Find the captain rank that has some captains in both Cutter and Armed schooner classes. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT Official_Name, Status FROM city ORDER BY Population DESC LIMIT 1 \nA: List the official name and status of the city with the largest population. \n Additional table information: table: farm"} -{"text": "Q: SELECT Character FROM actor ORDER BY age DESC \nA: What are the characters of actors in descending order of age? \n Additional table information: table: musical"} -{"text": "Q: SELECT name FROM Person WHERE age > (SELECT MIN(age) FROM person WHERE job = 'engineer') ORDER BY age NULLS FIRST \nA: What is the name of all the people who are older than at least one engineer? Order them by age. \n Additional table information: table: network_2"} -{"text": "Q: SELECT T1.company_id, T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Engineers AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id HAVING COUNT(*) >= 2 UNION SELECT T3.company_id, T3.company_name FROM Third_Party_Companies AS T3 JOIN Maintenance_Contracts AS T4 ON T3.company_id = T4.maintenance_contract_company_id GROUP BY T3.company_id HAVING COUNT(*) >= 2 \nA: Which third party companies have at least 2 maintenance engineers or have at least 2 maintenance contracts? List the company id and name. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT AVG(T1.Votes) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE T2.Party = 'Republican' \nA: What is the average number of votes of representatives from party 'Republican'? \n Additional table information: table: election_representative"} -{"text": "Q: 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 \nA: What is the id, name and IATA code of the airport that had most number of flights? \n Additional table information: table: flight_company"} -{"text": "Q: SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'CHRISSY' AND T1.lastname = 'NABOZNY' \nA: How many teachers does the student named CHRISSY NABOZNY have? \n Additional table information: table: student_1"} -{"text": "Q: SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = 'Pass' \nA: Find the dates of the tests taken with result 'Pass'. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'English' \nA: How many students attend course English? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT company FROM customers WHERE first_name = 'Eduardo' AND last_name = 'Martins' \nA: Eduardo Martins is a customer at which company? \n Additional table information: table: store_1"} -{"text": "Q: SELECT document_id FROM Documents WHERE document_type_code = 'CV' EXCEPT SELECT document_id FROM Documents_with_expenses \nA: Show ids for all documents in type CV without expense budgets. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT T2.name, T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'History' \nA: Find the name and salary of the instructors who are advisors of any student from History department? \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*) FROM member \nA: How many members are there? \n Additional table information: table: decoration_competition"} -{"text": "Q: SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN nurse AS T2 ON T1.AssistingNurse = T2.EmployeeID \nA: Find the names of nurses who are nursing an undergoing treatment. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T1.fault_log_entry_id, T1.fault_description, T1.fault_log_entry_datetime FROM Fault_Log AS T1 JOIN Fault_Log_Parts AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which fault log included the most number of faulty parts? List the fault log id, description and record time. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT COUNT(*) FROM cinema \nA: How many cinema do we have? \n Additional table information: table: cinema"} -{"text": "Q: SELECT product FROM product WHERE max_page_size = 'A4' AND pages_per_minute_color < 5 \nA: What are the products with the maximum page size A4 that also have a pages per minute color smaller than 5? \n Additional table information: table: store_product"} -{"text": "Q: SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: what is id of students who registered some courses but the least number of courses in these students? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN nurse AS T2 ON T1.AssistingNurse = T2.EmployeeID \nA: Which nurses are in charge of patients undergoing treatments? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT customer_details FROM customers EXCEPT SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id \nA: Find the names of customers who have no policies associated. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT title FROM Movie WHERE director = 'James Cameron' OR YEAR < 1980 \nA: What are names of the movies that are either made before 1980 or directed by James Cameron? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT LOCATION, COUNT(*) FROM railway GROUP BY LOCATION \nA: Show different locations of railways along with the corresponding number of railways at each location. \n Additional table information: table: railway"} -{"text": "Q: SELECT COUNT(*), T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T1.date_problem_reported > '1986-11-13' GROUP BY T2.product_id \nA: For each product that has problems, find the number of problems reported after 1986-11-13 and the product id? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT advisor, COUNT(*) FROM Student GROUP BY advisor \nA: How many students does each advisor have? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT T2.apt_type_code, T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = 'Kyle' \nA: What apartment type codes and apartment numbers do the buildings managed by 'Kyle' have? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = 'cumin' \nA: What is the unit of measurement of product named 'cumin'? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT DISTINCT POSITION FROM match_season \nA: Show all distinct positions of matches. \n Additional table information: table: match_season"} -{"text": "Q: SELECT Name FROM People ORDER BY Weight ASC NULLS FIRST \nA: What are the names of people in ascending order of weight? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT id FROM station WHERE city = 'San Francisco' INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING AVG(bikes_available) > 10 \nA: What are the ids of the stations in San Francisco that normally have more than 10 bikes available? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT DISTINCT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = 'warm' \nA: What are the different product names for products that have the 'warm' characteristic:? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2 \nA: Report the distinct advisors who have more than 2 students. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT DISTINCT artist_name FROM song WHERE languages = 'english' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8 \nA: What are the names of the different artists that have produced a song in English but have never receieved a rating higher than 8? \n Additional table information: table: music_1"} -{"text": "Q: SELECT AVG(followers) FROM user_profiles WHERE NOT UID IN (SELECT UID FROM tweets) \nA: Find the average number of followers for the users who do not have any tweet. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT COUNT(*) FROM track \nA: Count the number of tracks. \n Additional table information: table: race_track"} -{"text": "Q: SELECT DISTINCT T3.name FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.title = 'Gone with the Wind' \nA: What are the names of all the different reviewers who rates Gone with the Wind? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT SUM(revenue) FROM manufacturers WHERE headquarter = 'Austin' \nA: What is the sum of revenue from companies with headquarters in Austin? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = 'Germany' \nA: What are the addresses of customers living in Germany who have had an invoice? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = 'stanley.monahan@example.org' \nA: Find id of the candidate whose email is stanley.monahan@example.org? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT Company, Investor FROM entrepreneur \nA: List the companies and the investors of entrepreneurs. \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT Status FROM roller_coaster WHERE LENGTH > 3300 OR Height > 100 \nA: Show the statuses of roller coasters longer than 3300 or higher than 100. \n Additional table information: table: roller_coaster"} -{"text": "Q: SELECT catalog_level_name, catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10 \nA: What are the name and level of catalog structure with level number between 5 and 10 \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT CLASS FROM race GROUP BY CLASS HAVING COUNT(*) >= 2 \nA: What are the classes of races that have two or more corresponding races? \n Additional table information: table: race_track"} -{"text": "Q: SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment ORDER BY T3.cost DESC LIMIT 1 \nA: Find the physician who was trained in the most expensive procedure? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' \nA: Find the average age of members of the club 'Hopkins Student Enterprises'. \n Additional table information: table: club_1"} -{"text": "Q: SELECT Fname FROM STUDENT ORDER BY Age DESC \nA: What are the first names of students, ordered by age from greatest to least? \n Additional table information: table: college_3"} -{"text": "Q: SELECT AVG(Gold) FROM club_rank \nA: What is the average number of gold medals for clubs? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT date_of_birth FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn' \nA: What is the date of birth for the staff member named Janessa Sawayn? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT Country FROM member GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the most common country across members. \n Additional table information: table: decoration_competition"} -{"text": "Q: SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' EXCEPT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num \nA: What are the first names of the professors who do not teach a class. \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(*) FROM tweets \nA: Find the number of tweets in record. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT COUNT(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' AND T1.sex = 'F' \nA: How many female students live in Smith Hall? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T2.roomName, COUNT(*), T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room \nA: For each room, find its name and the number of times reservations were made for it. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT MAX(gradepoint), MIN(gradepoint) FROM GRADECONVERSION \nA: Find the max and min grade point for all letter grade. \n Additional table information: table: college_3"} -{"text": "Q: SELECT t2.document_structure_description FROM documents AS t1 JOIN document_structures AS t2 ON t1.document_structure_code = t2.document_structure_code GROUP BY t1.document_structure_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the structure description of the document that has been accessed the fewest number of times. \n Additional table information: table: document_management"} -{"text": "Q: SELECT COUNT(*) FROM ADDRESSES WHERE zip_postcode = '197' \nA: How many addresses have zip code 197? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT SUM(Spent) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID WHERE Student.Fname = 'Linda' AND Student.Lname = 'Smith' \nA: How long does student Linda Smith spend on the restaurant in total? \n Additional table information: table: restaurant_1"} -{"text": "Q: 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' \nA: Show the names of all the activities Mark Giuliano participates in. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT T4.dept_name FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code GROUP BY T3.dept_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the department that has the largest number of students enrolled? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T2.dept_name, T2.dept_address, COUNT(*) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 3 \nA: Find the name, address, number of students in the departments that have the top 3 highest number of students. \n Additional table information: table: college_1"} -{"text": "Q: SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars >= 4 ORDER BY T1.year NULLS FIRST \nA: In what years did a movie receive a 4 or 5 star rating, and list the years from oldest to most recently? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T1.engineer_id, T1.first_name, T1.last_name FROM Maintenance_Engineers AS T1, Engineer_Visits AS T2 GROUP BY T1.engineer_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which engineer has visited the most times? Show the engineer id, first name and last name. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT t3.headquartered_city, COUNT(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city \nA: How many stores are headquarted in each city? \n Additional table information: table: store_product"} -{"text": "Q: SELECT t1.attribute_name, t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 0 \nA: Find the name and attribute ID of the attribute definitions with attribute value 0. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT title, phone, hire_date FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards' \nA: What is the title, phone and hire date of Nancy Edwards? \n Additional table information: table: store_1"} -{"text": "Q: 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) \nA: Find the emails of parties with the most popular party form. \n Additional table information: table: e_government"} -{"text": "Q: SELECT Party FROM representative WHERE State = 'New York' INTERSECT SELECT Party FROM representative WHERE State = 'Pennsylvania' \nA: Show the parties that have both representatives in New York state and representatives in Pennsylvania state. \n Additional table information: table: election_representative"} -{"text": "Q: SELECT location_code FROM Ref_locations WHERE location_name = 'Canada' \nA: What is the location code for the country 'Canada'? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT lname FROM student WHERE sex = 'F' AND city_code = 'BAL' UNION SELECT lname FROM student WHERE sex = 'M' AND age < 20 \nA: What is the last name of every student who is either female or living in a city with the code BAL or male and under 20? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT DISTINCT blockcode FROM room WHERE unavailable = 0 \nA: What are the unique block codes that have available rooms? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 5 \nA: List the names of 5 users followed by the largest number of other users. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT emp_jobcode, COUNT(*) FROM employee GROUP BY emp_jobcode ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the count and code of the job with the most employee? \n Additional table information: table: college_1"} -{"text": "Q: SELECT AVG(height), AVG(weight) FROM people WHERE sex = 'M' \nA: Find the average height and weight for all males (sex is M). \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID WHERE T3.Sales_in_Billion > 200 \nA: Show the names of employees that work for companies with sales bigger than 200. \n Additional table information: table: company_employee"} -{"text": "Q: SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in \nA: Which faculty do not participate in any activity? Find their faculty ids. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT name, salary FROM instructor WHERE salary < (SELECT AVG(salary) FROM instructor WHERE dept_name = 'Physics') \nA: Find the name and salary of instructors whose salary is below the average salary of the instructors in the Physics department. \n Additional table information: table: college_2"} -{"text": "Q: SELECT DISTINCT cName FROM college WHERE enr > (SELECT MIN(enr) FROM college WHERE state = 'FL') \nA: What are the names of the colleges that are larger than at least one college in Florida? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT name FROM instructor WHERE NOT id IN (SELECT id FROM teaches) \nA: What are the names of instructors who didn't teach? \n Additional table information: table: college_2"} -{"text": "Q: SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2 ORDER BY College DESC \nA: Show the name of colleges that have at least two players in descending alphabetical order. \n Additional table information: table: match_season"} -{"text": "Q: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) EXCEPT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30) \nA: Find the name of the person who has friends with age above 40 but not under age 30? \n Additional table information: table: network_2"} -{"text": "Q: SELECT Ref_Shipping_Agents.shipping_agent_name, COUNT(Documents.document_id) FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code GROUP BY Ref_Shipping_Agents.shipping_agent_code ORDER BY COUNT(Documents.document_id) DESC LIMIT 1 \nA: Which shipping agent shipped the most documents? List the shipping agent name and the number of documents. \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT Police_force, COUNT(*) FROM county_public_safety GROUP BY Police_force \nA: How many counties correspond to each police force? \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT T2.Railway_ID, T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID GROUP BY T2.Railway_ID HAVING COUNT(*) > 1 \nA: Show id and location of railways that are associated with more than one train. \n Additional table information: table: railway"} -{"text": "Q: SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2 \nA: Which advisors are advising more than 2 students? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name = T2.name JOIN PersonFriend AS T3 ON T1.friend = T3.name JOIN PersonFriend AS T4 ON T3.friend = T4.name WHERE T2.name = 'Alice' AND T4.name <> 'Alice' \nA: What are the names of all of Alice's friends of friends? \n Additional table information: table: network_2"} -{"text": "Q: SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance NULLS FIRST \nA: Find the total checking and saving balance of all accounts sorted by the total balance in ascending order. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses \nA: Find the name of all the cities and states. \n Additional table information: table: e_government"} -{"text": "Q: SELECT Name FROM climber ORDER BY Points DESC \nA: What are the names of the climbers, ordered by points descending? \n Additional table information: table: climbing"} -{"text": "Q: SELECT T1.crs_code FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num WHERE T3.stu_lname = 'Smithson' \nA: What are the course codes for every class that the student with the last name Smithson took? \n Additional table information: table: college_1"} -{"text": "Q: SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18' \nA: What are the staff roles of the staff who \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT Ref_Shipping_Agents.shipping_agent_name FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Documents.document_id = 2 \nA: What is the name of the shipping agent of the document with id 2? \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT flag FROM ship GROUP BY flag ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the flag that is most common among all ships. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT fname FROM authors ORDER BY fname NULLS FIRST \nA: Find the first names of all the authors ordered in alphabetical order. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT T1.Name, T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID \nA: Show names of actors and names of musicals they are in. \n Additional table information: table: musical"} -{"text": "Q: SELECT decor, COUNT(*) FROM Rooms WHERE bedType = 'King' GROUP BY decor \nA: Find the number of rooms with king bed for each decor type. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT name FROM manufacturers WHERE revenue > (SELECT AVG(revenue) FROM manufacturers) \nA: Find the name of companies whose revenue is greater than the average revenue of all companies. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT payment_date FROM payment ORDER BY payment_date ASC NULLS FIRST LIMIT 1 \nA: When did the first payment happen? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote WHERE T2.Election_Cycle = 'Spring' \nA: Find the distinct Advisor of students who have treasurer votes in the spring election cycle. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T1.name, T1.long, AVG(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id GROUP BY T2.start_station_id \nA: For each start station id, what is its name, longitude and average duration of trips started there? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T1.title FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING COUNT(*) = 2 \nA: What are the titles for courses with two prerequisites? \n Additional table information: table: college_2"} -{"text": "Q: SELECT Date, Venue FROM workshop ORDER BY Venue NULLS FIRST \nA: Show the date and venue of each workshop in ascending alphabetical order of the venue. \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT COUNT(*) FROM Allergy_type WHERE allergytype = 'animal' \nA: How many animal type allergies exist? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT COUNT(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan' \nA: How many friends does Dan have? \n Additional table information: table: network_2"} -{"text": "Q: SELECT first_name, last_name FROM actor GROUP BY first_name, last_name ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most popular full name of the actors? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T1.student_id, T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) <= 2 \nA: Find the student ID and middle name for all the students with at most two enrollments. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT SUM(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = 'San Jose State University' \nA: How many undergraduates are there at San Jose State \n Additional table information: table: csu_1"} -{"text": "Q: SELECT product_type_code FROM products GROUP BY product_type_code HAVING AVG(product_price) > (SELECT AVG(product_price) FROM products) \nA: What is the code of the product type with an average price higher than the average price of all products? \n Additional table information: table: department_store"} -{"text": "Q: SELECT origin FROM Flight WHERE destination = 'Honolulu' \nA: What are the origins of all flights that are headed to Honolulu? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT date_became_customer FROM Customers WHERE first_name = 'Carole' AND last_name = 'Bernhard' \nA: When did Carole Bernhard first become a customer? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid GROUP BY T1.aid ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the name of aircraft which fewest people have its certificate. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT COUNT(*) FROM Settlements \nA: How many settlements are there in total? \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT AVG(Price), YEAR FROM WINE GROUP BY YEAR \nA: What are the average prices of wines for different years? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT AVG(T1.Total) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 200 \nA: What is the average total score of body builders with height bigger than 200? \n Additional table information: table: body_builder"} -{"text": "Q: SELECT user_name, password FROM users GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the usernames and passwords of users that have the most common role? \n Additional table information: table: document_management"} -{"text": "Q: SELECT Kids FROM Reservations WHERE CheckIn = '2010-09-21' AND FirstName = 'DAMIEN' AND LastName = 'TRACHSEL' \nA: How many kids stay in the room DAMIEN TRACHSEL checked in on Sep 21, 2010? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT T2.location_name, T1.location_code FROM Document_locations AS T1 JOIN Ref_locations AS T2 ON T1.location_code = T2.location_code GROUP BY T1.location_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: What are the name and code of the location with the smallest number of documents? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT clublocation FROM club WHERE clubname = 'Pen and Paper Gaming' \nA: Where is the club 'Pen and Paper Gaming' located? \n Additional table information: table: club_1"} -{"text": "Q: SELECT COUNT(*) FROM Staff \nA: How many employees are there? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Pen and Paper Gaming' \nA: Find the number of members of club 'Pen and Paper Gaming'. \n Additional table information: table: club_1"} -{"text": "Q: SELECT COUNT(*) FROM savings WHERE balance > (SELECT AVG(balance) FROM savings) \nA: How many accounts have a savings balance above the average savings balance? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT name FROM procedures ORDER BY cost NULLS FIRST LIMIT 3 \nA: What are the three most costly procedures? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = 'Gorgoroth' \nA: What are the issue dates of volumes associated with the artist 'Gorgoroth'? \n Additional table information: table: music_4"} -{"text": "Q: SELECT Amount_Settled, Amount_Claimed FROM Claims ORDER BY Amount_Claimed DESC LIMIT 1 \nA: Find the settlement amount of the claim with the largest claim amount. Show both the settlement amount and claim amount. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT COUNT(*) FROM customers \nA: How many customers are there? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT T3.Shop_Name, T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID \nA: Show names of shops and the carriers of devices they have in stock. \n Additional table information: table: device"} -{"text": "Q: SELECT T2.School_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T1.amount > 8.5 GROUP BY T1.school_id HAVING COUNT(*) > 1 \nA: Find the names of schools that have more than one donator with donation amount above 8.5. \n Additional table information: table: school_finance"} -{"text": "Q: SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id = T2.category_id JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'HUNGER ROOF' \nA: What is the genre name of the film HUNGER ROOF? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT product_id, product_type_code FROM products ORDER BY product_price NULLS FIRST LIMIT 1 \nA: Give the id and product type of the product with the lowest price. \n Additional table information: table: department_store"} -{"text": "Q: SELECT SUM(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010 \nA: How many games in total did team Boston Red Stockings attend from 2000 to 2010? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT Enrollment FROM school WHERE Denomination <> 'Catholic' \nA: What are the enrollments of schools whose denomination is not 'Catholic'? \n Additional table information: table: school_player"} -{"text": "Q: SELECT DISTINCT T1.Fname, T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.President_VOTE WHERE T1.sex = 'F' \nA: Find the first and last names of all the female (sex is F) students who have president votes. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T2.Committee = 'Appropriations' \nA: Which county do the delegates on 'Appropriations' committee belong to? Give me the county names. \n Additional table information: table: election"} -{"text": "Q: SELECT MAX(product_price), MIN(product_price), product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code NULLS FIRST \nA: Give the maximum and minimum product prices for each product type, grouped and ordered by product type. \n Additional table information: table: department_store"} -{"text": "Q: SELECT T3.Name, T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID \nA: Show the names of companies and of employees. \n Additional table information: table: company_employee"} -{"text": "Q: SELECT document_type_code, COUNT(*) FROM Documents GROUP BY document_type_code \nA: List document type codes and the number of documents in each code. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' AND t2.position = 'CTO' \nA: Find the first name and last name for the 'CTO' of the club 'Hopkins Student Enterprises'? \n Additional table information: table: club_1"} -{"text": "Q: SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1 \nA: What is the name of the shop that has the greatest quantity of devices in stock? \n Additional table information: table: device"} -{"text": "Q: SELECT T2.building, T2.room_number, T2.semester, T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = 'Psychology' ORDER BY T1.title NULLS FIRST \nA: What are the building, room number, semester and year of courses in the Psychology department, sorted using course title? \n Additional table information: table: college_2"} -{"text": "Q: SELECT AVG(T2.Weeks_on_Top) FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 25 \nA: What is the average weeks on top of volumes associated with the artist aged 25 or younger? \n Additional table information: table: music_4"} -{"text": "Q: SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = 'Nominated' \nA: What are the songs in volumes that have resulted in a nomination at music festivals? \n Additional table information: table: music_4"} -{"text": "Q: SELECT COUNT(*) FROM Aircraft \nA: How many aircrafts do we have? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Americano' \nA: Find the names of customers who ordered both products Latte and Americano. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT Official_native_language FROM country WHERE Official_native_language LIKE '%English%' \nA: Show all official native languages that contain the word 'English'. \n Additional table information: table: match_season"} -{"text": "Q: SELECT T2.Party FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes ASC NULLS FIRST LIMIT 1 \nA: What is the party of the representative that has the smallest number of votes. \n Additional table information: table: election_representative"} -{"text": "Q: SELECT T2.first_name, T2.last_name, COUNT(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY COUNT(T1.reports_to) DESC LIMIT 1 \nA: Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee. \n Additional table information: table: store_1"} -{"text": "Q: SELECT T1.staff_id, T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = 'Department Manager' \nA: Return the staff ids and genders for any staff with the title Department Manager. \n Additional table information: table: department_store"} -{"text": "Q: SELECT name, LOCATION FROM track \nA: Show the name and location for all tracks. \n Additional table information: table: race_track"} -{"text": "Q: SELECT Addresses.address_details FROM Addresses JOIN Documents_Mailed ON Documents_Mailed.mailed_to_address_id = Addresses.address_id WHERE document_id = 4 \nA: What address was the document with id 4 mailed to? \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT project_id, project_details FROM Projects \nA: List ids and details for all projects. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT school, nickname FROM university ORDER BY founded NULLS FIRST \nA: What are the different schools and their nicknames, ordered by their founding years? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: Which school has the smallest amount of professors? \n Additional table information: table: college_1"} -{"text": "Q: SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = 'USA' GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the states with the most invoices? \n Additional table information: table: store_1"} -{"text": "Q: SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id = T4.course_id WHERE T3.title = 'International Finance') \nA: Find the name of students who have taken the prerequisite course of the course with title International Finance. \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*) FROM follows \nA: How many followers does each user have? \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed \nA: Which employees do not authorize destruction for any document? Give me their employee ids. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT DISTINCT T1.driverid, T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds > 100000 \nA: What are the different driver ids and nationalities of all drivers who had a laptime of more than 100000 milliseconds? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1 \nA: Which party had the most hosts? Give me the party location. \n Additional table information: table: party_host"} -{"text": "Q: SELECT first_name, last_name, salary FROM employees WHERE salary < 6000 \nA: What are the full names and salaries for any employees earning less than 6000? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT origin, destination FROM Flight WHERE price > 300 \nA: What is the origin and destination for all flights whose price is higher than 300? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT MAX(T2.fastestlapspeed), T1.name, T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year NULLS FIRST \nA: What are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT COUNT(*) FROM Aircraft WHERE distance BETWEEN 1000 AND 5000 \nA: What is the count of aircrafts that have a distance between 1000 and 5000? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT order_id, COUNT(DISTINCT product_id) FROM Order_items GROUP BY order_id \nA: Show order ids and the number of products in each order. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT document_id, COUNT(*) FROM Draft_Copies GROUP BY document_id HAVING COUNT(*) > 1 \nA: Which documents have more than 1 draft copies? List document id and number of draft copies. \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT T2.title, T2.film_id, T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the title, id, and description of the movie with the greatest number of actors? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT Planned_Delivery_Date, Actual_Delivery_Date FROM BOOKINGS \nA: What are the planned delivery date and actual delivery date for each booking? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT phone, postal_code FROM address WHERE address = '1031 Daugavpils Parkway' \nA: What is the phone number and postal code of the address 1031 Daugavpils Parkway? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT product_id FROM Order_Items GROUP BY product_id HAVING COUNT(*) > 3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING SUM(total_amount_purchased) > 80000 \nA: Return the ids of all products that were ordered more than three times or supplied more than 80000. \n Additional table information: table: department_store"} -{"text": "Q: SELECT campus FROM campuses WHERE county = 'Los Angeles' AND YEAR > 1950 \nA: Which university is in Los Angeles county and opened after 1950? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT T1.Title, T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID \nA: Please show the titles of films and the types of market estimations. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT DISTINCT T1.id, T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12 \nA: What are the different ids and names of the stations that have had more than 12 bikes available? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE '%film%' \nA: Find all the locations whose names contain the word 'film'. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT T3.born_state FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T1.name = 'Treasury' INTERSECT SELECT T3.born_state FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T1.name = 'Homeland Security' \nA: List the states where both the secretary of 'Treasury' department and the secretary of 'Homeland Security' were born. \n Additional table information: table: department_management"} -{"text": "Q: SELECT T1.first_name, T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the full name of the employee who has the most customers? \n Additional table information: table: store_1"} -{"text": "Q: SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 AND T2.points > 20 \nA: What are the first names of the different drivers who won in position 1 as driver standing and had more than 20 points? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date = '08/30/2015' \nA: What are the distinct president votes on 08/30/2015? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT StuID, COUNT(*), SUM(gamesplayed) FROM Sportsinfo GROUP BY StuID \nA: What are the ids of all students along with how many sports and games did they play? \n Additional table information: table: game_1"} -{"text": "Q: SELECT city_code FROM student GROUP BY city_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the code of the city with the most students? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T1.date_of_notes FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.first_name = 'Fanny' \nA: Find the dates of assessment notes for students with first name 'Fanny'. \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT COUNT(*) FROM track \nA: How many tracks do we have? \n Additional table information: table: race_track"} -{"text": "Q: SELECT DISTINCT LOCATION FROM station \nA: What are all locations of train stations? \n Additional table information: table: train_station"} -{"text": "Q: SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC NULLS FIRST LIMIT 1 \nA: Which catalog content has the smallest capacity? Return the catalog entry name. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT DISTINCT T1.cust_name, T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id \nA: Find the name and credit score of the customers who have some loans. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC \nA: What are the total points of gymnasts, ordered by their floor exercise points descending? \n Additional table information: table: gymnast"} -{"text": "Q: SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which catalog publisher has published the most catalogs? \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT Speed FROM roller_coaster ORDER BY LENGTH DESC LIMIT 1 \nA: What are the speeds of the longest roller coaster? \n Additional table information: table: roller_coaster"} -{"text": "Q: SELECT T2.name, T2.open_year FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year = 2016 GROUP BY T2.branch_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name and open year for the branch with most number of memberships registered in 2016? \n Additional table information: table: shop_membership"} -{"text": "Q: 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 \nA: What are the ids and names of the companies that operated more than one flight? \n Additional table information: table: flight_company"} -{"text": "Q: SELECT T1.problem_description FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Christop' \nA: Which problems are reported by the staff with first name 'Christop'? Show the descriptions of the problems. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code WHERE T1.document_name = 'How to read a book' \nA: What is the document type name for the document with name 'How to read a book'? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT rID FROM Reviewer WHERE name = 'Daniel Lewis' \nA: What is the id of the reviewer named Daniel Lewis? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T2.Store_Email_Address FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.State_County = 'Alaska' \nA: What are the email addresses of the drama workshop groups with address in Alaska state? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT age FROM Person WHERE job = 'doctor' AND name = 'Zach' \nA: What is the age of the doctor named Zach? \n Additional table information: table: network_2"} -{"text": "Q: SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed \nA: Show the ids of the employees who don't authorize destruction for any document. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT customer_phone FROM available_policies WHERE policy_type_code = (SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1) \nA: Find the phone numbers of customers using the most common policy type among the available policies. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE '%gmail.com%' \nA: How many customers have email that contains 'gmail.com'? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT Name FROM WINE WHERE Price > (SELECT MAX(Price) FROM WINE WHERE YEAR = 2006) \nA: What are the names of wines that are more expensive then all wines made in the year 2006? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND faculty > (SELECT MAX(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = 'Orange') \nA: Find the names of the campus which has more faculties in 2002 than every campus in Orange county. \n Additional table information: table: csu_1"} -{"text": "Q: SELECT origin, destination FROM Flight WHERE price > 300 \nA: Show origin and destination for flights with price higher than 300. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT AVG(height), AVG(weight) FROM people WHERE sex = 'M' \nA: What are the average height and weight across males (sex is M)? \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.FirstName = 'Astrid' AND LastName = 'Gruber' \nA: What are the invoice dates for customers with the first name Astrid and the last name Gruber? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT FirstName, LastName FROM CUSTOMER WHERE Email = 'luisg@embraer.com.br' \nA: Find the full name of the customer with the email 'luisg@embraer.com.br'. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id \nA: get the details of employees who manage a department. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = (SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY COUNT(*) DESC LIMIT 1) \nA: List all the policy types used by the customer enrolled in the most policies. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT name, LOCATION, seating FROM track ORDER BY year_opened DESC LIMIT 1 \nA: Return the name, location, and seating of the track that was opened in the most recent year. \n Additional table information: table: race_track"} -{"text": "Q: SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1 \nA: Show the locations of schools that have more than 1 player. \n Additional table information: table: school_player"} -{"text": "Q: SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = 'Central Coast' \nA: What are the appelations for wines produced after 2008 but not in the Central Coast area? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT DISTINCT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' OR T2.friend = 'Alice' \nA: What are the different names and ages of every friend of either Dan or alice? \n Additional table information: table: network_2"} -{"text": "Q: SELECT COUNT(DISTINCT city) FROM station \nA: What is the number of distinct cities the stations are located at? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' ORDER BY emp_dob NULLS FIRST \nA: What are the first names of all employees that are professors ordered by date of birth? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T1.Title, T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 GROUP BY T2.AlbumID \nA: What are the titles and ids for albums containing tracks with unit price greater than 1? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT SUM(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_short_name = 'Columbus Square' \nA: Show the total number of rooms of the apartments in the building with short name 'Columbus Square'. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT major, AVG(age), MIN(age), MAX(age) FROM Student GROUP BY major \nA: What are the average, minimum, and max ages for each of the different majors? \n Additional table information: table: game_1"} -{"text": "Q: SELECT booking_start_date, booking_end_date FROM Apartment_Bookings \nA: Show the start dates and end dates of all the apartment bookings. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT COUNT(DISTINCT advisor) FROM Student \nA: How many different advisors are listed? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT DISTINCT T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800 \nA: List the file size and format for all songs that have resolution lower than 800. \n Additional table information: table: music_1"} -{"text": "Q: 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 \nA: List the states which have between 2 to 4 staffs living there. \n Additional table information: table: driving_school"} -{"text": "Q: SELECT AVG(age), city_code FROM student GROUP BY city_code \nA: Find the average age of all students living in the each city. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%' \nA: What is the checking balance of the account whose owner\u2019s name contains the substring \u2018ee\u2019? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT T3.location FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.market_value > 100 \nA: Show all locations where a gas station for company with market value greater than 100 is located. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = 'back' \nA: Find all the songs that do not have a back vocal. \n Additional table information: table: music_2"} -{"text": "Q: SELECT DISTINCT T2.emp_fname, T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Computer Info. Systems' \nA: What are the different first names and highest degree attained for professors teaching in the Computer Information Systems department? \n Additional table information: table: college_1"} -{"text": "Q: SELECT AVG(active_to_date - active_from_date) FROM customer_contact_channels \nA: Compute the average active time span of contact channels. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT COUNT(*) FROM Students WHERE NOT student_id IN (SELECT student_id FROM Student_Course_Enrolment) \nA: How many students did not have any course enrollment? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT customer_id FROM customers WHERE customer_name LIKE '%Diana%' \nA: Find the IDs of customers whose name contains 'Diana'. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT t2.team_name FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE enrollment < (SELECT AVG(enrollment) FROM university) \nA: What are the names of teams from universities that have a below average enrollment? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT COUNT(*) FROM ship \nA: What is the number of ships? \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id \nA: Which customers do not have a first notification of loss record? Give me the customer names. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = 'Forward' INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = 'Defender' \nA: What are the names of countries that have both players with position forward and players with position defender? \n Additional table information: table: match_season"} -{"text": "Q: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Zach' AND T1.gender = 'female' \nA: What are the names of all females who are friends with Zach? \n Additional table information: table: network_2"} -{"text": "Q: SELECT customer_status_code, COUNT(*) FROM Customers GROUP BY customer_status_code \nA: List all customer status codes and the number of customers having each status code. \n Additional table information: table: driving_school"} -{"text": "Q: SELECT COUNT(*), T1.claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY T1.Date_Claim_Settled DESC LIMIT 1 \nA: Find the claim id and the number of settlements made for the claim with the most recent settlement date. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid JOIN lives_in AS T4 ON T4.dormid = T1.dormid JOIN student AS T5 ON T5.stuid = T4.stuid WHERE T5.lname = 'Smith' \nA: Find the name of amenities of the dorm where the student with last name Smith is living in. \n Additional table information: table: dorm_1"} -{"text": "Q: 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' \nA: How much in total does customer with first name as Carole and last name as Bernhard paid? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT campus FROM campuses WHERE YEAR < 1800 \nA: What campuses opened before 1800? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT clubname FROM club WHERE clublocation = 'AKW' \nA: Find the name of all the clubs at 'AKW'. \n Additional table information: table: club_1"} -{"text": "Q: SELECT Leader_Name, College_Location FROM college \nA: Show the leader names and locations of colleges. \n Additional table information: table: decoration_competition"} -{"text": "Q: SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = 'Balls to the Wall' \nA: List name of all tracks in Balls to the Wall. \n Additional table information: table: store_1"} -{"text": "Q: SELECT HOST FROM performance ORDER BY Attendance ASC NULLS FIRST \nA: List the hosts of performances in ascending order of attendance. \n Additional table information: table: performance_attendance"} -{"text": "Q: SELECT COUNT(*) FROM pilot \nA: How many pilots are there? \n Additional table information: table: pilot_record"} -{"text": "Q: SELECT built_year FROM ship GROUP BY built_year ORDER BY COUNT(*) DESC LIMIT 1 \nA: In which year were most of ships built? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010 \nA: Find the distinct names of wines produced before the year of 2000 or after the year of 2010. \n Additional table information: table: wine_1"} -{"text": "Q: 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 \nA: On what day was the order with invoice number 10 placed? \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT COUNT(*) FROM products WHERE product_category_code = 'Spices' AND typical_buying_price > 1000 \nA: Find the number of products with category 'Spices' and typically sold above 1000. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T1.id, T1.Name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 2 \nA: What are the ids and names of the medicine that can interact with two or more enzymes? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT job_title, AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id GROUP BY T2.job_title \nA: display job title and average salary of employees. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT minister FROM party WHERE took_office > 1961 OR took_office < 1959 \nA: Who are the ministers who took office after 1961 or before 1959? \n Additional table information: table: party_people"} -{"text": "Q: SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims) \nA: Among all the claims, which settlements have a claimed amount that is no more than the average? List the claim start date. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT DISTINCT LOCATION FROM station WHERE number_of_platforms >= 15 AND total_passengers > 25 \nA: Show all locations that have train stations with at least 15 platforms and train stations with more than 25 total passengers. \n Additional table information: table: train_station"} -{"text": "Q: SELECT TYPE, COUNT(*), SUM(enrollment) FROM institution GROUP BY TYPE \nA: Show institution types, along with the number of institutions and total enrollment for each type. \n Additional table information: table: protein_institute"} -{"text": "Q: SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID ORDER BY Rank_in_Round ASC NULLS FIRST \nA: Show the names of members in ascending order of their rank in rounds. \n Additional table information: table: decoration_competition"} -{"text": "Q: SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which apartment type code is the most common among apartments with more than one bathroom? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT name FROM instructor WHERE salary > (SELECT MIN(salary) FROM instructor WHERE dept_name = 'Biology') \nA: What are the names of instructors who earn more than at least one instructor from the Biology department? \n Additional table information: table: college_2"} -{"text": "Q: 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 \nA: Tell me the first and last name of the student who has the most activities. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop' \nA: Find the number of vocal types used in song 'Le Pop' \n Additional table information: table: music_2"} -{"text": "Q: SELECT T1.title, T3.name FROM course AS T1 JOIN teaches AS T2 ON T1.course_id = T2.course_id JOIN instructor AS T3 ON T2.id = T3.id WHERE YEAR = 2008 ORDER BY T1.title NULLS FIRST \nA: list in alphabetic order all course names and their instructors' names in year 2008. \n Additional table information: table: college_2"} -{"text": "Q: SELECT Zip_code FROM county WHERE County_name = 'Howard' \nA: Show the zip code of the county with name 'Howard'. \n Additional table information: table: election"} -{"text": "Q: SELECT SUM(city_population) FROM district WHERE city_area > (SELECT AVG(city_area) FROM district) \nA: What is the total population for all the districts that have an area larger tahn the average city area? \n Additional table information: table: store_product"} -{"text": "Q: SELECT date_of_enrolment, date_of_completion FROM Student_Course_Enrolment \nA: List all the dates of enrollment and completion of students. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT COUNT(*) FROM papers \nA: Count the number of total papers. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT T2.Name, T1.College_Location FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID ORDER BY T2.Name ASC NULLS FIRST \nA: Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names. \n Additional table information: table: decoration_competition"} -{"text": "Q: 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' \nA: How many activities does Mark Giuliano participate in? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT name, street_address, floors FROM building ORDER BY floors NULLS FIRST \nA: Show the name, street address, and number of floors for all buildings ordered by the number of floors. \n Additional table information: table: protein_institute"} -{"text": "Q: SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country HAVING COUNT(*) >= 2 \nA: What are the countries that have at least two perpetrators? \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code GROUP BY t1.document_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the document with the most number of sections? \n Additional table information: table: document_management"} -{"text": "Q: SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC NULLS FIRST \nA: What is the total horses record for each farm, sorted ascending? \n Additional table information: table: farm"} -{"text": "Q: SELECT T1.organisation_id, COUNT(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: List the organisation id with the maximum outcome count, and the count. \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT MAX(elevation) FROM airports WHERE country = 'Iceland' \nA: What is the highest elevation of an airport in the country of Iceland? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT AVG(long) FROM station WHERE NOT id IN (SELECT station_id FROM status GROUP BY station_id HAVING MAX(bikes_available) > 10) \nA: What is the average longitude of stations that never had bike availability more than 10? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Which customer status code has least number of customers? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T1.Height FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Injured DESC \nA: What are the heights of perpetrators in descending order of the number of people they injured? \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Accounts) \nA: Show the number of all customers without an account. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT StuID FROM Student WHERE age = (SELECT MAX(age) FROM Student) \nA: What student id corresponds to the oldest student? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT T1.Title, T2.Publication_Date FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID \nA: Show the title and publication dates of books. \n Additional table information: table: book_2"} -{"text": "Q: SELECT T1.claim_id, T1.date_claim_made, T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.claim_id HAVING COUNT(*) = 1 \nA: List the date the claim was made, the date it was settled and the amount settled for all the claims which had exactly one settlement. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT COUNT(*) FROM Faculty WHERE Sex = 'F' AND Rank = 'Professor' \nA: Count the number of female Professors we have. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT Publisher FROM publication WHERE Price > 10000000 INTERSECT SELECT Publisher FROM publication WHERE Price < 5000000 \nA: Show the publishers that have publications with price higher than 10000000 and publications with price lower than 5000000. \n Additional table information: table: book_2"} -{"text": "Q: SELECT T2.emp_fname FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num GROUP BY T1.prof_num HAVING COUNT(*) > 1 \nA: Find the first names of professors who are teaching more than one class. \n Additional table information: table: college_1"} -{"text": "Q: SELECT County_name FROM county ORDER BY Population ASC NULLS FIRST LIMIT 3 \nA: Show the 3 counties with the smallest population. \n Additional table information: table: election"} -{"text": "Q: SELECT Notes FROM \"regional_marketing\" WHERE current_slogan = 'SOUTH AUSTRALIA' \nA: Tell me what the notes are for South Australia. \n Additional table information: table: regional_marketing\ncolumns: state_territory, text_bg_color, format, current_slogan, current_series, Notes"} -{"text": "Q: SELECT t1.name, t1.capacity FROM stadium AS t1 JOIN event AS t2 ON t1.id = t2.stadium_id WHERE t2.name = 'World Junior' \nA: Find the name and capacity of the stadium where the event named 'World Junior' happened. \n Additional table information: table: swimming"} -{"text": "Q: SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) DESC LIMIT 1 \nA: What type has the most games? \n Additional table information: table: game_1"} -{"text": "Q: SELECT Name FROM climber WHERE Country <> 'Switzerland' \nA: List the names of climbers whose country is not Switzerland. \n Additional table information: table: climbing"} -{"text": "Q: SELECT COUNT(*) FROM artist \nA: How many artists are there? \n Additional table information: table: music_4"} -{"text": "Q: SELECT T1.gender, T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.resolution NULLS FIRST LIMIT 1 \nA: What is the gender and name of the artist who sang the song with the smallest resolution? \n Additional table information: table: music_1"} -{"text": "Q: SELECT region_code, region_name FROM region ORDER BY region_code NULLS FIRST \nA: Show all region code and region name sorted by the codes. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT Name FROM People ORDER BY Age DESC LIMIT 5 \nA: What are the names of the five oldest people? \n Additional table information: table: gymnast"} -{"text": "Q: SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which payment method is used the most often? \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT fname FROM student WHERE city_code = 'PHL' AND age BETWEEN 20 AND 25 \nA: Find the first name of students living in city PHL whose age is between 20 and 25. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT SUM(enrollment), MIN(enrollment) FROM university \nA: Return the total and minimum enrollments across all schools. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT SUM(hours) FROM projects \nA: What is the total number of hours for all projects? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT name FROM enzyme ORDER BY name DESC \nA: List the name of enzymes in descending lexicographical order. \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT SUM(amount_piad), AVG(amount_piad) FROM claim_headers \nA: Find the total and average amount paid in claim headers. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT name FROM manufacturers WHERE revenue < (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin') \nA: Find the name of companies whose revenue is smaller than the revenue of all companies based in Austin. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT COUNT(*) FROM university WHERE NOT school_id IN (SELECT school_id FROM basketball_match) \nA: Count the number of universities that do not participate in the baketball match. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT advisor FROM Student GROUP BY advisor HAVING COUNT(*) >= 2 \nA: What are the advisors \n Additional table information: table: game_1"} -{"text": "Q: SELECT Nationality FROM pilot GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the most common nationality of pilots. \n Additional table information: table: pilot_record"} -{"text": "Q: SELECT * FROM Albums WHERE YEAR = 2010 \nA: What are the albums produced in year 2010? \n Additional table information: table: music_2"} -{"text": "Q: SELECT COUNT(*) FROM camera_lens WHERE focal_length_mm > 15 \nA: How many camera lenses have a focal length longer than 15 mm? \n Additional table information: table: mountain_photos"} -{"text": "Q: SELECT County_name FROM county ORDER BY Population DESC LIMIT 1 \nA: Which county has the largest population? Give me the name of the county. \n Additional table information: table: election"} -{"text": "Q: SELECT rank FROM Faculty GROUP BY rank ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Which rank has the smallest number of faculty members? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees) \nA: Find the count of universities whose campus fee is greater than the average campus fee. \n Additional table information: table: csu_1"} -{"text": "Q: SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code GROUP BY t1.document_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the name of the document that has the most sections. \n Additional table information: table: document_management"} -{"text": "Q: SELECT document_id FROM Documents WHERE document_status_code = 'done' AND document_type_code = 'Paper' INTERSECT SELECT document_id FROM Documents JOIN Ref_Shipping_Agents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = 'USPS' \nA: List document id of documents status is done and document type is Paper and the document is shipped by shipping agent named USPS. \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: 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 \nA: Which customer made the most orders? Find the customer name. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'CIS-220' INTERSECT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'QM-261' \nA: What is the first name of the professor who is teaching CIS-220 and QM-261? \n Additional table information: table: college_1"} -{"text": "Q: SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%' \nA: Return the titles of films that include 'Deleted Scenes' in their special feature section. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT DISTINCT name FROM genres \nA: What are the different names of the genres? \n Additional table information: table: store_1"} -{"text": "Q: SELECT COUNT(*) FROM Rating WHERE stars > 3 \nA: How many movie ratings have more than 3 stars? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT COUNT(*), SUM(student_capacity), gender FROM dorm GROUP BY gender \nA: Find the number of dorms and total capacity for each gender. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT COUNT(*) FROM Employee \nA: How many employees do we have? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = 'San Jose State University' AND t1.year = 2000 \nA: What is the campus fee in the year 2000 for San Jose State University? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT COUNT(DISTINCT transaction_type) FROM Financial_Transactions \nA: How many different types of transactions are there? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T1.name, T3.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T2.PrimaryAffiliation = 1 \nA: What are the name and primarily affiliated department name of each physician? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900 \nA: What are the denominations used by both schools founded before 1890 and schools founded after 1900? \n Additional table information: table: school_player"} -{"text": "Q: SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype = 'food' \nA: What are all the different food allergies? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT open_year, name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1 \nA: Which manufacturer has the most number of shops? List its name and year of opening. \n Additional table information: table: manufacturer"} -{"text": "Q: SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the policy type the most customers choose. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT T1.Date_of_ceremony FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T2.Weeks_on_Top > 2 \nA: Please show the date of ceremony of the volumes that last more than 2 weeks on top. \n Additional table information: table: music_4"} -{"text": "Q: SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id ORDER BY T2.rating DESC LIMIT 1 \nA: Find the name of the user who gave the highest rating. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT T1.account_id, T1.date_account_opened, T1.account_name, T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan' \nA: What are the ids, names, dates of opening, and other details for accounts corresponding to the customer with the first name 'Meaghan'? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT Name FROM mountain ORDER BY Name ASC NULLS FIRST \nA: What are the names of mountains in ascending alphabetical order? \n Additional table information: table: climbing"} -{"text": "Q: SELECT COUNT(*), T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name \nA: Find the number of checking accounts for each account name. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT COUNT(*) FROM Lessons WHERE lesson_status_code = 'Cancelled' \nA: How many lessons have been cancelled? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT COUNT(*), T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name \nA: What are the naems of all the projects, and how many scientists were assigned to each of them? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT Team FROM player ORDER BY Age DESC LIMIT 1 \nA: Which team has the oldest player? \n Additional table information: table: school_player"} -{"text": "Q: SELECT creation, name, budget_in_billions FROM department \nA: List the creation year, name and budget of each department. \n Additional table information: table: department_management"} -{"text": "Q: SELECT city FROM city WHERE regional_population > 10000000 UNION SELECT city FROM city WHERE regional_population < 5000000 \nA: Please give me a list of cities whose regional population is over 8000000 or under 5000000. \n Additional table information: table: city_record"} -{"text": "Q: SELECT store_id FROM customer GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the id of the store with the most customers. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'english' GROUP BY T2.artist_name HAVING COUNT(*) >= 1 \nA: What are the names and number of works for all artists who have sung at least one song in English? \n Additional table information: table: music_1"} -{"text": "Q: SELECT DISTINCT product_name FROM product ORDER BY product_name NULLS FIRST \nA: Sort all the distinct product names in alphabetical order. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = 'catnip' \nA: What is the color description of the product with name 'catnip'? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT channel_code, contact_number FROM customer_contact_channels WHERE active_to_date - active_from_date = (SELECT active_to_date - active_from_date FROM customer_contact_channels ORDER BY (active_to_date - active_from_date) DESC LIMIT 1) \nA: What is the channel code and contact number of the customer contact channel that was active for the longest time? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE country = 'Canada' \nA: Find the number of routes whose destination airports are in Canada. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType \nA: What is the average base price of different bed type? List bed type and average base price. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT Attendance FROM performance WHERE LOCATION = 'TD Garden' OR LOCATION = 'Bell Centre' \nA: Show the attendances of the performances at location 'TD Garden' or 'Bell Centre' \n Additional table information: table: performance_attendance"} -{"text": "Q: 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' \nA: In which country and state does Janessa Sawayn live? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT order_shipping_charges, customer_id FROM customer_orders WHERE order_status_code = 'Cancelled' OR order_status_code = 'Paid' \nA: Show the shipping charge and customer id for customer orders with order status Cancelled or Paid. \n Additional table information: table: customers_campaigns_ecommerce"} -{"text": "Q: SELECT AVG(product_price), product_category_code FROM products GROUP BY product_category_code \nA: What is the average price of the products for each category? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > 3000 \nA: Find the the name of the customers who have a loan with amount more than 3000. \n Additional table information: table: loan_1"} -{"text": "Q: 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 \nA: What is the first name of the staff who did not give any lesson? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT AVG(T1.duration) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = 'mp3' AND T2.resolution < 800 \nA: What is the average song duration for the songs that are in mp3 format and whose resolution below 800? \n Additional table information: table: music_1"} -{"text": "Q: SELECT Party FROM party WHERE NOT Party_ID IN (SELECT Party FROM election) \nA: What are the names of parties that do not have delegates in election? \n Additional table information: table: election"} -{"text": "Q: SELECT COUNT(DISTINCT Industry) FROM Companies \nA: Count the number of distinct company industries. \n Additional table information: table: company_office"} -{"text": "Q: SELECT T1.gender, T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.resolution NULLS FIRST LIMIT 1 \nA: Return the gender and name of artist who produced the song with the lowest resolution. \n Additional table information: table: music_1"} -{"text": "Q: SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T1.dept_code = T3.dept_code WHERE T3.dept_name = 'History' AND T1.prof_high_degree <> 'Ph.D.' \nA: What are the first names and offices of history professors who don't have Ph.D.s? \n Additional table information: table: college_1"} -{"text": "Q: SELECT Name, Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus' OR How_to_Get_There = 'walk' \nA: What are the names and opening hours of the tourist attractions that can be accessed by bus or walk? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT Dependent_name FROM dependent WHERE relationship = 'Spouse' \nA: find all dependent names who have a spouse relation with some employee. \n Additional table information: table: company_1"} -{"text": "Q: SELECT MAX(num_of_shops), AVG(Num_of_Factories) FROM manufacturer WHERE open_year < 1990 \nA: what is the average number of factories and maximum number of shops for manufacturers that opened before 1990. \n Additional table information: table: manufacturer"} -{"text": "Q: SELECT COUNT(*) FROM customers \nA: Count the number of customers. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT flno FROM Flight WHERE origin = 'Los Angeles' \nA: Show all flight number from Los Angeles. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT Product_Name FROM Products ORDER BY Product_Price ASC NULLS FIRST \nA: Sort the names of products in ascending order of their price. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT Famous_Title FROM artist WHERE NOT Artist_ID IN (SELECT Artist_ID FROM volume) \nA: Find the famous titles of artists that do not have any volume. \n Additional table information: table: music_4"} -{"text": "Q: SELECT account_id, account_details FROM Accounts \nA: What are the ids and details of all accounts? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT SUM(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000 \nA: How many home games did the team Boston Red Stockings play from 1990 to 2000 in total? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT Product_Type_Code, COUNT(*) FROM Products GROUP BY Product_Type_Code \nA: Show different type codes of products and the number of products with each type code. \n Additional table information: table: solvency_ii"} -{"text": "Q: SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown <> 'Santo Domingo' \nA: What are the names of gymnasts whose hometown is not 'Santo Domingo'? \n Additional table information: table: gymnast"} -{"text": "Q: SELECT COUNT(*) FROM Customers \nA: How many customers in total? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: What is the payment method that were used the least often? \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT COUNT(*) FROM Person WHERE age > (SELECT MAX(age) FROM person WHERE job = 'engineer') \nA: Find the number of people whose age is greater than all engineers. \n Additional table information: table: network_2"} -{"text": "Q: SELECT current_series FROM \"regional_marketing\" WHERE Notes = 'New series began in June 2011' \nA: What is the current series where the new series began in June 2011? \n Additional table information: table: regional_marketing\ncolumns: state_territory, text_bg_color, format, current_slogan, current_series, Notes"} -{"text": "Q: SELECT T1.role_description FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code WHERE T2.employee_name = 'Koby' \nA: What is the role of the employee named Koby? \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT T2.Comptroller FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2 \nA: Who were the comptrollers of the parties associated with the delegates from district 1 or district 2? \n Additional table information: table: election"} -{"text": "Q: SELECT T2.name, T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math' \nA: What are the names and salaries of instructors who advise students in the Math department? \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Demon Kitty Rag' \nA: What are the types of vocals used in the song 'Demon Kitty Rag'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT COUNT(*) FROM customers \nA: Return the total number of distinct customers. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT COUNT(DISTINCT name) FROM PersonFriend WHERE NOT friend IN (SELECT name FROM person WHERE city = 'Austin') \nA: What is the total number of people who has no friend living in the city of Austin. \n Additional table information: table: network_2"} -{"text": "Q: SELECT RESULT, COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC \nA: Please show the results of music festivals and the number of music festivals that have had each, ordered by this count. \n Additional table information: table: music_4"} -{"text": "Q: SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%' \nA: What are the descriptions of the categories that products with product descriptions that contain the letter t are in? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 2 ORDER BY COUNT(*) NULLS FIRST \nA: List the cities which have more than 2 airports sorted by the number of airports. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT COUNT(DISTINCT POSITION) FROM player \nA: How many different position for players are listed? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT COUNT(*), affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation \nA: What are the different affiliations, and how many schools with each have an enrollment size of above 20000? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT city, COUNT(*) FROM branch WHERE open_year < 2010 GROUP BY city \nA: Show the city and the number of branches opened before 2010 for each city. \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT T2.name, T2.country FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name and country for the artist with most number of exhibitions? \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Gatwick' \nA: Please show the names of aircrafts associated with airport with name 'London Gatwick'. \n Additional table information: table: aircraft"} -{"text": "Q: SELECT COUNT(*) FROM catalog_contents \nA: How many products are there in the records? \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT T1.Attraction_Type_Description, T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which attraction type does the most tourist attractions belong to? Tell me its attraction type description and code. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT roomName FROM Rooms WHERE basePrice > (SELECT AVG(basePrice) FROM Rooms) \nA: What are the name of rooms that cost more than the average. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT customer_id, COUNT(*) FROM Customers_cards GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the id of the customer who has the most cards, as well as the number of cards. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT job_title FROM jobs WHERE min_salary > 9000 \nA: display the job title of jobs which minimum salary is greater than 9000. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211' \nA: What is the first name of each student enrolled in class ACCT-211? \n Additional table information: table: college_1"} -{"text": "Q: SELECT document_id FROM Documents WHERE document_status_code = 'done' AND document_type_code = 'Paper' EXCEPT SELECT document_id FROM Documents JOIN Ref_Shipping_Agents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = 'USPS' \nA: List the document ids of documents with the status done and type Paper, which not shipped by the shipping agent named USPS. \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT COUNT(*) FROM WINE WHERE Winery = 'Robert Biale' \nA: How many wines are produced at Robert Biale winery? \n Additional table information: table: wine_1"} -{"text": "Q: 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 \nA: What are the statement id and statement detail for the statement that has the most corresponding accounts? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT country FROM addresses GROUP BY country HAVING COUNT(address_id) > 4 \nA: List the countries having more than 4 addresses listed. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT MAX(booked_count), MIN(booked_count), AVG(booked_count) FROM products_booked \nA: What are the maximum, minimum, and average booked count for the products booked? \n Additional table information: table: products_for_hire"} -{"text": "Q: SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20 \nA: From which hometowns did both people older than 23 and younger than 20 come from? \n Additional table information: table: gymnast"} -{"text": "Q: SELECT name, main_services FROM station ORDER BY total_passengers DESC LIMIT 3 \nA: Show the names and main services for train stations that have the top three total number of passengers. \n Additional table information: table: train_station"} -{"text": "Q: SELECT COUNT(*), T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id \nA: For each product with some problems, list the count of problems and the product id. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT customer_details FROM customers ORDER BY customer_details NULLS FIRST \nA: List the names of all the customers in alphabetical order. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3 \nA: What are the details of the three most expensive hotels? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT gameid, SUM(hours_played) FROM Plays_games GROUP BY gameid \nA: Show all game ids and the number of hours played. \n Additional table information: table: game_1"} -{"text": "Q: SELECT name FROM instructor WHERE NOT id IN (SELECT id FROM teaches WHERE semester = 'Spring') \nA: What are the names of instructors who didn't teach courses in the Spring? \n Additional table information: table: college_2"} -{"text": "Q: SELECT T1.name, COUNT(*) FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id GROUP BY T1.building_id \nA: For each building, show the name of the building and the number of institutions in it. \n Additional table information: table: protein_institute"} -{"text": "Q: SELECT AVG(damage_millions_USD), MAX(damage_millions_USD) FROM storm WHERE max_speed > 1000 \nA: Show the average and maximum damage for all storms with max speed higher than 1000. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT SUM(Amount_Settled) FROM Settlements \nA: What is the total amount of settlement made for all the settlements? \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3 \nA: Return the top 3 greatest support rates. \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT AVG(balance) FROM checking \nA: Find the average checking balance. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT COUNT(*), city FROM airports WHERE country = 'United States' GROUP BY city ORDER BY COUNT(*) DESC \nA: How many airports are there per city in the US ordered from most to least? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID HAVING COUNT(*) >= 3 \nA: Find the names of all reviewers who have contributed three or more ratings. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT COUNT(*) FROM aircraft \nA: What is the number of aircraft? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name = 'Green' \nA: Find the attribute data type for the attribute named 'Green'. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT city FROM city WHERE regional_population > 10000000 \nA: Which cities have regional population above 10000000? \n Additional table information: table: city_record"} -{"text": "Q: SELECT COUNT(*) FROM instruments WHERE instrument = 'drums' \nA: How many songs have used the instrument 'drums'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT T1.name, T3.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T2.PrimaryAffiliation = 1 \nA: Find the names of all physicians and their primary affiliated departments' names. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T3.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T1.name = 'CACHEbox' INTERSECT SELECT T3.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T1.name = 'Fasterfox' \nA: List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'. \n Additional table information: table: browser_web"} -{"text": "Q: SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name LIKE '%Led%' \nA: What is the title of the album that was released by the artist whose name has the phrase 'Led'? \n Additional table information: table: store_1"} -{"text": "Q: SELECT T1.employee_id, T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id \nA: Find employee with ID and name of the country presently where (s)he is working. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id JOIN medicine AS T3 ON T2.medicine_id = T3.id WHERE T3.name = 'Amisulpride' AND T2.interaction_type = 'inhibitor' \nA: What are the names of enzymes in the medicine named 'Amisulpride' that can serve as an 'inhibitor'? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT customer_name FROM customers WHERE payment_method <> 'Cash' \nA: Find the name of customers who did not pay with Cash. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT COUNT(DISTINCT T1.name), T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.Headquarter \nA: Find the number of different products that are produced by companies at different headquarter cities. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT guest_first_name, guest_last_name FROM Guests \nA: Return the first names and last names of all guests \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT AVG(age), job FROM Person WHERE gender = 'male' GROUP BY job \nA: What is average age of male for different job title? \n Additional table information: table: network_2"} -{"text": "Q: SELECT Publisher FROM publication GROUP BY Publisher HAVING COUNT(*) > 1 \nA: Show publishers that have more than one publication. \n Additional table information: table: book_2"} -{"text": "Q: SELECT COUNT(DISTINCT ID) FROM teaches WHERE semester = 'Spring' AND YEAR = 2010 \nA: How many instructors teach a course in the Spring of 2010? \n Additional table information: table: college_2"} -{"text": "Q: SELECT name FROM procedures WHERE cost > 1000 UNION SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen' \nA: What are the procedures that cost more than 1000 or are specialized in by physician John Wen? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id > 8 \nA: Name all the products with next entry ID greater than 8. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT T2.Season, T2.Player, T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country \nA: Show the season, the player, and the name of the country that player belongs to. \n Additional table information: table: match_season"} -{"text": "Q: SELECT name, dates_active, number_deaths FROM storm WHERE number_deaths >= 1 \nA: What are the names, dates active, and number of deaths for storms that had 1 or more death? \n Additional table information: table: storm_record"} -{"text": "Q: SELECT DISTINCT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'University of Oxford' \nA: Find the first names and last names of the authors whose institution affiliation is 'University of Oxford'. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT DISTINCT artist_name FROM artist WHERE country = 'Bangladesh' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7 \nA: What are the names of the different artists from Bangladesh who never received a rating higher than a 7? \n Additional table information: table: music_1"} -{"text": "Q: SELECT customer_id, customer_name FROM customers ORDER BY customer_id ASC NULLS FIRST \nA: What is the ordered list of customer ids? \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT COUNT(*), dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code \nA: How many classes are held in each department? \n Additional table information: table: college_1"} -{"text": "Q: SELECT AVG(T2.fastestlapspeed), T1.name, T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year NULLS FIRST \nA: What is the average fastest lap speed for races held after 2004, for each race, ordered by year? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT COUNT(DISTINCT name) FROM projects \nA: Find the number of distinct projects. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE enroll_grade = 'C' \nA: What is the first name of students who got grade C in any class? \n Additional table information: table: college_1"} -{"text": "Q: SELECT SUM(amount) FROM payment \nA: Return the sum of all payment amounts. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT COUNT(*) FROM Church WHERE Open_Date < 1850 \nA: How many churches opened before 1850 are there? \n Additional table information: table: wedding"} -{"text": "Q: SELECT COUNT(*) FROM school \nA: Count the number of schools. \n Additional table information: table: school_finance"} -{"text": "Q: SELECT T3.Pilot_name, T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID ORDER BY T3.Rank NULLS FIRST \nA: Show the names of pilots and fleet series of the aircrafts they have flied with in ascending order of the rank of the pilot. \n Additional table information: table: pilot_record"} -{"text": "Q: SELECT clubname FROM club \nA: Give me the name of each club. \n Additional table information: table: club_1"} -{"text": "Q: SELECT T2.product_name, SUM(T1.product_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name \nA: Show all product names and the total quantity ordered for each product name. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Customer_Payments) \nA: How many customers have no payment histories? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4 \nA: Show the facility codes of apartments with more than 4 bedrooms. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name HAVING AVG(Product_Price) < 1000000 \nA: What are the product names with average product price smaller than 1000000? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT dname FROM department ORDER BY mgr_start_date NULLS FIRST \nA: List all department names ordered by their starting date. \n Additional table information: table: company_1"} -{"text": "Q: SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.Fname = 'David' AND T2.Lname = 'Shieber' \nA: Show total hours per week and number of games played for student David Shieber. \n Additional table information: table: game_1"} -{"text": "Q: SELECT T2.emp_fname, T4.prof_office, T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num \nA: What are the first names, office locations of all lecturers who have taught some course? \n Additional table information: table: college_1"} -{"text": "Q: SELECT name, damage_millions_USD FROM storm ORDER BY max_speed DESC \nA: List name and damage for all storms in a descending order of max speed. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Boeing 737-800' INTERSECT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Airbus A340-300' \nA: Show names for all employees who have certificates on both Boeing 737-800 and Airbus A340-300. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT T2.name, T3.name FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id = T3.id ORDER BY T1.compatible_since_year DESC \nA: give me names of all compatible browsers and accelerators in the descending order of compatible year \n Additional table information: table: browser_web"} -{"text": "Q: SELECT route_name FROM Delivery_Routes ORDER BY route_name NULLS FIRST \nA: List the names of all routes in alphabetic order. \n Additional table information: table: customer_deliveries"} -{"text": "Q: SELECT T1.total FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T2.Birth_Date LIKE '%January%' \nA: What are the total scores of the body builders whose birthday contains the string 'January' ? \n Additional table information: table: body_builder"} -{"text": "Q: SELECT city FROM city WHERE regional_population > 10000000 \nA: Please give me a list of cities whose regional population is over 10000000. \n Additional table information: table: city_record"} -{"text": "Q: SELECT name FROM student WHERE dept_name = 'History' ORDER BY tot_cred DESC LIMIT 1 \nA: Give the name of the student in the History department with the most credits. \n Additional table information: table: college_2"} -{"text": "Q: SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T1.Launch_year = 2002 ORDER BY T1.RAM_MiB DESC LIMIT 1 \nA: List the name of the phone model launched in year 2002 and with the highest RAM size. \n Additional table information: table: phone_1"} -{"text": "Q: 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' \nA: In what city does Janessa Sawayn live? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT Name FROM climber WHERE Country <> 'Switzerland' \nA: What are the names of climbers who are not from the country of Switzerland? \n Additional table information: table: climbing"} -{"text": "Q: SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = 'Heilo' \nA: How many instrument does the musician with last name 'Heilo' use? \n Additional table information: table: music_2"} -{"text": "Q: SELECT publisher, COUNT(*) FROM book_club GROUP BY publisher \nA: Show all publishers and the number of books for each publisher. \n Additional table information: table: culture_company"} -{"text": "Q: SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'Close a policy' OR t3.service_name = 'Upgrade a policy' \nA: Which customers have used the service named 'Close a policy' or 'Upgrade a policy'? Give me the customer names. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT TYPE, AVG(Tonnage) FROM ship GROUP BY TYPE \nA: For each type, what is the average tonnage? \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT eid, name FROM Employee ORDER BY salary DESC LIMIT 1 \nA: What is the id and name of the employee with the highest salary? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT AVG(enr) FROM College \nA: What is the average enrollment number? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT COUNT(*) FROM tryout WHERE decision = 'yes' \nA: How many students got accepted after the tryout? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT AVG(length_feet) FROM bridge \nA: What is the average length in feet of the bridges? \n Additional table information: table: architecture"} -{"text": "Q: SELECT founder FROM manufacturers WHERE name = 'Sony' \nA: Return the founder of Sony. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the id of the product ordered the most often on invoices. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name HAVING AVG(Product_Price) < 1000000 \nA: Find the product names whose average product price is below 1000000. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT Country, COUNT(*) FROM member GROUP BY Country \nA: Show the different countries and the number of members from each. \n Additional table information: table: decoration_competition"} -{"text": "Q: SELECT user_name, password FROM users GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: List all the username and passwords of users with the most popular role. \n Additional table information: table: document_management"} -{"text": "Q: SELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Elsa' \nA: Give the address of the staff member who has the first name Elsa. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' \nA: What are the names of the states that have some college students playing in the positions of goalie and mid-field? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT title FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq) \nA: Find the name of the courses that do not have any prerequisite? \n Additional table information: table: college_2"} -{"text": "Q: SELECT date, zip_code FROM weather WHERE min_dew_point_f < (SELECT MIN(min_dew_point_f) FROM weather WHERE zip_code = 94107) \nA: Which days had a minimum dew point smaller than any day in zip code 94107, and in which zip codes were those measurements taken? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_last_name = 'Bosco' \nA: Find the ids of the problems that are reported by the staff whose last name is Bosco. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT T2.Building FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which building does the instructor who teaches the most number of courses live in? \n Additional table information: table: college_3"} -{"text": "Q: SELECT Advisor FROM STUDENT WHERE city_code = 'BAL' \nA: Show the advisors of the students whose city of residence has city code 'BAL'. \n Additional table information: table: voter_2"} -{"text": "Q: 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 \nA: Which customers have made at least two orders? Give me each customer name and number of orders made. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT problem_id FROM problems WHERE date_problem_reported < '1978-06-26' \nA: What are the ids of the problems which are reported before 1978-06-26? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.major = '600' \nA: Which members of 'Bootup Baltimore' major in '600'? Give me their first names and last names. \n Additional table information: table: club_1"} -{"text": "Q: SELECT powertrain FROM \"vehicles\".\"cars\" WHERE order_year = '2000' \nA: what is the powertrain (engine/transmission) when the order year is 2000? \n Additional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion"} -{"text": "Q: SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Le Pop' \nA: Who performed the song named 'Le Pop'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid') \nA: How many schools have students playing in goalie and mid-field positions? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT SUM(Rating_in_percent), OWNER FROM channel GROUP BY OWNER \nA: What is the total rating of channel for each channel owner? \n Additional table information: table: program_share"} -{"text": "Q: SELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_price > 2000 \nA: Find the order detail for the products with price above 2000. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = '2192' \nA: What are the distinct last names of the students who have president votes but do not have 2192 as the advisor? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT COUNT(DISTINCT city) FROM station \nA: How many different cities have these stations? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars = 3 INTERSECT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars = 4 \nA: What are the names of all movies that received 3 or 4 stars? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT COUNT(*) FROM device \nA: Count the number of devices. \n Additional table information: table: device"} -{"text": "Q: SELECT Name FROM musical WHERE Nominee = 'Bob Fosse' \nA: What are the names of musicals with nominee 'Bob Fosse'? \n Additional table information: table: musical"} -{"text": "Q: SELECT SUM(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010 \nA: What is the total home game attendance of team Boston Red Stockings from 2000 to 2010? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT date_of_latest_logon FROM Students WHERE family_name = 'Jaskolski' OR family_name = 'Langosh' \nA: What are the dates of the latest logon of the students with family name 'Jaskolski' or 'Langosh'? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT COUNT(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = 'Australian Grand Prix' AND YEAR = 2009 \nA: How many drivers were in the Australian Grand Prix held in 2009? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT COUNT(*), T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name ORDER BY COUNT(*) DESC \nA: For each airport name, how many routes start at that airport, ordered from most to least? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT eid, name FROM Employee ORDER BY salary DESC LIMIT 1 \nA: Show the id and name of the employee with maximum salary. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING COUNT(T1.id) > 10 \nA: What are the names of the albums that have more than 10 tracks? \n Additional table information: table: store_1"} -{"text": "Q: SELECT DName FROM DEPARTMENT WHERE Division = 'AS' UNION SELECT DName FROM DEPARTMENT WHERE Division = 'EN' AND Building = 'NEB' \nA: What are the names of departments either in division AS, or in division EN and in building NEB? \n Additional table information: table: college_3"} -{"text": "Q: SELECT MAX(amount_outstanding), MIN(amount_outstanding), AVG(amount_outstanding) FROM Customers \nA: What is maximum, minimum and average amount of outstanding of customer? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.song_name LIKE '%love%' \nA: What are the names of the artists who released a song that has the word love in its title, and where are the artists from? \n Additional table information: table: music_1"} -{"text": "Q: SELECT DISTINCT source_system_code FROM cmi_cross_references WHERE source_system_code LIKE '%en%' \nA: Which distinct source system code includes the substring 'en'? \n Additional table information: table: local_govt_mdm"} -{"text": "Q: SELECT name FROM enzyme WHERE name LIKE '%ALA%' \nA: What are the names of enzymes that include the string 'ALA'? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT payment_method_code, COUNT(*) FROM Customer_Payments GROUP BY payment_method_code \nA: List all payment methods and number of payments using each payment methods. \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population < 100000 \nA: Which delegates are from counties with population smaller than 100000? \n Additional table information: table: election"} -{"text": "Q: SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id ORDER BY trust NULLS FIRST LIMIT 1 \nA: Find the name of the target user with the lowest trust score. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT Country FROM member GROUP BY Country HAVING COUNT(*) > 2 \nA: Which countries have more than two members? \n Additional table information: table: decoration_competition"} -{"text": "Q: SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5 \nA: what are the last names of the teachers who teach grade 5? \n Additional table information: table: student_1"} -{"text": "Q: SELECT crs_credit, crs_description FROM course WHERE crs_code = 'QM-261' \nA: What is the course description and number of credits for QM-261? \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(*) FROM phone WHERE Company_name = 'Nokia Corporation' \nA: How many phone hardware models are produced by the company named 'Nokia Corporation'? \n Additional table information: table: phone_1"} -{"text": "Q: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Stephanie' AND t1.lname = 'Weirich' \nA: Which papers have 'Stephanie Weirich' as an author? \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT document_type_description FROM Ref_document_types WHERE document_type_name = 'Film' \nA: What is the document type description for document type named Film? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT * FROM body_builder \nA: Show all information about each body builder. \n Additional table information: table: body_builder"} -{"text": "Q: SELECT Name, Age FROM editor \nA: What are the names and ages of editors? \n Additional table information: table: journal_committee"} -{"text": "Q: SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = 'Heilo' AND T3.title = 'Badlands' \nA: What instruments did the musician with the last name 'Heilo' play in 'Badlands'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT SUM(total_pounds) FROM purchase AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T2.city = 'London' AND T1.year = 2018 \nA: What is the sum of total pounds of purchase in year 2018 for all branches in London? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code = T2.color_code WHERE T2.color_description = 'yellow' \nA: What is the name of the product with the color description 'yellow'? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT DISTINCT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = 'warm' \nA: List the all the distinct names of the products with the characteristic name 'warm'. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which reign is the most common among wrestlers? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount > 100 \nA: Show all cities without a branch having more than 100 memberships. \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT max_page_size FROM product GROUP BY max_page_size HAVING COUNT(*) > 3 \nA: What is the maximum page size for everything that has more than 3 products listed? \n Additional table information: table: store_product"} -{"text": "Q: SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie' \nA: What are the names of the schools with some players in the mid position but no goalies? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT COUNT(DISTINCT allergytype) FROM Allergy_type \nA: How many distinct allergies are there? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the track that has had the greatest number of races? \n Additional table information: table: race_track"} -{"text": "Q: SELECT DISTINCT rank FROM Faculty \nA: What ranks do we have for faculty? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT name, trade_name FROM medicine EXCEPT SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id JOIN enzyme AS T3 ON T3.id = T2.enzyme_id WHERE T3.product = 'Protoporphyrinogen IX' \nA: Show the medicine names and trade names that cannot interact with the enzyme with product 'Heme'. \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT Studio FROM film WHERE Director = 'Nicholas Meyer' INTERSECT SELECT Studio FROM film WHERE Director = 'Walter Hill' \nA: What are the names of studios that have produced films with both Nicholas Meyer and Walter Hill? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT date_from, date_to FROM Project_Staff WHERE project_id IN (SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY COUNT(*) DESC LIMIT 1) UNION SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'leader' \nA: List from which date and to which date these staff work: project staff of the project which hires the most staffs \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT DISTINCT T1.player_name, T1.birthday FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY potential DESC LIMIT 5 \nA: List the names and birthdays of the top five players in terms of potential. \n Additional table information: table: soccer_1"} -{"text": "Q: SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed \nA: Show the ids of all employees who have either destroyed a document or made an authorization to do this. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' AND t3.sex = 'M' \nA: What are the first name and last name of each male member in club 'Hopkins Student Enterprises'? \n Additional table information: table: club_1"} -{"text": "Q: SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t3.order_quantity = (SELECT MAX(order_quantity) FROM order_items) \nA: Find the name of the customer who made the order of the largest amount of goods. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT manufacturer FROM \"vehicles\".\"cars\" WHERE order_year = '1998' \nA: who is the manufacturer for the order year 1998? \n Additional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion"} -{"text": "Q: SELECT account_id, COUNT(*) FROM Financial_transactions GROUP BY account_id \nA: Show the account id and the number of transactions for each account \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT employee_id, MAX(end_date) FROM job_history GROUP BY employee_id \nA: What are the employee ids for each employee and final dates of employment at their last job? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T2.name, T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T1.register_year = 2016 \nA: Show the member name and hometown who registered a branch in 2016. \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT Team FROM player ORDER BY Age DESC LIMIT 5 \nA: What are the teams that have the 5 oldest players? \n Additional table information: table: school_player"} -{"text": "Q: SELECT Country FROM manager WHERE Age > 50 INTERSECT SELECT Country FROM manager WHERE Age < 46 \nA: Show the countries that have both managers of age above 50 and managers of age below 46. \n Additional table information: table: railway"} -{"text": "Q: SELECT COUNT(DISTINCT dept_name) FROM course \nA: Count the number of departments which offer courses. \n Additional table information: table: college_2"} -{"text": "Q: SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC \nA: What is all the information about employees with D or S in their first name, ordered by salary descending? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT address FROM shop ORDER BY open_year NULLS FIRST \nA: Show the shop addresses ordered by their opening year. \n Additional table information: table: coffee_shop"} -{"text": "Q: SELECT COUNT(*) FROM Video_games \nA: How many video games do you have? \n Additional table information: table: game_1"} -{"text": "Q: SELECT Name FROM technician WHERE Team <> 'NYY' \nA: List the name of technicians whose team is not 'NYY'. \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT COUNT(*) FROM university WHERE LOCATION LIKE '%NY%' \nA: How many universities have a location that contains NY? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT name, age FROM people WHERE is_male = 'T' AND NOT people_id IN (SELECT male_id FROM wedding) \nA: Show the name and age for all male people who don't have a wedding. \n Additional table information: table: wedding"} -{"text": "Q: SELECT COUNT(*), T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director \nA: How many movie reviews does each director get? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN Prescribes AS T3 ON T3.Patient = T2.SSN JOIN Medication AS T4 ON T3.Medication = T4.Code WHERE room = 111 \nA: What is the name of the medication used for the patient staying in room 111? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT student_id FROM student_course_attendance \nA: What are the ids of all students who have attended at least one course? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT Player_name, residence FROM player WHERE Occupation <> 'Researcher' \nA: List the name and residence for players whose occupation is not 'Researcher'. \n Additional table information: table: riding_club"} -{"text": "Q: SELECT SUM(budget) FROM department WHERE dept_name = 'Marketing' OR dept_name = 'Finance' \nA: Find the total budgets of the Marketing or Finance department. \n Additional table information: table: college_2"} -{"text": "Q: SELECT name FROM projects WHERE hours > (SELECT AVG(hours) FROM projects) \nA: List the name of all projects that are operated longer than the average working hours of all projects. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT T1.first_name, T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total NULLS FIRST LIMIT 10 \nA: List the customers first and last name of 10 least expensive invoices. \n Additional table information: table: store_1"} -{"text": "Q: SELECT name FROM manufacturers WHERE revenue BETWEEN 100 AND 150 \nA: What are the names of companies with revenue between 100 and 150? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT Studio FROM film GROUP BY Studio HAVING AVG(Gross_in_dollar) >= 4500000 \nA: Which studios have an average gross of over 4500000? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT T1.id, COUNT(*) FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id GROUP BY T1.id \nA: How many games has each stadium held? \n Additional table information: table: game_injury"} -{"text": "Q: SELECT MAX(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' \nA: What are the maximum scores the team Boston Red Stockings got when the team won in postseason? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID ORDER BY T2.quality_rank NULLS FIRST \nA: Show names of technicians in ascending order of quality rank of the machine they are assigned. \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which countries has the most number of airlines whose active status is 'Y'? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT SUM(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan' \nA: Return the total revenue of companies with headquarters in Tokyo or Taiwan. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT T1.name, T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T2.balance DESC LIMIT 3 \nA: Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT COUNT(*) FROM files WHERE duration LIKE '4:%' \nA: What is the count of the songs that last approximately 4 minutes? \n Additional table information: table: music_1"} -{"text": "Q: SELECT product_id FROM Order_Items GROUP BY product_id HAVING COUNT(*) > 3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING SUM(total_amount_purchased) > 80000 \nA: What are the ids of all products that were either ordered more than 3 times or have a cumulative amount purchased of above 80000? \n Additional table information: table: department_store"} -{"text": "Q: SELECT start_station_name, start_station_id FROM trip WHERE start_date LIKE '8/%' GROUP BY start_station_name ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which start station had the most trips starting from August? Give me the name and id of the station. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T1.party_name, T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id \nA: Show all party names and their region names. \n Additional table information: table: party_people"} -{"text": "Q: SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'Close a policy' OR t3.service_name = 'Upgrade a policy' \nA: Find the names of customers who have used either the service 'Close a policy' or the service 'Upgrade a policy'. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT COUNT(*) FROM enzyme WHERE NOT id IN (SELECT enzyme_id FROM medicine_enzyme_interaction) \nA: What is the count of enzymes without any interactions? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: 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' \nA: Which students participate in both Canoeing and Kayaking as their activities? Tell me their student ids. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id \nA: What are the different cities where people live? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT color_description FROM ref_colors \nA: List the description of all the colors. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'Close a policy' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'New policy application' \nA: Which customers have used both the service named 'Close a policy' and the service named 'Upgrade a policy'? Give me the customer names. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT STATEMENT_ID, statement_details FROM Statements \nA: What are the ids and details of all statements? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT T1.name FROM instructor AS T1 JOIN teaches AS T2 ON T1.id = T2.id JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.title = 'C Programming' \nA: Find the name of the instructors who taught C Programming course before. \n Additional table information: table: college_2"} -{"text": "Q: SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id GROUP BY t2.program_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the name of the program that is broadcast most frequently. \n Additional table information: table: program_share"} -{"text": "Q: SELECT COUNT(*), time_of_day FROM broadcast GROUP BY time_of_day \nA: how many programs are broadcast in each time section of the day? \n Additional table information: table: program_share"} -{"text": "Q: SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the busiest destination airport that runs most number of routes in China. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT classroom, COUNT(*) FROM list WHERE grade = '0' GROUP BY classroom \nA: For each grade 0 classroom, report the total number of students. \n Additional table information: table: student_1"} -{"text": "Q: SELECT rank, Fname, Lname FROM Faculty \nA: What are the rank, first name, and last name of the faculty members? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT customer_details FROM customers WHERE customer_details LIKE '%Diana%' \nA: Which customers have the substring 'Diana' in their names? Return the customer details. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = 'Fail' \nA: What are the completion dates of all the tests that have result 'Fail'? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT COUNT(DISTINCT bike_id) FROM trip \nA: From the trip record, find the number of unique bikes. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name ORDER BY COUNT(*) DESC LIMIT 3 \nA: What are the three products that have the most problems?s \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1 \nA: What is the duration of the oldest actor? \n Additional table information: table: musical"} -{"text": "Q: SELECT first_name, last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163) \nA: Provide the full names of employees earning more than the employee with id 163. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T1.staff_name, T3.first_name, T3.last_name FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id JOIN Maintenance_Engineers AS T3 ON T2.engineer_id = T3.engineer_id \nA: Which staff have contacted which engineers? List the staff name and the engineer first name and last name. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT title FROM Movie WHERE YEAR > (SELECT MAX(YEAR) FROM Movie WHERE director = 'Steven Spielberg') \nA: What is the names of movies whose created year is after all movies directed by Steven Spielberg? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT COUNT(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Dayana Robel' \nA: How many policies are listed for the customer named 'Dayana Robel'? \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT T3.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T1.name = 'John Williams' \nA: What are the names of all aircrafts that John Williams have certificates to be able to fly? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT name FROM buildings WHERE Status = 'on-hold' ORDER BY Stories ASC NULLS FIRST \nA: Find the names of the buildings in 'on-hold' status, and sort them in ascending order of building stories. \n Additional table information: table: company_office"} -{"text": "Q: SELECT T1.name, COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 5 \nA: List the top 5 genres by number of tracks. List genres name and total tracks. \n Additional table information: table: store_1"} -{"text": "Q: SELECT FirstName, LastName FROM EMPLOYEE WHERE City = 'Calgary' \nA: What are the first names and last names of the employees who live in Calgary city. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT title FROM course ORDER BY title NULLS FIRST, credits NULLS FIRST \nA: List the names of all courses ordered by their titles and credits. \n Additional table information: table: college_2"} -{"text": "Q: SELECT product_description FROM products WHERE product_name = 'Chocolate' \nA: Return the description of the product called 'Chocolate'. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT COUNT(*), country FROM airports GROUP BY country ORDER BY COUNT(*) DESC \nA: What is the number of airports per country, ordered from most to least? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT T2.customer_last_name, T1.customer_id, T2.phone_number FROM Orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the last name, id and phone number of the customer who has made the greatest number of orders. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop' \nA: What are the types of vocals used in the song 'Le Pop'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent' \nA: List the project details of the project both producing patent and paper as outcomes. \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT title, film_id FROM film WHERE rental_rate = 0.99 INTERSECT SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id HAVING COUNT(*) < 3 \nA: Which film is rented at a fee of 0.99 and has less than 3 in the inventory? List the film title and id. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT COUNT(*), city_code FROM student GROUP BY city_code HAVING COUNT(*) > 1 \nA: Find the number of students for the cities where have more than one student. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'laurel' \nA: How many characteristics does the product named 'laurel' have? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID GROUP BY T1.Device_ID HAVING COUNT(*) > 1 \nA: What are the carriers of devices that are in stock in more than a single shop? \n Additional table information: table: device"} -{"text": "Q: SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' INTERSECT SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Night' \nA: Which channels broadcast both in the morning and at night? Give me the channel names. \n Additional table information: table: program_share"} -{"text": "Q: SELECT name FROM program ORDER BY launch NULLS FIRST \nA: list all the names of programs, ordering by launch time. \n Additional table information: table: program_share"} -{"text": "Q: SELECT city, GDP FROM city ORDER BY GDP NULLS FIRST LIMIT 1 \nA: Which city has the lowest GDP? Please list the city name and its GDP. \n Additional table information: table: city_record"} -{"text": "Q: SELECT AVG(T1.duration) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = 'mp3' AND T2.resolution < 800 \nA: What is the average duration of songs that have mp3 format and resolution below 800? \n Additional table information: table: music_1"} -{"text": "Q: SELECT T2.name, T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the name and id of the team with the most victories in 2008 postseason? \n Additional table information: table: baseball_1"} -{"text": "Q: 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' \nA: Show the statement detail and the corresponding document name for the statement with detail 'Private Project'. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT COUNT(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8 \nA: What is the number of days that had an average humity above 50 and an average visibility above 8? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT COUNT(*) FROM Staff \nA: How many staff in total? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT COUNT(*) FROM stadium WHERE country <> 'Russia' \nA: How many stadiums are not in country 'Russia'? \n Additional table information: table: swimming"} -{"text": "Q: SELECT Starting_Year FROM technician WHERE Team = 'CLE' INTERSECT SELECT Starting_Year FROM technician WHERE Team = 'CWS' \nA: What are the starting years shared by the technicians from the team 'CLE' or 'CWS'? \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT title FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq) \nA: Find the name of the courses that do not have any prerequisite? \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*) FROM dorm \nA: How many dorms are in the database? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT AVG(rating), AVG(resolution) FROM song WHERE languages = 'bangla' \nA: What is the average rating and resolution of all bangla songs? \n Additional table information: table: music_1"} -{"text": "Q: SELECT DISTINCT title FROM Movie EXCEPT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Chris Jackson' \nA: What are the titles of all movies that were not reviewed by Chris Jackson? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT Sex FROM Student WHERE Fname = 'Linda' AND Lname = 'Smith' \nA: What is the gender of the student Linda Smith? \n Additional table information: table: restaurant_1"} -{"text": "Q: SELECT T2.school_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T1.school_id HAVING SUM(T1.amount) <= 10 \nA: List all the names of schools with an endowment amount smaller than or equal to 10. \n Additional table information: table: school_finance"} -{"text": "Q: SELECT first_name, last_name, salary, department_id, MAX(salary) FROM employees GROUP BY department_id \nA: What are the department ids, full names, and salaries for employees who make the most in their departments? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT StuID FROM Student WHERE Sex = 'M' \nA: Show student ids for all male students. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT name FROM pilot WHERE NOT pilot_id IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia') \nA: find the name of pilots who did not win the matches held in the country of Australia. \n Additional table information: table: aircraft"} -{"text": "Q: SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32 \nA: What are the songs in volumes associated with the artist aged 32 or older? \n Additional table information: table: music_4"} -{"text": "Q: SELECT YEAR FROM festival_detail GROUP BY YEAR HAVING COUNT(*) > 1 \nA: List the year in which there are more than one festivals. \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT name FROM media_types \nA: List all media types. \n Additional table information: table: store_1"} -{"text": "Q: SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T2.amenid = T1.amenid JOIN dorm AS T3 ON T2.dormid = T3.dormid WHERE T3.dorm_name = 'Anonymous Donor Hall' ORDER BY T1.amenity_name NULLS FIRST \nA: List name of all amenities which Anonymous Donor Hall has, and sort the results in alphabetic order. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT id, color, name FROM photos \nA: List the id, color scheme, and name for all the photos. \n Additional table information: table: mountain_photos"} -{"text": "Q: SELECT T2.title, AVG(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY AVG(T1.stars) DESC LIMIT 1 \nA: What are the movie titles with the highest average rating and what are those ratings? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT name FROM Person WHERE age < 30 \nA: What is the name of the person whose age is below 30? \n Additional table information: table: network_2"} -{"text": "Q: SELECT COUNT(*) FROM market WHERE Number_cities < 300 \nA: Count the number of markets that have a number of cities lower than 300. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT Hispanic FROM city WHERE Black > 10 \nA: Return the hispanic percentage for cities in which the black percentage is greater than 10. \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT COUNT(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.maxOccupancy = T1.Adults + T1.Kids \nA: List how many times the number of people in the room reached the maximum occupancy of the room. The number of people include adults and kids. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT book_title, author_or_editor FROM book_club WHERE YEAR > 1989 \nA: What are the titles and authors or editors that correspond to books made after 1989? \n Additional table information: table: culture_company"} -{"text": "Q: SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM employment) \nA: List the names of people that are not employed by any company \n Additional table information: table: company_employee"} -{"text": "Q: SELECT DISTINCT rank FROM Faculty \nA: Find the list of distinct ranks for faculty. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT Aircraft FROM aircraft WHERE NOT Aircraft_ID IN (SELECT Winning_Aircraft FROM MATCH) \nA: List the names of aircrafts and that did not win any match. \n Additional table information: table: aircraft"} -{"text": "Q: SELECT t3.characteristic_name, t3.characteristic_data_type FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'cumin' \nA: What are the names and data types of the characteristics of the 'cumin' product? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT COUNT(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE '%a%' \nA: How many lessons taught by staff whose first name has letter 'a' in it? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT title FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid GROUP BY T1.songid ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which song has the most vocals? \n Additional table information: table: music_2"} -{"text": "Q: SELECT forename, surname FROM drivers WHERE nationality = 'German' \nA: Find the forename and surname of drivers whose nationality is German? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT decor, COUNT(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor \nA: How many rooms cost more than 120, for each different decor? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT DISTINCT T1.stageposition FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE Firstname = 'Solveig' \nA: What are the different stage positions for all musicians whose first name is 'Solveig'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton' AND capacity < 50 \nA: How many rooms whose capacity is less than 50 does the Lamberton building have? \n Additional table information: table: college_2"} -{"text": "Q: SELECT first_name, department_id FROM employees WHERE last_name = 'McEwen' \nA: What are the first names and department numbers for employees with last name McEwen? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T2.Name, T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID \nA: Show the names of members and the location of the performances they attended. \n Additional table information: table: performance_attendance"} -{"text": "Q: SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType \nA: For each bed type, find the average base price of different bed type. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'flax' \nA: Count the number of characteristics of the 'flax' product. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1 \nA: What is the name of the hardware product with the greatest price? \n Additional table information: table: department_store"} -{"text": "Q: SELECT MAX(share_count) FROM TRANSACTIONS WHERE amount_of_transaction < 10000 \nA: Show the maximum share count of transactions where the amount is smaller than 10000 \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT DISTINCT product_color FROM Products \nA: Show all product colors. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT * FROM CUSTOMER WHERE State = 'NY' \nA: Find all the customer information in state NY. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT location_code FROM Ref_locations WHERE location_name = 'Canada' \nA: Show the location code of the country 'Canada'. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT COUNT(*) FROM Ref_locations \nA: How many locations are listed in the database? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT DPhone FROM DEPARTMENT WHERE Room = 268 \nA: Give the phones for departments in room 268. \n Additional table information: table: college_3"} -{"text": "Q: SELECT COUNT(DISTINCT role_code) FROM Project_Staff \nA: How many different roles are there on the project staff? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928 \nA: What are the names of ships that were involved in a mission launched after 1928? \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id \nA: What are the different cities where students live? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT SUM(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990 \nA: How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING COUNT(*) > 2 \nA: Find all the policy types that are used by more than 2 customers. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT Nationality, COUNT(*) FROM HOST GROUP BY Nationality \nA: How many hosts does each nationality have? List the nationality and the count. \n Additional table information: table: party_host"} -{"text": "Q: SELECT T2.lname, T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.SportName = 'Football' OR T1.SportName = 'Lacrosse' \nA: What is the first and last name of all students who play Football or Lacrosse? \n Additional table information: table: game_1"} -{"text": "Q: SELECT T1.custid, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT MAX(balance) FROM checking) \nA: What are the customer id and name corresponding to accounts with a checking balance less than the largest checking balance? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1) \nA: What are the names of all the stores in the largest district by population? \n Additional table information: table: store_product"} -{"text": "Q: SELECT Order_Date FROM BOOKINGS \nA: What is the order date of each booking? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT name FROM Companies ORDER BY Market_Value_billion DESC \nA: Sort the company names in descending order of the company's market value. \n Additional table information: table: company_office"} -{"text": "Q: SELECT AVG(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Provisional' \nA: What is the average room count of the apartments whose booking status code is 'Provisional'? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT Name, Other_Details FROM Staff \nA: Show the names and details of all the staff members. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT DISTINCT T1.cust_name, T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id \nA: What are the different names and credit scores of customers who have taken a loan? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT * FROM College ORDER BY enr NULLS FIRST \nA: What information do you have on colleges sorted by increasing enrollment numbers? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT SUM(student_capacity) FROM dorm \nA: What is the total student capacity of all dorms? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T2.dept_name = 'Accounting' OR T2.dept_name = 'Biology' \nA: How many professors who are from either Accounting or Biology department? \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(*) FROM web_client_accelerator WHERE NOT id IN (SELECT accelerator_id FROM accelerator_compatible_browser) \nA: How many accelerators are not compatible with the browsers listed ? \n Additional table information: table: browser_web"} -{"text": "Q: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Tracy' AND t3.lname = 'Kim' \nA: Find the number of clubs where 'Tracy Kim' is a member. \n Additional table information: table: club_1"} -{"text": "Q: SELECT name, operating_system FROM web_client_accelerator WHERE CONNECTION <> 'Broadband' \nA: What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection? \n Additional table information: table: browser_web"} -{"text": "Q: SELECT T2.name, COUNT(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year > 2015 GROUP BY T2.branch_id \nA: For each branch id, what are the names of the branches that were registered after 2015? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT employee_ID FROM Employees WHERE employee_name = 'Ebba' \nA: What is the id for the employee called Ebba? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT Country FROM market ORDER BY Country ASC NULLS FIRST \nA: List all countries of markets in ascending alphabetical order. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT T1.student_id, T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) <= 2 \nA: What are the student IDs and middle names of the students enrolled in at most two courses? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT name, cost FROM procedures ORDER BY cost DESC \nA: Sort the list of names and costs of all procedures in the descending order of cost. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50 \nA: What are the names of all airports whose elevation is between -50 and 50? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' EXCEPT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num \nA: What are the first names of all professors not teaching any classes? \n Additional table information: table: college_1"} -{"text": "Q: SELECT t1.catalog_name, t1.date_of_publication FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id = t2.catalog_id WHERE catalog_level_number > 5 \nA: Find the names and publication dates of all catalogs that have catalog level number greater than 5. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT f_id FROM song WHERE resolution > (SELECT MAX(resolution) FROM song WHERE rating < 8) \nA: What is the id of every song that has a resolution higher than that of a song with a rating below 8? \n Additional table information: table: music_1"} -{"text": "Q: SELECT COUNT(*) FROM VOTING_RECORD \nA: Find the number of voting records in total. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' \nA: Find the names of all instructors in computer science department \n Additional table information: table: college_2"} -{"text": "Q: SELECT T2.name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name \nA: What is the average number of stars that each reviewer awards for a movie? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T2.Year, T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID \nA: Show the years and the official names of the host cities of competitions. \n Additional table information: table: farm"} -{"text": "Q: SELECT product FROM product WHERE product LIKE '%Scanner%' \nA: What are all of the products whose name includes the substring 'Scanner'? \n Additional table information: table: store_product"} -{"text": "Q: SELECT rank, sex, COUNT(*) FROM Faculty GROUP BY rank, sex \nA: Show all the ranks and the number of male and female faculty for each rank. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT COUNT(*) FROM Staff WHERE first_name = 'Ludie' \nA: How many employees have a first name of Ludie? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = 'North Coast' \nA: Find the names of all distinct wines that have appellations in North Coast area. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT name, headquarter, founder FROM manufacturers ORDER BY revenue DESC LIMIT 1 \nA: Find the name, headquarter and founder of the manufacturer that has the highest revenue. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t2.support_rate < t2.oppose_rate \nA: What are the names of candidates who have a lower support rate than oppose rate? \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT name, date FROM races ORDER BY date DESC LIMIT 1 \nA: What is the name and date of the most recent race? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT SUM(faculty) FROM faculty WHERE YEAR = 2002 \nA: How many faculty, in total, are there in the year 2002? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT AVG(Event_Attendance), MAX(Event_Attendance) FROM event \nA: what are the average and maximum attendances of all events? \n Additional table information: table: news_report"} -{"text": "Q: SELECT SUM(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.facility_code = 'Gym' \nA: Find the total number of rooms in the apartments that have facility code 'Gym'. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT COUNT(*) FROM (SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings') \nA: How many times in total did the team Boston Red Stockings participate in postseason games? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT t1.Effective_Date FROM claims AS t1 JOIN settlements AS t2 ON t1.claim_id = t2.claim_id GROUP BY t1.claim_id ORDER BY SUM(t2.settlement_amount) DESC LIMIT 1 \nA: Find the claim that has the largest total settlement amount. Return the effective date of the claim. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT COUNT(*), T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code \nA: How many different professors are there for the different schools? \n Additional table information: table: college_1"} -{"text": "Q: SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000 \nA: Which directors had a movie in either 1999 or 2000? \n Additional table information: table: culture_company"} -{"text": "Q: SELECT Fname FROM Student WHERE Major = 600 \nA: What are the first names for all students who are from the major numbered 600? \n Additional table information: table: game_1"} -{"text": "Q: SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Der Kapitan' AND T1.StagePosition = 'back' \nA: What is the first and last name of the artist who performed back stage for the song 'Der Kapitan'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT COUNT(*) FROM body_builder \nA: How many body builders are there? \n Additional table information: table: body_builder"} -{"text": "Q: SELECT price_range FROM HOTELS WHERE star_rating_code = '5' \nA: What are the price ranges of five star hotels? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: 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%' \nA: What are the ids of documents with letter 's' in the name with any expense budgets. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT District_name, City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000 \nA: Find the name and population of district with population between 200000 and 2000000 \n Additional table information: table: store_product"} -{"text": "Q: SELECT Status, COUNT(*) FROM roller_coaster GROUP BY Status \nA: Show the different statuses and the numbers of roller coasters for each status. \n Additional table information: table: roller_coaster"} -{"text": "Q: SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT AVG(balance) FROM checking) INTERSECT SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM savings) \nA: Find the names of accounts whose checking balance is above the average checking balance, but savings balance is below the average savings balance. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT Country_name, Capital FROM country \nA: What are the names and capitals of each country? \n Additional table information: table: match_season"} -{"text": "Q: SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals' \nA: What are the first name and last name of the players who were paid salary by team Washington Nationals in both 2005 and 2007? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT employee_name FROM Employees WHERE role_code = 'HR' \nA: Show the names of all the employees with role 'HR'. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT AVG(transaction_amount), MIN(transaction_amount), MAX(transaction_amount), SUM(transaction_amount) FROM Financial_transactions \nA: Return the average, minimum, maximum, and total transaction amounts. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT name FROM instructor WHERE name LIKE '%dar%' \nA: Find the names of all instructors whose name includes the substring \u201cdar\u201d. \n Additional table information: table: college_2"} -{"text": "Q: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = 'USA' AND t2.authorder = 2 AND t1.lname = 'Turon' \nA: Find papers whose second author has last name 'Turon' and is affiliated with an institution in the country 'USA'. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT T2.title, T1.mID FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the movie that is rated by most of times? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT model_name FROM chip_model ORDER BY launch_year NULLS FIRST \nA: List all the model names sorted by their launch year. \n Additional table information: table: phone_1"} -{"text": "Q: SELECT pName, HS FROM Player WHERE HS < 1500 \nA: What are the names and number of hours spent training for each player who trains for less than 1500 hours? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT AVG(Age) FROM artist \nA: What is the average age of all artists? \n Additional table information: table: music_4"} -{"text": "Q: SELECT T2.Name, T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'White' \nA: Give the names and scores of wines made from white grapes. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT T2.school_name FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id JOIN endowment AS T3 ON T2.school_id = T3.school_id GROUP BY T2.school_name HAVING SUM(T1.budgeted) > 100 OR SUM(T3.amount) > 10 \nA: Show the names of schools with a total budget amount greater than 100 or a total endowment greater than 10. \n Additional table information: table: school_finance"} -{"text": "Q: SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie' \nA: What college has a student who successfully made the team in the role of a goalie? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35 \nA: Which nations have both hosts of age above 45 and hosts of age below 35? \n Additional table information: table: party_host"} -{"text": "Q: SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T2.name = 'Creative Labs' INTERSECT SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T2.name = 'Sony' \nA: What are the names of products produced by both Creative Labs and Sony? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT AVG(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = 'SALE' \nA: Show the average amount of transactions with type code 'SALE'. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT COUNT(*) FROM Activity \nA: How many activities do we have? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT T1.first_name, T1.job_id FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T2.department_name = 'Finance' \nA: Give the first name and job id for all employees in the Finance department. \n Additional table information: table: hr_1"} -{"text": "Q: 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' \nA: What are the details for statements with the details 'Private Project', and what are the names of the corresponding documents? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT donator_name, SUM(amount) FROM endowment GROUP BY donator_name ORDER BY SUM(amount) DESC \nA: List each donator name and the amount of endowment in descending order of the amount of endowment. \n Additional table information: table: school_finance"} -{"text": "Q: SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200 \nA: Find all the films longer than 100 minutes, or rated PG, except those who cost more than 200 for replacement. List the titles. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T1.dept_name = 'Art' \nA: Find the names of all instructors in the Art department who have taught some course and the course_id. \n Additional table information: table: college_2"} -{"text": "Q: SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the description of the color for most products? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT MAX(Enrollment) FROM university \nA: What is the maximum enrollment across all schools? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate < 100) \nA: What are the names of cities that are in counties that have a crime rate below 100? \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT billing_country, SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8 \nA: A list of the top 8 countries by gross/total invoice size. List country name and gross invoice size. \n Additional table information: table: store_1"} -{"text": "Q: SELECT Author FROM submission WHERE NOT Submission_ID IN (SELECT Submission_ID FROM acceptance) \nA: Which authors did not submit to any workshop? \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT customer_first_name, customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name, T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id \nA: What are the full names of customers who do not have any accounts? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T1.Status FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the status of the city that has hosted the greatest number of competitions. \n Additional table information: table: farm"} -{"text": "Q: SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen' \nA: What are the names of procedures physician John Wen was trained in? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT date, zip_code FROM weather WHERE max_temperature_f >= 80 \nA: When and in what zip code did max temperature reach 80? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT DISTINCT country FROM artist \nA: Return the different countries for artists. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT T2.Dname, T2.Room FROM COURSE AS T1 JOIN DEPARTMENT AS T2 ON T1.DNO = T2.DNO WHERE T1.CName = 'INTRODUCTION TO COMPUTER SCIENCE' \nA: What are the department name and room for the course INTRODUCTION TO COMPUTER SCIENCE? \n Additional table information: table: college_3"} -{"text": "Q: SELECT MAX(cost), MIN(cost), AVG(cost) FROM procedures \nA: Tell me the highest, lowest, and average cost of procedures. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT organization_name FROM organizations WHERE organization_name LIKE '%Party%' \nA: What are the names of organizations that contain the word 'Party'? \n Additional table information: table: e_government"} -{"text": "Q: SELECT COUNT(*) FROM All_documents WHERE document_type_code = 'CV' OR document_type_code = 'BK' \nA: Show the number of documents with document type code CV or BK. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT DISTINCT classroom, grade FROM list \nA: What are the grade number and classroom number of each class in the list? \n Additional table information: table: student_1"} -{"text": "Q: SELECT customer_details FROM Customers EXCEPT SELECT T1.customer_details FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id = T2.customer_id \nA: Which customers do not have any policies? Find the details of these customers. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT T2.guest_first_name, T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T1.booking_status_code = 'Confirmed' \nA: Which guests have apartment bookings with status code 'Confirmed'? Return their first names and last names. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1 \nA: List the most common type of competition. \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT AVG(rating), AVG(resolution) FROM song WHERE languages = 'bangla' \nA: What are the average rating and resolution of songs that are in Bangla? \n Additional table information: table: music_1"} -{"text": "Q: SELECT T2.Visit_Date, T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID = T2.Tourist_ID WHERE T1.Tourist_Details = 'Vincent' \nA: What are the visit date and details of the visitor whose detail is 'Vincent'? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT COUNT(*), dept_name FROM student GROUP BY dept_name \nA: How many students are in each department? \n Additional table information: table: college_2"} -{"text": "Q: SELECT Party, COUNT(*) FROM representative GROUP BY Party \nA: What are the different parties of representative? Show the party name and the number of representatives in each party. \n Additional table information: table: election_representative"} -{"text": "Q: SELECT COUNT(*) FROM artist WHERE country = 'Bangladesh' \nA: How many Bangladeshi artists are listed? \n Additional table information: table: music_1"} -{"text": "Q: SELECT DISTINCT classroom FROM list WHERE grade = 5 \nA: Show me the classrooms grade 5 is using. \n Additional table information: table: student_1"} -{"text": "Q: SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the most common college of authors of submissions. \n Additional table information: table: workshop_paper"} -{"text": "Q: 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' \nA: What is zip code of customer with first name as Carole and last name as Bernhard? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T1.title, T1.credits, T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING COUNT(*) > 1 \nA: What is the title, credit value, and department name for courses with more than one prerequisite? \n Additional table information: table: college_2"} -{"text": "Q: SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.major = '600' \nA: Find all members of 'Bootup Baltimore' whose major is '600'. Show the first name and last name. \n Additional table information: table: club_1"} -{"text": "Q: SELECT party, COUNT(*) FROM driver GROUP BY party \nA: Show the party and the number of drivers in each party. \n Additional table information: table: school_bus"} -{"text": "Q: SELECT match_id FROM MATCH WHERE competition = '1994 FIFA World Cup qualification' \nA: Find the match ids of the cities that hosted competition '1994 FIFA World Cup qualification'? \n Additional table information: table: city_record"} -{"text": "Q: SELECT course_name FROM courses ORDER BY course_name NULLS FIRST \nA: What are the names of the courses in alphabetical order? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT Product_Name, AVG(Product_Price) FROM PRODUCTS GROUP BY Product_Name \nA: What are the different product names? What is the average product price for each of them? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT T1.State_County FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Marketing_Region_Code = 'CA' \nA: What are the states or counties of the address of the stores with marketing region code 'CA'? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = 'back' \nA: Find the name of songs that does not have a back vocal. \n Additional table information: table: music_2"} -{"text": "Q: SELECT T2.protein_name, T1.institution FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id \nA: Show the protein name and the institution name. \n Additional table information: table: protein_institute"} -{"text": "Q: SELECT COUNT(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.Sex = 'M' AND T2.Election_Cycle = 'Fall' \nA: How many male (sex is M) students have class senator votes in the fall election cycle? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT name, job FROM Person ORDER BY name NULLS FIRST \nA: list the name, job title of all people ordered by their names. \n Additional table information: table: network_2"} -{"text": "Q: SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1 \nA: Find the name of the room with the maximum occupancy. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT name FROM driver WHERE home_city = 'Hartford' AND age < 40 \nA: List names for drivers from Hartford city and younger than 40. \n Additional table information: table: school_bus"} -{"text": "Q: SELECT vehicle_id FROM Vehicles \nA: List all vehicle id \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T2.first_name = 'Lyla' \nA: What is the zip code of the address where the teacher with first name 'Lyla' lives? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT T1.name, T1.max_speed FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the storm name and max speed which affected the greatest number of regions? \n Additional table information: table: storm_record"} -{"text": "Q: SELECT customer_email, customer_name FROM customers WHERE payment_method = 'Visa' \nA: List the names and emails of customers who payed by Visa card. \n Additional table information: table: customer_deliveries"} -{"text": "Q: SELECT T1.customer_name, T1.customer_phone, T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the name, phone number and email address of the customer who made the largest number of orders? \n Additional table information: table: department_store"} -{"text": "Q: SELECT artist_name FROM artist WHERE country = 'UK' AND gender = 'Male' \nA: What are the names of all male British artists? \n Additional table information: table: music_1"} -{"text": "Q: SELECT AVG(price) FROM products WHERE manufacturer = 2 \nA: What is the average price of products with manufacturer codes equal to 2? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT COUNT(DISTINCT Party) FROM representative \nA: How many distinct parties are there for representatives? \n Additional table information: table: election_representative"} -{"text": "Q: SELECT T3.location FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.market_value > 100 \nA: What are the locations that have gas stations owned by a company with a market value greater than 100? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT * FROM CUSTOMER WHERE State = 'NY' \nA: What is all the customer information for customers in NY state? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT name FROM person EXCEPT SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.job = 'student' \nA: Find the name of the person who has no student friends. \n Additional table information: table: network_2"} -{"text": "Q: SELECT T1.id, T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.height > 4000 \nA: What are the id and name of the photos for mountains? \n Additional table information: table: mountain_photos"} -{"text": "Q: SELECT COUNT(DISTINCT POSITION) FROM player \nA: how many different positions are there? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT stu_gpa, stu_phone, stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5 \nA: What is the first name, GPA, and phone number of the students with the top 5 GPAs? \n Additional table information: table: college_1"} -{"text": "Q: SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' \nA: What are the names of all instructors in the Comp. Sci. department? \n Additional table information: table: college_2"} -{"text": "Q: SELECT LOCATION FROM station EXCEPT SELECT LOCATION FROM station WHERE number_of_platforms >= 15 \nA: Show all locations which don't have a train station with at least 15 platforms. \n Additional table information: table: train_station"} -{"text": "Q: SELECT format FROM \"regional_marketing\" WHERE state_territory = 'South Australia' \nA: What is the format for South Australia? \n Additional table information: table: regional_marketing\ncolumns: state_territory, text_bg_color, format, current_slogan, current_series, Notes"} -{"text": "Q: SELECT languages FROM song GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the language used most often in the songs? \n Additional table information: table: music_1"} -{"text": "Q: SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM checking) \nA: What are the names of customers with checking balances lower than the average checking balance? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' \nA: Find the average age of the members in the club 'Bootup Baltimore'. \n Additional table information: table: club_1"} -{"text": "Q: SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: What is the role with the smallest number of employees? Find the role codes. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT COUNT(DISTINCT dept_address), school_code FROM department GROUP BY school_code \nA: How many different locations does each school have? \n Additional table information: table: college_1"} -{"text": "Q: SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1 \nA: Find id of the candidate who most recently accessed the course? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT College, COUNT(*) FROM submission GROUP BY College \nA: For each college, return the college name and the count of authors with submissions from that college. \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_price > 2000 \nA: What are the order details of the products with price higher than 2000? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT COUNT(*) FROM users WHERE user_login = 1 \nA: Count the number of users that are logged in. \n Additional table information: table: document_management"} -{"text": "Q: SELECT customer_status_code, cell_mobile_phone_number, email_address FROM Customers WHERE first_name = 'Marina' OR last_name = 'Kohler' \nA: What is the status code, phone number, and email address of the customer whose last name is Kohler or whose first name is Marina? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT DISTINCT classroom FROM list WHERE grade = 4 \nA: Find the classrooms in which grade 4 is studying. \n Additional table information: table: student_1"} -{"text": "Q: SELECT f_id FROM files WHERE formats = 'mp4' INTERSECT SELECT f_id FROM song WHERE resolution < 1000 \nA: Find the id of songs that are available in mp4 format and have resolution lower than 1000. \n Additional table information: table: music_1"} -{"text": "Q: SELECT T1.driverid, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds DESC LIMIT 1 \nA: What is the id and family name of the driver who has the longest laptime? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = 'Metallica' \nA: Hom many albums does the artist 'Metallica' have? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT classroom, COUNT(*) FROM list GROUP BY classroom \nA: For each classroom, show the classroom number and find how many students are using it. \n Additional table information: table: student_1"} -{"text": "Q: SELECT product_price FROM products WHERE NOT product_id IN (SELECT product_id FROM complaints) \nA: Find the prices of products which has never received a single complaint. \n Additional table information: table: customer_complaints"} -{"text": "Q: 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' \nA: Find the first names of professors who are not playing Canoeing or Kayaking. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT SUM(maxOccupancy) FROM Rooms WHERE decor = 'modern' \nA: How many people in total can stay in the modern rooms of this inn? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT product_id FROM products_booked GROUP BY product_id HAVING COUNT(*) = 3 \nA: What is the id of the product that is booked for 3 times? \n Additional table information: table: products_for_hire"} -{"text": "Q: SELECT city FROM park GROUP BY city HAVING COUNT(*) BETWEEN 2 AND 4 \nA: Which cities have 2 to 4 parks? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT name, salary FROM instructor WHERE salary < (SELECT AVG(salary) FROM instructor WHERE dept_name = 'Physics') \nA: What are the names and salaries for instructors who earn less than the average salary of instructors in the Physics department? \n Additional table information: table: college_2"} -{"text": "Q: SELECT AVG(price) FROM Flight WHERE origin = 'Los Angeles' AND destination = 'Honolulu' \nA: What is the average price for flights from LA to Honolulu? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT first_name FROM people ORDER BY first_name NULLS FIRST \nA: List the first names of people in alphabetical order? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT StuID FROM Student WHERE sex = 'F' INTERSECT SELECT StuID FROM Sportsinfo WHERE sportname = 'Football' \nA: What are the ids of all female students who play football? \n Additional table information: table: game_1"} -{"text": "Q: SELECT COUNT(*) FROM manufacturers WHERE founder = 'Andy' \nA: How many companies were created by Andy? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT T1.driverid, T1.forename, COUNT(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING COUNT(*) >= 2 \nA: What is the id, forename, and number of races for all drivers that have participated in at least 2 races? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = 'Duplex' \nA: Return the booking start date and end date for the apartments that have type code 'Duplex'. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT T2.name, T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the name and id of the team that won the most times in 2008 postseason. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT MIN(salary), department_id FROM employees GROUP BY department_id \nA: What is the minimum salary in each department? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT address_content FROM addresses WHERE city = 'East Julianaside' AND state_province_county = 'Texas' UNION SELECT address_content FROM addresses WHERE city = 'Gleasonmouth' AND state_province_county = 'Arizona' \nA: What are all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT T1.Player, T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Columbus Crew' \nA: Show the players and years played for players from team 'Columbus Crew'. \n Additional table information: table: match_season"} -{"text": "Q: SELECT name FROM Person WHERE age > (SELECT MIN(age) FROM person WHERE job = 'engineer') ORDER BY age NULLS FIRST \nA: Find the name of people whose age is greater than any engineer sorted by their age. \n Additional table information: table: network_2"} -{"text": "Q: SELECT COUNT(*) FROM Student WHERE city_code = 'HKG' OR city_code = 'CHI' \nA: Give the number of students living in either HKG or CHI. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT name FROM club ORDER BY Start_year ASC NULLS FIRST \nA: List all club names in ascending order of start year. \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT player_api_id FROM Player WHERE height >= 180 AND height <= 190 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE preferred_foot = 'left' \nA: List all of the ids for left-footed players with a height between 180cm and 190cm. \n Additional table information: table: soccer_1"} -{"text": "Q: SELECT DISTINCT premises_type FROM premises \nA: What are all the distinct premise types? \n Additional table information: table: customers_campaigns_ecommerce"} -{"text": "Q: SELECT COUNT(*), affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation \nA: Find the number of universities that have over a 20000 enrollment size for each affiliation type. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT COUNT(*) FROM invoices WHERE billing_city = 'Chicago' AND billing_state = 'IL' \nA: List the number of invoices from Chicago, IL. \n Additional table information: table: store_1"} -{"text": "Q: SELECT name, dates_active, number_deaths FROM storm WHERE number_deaths >= 1 \nA: List name, dates active, and number of deaths for all storms with at least 1 death. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT decor FROM Rooms WHERE roomName = 'Recluse and defiance' \nA: What is the decor of room Recluse and defiance? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT cName, state, MIN(enr) FROM college GROUP BY state \nA: What is the name of school that has the smallest enrollment in each state? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT StuID FROM Student WHERE sex = 'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname = 'Football' \nA: Show all male student ids who don't play football. \n Additional table information: table: game_1"} -{"text": "Q: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy \nA: What are the student ids of students who don't have any allergies? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT AVG(Working_Horses) FROM farm WHERE Total_Horses > 5000 \nA: What is the average number of working horses of farms with more than 5000 total number of horses? \n Additional table information: table: farm"} -{"text": "Q: SELECT campus FROM campuses WHERE county = 'Los Angeles' AND YEAR > 1950 \nA: What campuses are located in Los Angeles county and opened after 1950? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT DName FROM DEPARTMENT WHERE Building = 'Mergenthaler' \nA: Find the department name that is in Building 'Mergenthaler'. \n Additional table information: table: college_3"} -{"text": "Q: SELECT T1.role_description, T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: For each staff id, what is the description of the role that is involved with the most number of projects? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1 \nA: What is the apartment number of the apartment with the most beds? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT COUNT(DISTINCT rating) FROM film \nA: How many kinds of different ratings are listed? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T2.first_name, T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING COUNT(*) > 30 \nA: What are the full names of actors who had roles in more than 30 films? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT Category FROM music_festival WHERE RESULT = 'Awarded' \nA: What are the category of music festivals with result 'Awarded'? \n Additional table information: table: music_4"} -{"text": "Q: SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor <> 'Rachel Elnaugh' \nA: Return the names of entrepreneurs do no not have the investor Rachel Elnaugh. \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT origin FROM program ORDER BY origin NULLS FIRST \nA: List all program origins in the alphabetical order. \n Additional table information: table: program_share"} -{"text": "Q: SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id \nA: Find the names of users who do not have a first notification of loss record. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT T2.Name, COUNT(*) FROM debate_people AS T1 JOIN people AS T2 ON T1.Affirmative = T2.People_ID GROUP BY T2.Name \nA: Show the names of people and the number of times they have been on the affirmative side of debates. \n Additional table information: table: debate"} -{"text": "Q: SELECT id, duration FROM trip ORDER BY duration DESC LIMIT 3 \nA: What are the ids of the trips that lasted the longest and how long did they last? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t1.sex = 'F' ORDER BY t1.name NULLS FIRST \nA: list all female (sex is F) candidate names in the alphabetical order. \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T1.Total_Points > 57.5 \nA: Give the different hometowns of gymnasts that have a total point score of above 57.5. \n Additional table information: table: gymnast"} -{"text": "Q: SELECT last_name FROM staff WHERE email_address LIKE '%wrau%' \nA: Find the last name of the staff whose email address contains 'wrau'. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT product_category_description, unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs' \nA: Return the description and unit of measurement for products in the 'Herbs' category. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT DISTINCT state FROM college WHERE enr < (SELECT MAX(enr) FROM college) \nA: What are the states with colleges that have enrollments less than the some other college? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = 'hot' \nA: How many products have the characteristic named 'hot'? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT open_year FROM branch GROUP BY open_year HAVING COUNT(*) >= 2 \nA: List all open years when at least two shops are opened. \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT T2.Fname, T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY COUNT(*) DESC LIMIT 3 \nA: What are the first and last names of the instructors who teach the top 3 number of courses? \n Additional table information: table: college_3"} -{"text": "Q: SELECT T2.Pilot_name, COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name HAVING COUNT(*) > 1 \nA: Show names of pilots that have more than one record. \n Additional table information: table: pilot_record"} -{"text": "Q: SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = 'Uganda' \nA: What are the times used by climbers who climbed mountains in the country of Uganda? \n Additional table information: table: climbing"} -{"text": "Q: SELECT name FROM program ORDER BY launch DESC LIMIT 1 \nA: find the name of the program that was launched most recently. \n Additional table information: table: program_share"} -{"text": "Q: SELECT T2.roomName, COUNT(*), T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room \nA: Return the name and number of reservations made for each of the rooms. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK' \nA: Which language does the film AIRPORT POLLOCK use? List the language name. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT name, height, prominence FROM mountain WHERE range <> 'Aberdare Range' \nA: What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'? \n Additional table information: table: mountain_photos"} -{"text": "Q: SELECT SUM(enr) FROM college WHERE NOT cName IN (SELECT cName FROM tryout WHERE pPos = 'goalie') \nA: What is the total number of enrollment of schools that do not have any goalie player? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT COUNT(DISTINCT city) FROM Person \nA: How many different cities are they from? \n Additional table information: table: network_2"} -{"text": "Q: SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T2.balance > T3.balance \nA: Find the name of accounts whose checking balance is higher than corresponding saving balance. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT Date_Claim_Made, Date_Claim_Settled FROM Claims WHERE Amount_Claimed > (SELECT AVG(Amount_Claimed) FROM Claims) \nA: Among all the claims, which claims have a claimed amount larger than the average? List the date the claim was made and the date it was settled. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT document_id, document_name FROM Documents \nA: What are the ids and names for each of the documents? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT Name FROM Projects WHERE NOT Code IN (SELECT Project FROM AssignedTo) \nA: What are the names of projects that have not been assigned? \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT T2.apt_type_code, T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = 'Kyle' \nA: Show the apartment type codes and apartment numbers in the buildings managed by 'Kyle'. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT city_code, COUNT(*) FROM Student GROUP BY city_code \nA: How many students live in each city? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1 \nA: Show the authors who have submissions to more than one workshop. \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT shipping_agent_name FROM Ref_Shipping_Agents \nA: What are the shipping agent names? \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'Mobile Computing') \nA: What is the course title of the prerequisite of course Mobile Computing? \n Additional table information: table: college_2"} -{"text": "Q: 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' \nA: Show first name and last name for all the students advised by Michael Goodrich. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT DISTINCT Name FROM WINE ORDER BY Name NULLS FIRST \nA: List the names of all distinct wines in alphabetical order. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT characteristic_name, other_characteristic_details, characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name, t1.other_characteristic_details, t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id = t2.characteristic_id \nA: What are the names, details and data types of the characteristics which are never used by any product? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT SUM(enrollment), AVG(enrollment) FROM school \nA: What are the total and average enrollment of all schools? \n Additional table information: table: school_finance"} -{"text": "Q: SELECT T1.Team, T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID \nA: For each player, show the team and the location of school they belong to. \n Additional table information: table: school_player"} -{"text": "Q: SELECT host_city FROM hosting_city ORDER BY YEAR DESC LIMIT 1 \nA: Find the city that hosted some events in the most recent year. What is the id of this city? \n Additional table information: table: city_record"} -{"text": "Q: SELECT T1.dorm_name, T1.student_capacity FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid GROUP BY T2.dormid ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: Find the name and capacity of the dorm with least number of amenities. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT flno, origin, destination FROM Flight ORDER BY origin NULLS FIRST \nA: What is the flight number, origin, and destination for all flights in alphabetical order by departure cities? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT DISTINCT cName FROM tryout ORDER BY cName NULLS FIRST \nA: Find the name of different colleges involved in the tryout in alphabetical order. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT T1.personal_name, T1.family_name, T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the personal name, family name, and author ID of the course author who teaches the most courses? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT company, main_industry FROM company WHERE NOT company_id IN (SELECT company_id FROM station_company) \nA: What are the main industries of the companies without gas stations and what are the companies? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT MAX(Price), MAX(Score), YEAR FROM WINE GROUP BY YEAR \nA: What are the maximum price and score of wines for each year? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000 \nA: What are the types of the ships that have both shiips with tonnage more than 6000 and those with tonnage less than 4000? \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT town_city FROM customers WHERE customer_type_code = 'Good Credit Rating' GROUP BY town_city ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: Return the city with the customer type code 'Good Credit Rating' that had the fewest customers. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 2 EXCEPT SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id JOIN Claims AS T3 ON T2.policy_id = T3.policy_id \nA: Give me the the customer details and id for the customers who had two or more policies but did not file any claims. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT clublocation FROM club WHERE clubname = 'Pen and Paper Gaming' \nA: Find the location of the club 'Pen and Paper Gaming'. \n Additional table information: table: club_1"} -{"text": "Q: SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which industry has the most companies? \n Additional table information: table: company_office"} -{"text": "Q: SELECT T1.Store_Phone, T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T2.Product_Name = 'film' \nA: Find the names of the workshop groups where services with product name 'film' are performed. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade = 'B' \nA: How many students have had at least one 'B' grade? \n Additional table information: table: college_3"} -{"text": "Q: SELECT T2.monthly_rental FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id WHERE T1.state_province_county = 'Texas' \nA: What are the monthly rentals of student addresses in Texas state? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'bangla' GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3 \nA: What are the top 3 artists with the largest number of songs in the language Bangla? \n Additional table information: table: music_1"} -{"text": "Q: SELECT COUNT(*) FROM Rooms \nA: What is the total number of rooms available in this inn? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT t2.date_opened, t2.date_closed FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name LIKE '%Diana%' \nA: What are the open and close dates of all the policies used by the customer who have 'Diana' in part of their names? \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT COUNT(*) FROM campuses \nA: What is the total number of campuses? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1 \nA: Return the name of the heaviest entrepreneur. \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1 \nA: What is the id of the candidate who most recently accessed the course? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_President_VOTE \nA: What are the distinct last names of the students who have class president votes? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T1.driverid, T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE POSITION = '1' GROUP BY T1.driverid HAVING COUNT(*) >= 2 \nA: What is the id, forname and surname of the driver who had the first position in terms of laptime at least twice? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Tennis Club' \nA: How many members does the club 'Tennis Club' has? \n Additional table information: table: club_1"} -{"text": "Q: SELECT theme, YEAR FROM exhibition WHERE ticket_price < 15 \nA: Show theme and year for all exhibitions with ticket prices lower than 15. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT name, origin, OWNER FROM program \nA: List the name, origin and owner of each program. \n Additional table information: table: program_share"} -{"text": "Q: SELECT document_type_code, document_type_name FROM Ref_document_types \nA: What are all the document type codes and document type names? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT COUNT(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000 \nA: What is the number of employees that have a salary between 100000 and 200000? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age NULLS FIRST LIMIT 1 \nA: what is the name and age of the youngest winning pilot? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT Name FROM manager ORDER BY LEVEL ASC NULLS FIRST \nA: What are the names of managers in ascending order of level? \n Additional table information: table: railway"} -{"text": "Q: SELECT DISTINCT name FROM races ORDER BY name DESC \nA: List the names of all distinct races in reversed lexicographic order? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT AVG(age), job FROM Person GROUP BY job \nA: How old is the average person for each job? \n Additional table information: table: network_2"} -{"text": "Q: SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: Find the emails of customers who has filed a complaints of the product with the most complaints. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall' ORDER BY T3.amenity_name NULLS FIRST \nA: What amenities does Smith Hall have in alphabetical order? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT SUM(city_population) FROM district ORDER BY city_area DESC LIMIT 3 \nA: What is the total number of residents for the districts with the 3 largest areas? \n Additional table information: table: store_product"} -{"text": "Q: SELECT T1.problem_description FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Christop' \nA: Give me a list of descriptions of the problems that are reported by the staff whose first name is Christop. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT COUNT(DISTINCT roomtype) FROM room \nA: Find the number of distinct room types available. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT flno, origin, destination FROM Flight ORDER BY origin NULLS FIRST \nA: Show flight number, origin, destination of all flights in the alphabetical order of the departure cities. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT COUNT(DISTINCT customer_id) FROM customer_orders WHERE order_status = 'Cancelled' \nA: How many customers have at least one order with status 'Cancelled'? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2 \nA: display the ID for those employees who did two or more jobs in the past. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Show the transaction type code that occurs the fewest times. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID = T2.nurse \nA: What are the distinct names of nurses on call? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T1.season FROM game AS T1 JOIN injury_accident AS T2 ON T1.id = T2.game_id WHERE T2.player = 'Walter Samuel' \nA: What is the season of the game which causes the player 'Walter Samuel' to get injured? \n Additional table information: table: game_injury"} -{"text": "Q: SELECT pilot FROM flight GROUP BY pilot ORDER BY COUNT(*) DESC LIMIT 1 \nA: which pilot is in charge of the most number of flights? \n Additional table information: table: flight_company"} -{"text": "Q: SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING COUNT(DISTINCT T3.product_id) >= 3 \nA: Find the names of customers who have bought by at least three distinct products. \n Additional table information: table: department_store"} -{"text": "Q: SELECT Name FROM wrestler WHERE NOT Wrestler_ID IN (SELECT Wrestler_ID FROM elimination) \nA: List the names of wrestlers that have not been eliminated. \n Additional table information: table: wrestler"} -{"text": "Q: SELECT T1.Allergy, T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = 'Lisa' ORDER BY T1.Allergy NULLS FIRST \nA: What are the allergies the girl named Lisa has? And what are the types of them? Order the result by allergy names. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT name FROM procedures ORDER BY cost NULLS FIRST LIMIT 3 \nA: Find the three most expensive procedures. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT start_station_id, start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*) >= 200 \nA: Find the ids and names of stations from which at least 200 trips started. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT roomName FROM Rooms WHERE basePrice < 160 AND beds = 2 AND decor = 'modern' \nA: What are the names of modern rooms that have a base price lower than $160 and two beds. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT customer_details FROM customers UNION SELECT staff_details FROM staff \nA: What are the names of the customers and staff members? \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN Prescribes AS T3 ON T3.Patient = T2.SSN JOIN Medication AS T4 ON T3.Medication = T4.Code WHERE room = 111 \nA: Find the name of medication used on the patient who stays in room 111? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT id FROM trip WHERE duration >= (SELECT AVG(duration) FROM trip WHERE zip_code = 94103) \nA: What are the ids of all trips that had a duration as long as the average trip duration in the zip code 94103? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = 'Blackville' \nA: What city is the headquarter of the store Blackville? \n Additional table information: table: store_product"} -{"text": "Q: SELECT T2.first_name, T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id \nA: What are the first and last names of all the candidates? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = 'Solveig' GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which vocal type has the band mate with first name 'Solveig' played the most? \n Additional table information: table: music_2"} -{"text": "Q: SELECT T1.Name FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId GROUP BY T2.GenreId ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the most common genre in all tracks? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT friend FROM PersonFriend WHERE name = 'Zach' AND YEAR = (SELECT MAX(YEAR) FROM PersonFriend WHERE name = 'Zach') \nA: Which friend of Zach has the longest-lasting friendship? \n Additional table information: table: network_2"} -{"text": "Q: SELECT T1.Service_Type_Description, T1.Service_Type_Code FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T1.Service_Type_Code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the description and code of the type of service that is performed the most often? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 \nA: Please show the most common type of ships. \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT name, member_id FROM member WHERE Membership_card = 'Black' OR age < 30 \nA: Find the ids and names of members who are under age 30 or with black membership card. \n Additional table information: table: coffee_shop"} -{"text": "Q: SELECT T2.name, T2.location FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id HAVING COUNT(*) = 1 \nA: What are the names and locations of tracks that have had exactly 1 race? \n Additional table information: table: race_track"} -{"text": "Q: SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the last name of the musician that have produced the most songs? \n Additional table information: table: music_2"} -{"text": "Q: SELECT TIME FROM elimination WHERE Eliminated_By = 'Punk' OR Eliminated_By = 'Orton' \nA: Show the times of elimination by 'Punk' or 'Orton'. \n Additional table information: table: wrestler"} -{"text": "Q: SELECT AVG(ticket_price), MIN(ticket_price), MAX(ticket_price) FROM exhibition WHERE YEAR < 2009 \nA: What are the average, minimum, and maximum ticket prices for exhibitions that happened prior to 2009? \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT MAX(Milliseconds), MIN(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Pop' \nA: Find the maximum and minimum millisecond lengths of pop tracks. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT school_name FROM school ORDER BY enrollment NULLS FIRST LIMIT 1 \nA: List the name of the school with the smallest enrollment. \n Additional table information: table: school_finance"} -{"text": "Q: SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 \nA: Find the names of bank branches that have provided a loan to any customer whose credit score is below 100. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code = 'PIT' \nA: Find the distinct first names of all the students who have vice president votes and whose city code is not PIT. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = 'Daan' AND T4.last_name = 'Peeters' \nA: What are the tracks that Dean Peeters bought? \n Additional table information: table: store_1"} -{"text": "Q: SELECT DISTINCT firstname, lastname FROM teachers \nA: Report the first name and last name of all the teachers. \n Additional table information: table: student_1"} -{"text": "Q: SELECT circuitid, LOCATION FROM circuits WHERE country = 'France' OR country = 'Belgium' \nA: Find the id and location of circuits that belong to France or Belgium? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT g_name, rating FROM genre ORDER BY g_name NULLS FIRST \nA: What are the names of all genres in alphabetical order, combined with its ratings? \n Additional table information: table: music_1"} -{"text": "Q: SELECT shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_name = 'UPS' \nA: What is the shipping agent code of shipping agent UPS? \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT COUNT(*) FROM airlines WHERE country = 'Russia' \nA: How many airlines does Russia has? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2 \nA: Show the team that have at least two technicians. \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT state, acc_type, credit_score FROM customer WHERE no_of_loans = 0 \nA: Find the state, account type, and credit score of the customer whose number of loan is 0. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT document_type_description FROM Ref_Document_Types WHERE document_type_code = 'Paper' \nA: What is the description of document type 'Paper'? \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT AVG(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = 'AIB' \nA: What is the average number of points for players from the 'AIB' club? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT Date_of_ceremony, RESULT FROM music_festival \nA: Return the dates of ceremony and the results of all music festivals \n Additional table information: table: music_4"} -{"text": "Q: SELECT COUNT(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Blanche' AND T2.customer_last_name = 'Huels' AND T1.card_type_code = 'Credit' \nA: How many credit cards does customer Blanche Huels have? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code JOIN Projects AS T3 ON T2.project_id = T3.project_id WHERE T3.project_details = 'sint' \nA: What is the description for the results whose project detail is 'sint'? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT MIN(Order_Quantity), AVG(Order_Quantity), MAX(Order_Quantity) FROM INVOICES \nA: Show the minimum, average, maximum order quantity of all invoices. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT title FROM item ORDER BY title NULLS FIRST \nA: List the titles of all items in alphabetic order . \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT COUNT(DISTINCT StuID) FROM Sportsinfo \nA: How many different students are involved in sports? \n Additional table information: table: game_1"} -{"text": "Q: SELECT chip_model, screen_mode FROM phone WHERE Hardware_Model_name = 'LG-P760' \nA: What are the chip model and screen mode of the phone with hardware model name 'LG-P760'? \n Additional table information: table: phone_1"} -{"text": "Q: SELECT COUNT(DISTINCT director) FROM movie \nA: Count the number of different directors. \n Additional table information: table: culture_company"} -{"text": "Q: SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = 'keyboard' \nA: List the names of all the distinct customers who bought a keyboard. \n Additional table information: table: department_store"} -{"text": "Q: 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 \nA: What is the first name of all employees who do not give any lessons? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT order_id, COUNT(*) FROM Invoices GROUP BY order_id \nA: How many invoices correspond to each order id? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Ryley Goldner' \nA: Return the positions of players on the team Ryley Goldner. \n Additional table information: table: match_season"} -{"text": "Q: SELECT document_type_code, document_type_name, document_type_description FROM Ref_document_types \nA: What are the codes, names, and descriptions of the different document types? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT MAX(OMIM) FROM enzyme \nA: What is the maximum OMIM value in the database? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT t2.unit_of_measure, t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = 'chervil' \nA: Find the unit of measurement and product category code of product named 'chervil'. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T1.name, T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY AVG(T2.salary) ASC NULLS FIRST LIMIT 1 \nA: What are the name and id of the team offering the lowest average salary? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT T2.title, T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY T1.stars DESC LIMIT 3 \nA: What are the names and years released for the movies with the top 3 highest ratings? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1 \nA: Find the name of the patient who made the appointment with the most recent start date. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT AVG(Price), manufacturer FROM Products GROUP BY manufacturer \nA: Select the average price of each manufacturer's products, showing only the manufacturer's code. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT COUNT(*) FROM player \nA: How many players are there? \n Additional table information: table: riding_club"} -{"text": "Q: SELECT Room FROM FACULTY WHERE Rank = 'Professor' AND Building = 'NEB' \nA: What are the rooms for members of the faculty who are professors and who live in building NEB? \n Additional table information: table: college_3"} -{"text": "Q: SELECT T1.Char_cells, T1.Pixels, T1.Hardware_colours FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T2.Hardware_Model_name = 'LG-P760' \nA: Find the Char cells, Pixels and Hardware colours for the screen of the phone whose hardware model name is 'LG-P760'. \n Additional table information: table: phone_1"} -{"text": "Q: 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' \nA: Give me the names of customers who have placed orders between 2009-01-01 and 2010-01-01. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT T2.customer_first_name, T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 2 \nA: Show first name and id for all customers with at least 2 accounts. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT MAX(support_rate), MIN(consider_rate), MIN(oppose_rate) FROM candidate \nA: find the highest support percentage, lowest consider rate and oppose rate of all candidates. \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT DISTINCT (Famous_Release_date) FROM artist \nA: What are the distinct Famous release dates? \n Additional table information: table: music_4"} -{"text": "Q: SELECT AVG(Age) FROM STUDENT WHERE Sex = 'F' \nA: What is the average age of female (sex is F) students? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT MAX(authorder) FROM authorship) \nA: Retrieve the title of the paper that has the largest number of authors. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT COUNT(*) FROM department WHERE NOT department_id IN (SELECT department_id FROM management) \nA: How many departments are led by heads who are not mentioned? \n Additional table information: table: department_management"} -{"text": "Q: SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name \nA: Show the country names and the corresponding number of players. \n Additional table information: table: match_season"} -{"text": "Q: SELECT * FROM instructor ORDER BY salary NULLS FIRST \nA: List the information of all instructors ordered by their salary in ascending order. \n Additional table information: table: college_2"} -{"text": "Q: SELECT T1.name_first, T1.name_last, T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the manager's first name, last name and id who won the most manager award? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT school_name FROM school ORDER BY school_name NULLS FIRST \nA: Show all school names in alphabetical order. \n Additional table information: table: school_finance"} -{"text": "Q: SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id, customers AS t3 GROUP BY t3.customer_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: Return the names of products that have had complaints filed by the customer who has filed the fewest complaints. \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT card_type_code FROM Customers_cards GROUP BY card_type_code HAVING COUNT(*) >= 5 \nA: What are the codes of card types that have 5 or more cards? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT decor, COUNT(*) FROM Rooms WHERE bedType = 'King' GROUP BY decor \nA: How many rooms have king beds? Report the number for each decor type. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT MAX(Enrollment) FROM university \nA: Return the maximum enrollment across all schools. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT SUM(gamesplayed) FROM Sportsinfo WHERE sportname = 'Football' AND onscholarship = 'Y' \nA: What is the total number of all football games played by scholarship students? \n Additional table information: table: game_1"} -{"text": "Q: SELECT state FROM bank GROUP BY state ORDER BY SUM(no_of_customers) DESC LIMIT 1 \nA: Which state has the greatest total number of bank customers? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT name FROM stadium WHERE name LIKE '%Bank%' \nA: Which stadium name contains the substring 'Bank'? \n Additional table information: table: game_injury"} -{"text": "Q: SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T2.Committee = 'Appropriations' \nA: What are the names of the county that the delegates on 'Appropriations' committee belong to? \n Additional table information: table: election"} -{"text": "Q: SELECT T1.emp_fname FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History' EXCEPT SELECT T4.emp_fname FROM employee AS T4 JOIN CLASS AS T5 ON T4.emp_num = T5.prof_num \nA: What are the first names of all history professors who do not teach? \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = 'sesame' \nA: Count the number of characteristics the product 'sesame' has. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT t2.service_name FROM first_notification_of_loss AS t1 JOIN services AS t2 ON t1.service_id = t2.service_id GROUP BY t1.service_id HAVING COUNT(*) > 2 \nA: Which services have been used more than twice in first notification of loss? Return the service name. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT T2.firstname, T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'EVELINA' AND T1.lastname = 'BROMLEY' \nA: Which teachers teach the student named EVELINA BROMLEY? Give me the first and last name of the teachers. \n Additional table information: table: student_1"} -{"text": "Q: SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = 'red' AND t3.characteristic_name = 'slow' \nA: How many products have the color description 'red' and the characteristic name 'slow'? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie' \nA: Find the names of schools that have some players in the mid position but not in the goalie position. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT DISTINCT directed_by FROM film \nA: Who are all the directors? \n Additional table information: table: cinema"} -{"text": "Q: SELECT COUNT(course_id) FROM Student_Course_Enrolment \nA: Find the number of distinct courses that have enrolled students. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT T1.Date_Claim_Made, T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id HAVING COUNT(*) > 2 UNION SELECT T1.Date_Claim_Made, T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id WHERE T1.Amount_Claimed = (SELECT MAX(Amount_Claimed) FROM Claims) \nA: Which claims caused more than 2 settlements or have the maximum claim value? List the date the claim was made and the claim id. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = '660 Shea Crescent' OR T2.How_to_Get_There = 'walk' \nA: What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT Adults FROM Reservations WHERE CheckIn = '2010-10-23' AND FirstName = 'CONRAD' AND LastName = 'SELBIG' \nA: How many adults stay in the room CONRAD SELBIG checked in on Oct 23, 2010? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT Case_burden FROM county_public_safety ORDER BY Population DESC \nA: What are the case burdens of counties, ordered descending by population? \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY SUM(transaction_amount) DESC LIMIT 1 \nA: What is the transaction type that has processed the greatest total amount in transactions? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T2.city, COUNT(*), T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which city has the most addresses? List the city name, number of addresses, and city id. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT COUNT(DISTINCT gender) FROM dorm \nA: Find the number of distinct gender for dorms. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T1.stu_fname, T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'C' OR T2.enroll_grade = 'A' \nA: What are the names of all students taking a course who received an A or C? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 GROUP BY T2.bname ORDER BY SUM(T1.amount) DESC LIMIT 1 \nA: What is the name of the bank branch that has lended the largest total amount in loans, specifically to customers with credit scores below 100? \n Additional table information: table: loan_1"} -{"text": "Q: 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 \nA: What are the names of the states that have 2 to 4 employees living there? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT apt_type_code, bathroom_count, bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY SUM(room_count) DESC LIMIT 1 \nA: Show the apartment type code that has the largest number of total rooms, together with the number of bathrooms and number of bedrooms. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students \nA: What are the login names used both by some course authors and some students? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT COUNT(*), t1.name FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id GROUP BY t1.manufacturer_id \nA: Find the number of funiture types produced by each manufacturer as well as the company names. \n Additional table information: table: manufacturer"} -{"text": "Q: SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T2.dormid FROM dorm AS T3 JOIN has_amenity AS T4 ON T3.dormid = T4.dormid JOIN dorm_amenity AS T5 ON T4.amenid = T5.amenid GROUP BY T3.dormid ORDER BY COUNT(*) DESC LIMIT 1) \nA: What are the first names of all students who live in the dorm with the most amenities? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT title FROM Movie WHERE director = 'Steven Spielberg' \nA: What are the names of all movies directed by Steven Spielberg? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT COUNT(DISTINCT allergytype) FROM Allergy_type \nA: How many different allergy types exist? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT Date, Venue FROM workshop ORDER BY Venue NULLS FIRST \nA: Sort the each workshop in alphabetical order of the venue. Return the date and venue of each workshop. \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT cust_name FROM customer ORDER BY acc_bal NULLS FIRST \nA: What are the names of all customers, ordered by account balance? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT job_id FROM job_history WHERE end_date - start_date > 300 GROUP BY job_id HAVING COUNT(*) >= 2 \nA: display job ID for those jobs that were done by two or more for more than 300 days. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = 'Heilo' \nA: Find all the instruments ever used by the musician with last name 'Heilo'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT T1.emp_lname, T1.emp_hiredate FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num WHERE T2.prof_office = 'DRE 102' \nA: What is the last name of the professor whose office is located in DRE 102, and when were they hired? \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(*), semester, YEAR FROM SECTION GROUP BY semester, YEAR \nA: How many courses are provided in each semester and year? \n Additional table information: table: college_2"} -{"text": "Q: SELECT T2.Name FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID WHERE T3.Sales > 3000 \nA: Show the names of editors that are on the committee of journals with sales bigger than 3000. \n Additional table information: table: journal_committee"} -{"text": "Q: SELECT AVG(salary), MAX(salary) FROM Employee \nA: What is the average and largest salary of all employees? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT fname FROM student WHERE age > 20 \nA: Find the first name of students who is older than 20. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1 \nA: What is the name of the patient who made the most recent appointment? \n Additional table information: table: hospital_1"} -{"text": "Q: 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' \nA: Find the ids of the students who participate in Canoeing and Kayaking. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT member_name FROM member WHERE party_id = 3 INTERSECT SELECT member_name FROM member WHERE party_id = 1 \nA: Which member names are shared among members in the party with the id 3 and the party with the id 1? \n Additional table information: table: party_people"} -{"text": "Q: SELECT Grape, Appelation, Name FROM WINE WHERE Score > 93 ORDER BY Name NULLS FIRST \nA: What are the grapes, appelations, and wines with scores above 93, sorted by Name? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT DISTINCT start_station_name FROM trip WHERE duration < 100 \nA: What are all the different start station names for a trip that lasted less than 100? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t2.acc_percent NULLS FIRST LIMIT 1 \nA: What is the primary conference of the school that has the lowest acc percent score in the competition? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the last name of the musician who was in the most songs? \n Additional table information: table: music_2"} -{"text": "Q: SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING MIN(bikes_available) < 7 \nA: What are the ids of stations that have latitude above 37.4 and never had bike availability below 7? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T1.transaction_type_description FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code GROUP BY T1.transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the description of the transaction type that occurs most frequently. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT card_type_code, COUNT(*) FROM Customers_cards GROUP BY card_type_code \nA: Show all card type codes and the number of cards in each type. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT t2.team_name, t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t1.founded NULLS FIRST LIMIT 1 \nA: Return the name of the team and the acc during the regular season for the school that was founded the earliest. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC NULLS FIRST \nA: What are the themes of parties ordered by the number of hosts in ascending manner? \n Additional table information: table: party_host"} -{"text": "Q: SELECT DISTINCT salary FROM instructor WHERE salary < (SELECT MAX(salary) FROM instructor) \nA: What are the distinct salaries of all instructors who earned less than the maximum salary? \n Additional table information: table: college_2"} -{"text": "Q: SELECT address FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards' \nA: What is Nancy Edwards's address? \n Additional table information: table: store_1"} -{"text": "Q: SELECT customer_details FROM customers WHERE customer_details LIKE '%Diana%' \nA: Find the names of customers whose name contains 'Diana'. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT role_name, role_description FROM ROLES WHERE role_code = 'MG' \nA: Find the name and description of the role with code 'MG'. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = 'Fail' \nA: What are the cell phone numbers of the candidates that received an assessment code of 'Fail'? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT title FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq) \nA: What are the names of courses without prerequisites? \n Additional table information: table: college_2"} -{"text": "Q: SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the type of the organization with the most research staff? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80 \nA: Which colleges have both authors with submission score above 90 and authors with submission score below 80? \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT LName FROM STUDENT WHERE Major = 50 \nA: Find the last names of students with major 50. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT COUNT(*) FROM Student WHERE age > 18 AND NOT StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food' OR T2.allergytype = 'animal') \nA: Find the number of students who are older than 18 and do not have allergy to either food or animal. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating = 10 \nA: Find the names of goods that receive a rating of 10. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT name, price FROM Products ORDER BY price ASC NULLS FIRST LIMIT 1 \nA: What is the name and price of the cheapest product? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT payment_method_code, COUNT(*) FROM Customer_Payments GROUP BY payment_method_code \nA: For each payment method, how many payments were made? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT COUNT(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Art' AND T2.customer_last_name = 'Turcotte' \nA: How many cards does customer Art Turcotte have? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT AVG(Attendance) FROM performance \nA: What is the average number of attendees for performances? \n Additional table information: table: performance_attendance"} -{"text": "Q: SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = 'Balls to the Wall' \nA: What is title of album which track Balls to the Wall belongs to? \n Additional table information: table: store_1"} -{"text": "Q: SELECT school, nickname FROM university ORDER BY founded NULLS FIRST \nA: List all schools and their nicknames in the order of founded year. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING COUNT(T1.track_id) > 100 \nA: List the name of playlist which has number of tracks greater than 100. \n Additional table information: table: store_1"} -{"text": "Q: SELECT campus FROM campuses WHERE LOCATION = 'Northridge' AND county = 'Los Angeles' UNION SELECT campus FROM campuses WHERE LOCATION = 'San Francisco' AND county = 'San Francisco' \nA: What campuses are located in Northridge, Los Angeles or in San Francisco, San Francisco? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 3 INTERSECT SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 4 \nA: What are the names of all reviewers that have given 3 or 4 stars for reviews? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT first_name, last_name, gender_mf FROM customers WHERE good_or_bad_customer = 'good' ORDER BY last_name NULLS FIRST \nA: What are the first name, last name, and gender of all the good customers? Order by their last name. \n Additional table information: table: products_for_hire"} -{"text": "Q: SELECT T2.name, T2.country FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the name and country corresponding to the artist who has had the most exhibitions. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID \nA: What are the names of gymnasts? \n Additional table information: table: gymnast"} -{"text": "Q: SELECT AVG(access_count) FROM documents \nA: What is the average access count of documents? \n Additional table information: table: document_management"} -{"text": "Q: SELECT AVG(t1.access_count) FROM documents AS t1 JOIN document_functional_areas AS t2 ON t1.document_code = t2.document_code JOIN functional_areas AS t3 ON t2.functional_area_code = t3.functional_area_code WHERE t3.functional_area_description = 'Acknowledgement' \nA: What are the average access counts of documents that have the functional area description 'Acknowledgement'? \n Additional table information: table: document_management"} -{"text": "Q: SELECT name, lat, city FROM station ORDER BY lat NULLS FIRST LIMIT 1 \nA: What is the name, latitude, and city of the station that is located the furthest South? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T1.Royal_Family_Details, T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID = T2.Tourist_Attraction_ID \nA: What are the details and ways to get to tourist attractions related to royal family? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT department_id, AVG(salary) FROM employees WHERE commission_pct <> 'null' GROUP BY department_id \nA: What is the average salary of employees who have a commission percentage that is not null? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T1.name FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING COUNT(*) > 1 \nA: Find the names of users who have more than one tweet. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = 'USA' GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1 \nA: List the state in the US with the most invoices. \n Additional table information: table: store_1"} -{"text": "Q: SELECT T2.team_id, T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id ORDER BY AVG(T1.attendance) DESC LIMIT 1 \nA: Find the id and rank of the team that has the highest average attendance rate in 2014. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT name FROM scientists ORDER BY name NULLS FIRST \nA: List the names of all scientists sorted in alphabetical order. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY SUM(t3.order_quantity) DESC LIMIT 1 \nA: Give me the name of the customer who ordered the most items in total. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT test_result, COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC \nA: List each test result and its count in descending order of count. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2 ORDER BY College DESC \nA: What are the names of colleges that have two or more players, listed in descending alphabetical order? \n Additional table information: table: match_season"} -{"text": "Q: SELECT t1.manufacturer_id, t1.num_of_shops FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id ORDER BY t2.Price_in_Dollar DESC LIMIT 1 \nA: Find the id and number of shops for the company that produces the most expensive furniture. \n Additional table information: table: manufacturer"} -{"text": "Q: SELECT SUM(balance) FROM checking \nA: What is the total checking balance in all accounts? \n Additional table information: table: small_bank_1"} -{"text": "Q: 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%' \nA: What are the the lesson ids of all staff taught by Janessa Sawayn whose nickname has the letter s? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT International_Passengers, Domestic_Passengers FROM airport WHERE Airport_Name = 'London Heathrow' \nA: What are the number of international and domestic passengers of the airport named London 'Heathrow'? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT COUNT(*) FROM employee \nA: Find the total number of employees. \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines' \nA: What is the number of different different airports that are destinations for American Airlines? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE '%Functional%' \nA: Who has written a paper that has the word 'Functional' in its title? Return the first names of the authors. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1 \nA: Return the apartment number with the largest number of bedrooms. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT name FROM ship ORDER BY built_year NULLS FIRST, CLASS NULLS FIRST \nA: What are the names of ships, ordered by year they were built and their class? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT policy_type_code, COUNT(*) FROM policies GROUP BY policy_type_code \nA: For each policy type, return its type code and its count in the record. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT * FROM departments WHERE department_name = 'Marketing' \nA: Display all the information about the department Marketing. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT Country_name, Capital FROM country \nA: Show the country name and capital of all countries. \n Additional table information: table: match_season"} -{"text": "Q: SELECT T3.name, T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id ORDER BY T1.register_year NULLS FIRST \nA: What are the names of the members and branches at which they are registered sorted by year of registration? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT dept_name FROM student GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the deparment with the highest enrollment? \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(DISTINCT sportname) FROM Sportsinfo \nA: How many sports do we have? \n Additional table information: table: game_1"} -{"text": "Q: SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Louisville , Kentucky' INTERSECT SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Hiram , Georgia' \nA: Find the name of branches where have some members whose hometown is in Louisville, Kentucky and some in Hiram, Georgia. \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT DISTINCT President_Vote, VICE_President_Vote FROM VOTING_RECORD \nA: List all the distinct president votes and the vice president votes. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T2.balance, T3.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance DESC \nA: What are the names, checking balances, and savings balances of customers, ordered by the total of checking and savings balances descending? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major = 600 \nA: Which student's age is older than 18 and is majoring in 600? List each student's first and last name. \n Additional table information: table: restaurant_1"} -{"text": "Q: 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 \nA: What is the name of organization that has the greatest number of contact individuals? \n Additional table information: table: e_government"} -{"text": "Q: SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'MARROTTE' AND T2.lastname = 'KIRK' \nA: Find all students taught by MARROTTE KIRK. Output first and last names of students. \n Additional table information: table: student_1"} -{"text": "Q: SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = 'Karson' \nA: List the dates of enrollment and completion of the student with personal name 'Karson'. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT T1.Title FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID ORDER BY T2.Price DESC \nA: Show the titles of books in descending order of publication price. \n Additional table information: table: book_2"} -{"text": "Q: SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC NULLS FIRST \nA: List the total number of horses on farms in ascending order. \n Additional table information: table: farm"} -{"text": "Q: SELECT title FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid GROUP BY T1.songid ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the song with the most vocals? \n Additional table information: table: music_2"} -{"text": "Q: SELECT LOCATION, SUM(number_of_platforms), SUM(total_passengers) FROM station GROUP BY LOCATION \nA: Show all locations and the total number of platforms and passengers for all train stations in each location. \n Additional table information: table: train_station"} -{"text": "Q: SELECT T1.id, T1.Name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 2 \nA: What are the ids and names of the web accelerators that are compatible with two or more browsers? \n Additional table information: table: browser_web"} -{"text": "Q: SELECT card_type_code, COUNT(*) FROM Customers_cards GROUP BY card_type_code \nA: What are the different card types, and how many cards are there of each? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T1.customer_name FROM customers AS T1, orders AS T2, 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 \nA: What are the names of the customers who bought product 'food' at least once? \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = 'Dayana Robel' \nA: What are all the policy types of the customer named 'Dayana Robel'? \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT MAX(T1.RAM_MiB), MIN(T1.RAM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = 'Nokia Corporation' \nA: What is maximum and minimum RAM size of phone produced by company named 'Nokia Corporation'? \n Additional table information: table: phone_1"} -{"text": "Q: SELECT fname FROM authors WHERE lname = 'Ueno' \nA: What is the first name of the author with last name 'Ueno'? \n Additional table information: table: icfp_1"} -{"text": "Q: 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' \nA: What is average lesson price taught by staff with first name as Janessa and last name as Sawayn? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T2.title, T1.rID, T1.stars, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.rID \nA: For each reviewer id, what is the title and rating for the movie with the smallest rating? \n Additional table information: table: movie_1"} -{"text": "Q: 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' \nA: What are the names of the stations which serve both 'Ananthapuri Express' and 'Guruvayur Express' trains? \n Additional table information: table: train_station"} -{"text": "Q: SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y' \nA: Show last names for all student who are on scholarship. \n Additional table information: table: game_1"} -{"text": "Q: SELECT CLASS FROM captain GROUP BY CLASS HAVING COUNT(*) > 2 \nA: Give the classes that have more than two captains. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT name, manufacturer_id FROM manufacturer ORDER BY open_year NULLS FIRST \nA: List all manufacturer names and ids ordered by their opening year. \n Additional table information: table: manufacturer"} -{"text": "Q: SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: What are the ids of the students who registered for some courses but had the least number of courses for all students? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT COUNT(*) FROM storm WHERE Number_Deaths > 0 \nA: Count the number of storms in which at least 1 person died. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT name FROM driver ORDER BY age DESC \nA: Show the name of drivers in descending order of age. \n Additional table information: table: school_bus"} -{"text": "Q: SELECT first_name FROM people ORDER BY first_name NULLS FIRST \nA: What are the first names of the people in alphabetical order? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id GROUP BY T2.member_in_charge_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the name of the member who is in charge of the most events. \n Additional table information: table: party_people"} -{"text": "Q: SELECT name FROM instructor WHERE dept_name = 'Statistics' ORDER BY salary NULLS FIRST LIMIT 1 \nA: Give the name of the lowest earning instructor in the Statistics department. \n Additional table information: table: college_2"} -{"text": "Q: SELECT MAX(OMIM) FROM enzyme \nA: What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT AVG(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University' \nA: What is the average height of the players from the college named 'Yale University'? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT RoomId, roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3 \nA: Find the name and id of the top 3 expensive rooms. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT T3.title, T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building = T2.building AND T1.room_number = T2.room_number JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.capacity = (SELECT MAX(capacity) FROM classroom) \nA: Give the title and credits for the course that is taught in the classroom with the greatest capacity. \n Additional table information: table: college_2"} -{"text": "Q: SELECT LOCATION FROM school ORDER BY Founded DESC \nA: List the locations of schools in descending order of founded year. \n Additional table information: table: school_player"} -{"text": "Q: SELECT Name FROM city ORDER BY Name ASC NULLS FIRST \nA: Return the names of cities, ordered alphabetically. \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT COUNT(*), project_id FROM Documents WHERE document_type_code = 'BK' GROUP BY project_id \nA: How many documents are with document type code BK for each product id? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 3 \nA: Show the id and details for the investors who have the top 3 number of transactions. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT AVG(price_range) FROM HOTELS WHERE star_rating_code = '5' AND pets_allowed_yn = 1 \nA: Show the average price range of hotels that have 5 star ratings and allow pets. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT birth_country FROM player GROUP BY birth_country ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 3 \nA: List three countries which are the origins of the least players. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT T1.name, T1.age, T1.job FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice' AND T2.year = (SELECT MAX(YEAR) FROM PersonFriend WHERE friend = 'Alice') \nA: What are the names, ages, and jobs of all people who are friends with Alice for the longest amount of time? \n Additional table information: table: network_2"} -{"text": "Q: SELECT first_name, last_name FROM Customers \nA: List the first name and last name of all customers. \n Additional table information: table: driving_school"} -{"text": "Q: SELECT AVG(weight), MIN(weight), sex FROM people GROUP BY sex \nA: What are the average and minimum weights for people of each sex? \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT DISTINCT Reign FROM wrestler WHERE LOCATION <> 'Tokyo , Japan' \nA: What are the distinct reigns of wrestlers whose location is not 'Tokyo,Japan' ? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT SUM(Enrollment), affiliation FROM university WHERE founded > 1850 GROUP BY affiliation \nA: What are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT COUNT(*) FROM scientists WHERE NOT ssn IN (SELECT scientist FROM AssignedTo) \nA: Find the number of scientists who are not assigned to any project. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = '254 Ottilie Junction' OR T2.How_to_Get_There = 'bus' \nA: Find the names of the tourist attractions that is either accessible by bus or at address 254 Ottilie Junction. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT pets_allowed_yn, AVG(price_range) FROM HOTELS GROUP BY pets_allowed_yn \nA: What are the average prices of hotels grouped by their pet policy. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT COUNT(*) FROM technician \nA: How many technicians are there? \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1) \nA: What are the names of customers using the most popular payment method? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT DISTINCT gtype FROM Video_games \nA: What are the different types of video games? \n Additional table information: table: game_1"} -{"text": "Q: SELECT t1.customer_name, t2.active_from_date FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t2.channel_code = 'Email' \nA: What are the name and active date of the customers whose contact channel code is email? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the language that was used most often in songs with resolution above 500? \n Additional table information: table: music_1"} -{"text": "Q: SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name HAVING AVG(T1.price) >= 150 \nA: Select the names of manufacturer whose products have an average price higher than or equal to $150. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT T2.address, T1.email FROM customer AS T1 JOIN address AS T2 ON T2.address_id = T1.address_id WHERE T1.first_name = 'LINDA' \nA: Return the address and email of the customer with the first name Linda. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T1.student_id, T2.first_name FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY AVG(monthly_rental) DESC LIMIT 1 \nA: What are the id and first name of the student whose addresses have the highest average monthly rental? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT COUNT(*), T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name \nA: For each airport name, how many routes start at that airport? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT minister, took_office, left_office FROM party ORDER BY left_office NULLS FIRST \nA: Show the ministers and the time they took and left office, listed by the time they left office. \n Additional table information: table: party_people"} -{"text": "Q: SELECT meter_200, meter_300 FROM swimmer WHERE nationality = 'Australia' \nA: Find all 200 meter and 300 meter results of swimmers with nationality 'Australia'. \n Additional table information: table: swimming"} -{"text": "Q: SELECT Store_Name FROM Drama_Workshop_Groups \nA: What are the store names of drama workshop groups? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT COUNT(DISTINCT Publication_Date) FROM publication \nA: How many distinct publication dates are there in our record? \n Additional table information: table: book_2"} -{"text": "Q: SELECT name, trade_name FROM medicine WHERE FDA_approved = 'Yes' \nA: What are the names and trade names of the medcines that are FDA approved? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: What are the emails of customers who have filed complaints on the product which has had the greatest number of complaints? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT T1.id, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 3 \nA: What is the id and trade name of the medicines can interact with at least 3 enzymes? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008 \nA: Which locations contains both shops that opened after the year 2012 and shops that opened before 2008? \n Additional table information: table: device"} -{"text": "Q: SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'Colorado' \nA: What are the names of customers who live in Colorado state? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT student_id FROM students WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance) \nA: List the id of students who never attends courses? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT city FROM branch WHERE open_year = 2001 AND membership_amount > 100 \nA: Show all city with a branch opened in 2001 and a branch with more than 100 membership. \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT T1.name, COUNT(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid \nA: How many patients do each physician take care of? List their names and number of patients they take care of. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT date FROM weather WHERE zip_code = 94107 AND EVENTS <> 'Fog' AND EVENTS <> 'Rain' \nA: On which day has it neither been foggy nor rained in the zip code of 94107? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T1.name, T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID \nA: What are the names and players of all the clubs? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT T2.first_name, T2.last_name, T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which film actor (actress) starred the most films? List his or her first name, last name and actor id. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT MIN(market_value), MAX(market_value), AVG(market_value) FROM company \nA: What is the minimum, maximum, and average market value for every company? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3 \nA: What are the names of the three artists who have produced the most songs, and how many works did they produce? \n Additional table information: table: music_1"} -{"text": "Q: SELECT Builder FROM railway GROUP BY Builder ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the most common builder of railways. \n Additional table information: table: railway"} -{"text": "Q: SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id JOIN products AS T3 ON T2.product_id = T3.product_id GROUP BY T3.product_id HAVING COUNT(DISTINCT T1.customer_id) >= 2 \nA: Find the names of products that were bought by at least two distinct customers. \n Additional table information: table: department_store"} -{"text": "Q: SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID HAVING COUNT(*) >= 3 \nA: Show names of musicals which have at least three actors. \n Additional table information: table: musical"} -{"text": "Q: SELECT T3.manager_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.company = 'ExxonMobil' \nA: What are the names of the managers for gas stations that are operated by the ExxonMobil company? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT COUNT(*) FROM budget WHERE budgeted > 3000 AND YEAR <= 2001 \nA: Count the number of budgets in year 2001 or before whose budgeted amount is greater than 3000 \n Additional table information: table: school_finance"} -{"text": "Q: SELECT T1.Title, T2.AlbumID, COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId GROUP BY T2.AlbumID \nA: Show the album names, ids and the number of tracks for each album. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = 'Clara') \nA: What are the full names and hire dates for employees in the same department as someone with the first name Clara? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T1.skill_id, T1.skill_description FROM Skills AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.skill_id = T2.skill_id GROUP BY T1.skill_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which skill is used in fixing the most number of faults? List the skill id and description. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1 \nA: What is the last date of the staff leaving the projects? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT COUNT(*) FROM papers \nA: How many papers are published in total? \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the id of the account with the most transactions? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT COUNT(*) FROM ref_colors \nA: Count the number of colors. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.' \nA: What is the total number of professors with a Ph.D. ? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T2.emp_fname, T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Accounting' \nA: What are the first names of all Accounting professors who teach and what are the classrooms of the courses they teach? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T2.title, T1.rID, T1.stars, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.rID \nA: Find the title and star rating of the movie that got the least rating star for each reviewer. \n Additional table information: table: movie_1"} -{"text": "Q: SELECT COUNT(*) FROM team_franchise WHERE active = 'Y' \nA: Find the number of team franchises that are active (have 'Y' as 'active' information). \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name ORDER BY COUNT(*) DESC LIMIT 3 \nA: Find the top 3 products which have the largest number of problems? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT T1.first_name, T1.last_name, T2.department_name, T3.city, T3.state_province FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id \nA: display the first and last name, department, city, and state province for each employee. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT Low_Estimate, High_Estimate FROM film_market_estimation \nA: Return the low and high estimates for all film markets. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the position that is most common among players in match seasons? \n Additional table information: table: match_season"} -{"text": "Q: SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = 'Heilo' AND T3.title = 'Le Pop' \nA: What instrument did the musician with last name 'Heilo' use in the song 'Le Pop'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT DISTINCT T1.Major FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote \nA: Find the distinct majors of students who have treasurer votes. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT COUNT(*) FROM farm \nA: How many farms are there? \n Additional table information: table: farm"} -{"text": "Q: SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the countries with the most airlines whose active status is Y? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT name, phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn GROUP BY T1.patient HAVING COUNT(*) > 1 \nA: what are name and phone number of patients who had more than one appointment? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) > 1 \nA: In which locations are there more than one movie theater with capacity above 300? \n Additional table information: table: cinema"} -{"text": "Q: SELECT T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID WHERE T1.White > 90 \nA: What are the crime rates of counties that contain cities that have white percentages of over 90? \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY SUM(transaction_amount) DESC LIMIT 1 \nA: Return the type of transaction with the highest total amount. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT COUNT(DISTINCT party_name) FROM party \nA: Count the number of different parties. \n Additional table information: table: party_people"} -{"text": "Q: SELECT COUNT(*), dept_code FROM professor WHERE prof_high_degree = 'Ph.D.' GROUP BY dept_code \nA: Find the number of professors with a Ph.D. degree in each department. \n Additional table information: table: college_1"} -{"text": "Q: SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance NULLS FIRST LIMIT 1 \nA: Find the name of account that has the lowest total checking and saving balance. \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT COUNT(*), T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name \nA: What are the names of customers with accounts, and how many checking accounts do each of them have? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT LOCATION FROM railway GROUP BY LOCATION HAVING COUNT(*) > 1 \nA: Show the locations that have more than one railways. \n Additional table information: table: railway"} -{"text": "Q: SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id GROUP BY t2.ship_id HAVING COUNT(*) > 1 \nA: Find the name of the ships that have more than one captain. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT T1.City_Town FROM Addresses AS T1 JOIN Customers AS T2 ON T1.Address_ID = T2.Address_ID EXCEPT SELECT T1.City_Town FROM Addresses AS T1 JOIN Performers AS T2 ON T1.Address_ID = T2.Address_ID \nA: Show all cities where at least one customer lives in but no performer lives in. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id = t2.campus WHERE t2.year = 1956 AND totalenrollment_ay > 400 AND FTE_AY > 200 \nA: What campus had more than 400 total enrollment but more than 200 full time enrollment in year 1956? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT T1.Code, T1.Fate, T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID \nA: Show codes and fates of missions, and names of ships involved. \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT f_id FROM files WHERE formats = 'mp3' \nA: What are the id of all the files in mp3 format? \n Additional table information: table: music_1"} -{"text": "Q: SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Which allergy type has least number of allergies? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT AVG(lat), AVG(long) FROM station WHERE city = 'San Jose' \nA: What is the average latitude and longitude of stations located in San Jose city? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT COUNT(DISTINCT FacID) FROM Faculty_participates_in \nA: How many faculty members participate in an activity? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT COUNT(*) FROM Companies \nA: Count the number of companies. \n Additional table information: table: company_office"} -{"text": "Q: SELECT campus FROM campuses WHERE LOCATION = 'Chico' \nA: What are the names of all campuses located at Chico? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100 \nA: Find the distinct winery of wines having price between 50 and 100. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT role_code, role_name, role_description FROM ROLES \nA: List all role codes, role names, and role descriptions. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid GROUP BY T1.aid ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the names of the aircraft that the least people are certified to fly? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY overall_rating DESC LIMIT 3 \nA: Who are the top 3 players in terms of overall rating? \n Additional table information: table: soccer_1"} -{"text": "Q: SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester = 'Fall' AND YEAR = 2003) \nA: Find the names of students who have taken any course in the fall semester of year 2003. \n Additional table information: table: college_2"} -{"text": "Q: SELECT AVG(t1.access_count) FROM documents AS t1 JOIN document_functional_areas AS t2 ON t1.document_code = t2.document_code JOIN functional_areas AS t3 ON t2.functional_area_code = t3.functional_area_code WHERE t3.functional_area_description = 'Acknowledgement' \nA: Find the average access counts of documents with functional area 'Acknowledgement'. \n Additional table information: table: document_management"} -{"text": "Q: SELECT Name FROM ship ORDER BY Tonnage ASC NULLS FIRST \nA: what are the names of the ships ordered by ascending tonnage? \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT T1.first_name, T1.job_id FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T2.department_name = 'Finance' \nA: What is the first name and job id for all employees in the Finance department? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT COUNT(DISTINCT city) FROM airports WHERE country = 'Greenland' \nA: How many different cities do have some airport in the country of Greenland? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2 \nA: List the nations that have more than two ships. \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the city with the most number of flagship stores? \n Additional table information: table: store_product"} -{"text": "Q: SELECT T2.emp_fname, T4.prof_office, T3.crs_description, T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num JOIN department AS T5 ON T4.dept_code = T5.dept_code \nA: Find the first names and offices of all instructors who have taught some course and the course description and the department name. \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(*) FROM region AS t1 JOIN party AS t2 ON t1.region_id = t2.region_id JOIN party_events AS t3 ON t2.party_id = t3.party_id WHERE t1.region_name = 'United Kingdom' AND t3.Event_Name = 'Annaual Meeting' \nA: Count the number of Annual Meeting events that took place in the region of the United Kingdom. \n Additional table information: table: party_people"} -{"text": "Q: SELECT date_of_transaction FROM TRANSACTIONS WHERE transaction_type_code = 'SALE' \nA: Show all dates of transactions whose type code is 'SALE'. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT T1.claim_id, T1.date_claim_made, COUNT(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which claim incurred the most number of settlements? List the claim id, the date the claim was made, and the number. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT Investor_details FROM INVESTORS \nA: Show all investor details. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT f_id FROM files WHERE formats = 'mp3' \nA: What are the id of songs whose format is mp3. \n Additional table information: table: music_1"} -{"text": "Q: SELECT COUNT(*) FROM perpetrator \nA: How many perpetrators are there? \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT MONTH FROM happy_hour GROUP BY MONTH HAVING COUNT(*) > 2 \nA: Which months have more than 2 happy hours? \n Additional table information: table: coffee_shop"} -{"text": "Q: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING SUM(access_count) > 10000 \nA: Return the codes of the document types that do not have a total access count of over 10000. \n Additional table information: table: document_management"} -{"text": "Q: SELECT AVG(Horizontal_Bar_Points) FROM gymnast \nA: Return the average horizontal bar points across all gymnasts. \n Additional table information: table: gymnast"} -{"text": "Q: SELECT T2.Hardware_Model_name, T2.Company_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T1.Launch_year = 2002 OR T1.RAM_MiB > 32 \nA: List the hardware model name and company name for all the phones that were launched in year 2002 or have RAM size greater than 32. \n Additional table information: table: phone_1"} -{"text": "Q: SELECT COUNT(*) FROM game WHERE NOT id IN (SELECT game_id FROM injury_accident) \nA: How many games are free of injury accidents? \n Additional table information: table: game_injury"} -{"text": "Q: SELECT T1.project_id, COUNT(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY COUNT(*) ASC NULLS FIRST \nA: How many staff does each project has? List the project id and the number in an ascending order. \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'Spanish' \nA: Find the the date of enrollment of the 'Spanish' course. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT t2.state_province_county, COUNT(*) FROM customer_addresses AS t1 JOIN addresses AS t2 ON t1.address_id = t2.address_id GROUP BY t2.state_province_county \nA: List the state names and the number of customers living in each state. \n Additional table information: table: customer_deliveries"} -{"text": "Q: SELECT T2.date_moved_in, T1.customer_id, T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id \nA: What is each customer's move in date, and the corresponding customer id and details? \n Additional table information: table: local_govt_and_lot"} -{"text": "Q: SELECT name FROM member WHERE address = 'Harford' OR address = 'Waterbury' \nA: Give me the names of members whose address is in Harford or Waterbury. \n Additional table information: table: coffee_shop"} -{"text": "Q: SELECT invoice_number, COUNT(*) FROM Financial_transactions GROUP BY invoice_number \nA: Show the invoice number and the number of transactions for each invoice. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT name FROM user_profiles WHERE email LIKE '%superstar%' OR email LIKE '%edu%' \nA: Find the names of users whose emails contain \u2018superstar\u2019 or \u2018edu\u2019. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.distance > 5000 GROUP BY T1.eid ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the salaray and name of the employee with the most certificates to fly planes more than 5000? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT player FROM match_season ORDER BY College ASC NULLS FIRST \nA: Return all players sorted by college in ascending alphabetical order. \n Additional table information: table: match_season"} -{"text": "Q: SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = 'Forward' INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = 'Defender' \nA: Return the names of countries that have players that play the Forward position, as well as players who play the Defender position. \n Additional table information: table: match_season"} -{"text": "Q: SELECT first_name, last_name FROM employees ORDER BY hire_date ASC NULLS FIRST LIMIT 10 \nA: What are the first and last names of the top 10 longest-serving employees? \n Additional table information: table: store_1"} -{"text": "Q: SELECT document_id, document_name FROM Documents \nA: Show the ids and names of all documents. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT invoice_number, COUNT(*) FROM Financial_transactions GROUP BY invoice_number \nA: How many transactions correspond to each invoice number? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT COUNT(*), T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name \nA: Find the number of routes for each source airport and the airport name. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT COUNT(*) FROM company \nA: How many gas companies are there? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT fname, major FROM Student WHERE NOT StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Soy') \nA: Find the first name and major of the students who are not allegry to soy. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT Price FROM WINE WHERE YEAR < 2010 \nA: Return the prices of wines produced before 2010. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT fname, lname FROM student WHERE city_code <> 'HKG' ORDER BY age NULLS FIRST \nA: List the first and last name of students who are not living in the city with code HKG, and sorted the results by their ages. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT trade_name, COUNT(*) FROM medicine GROUP BY trade_name \nA: find the number of medicines offered by each trade. \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT order_id, customer_id FROM orders ORDER BY date_order_placed NULLS FIRST LIMIT 1 \nA: Find the order id and customer id associated with the oldest order. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = 'advanced database' \nA: Find the login name of the course author that teaches the course with name 'advanced database'. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING COUNT(T1.id) > 10 \nA: List title of albums have the number of tracks greater than 10. \n Additional table information: table: store_1"} -{"text": "Q: SELECT Support_rate, Consider_rate, Oppose_rate FROM candidate ORDER BY unsure_rate NULLS FIRST \nA: What are the support, consider, and oppose rates of each candidate, ordered ascending by their unsure rate? \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT investor_id, COUNT(*) FROM TRANSACTIONS GROUP BY investor_id \nA: Show the number of transactions for different investors. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT premises_type, premise_details FROM premises ORDER BY premises_type NULLS FIRST \nA: Find the types and details for all premises and order by the premise type. \n Additional table information: table: customers_campaigns_ecommerce"} -{"text": "Q: SELECT DISTINCT POSITION FROM match_season \nA: What are the different positions for match season? \n Additional table information: table: match_season"} -{"text": "Q: SELECT country FROM customers WHERE first_name = 'Roberto' AND last_name = 'Almeida' \nA: What country does Roberto Almeida live? \n Additional table information: table: store_1"} -{"text": "Q: SELECT COUNT(*) FROM party \nA: Count the number of parties. \n Additional table information: table: party_host"} -{"text": "Q: SELECT COUNT(*) FROM train \nA: Show the number of trains \n Additional table information: table: train_station"} -{"text": "Q: SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id \nA: Find the name of bank branches that provided some loans. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MEMBER_OF AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: What is the name of the department with the fewest members? \n Additional table information: table: college_3"} -{"text": "Q: SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code = 'PIT' \nA: What are the distinct first names of the students who have vice president votes and reside in a city whose city code is not PIT? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT AVG(lat), AVG(long) FROM station WHERE city = 'San Jose' \nA: What is the average latitude and longitude in San Jose? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT COUNT(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night' \nA: find the number of different programs that are broadcast during night time. \n Additional table information: table: program_share"} -{"text": "Q: SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'statistics' ORDER BY T2.registration_date NULLS FIRST \nA: What are the ids of the students who registered course statistics by order of registration date? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.firstname = 'Solveig' AND T2.title = 'A Bar In Amsterdam' \nA: Which vocal type did the musician with first name 'Solveig' played in the song with title 'A Bar in Amsterdam'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT T2.organisation_id, T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING SUM(T1.grant_amount) > 6000 \nA: What are the ids and details for all organizations that have grants of more than 6000 dollars? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT Participant_ID, Participant_Type_Code, Participant_Details FROM Participants \nA: What are all the the participant ids, type code and details? \n Additional table information: table: local_govt_in_alabama"} -{"text": "Q: SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id GROUP BY t2.swimmer_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the name of the swimmer who has the most records. \n Additional table information: table: swimming"} -{"text": "Q: SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the city_code of the city that the most students live in? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT Winery FROM WINE GROUP BY Winery HAVING COUNT(*) >= 4 \nA: Which wineries produce at least four wines? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT Name, Nationality FROM HOST ORDER BY Age DESC LIMIT 1 \nA: Show the name and the nationality of the oldest host. \n Additional table information: table: party_host"} -{"text": "Q: SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1 \nA: What is the name of the county with the greatest population? \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT Police_force FROM county_public_safety WHERE LOCATION = 'East' INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = 'West' \nA: Show the police force shared by counties with location on the east and west. \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT name FROM artist WHERE NOT artist_id IN (SELECT artist_id FROM exhibition) \nA: What are the names of artists that have not had any exhibitions? \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = 'Solveig' GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the types of vocals that the band member with the first name 'Solveig' played the most? \n Additional table information: table: music_2"} -{"text": "Q: SELECT SUM(T2.balance), T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name \nA: What are the names of customers with accounts, and what are the total savings balances for each? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT SUM(Points) FROM player \nA: What is the total number of points for all players? \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT * FROM College ORDER BY enr NULLS FIRST \nA: List all information about college sorted by enrollment number in the ascending order. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC \nA: What are the names of actors ordered descending by the year in which their musical was awarded? \n Additional table information: table: musical"} -{"text": "Q: SELECT name FROM buildings WHERE NOT id IN (SELECT building_id FROM Office_locations) \nA: List the names of buildings that have no company office. \n Additional table information: table: company_office"} -{"text": "Q: SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000 \nA: Find the locations where have both tracks with more than 90000 seats and tracks with less than 70000 seats. \n Additional table information: table: race_track"} -{"text": "Q: SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'Red' \nA: What are the names of wines made from red grapes? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT AVG(T2.Number_cities) FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T1.Low_Estimate > 10000 \nA: Give the average number of cities within markets that had a low market estimation larger than 10000? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT COUNT(*) FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY' \nA: Find the number of times ROY SWEAZY has reserved a room. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT TYPE FROM ship WHERE flag = 'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag = 'Malta' \nA: What types of ships have both ships that have Panama Flags and Malta flags? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT COUNT(DISTINCT eid) FROM Certificate \nA: How many employees have certificate. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT t2.service_name FROM first_notification_of_loss AS t1 JOIN services AS t2 ON t1.service_id = t2.service_id GROUP BY t1.service_id HAVING COUNT(*) > 2 \nA: Find the name of services that have been used for more than 2 times in first notification of loss. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT city FROM addresses WHERE NOT city IN (SELECT DISTINCT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id) \nA: What are the cities no customers live in? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT SUM(grant_amount), organisation_id FROM Grants GROUP BY organisation_id \nA: What is the total amount of grants given by each organisations? Also list the organisation id. \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT SUM(amount), T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname \nA: What are the names of the different bank branches, and what are their total loan amounts? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT apt_number FROM Apartments ORDER BY room_count ASC NULLS FIRST \nA: Return all the apartment numbers sorted by the room count in ascending order. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT t1.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID WHERE t2.Price_in_Dollar < (SELECT MAX(Price_in_Dollar) FROM furniture_manufacte) \nA: Find the names of furnitures whose prices are lower than the highest price. \n Additional table information: table: manufacturer"} -{"text": "Q: SELECT DISTINCT T1.id, T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12 \nA: What are the id and name of the stations that have ever had more than 12 bikes available? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the id and details of the investor that has the largest number of transactions. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC NULLS FIRST LIMIT 1 \nA: Tell me the the date when the first claim was made. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT organization_id FROM organizations EXCEPT SELECT parent_organization_id FROM organizations \nA: Which organizations are not a parent organization of others? List the organization id. \n Additional table information: table: local_govt_and_lot"} -{"text": "Q: SELECT dorm_name, gender FROM dorm WHERE student_capacity > 300 OR student_capacity < 100 \nA: Find the name and gender type of the dorms whose capacity is greater than 300 or less than 100. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT country FROM people WHERE age < 25 INTERSECT SELECT country FROM people WHERE age > 30 \nA: Show the country where people older than 30 and younger than 25 are from. \n Additional table information: table: wedding"} -{"text": "Q: SELECT T2.roomName, T1.Rate, T1.CheckIn, T1.CheckOut FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY T1.Rate DESC LIMIT 1 \nA: Which room has the highest rate? List the room's full name, rate, check in and check out date. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT payment_method_code, COUNT(*) FROM customers GROUP BY payment_method_code \nA: How many customers use each payment method? \n Additional table information: table: department_store"} -{"text": "Q: SELECT name, open_date FROM church ORDER BY open_date DESC LIMIT 3 \nA: Show the name and opening year for three churches that opened most recently. \n Additional table information: table: wedding"} -{"text": "Q: SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the code of the city that has the most students. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed \nA: What are the ids of all the employees who authorize document destruction? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT COUNT(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = 'F' AND T1.allergy = 'Milk' OR T1.allergy = 'Eggs' \nA: How many students who are female are allergic to milk or eggs? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT T1.member_name, T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id \nA: What are the names of members and their corresponding parties? \n Additional table information: table: party_people"} -{"text": "Q: SELECT Name FROM actor WHERE Age <> 20 \nA: What are the names of actors who are not 20 years old? \n Additional table information: table: musical"} -{"text": "Q: SELECT T2.dept_name FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: What is the name of the department with the fewest professors? \n Additional table information: table: college_1"} -{"text": "Q: SELECT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id GROUP BY t3.city ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which city has the most customers living in? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT fname FROM authors WHERE lname = 'Ueno' \nA: Which authors have last name 'Ueno'? List their first names. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT COUNT(*), cName FROM tryout GROUP BY cName ORDER BY COUNT(*) DESC \nA: Find the number of students who participate in the tryout for each college ordered by descending count. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT AVG(T1.stars), T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT MIN(YEAR) FROM Movie) \nA: For the oldest movie listed, what is its average rating and title? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the type code of the most frequently used policy. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT COUNT(DISTINCT affiliation) FROM university \nA: Find how many different affiliation types there are. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT T1.name FROM nurse AS T1 JOIN appointment AS T2 ON T1.employeeid = T2.prepnurse GROUP BY T1.employeeid ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the name of the nurse who has the largest number of appointments. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the country that the most papers are affiliated with. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT MAX(T2.gradepoint), MIN(T2.gradepoint) FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.city_code = 'NYC' \nA: What is the maximum and minimum grade point of students who live in NYC? \n Additional table information: table: college_3"} -{"text": "Q: SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4 \nA: What are department ids for departments with managers managing more than 3 employees? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT document_name FROM documents EXCEPT SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code JOIN document_sections_images AS t3 ON t2.section_id = t3.section_id \nA: What are the names of documents that do not have any images? \n Additional table information: table: document_management"} -{"text": "Q: SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = 'AC/DC' \nA: Find the title of all the albums of the artist 'AC/DC'. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT AVG(T1.HS), MAX(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' \nA: Find the average and maximum hours for the students whose tryout decision is yes. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.major = '600' GROUP BY t1.clubname ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the club which has the largest number of members majoring in '600'. \n Additional table information: table: club_1"} -{"text": "Q: SELECT T1.Code, T1.Fate, T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID \nA: What are the mission codes, fates, and names of the ships involved? \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT AVG(Quantity) FROM stock \nA: Give the average quantity of stocks. \n Additional table information: table: device"} -{"text": "Q: SELECT County_name, Population FROM county \nA: What are the name and population of each county? \n Additional table information: table: election"} -{"text": "Q: SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING COUNT(*) > 3 \nA: What are the payment method codes that have been used by more than 3 parties? \n Additional table information: table: e_government"} -{"text": "Q: SELECT name, born_state, age FROM head ORDER BY age NULLS FIRST \nA: List the name, born state and age of the heads of departments ordered by age. \n Additional table information: table: department_management"} -{"text": "Q: SELECT name FROM track WHERE NOT track_id IN (SELECT track_id FROM race) \nA: Show all track names that have had no races. \n Additional table information: table: race_track"} -{"text": "Q: SELECT StuID FROM Has_allergy GROUP BY StuID HAVING COUNT(*) >= 2 \nA: What are the students ids of students who have more than one allergy? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_date < '2018-03-17 07:13:53' \nA: Find the total amount of products ordered before 2018-03-17 07:13:53. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10 \nA: What are the department ids for which more than 10 employees had a commission? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = 'white' \nA: List all the product names with the color description 'white'. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T1.staff_id, T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from NULLS FIRST LIMIT 1 \nA: What is the id and name of the staff who has been assigned for the least amount of time? \n Additional table information: table: department_store"} -{"text": "Q: SELECT Nominee FROM musical WHERE Award = 'Tony Award' INTERSECT SELECT Nominee FROM musical WHERE Award = 'Drama Desk Award' \nA: Who are the nominees who have been nominated for both a Tony Award and a Drama Desk Award? \n Additional table information: table: musical"} -{"text": "Q: SELECT COUNT(DISTINCT s_id) FROM advisor \nA: Count the number of students who have advisors. \n Additional table information: table: college_2"} -{"text": "Q: SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' \nA: What are the first names of all students in Smith Hall? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT Name FROM ship WHERE Nationality <> 'United States' \nA: What are the names of the ships that are not from the United States? \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT gender, COUNT(*) FROM Customers GROUP BY gender \nA: Show the number of customers for each gender. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT COUNT(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia' \nA: How many cities are in Australia? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY SUM(t3.order_quantity) DESC LIMIT 1 \nA: What is the name of the customer that has purchased the most items? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT MAX(Points) FROM climber WHERE Country = 'United Kingdom' \nA: What is the maximum point for climbers whose country is United Kingdom? \n Additional table information: table: climbing"} -{"text": "Q: SELECT AVG(HS) FROM Player \nA: What is the average training hours of all players? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT Carrier FROM phone ORDER BY Price DESC LIMIT 1 \nA: What is the carrier of the most expensive phone? \n Additional table information: table: phone_market"} -{"text": "Q: SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name LIKE '%Led%' \nA: List the name of albums that are released by aritist whose name has 'Led' \n Additional table information: table: store_1"} -{"text": "Q: SELECT preferred_foot, COUNT(*) FROM Player_Attributes WHERE overall_rating > 80 GROUP BY preferred_foot \nA: Of all players with an overall rating greater than 80, how many are right-footed and left-footed? \n Additional table information: table: soccer_1"} -{"text": "Q: SELECT DISTINCT form_type_code FROM forms \nA: List all the types of forms. \n Additional table information: table: e_government"} -{"text": "Q: SELECT T2.Name, T1.ArtistId FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistID GROUP BY T1.ArtistId HAVING COUNT(*) >= 3 ORDER BY T2.Name NULLS FIRST \nA: What are the names and ids of artists with 3 or more albums, listed in alphabetical order? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name = T2.name JOIN PersonFriend AS T3 ON T1.friend = T3.name JOIN PersonFriend AS T4 ON T3.friend = T4.name WHERE T2.name = 'Alice' AND T4.name <> 'Alice' \nA: Find Alice's friends of friends. \n Additional table information: table: network_2"} -{"text": "Q: SELECT COUNT(*) FROM book_club \nA: Count the number of book clubs. \n Additional table information: table: culture_company"} -{"text": "Q: SELECT COUNT(*) FROM INVESTORS \nA: Find the number of investors in total. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT COUNT(*) FROM rooms WHERE NOT roomid IN (SELECT DISTINCT room FROM reservations) \nA: Find the number of rooms that do not have any reservation. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = 'Walter Hill' \nA: Which studios have never worked with the director Walter Hill? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT T1.member_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id WHERE T2.Party_name <> 'Progress Party' \nA: Which member names corresponding to members who are not in the Progress Party? \n Additional table information: table: party_people"} -{"text": "Q: SELECT title FROM papers WHERE title LIKE '%Database%' \nA: Which paper's title contains the word 'Database'? \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35 \nA: Show the nations that have both hosts older than 45 and hosts younger than 35. \n Additional table information: table: party_host"} -{"text": "Q: SELECT MAX(date_moved_in) FROM Residents \nA: When is the last day any resident moved in? \n Additional table information: table: local_govt_and_lot"} -{"text": "Q: SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There \nA: Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.order_date DESC LIMIT 1 \nA: Find the name of the customer who made an order most recently. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT region_name FROM region WHERE region_name <> 'Denmark' \nA: Show names for all regions except for Denmark. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT Residence FROM player WHERE gender = 'M' INTERSECT SELECT Residence FROM player WHERE gender = 'F' \nA: Show the residences that have both a player of gender 'M' and a player of gender 'F'. \n Additional table information: table: riding_club"} -{"text": "Q: SELECT T1.account_name, T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan' AND T2.customer_last_name = 'Keeling' \nA: Show the account name and other account detail for all accounts by the customer with first name Meaghan and last name Keeling. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT COUNT(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8 \nA: How many days had both mean humidity above 50 and mean visibility above 8? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT order_id, COUNT(*) FROM Order_items GROUP BY order_id \nA: How many order items correspond to each order id? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT T1.name, COUNT(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid \nA: Find the name of each user and number of tweets tweeted by each of them. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT member_name FROM member EXCEPT SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id \nA: Show all member names who are not in charge of any event. \n Additional table information: table: party_people"} -{"text": "Q: SELECT first_name, last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000 \nA: What are the first and last names of all customers with between 1000 and 3000 dollars outstanding? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT product_category_code, typical_buying_price FROM products WHERE product_name = 'cumin' \nA: What is the category and typical buying price of the product with name 'cumin'? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT Shop_Name FROM shop ORDER BY Open_Year ASC NULLS FIRST \nA: What are the names of shops in ascending order of open year? \n Additional table information: table: device"} -{"text": "Q: SELECT YEAR, book_title, publisher FROM book_club ORDER BY YEAR DESC \nA: Show the years, book titles, and publishers for all books, in descending order by year. \n Additional table information: table: culture_company"} -{"text": "Q: SELECT College FROM match_season WHERE POSITION = 'Midfielder' INTERSECT SELECT College FROM match_season WHERE POSITION = 'Defender' \nA: Which college have both players with position midfielder and players with position defender? \n Additional table information: table: match_season"} -{"text": "Q: SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1 \nA: What is detail of the student who most recently registered course? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT DISTINCT T1.state, T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes' \nA: What is the state and enrollment of the colleges where have any students who got accepted in the tryout decision. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT COUNT(*), constructorid FROM constructorStandings GROUP BY constructorid \nA: What are the numbers of races for each constructor id? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT customer_id, COUNT(*) FROM Customers_cards GROUP BY customer_id \nA: What are the different customer ids, and how many cards does each one hold? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT product_name FROM products WHERE product_category_code = 'Spices' \nA: Return the names of products in the category 'Spices'. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT party_name FROM party WHERE NOT party_id IN (SELECT party_id FROM Member) \nA: What are the names of parties that have no members? \n Additional table information: table: party_people"} -{"text": "Q: SELECT AVG(bikes_available) FROM status WHERE NOT station_id IN (SELECT id FROM station WHERE city = 'Palo Alto') \nA: What is the average bike availability in stations that are not located in Palo Alto? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT Title FROM film WHERE NOT Film_ID IN (SELECT Film_ID FROM film_market_estimation) \nA: List the title of films that do not have any market estimation. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT AVG(access_count) FROM documents GROUP BY document_structure_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: What is the average access count of documents that have the least common structure? \n Additional table information: table: document_management"} -{"text": "Q: SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE Votes > 10000 \nA: What are the names of representatives with more than 10000 votes in election? \n Additional table information: table: election_representative"} -{"text": "Q: SELECT date FROM weather WHERE zip_code = 94107 AND EVENTS <> 'Fog' AND EVENTS <> 'Rain' \nA: In zip code 94107, on which day neither Fog nor Rain was not observed? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT COUNT(*) FROM College \nA: How many colleges in total? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT COUNT(*) FROM club WHERE clublocation = 'HHH' \nA: How many clubs are located at 'HHH'? \n Additional table information: table: club_1"} -{"text": "Q: SELECT T2.product_name, COUNT(*) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T3.order_id = T1.order_id GROUP BY T2.product_name \nA: What are teh names of the different products, as well as the number of customers who have ordered each product. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT T2.Delegate, T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District \nA: What are the delegate and name of the county they belong to, for each county? \n Additional table information: table: election"} -{"text": "Q: SELECT COUNT(DISTINCT dept_name) FROM department \nA: How many different departments are there? \n Additional table information: table: college_1"} -{"text": "Q: SELECT Fname, Lname, Age FROM Student WHERE Sex = 'F' \nA: Show first name, last name, age for all female students. Their sex is F. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT SUM(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research' \nA: What is the total amount of grant money for research? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'TARRING' AND T2.lastname = 'LEIA' \nA: Find the number of students taught by TARRING LEIA. \n Additional table information: table: student_1"} -{"text": "Q: SELECT name, price FROM products \nA: What are the names and prices of all products in the store? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150 \nA: Which rooms cost between 120 and 150? Give me the room names. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT T1.fname, T1.lname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge') \nA: Find the first and last name of students who are living in the dorms that have amenity TV Lounge. \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT Restaurant.ResName, SUM(Visits_Restaurant.Spent) FROM Visits_Restaurant JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID GROUP BY Restaurant.ResID ORDER BY SUM(Visits_Restaurant.Spent) ASC NULLS FIRST LIMIT 1 \nA: At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total. \n Additional table information: table: restaurant_1"} -{"text": "Q: SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName NULLS FIRST \nA: Find the name of all students who were in the tryout sorted in alphabetic order. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT name, nationality, id FROM architect WHERE gender = 'male' ORDER BY name NULLS FIRST \nA: List the name, nationality and id of all male architects ordered by their names lexicographically. \n Additional table information: table: architecture"} -{"text": "Q: SELECT COUNT(DISTINCT dept_name) FROM department \nA: How many departments does the college has? \n Additional table information: table: college_1"} -{"text": "Q: SELECT DISTINCT forename FROM drivers ORDER BY forename ASC NULLS FIRST \nA: What are the first names of all the different drivers in alphabetical order? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT DISTINCT fname FROM student \nA: What are the first names of all the students? \n Additional table information: table: club_1"} -{"text": "Q: SELECT COUNT(*), gender FROM Person WHERE age < 40 GROUP BY gender \nA: How many people are under 40 for each gender? \n Additional table information: table: network_2"} -{"text": "Q: SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t2.position = 'President' \nA: What are the first and last name of the president of the club 'Bootup Baltimore'? \n Additional table information: table: club_1"} -{"text": "Q: SELECT T2.customer_first_name, T2.customer_last_name, T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Give the full name and customer id of the customer with the fewest accounts. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT name, seating FROM track WHERE year_opened > 2000 ORDER BY seating NULLS FIRST \nA: Show names and seatings, ordered by seating for all tracks opened after 2000. \n Additional table information: table: race_track"} -{"text": "Q: 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 \nA: What is the id and detail of the vehicle used in lessons for most of the times? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211' AND T2.enroll_grade = 'C' \nA: What are the first names of all students who took ACCT-211 and received a C? \n Additional table information: table: college_1"} -{"text": "Q: SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING COUNT(*) > 1 \nA: On which days more than one revisions were made on catalogs. \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT DISTINCT location_code FROM Document_locations \nA: Give me all the distinct location codes for documents. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT MIN(membership_amount), MAX(membership_amount) FROM branch WHERE open_year = 2011 OR city = 'London' \nA: What are the minimum and maximum membership amounts for all branches that either opened in 2011 or are located in London? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = (SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY COUNT(*) DESC LIMIT 1) \nA: What are all the policy types of the customer that has the most policies listed? \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name = 'Ashley' \nA: Find the phone number of performer 'Ashley'. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT state FROM park GROUP BY state HAVING COUNT(*) > 2 \nA: List the names of states that have more than 2 parks. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT Name, LOCATION FROM wrestler \nA: Give the names and locations of all wrestlers. \n Additional table information: table: wrestler"} -{"text": "Q: SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the type of vocables that appears most frequently? \n Additional table information: table: music_2"} -{"text": "Q: SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*) > 2 \nA: Which headquarter locations are used by more than 2 companies? \n Additional table information: table: company_office"} -{"text": "Q: SELECT cust_name FROM customer ORDER BY credit_score NULLS FIRST LIMIT 1 \nA: What is the name of the customer with the worst credit score? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT dept_name, budget FROM department WHERE budget > (SELECT AVG(budget) FROM department) \nA: What are the names and budgets of departments with budgets greater than the average? \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = 'sesame' \nA: How many characteristics does the product named 'sesame' have? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT song_name FROM song WHERE rating < (SELECT MIN(rating) FROM song WHERE languages = 'english') \nA: What are the song names for every song whose rating is less than the minimum rating for English songs? \n Additional table information: table: music_1"} -{"text": "Q: SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which party has the largest number of delegates? \n Additional table information: table: election"} -{"text": "Q: SELECT * FROM employees WHERE hire_date < '2002-06-21' \nA: What is all the information about employees hired before June 21, 2002? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017 \nA: What are the unique names of all race held between 2014 and 2017? \n Additional table information: table: formula_1"} -{"text": "Q: 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 \nA: What are the ids and names of the architects who built at least 3 bridges ? \n Additional table information: table: architecture"} -{"text": "Q: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Mortgages' INTERSECT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Auto' \nA: What are the names of customers who have taken both Mortgage and Auto loans? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT T2.invoice_number, T2.invoice_date FROM Financial_transactions AS T1 JOIN Invoices AS T2 ON T1.invoice_number = T2.invoice_number GROUP BY T1.invoice_number ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the invoice number and invoice date for the invoice with most number of transactions? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT T1.FirstName, T1.SupportRepId FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) >= 10 \nA: Please show the employee first names and ids of employees who serve at least 10 customers. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT T1.name, T2.alid FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T2.alid ORDER BY COUNT(*) DESC LIMIT 10 \nA: Find the names of the top 10 airlines that operate the most number of routes. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT COUNT(*), formats FROM files GROUP BY formats \nA: How many songs were released for each format? \n Additional table information: table: music_1"} -{"text": "Q: SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = 'Gorgoroth' \nA: Return the issue dates of volumes that are by the artist named Gorgoroth. \n Additional table information: table: music_4"} -{"text": "Q: SELECT Author FROM submission ORDER BY Scores ASC NULLS FIRST \nA: List the authors of submissions in ascending order of scores. \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT T1.council_tax_id FROM Rent_Arrears AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id JOIN Customer_Master_Index AS T3 ON T3.master_customer_id = T2.master_customer_id WHERE T3.cmi_details <> 'Schmidt , Kertzmann and Lubowitz' \nA: What are the renting arrears tax ids related to the customer master index whose detail is not 'Schmidt, Kertzmann and Lubowitz'? \n Additional table information: table: local_govt_mdm"} -{"text": "Q: SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the characteristic name used by most number of the products? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Art' AND T2.customer_last_name = 'Turcotte' \nA: Return the number of accounts that the customer with the first name Art and last name Turcotte has. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT job_id, hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05' \nA: What are the job ids and dates of hire for employees hired after November 5th, 2007 and before July 5th, 2009? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T2.name, T2.open_year FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year = 2016 GROUP BY T2.branch_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name and opening year for the branch that registered the most members in 2016? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT College FROM match_season WHERE POSITION = 'Midfielder' INTERSECT SELECT College FROM match_season WHERE POSITION = 'Defender' \nA: Return the colleges that have players who play the Midfielder position, as well as players who play the Defender position. \n Additional table information: table: match_season"} -{"text": "Q: SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' AND salary > 80000 \nA: What are the names of the instructors in the Comp. Sci. department who earn more than 80000? \n Additional table information: table: college_2"} -{"text": "Q: SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%' \nA: Who are the players that have names containing the letter a? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT Reign, Days_held FROM wrestler \nA: Show the reign and days held of wrestlers. \n Additional table information: table: wrestler"} -{"text": "Q: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.age < 18 \nA: Count the number of members in club 'Bootup Baltimore' whose age is below 18. \n Additional table information: table: club_1"} -{"text": "Q: SELECT Residence FROM player GROUP BY Residence HAVING COUNT(*) >= 2 \nA: Show the residences that have at least two players. \n Additional table information: table: riding_club"} -{"text": "Q: SELECT DISTINCT (catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE '%Murray%' \nA: Which catalog publishers have substring 'Murray' in their names? \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.firstname = 'Solveig' AND T2.title = 'A Bar In Amsterdam' \nA: What are the types of vocals that the musician with the first name 'Solveig' played in the song 'A Bar in Amsterdam'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT POSITION, COUNT(*) FROM match_season GROUP BY POSITION \nA: Show the position of players and the corresponding number of players. \n Additional table information: table: match_season"} -{"text": "Q: SELECT T1.title, T1.director FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title ORDER BY T1.director NULLS FIRST, T1.title NULLS FIRST \nA: For all directors who have directed more than one movie, what movies have they directed and what are their names? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT AVG(num_of_staff), AVG(score) FROM shop \nA: What are the average score and average staff number of all shops? \n Additional table information: table: coffee_shop"} -{"text": "Q: SELECT gname, gtype FROM Video_games ORDER BY gname NULLS FIRST \nA: Show all video games and their types in the order of their names. \n Additional table information: table: game_1"} -{"text": "Q: SELECT Fname FROM STUDENT ORDER BY Age DESC \nA: Find the first name of students in the descending order of age. \n Additional table information: table: college_3"} -{"text": "Q: SELECT COUNT(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000 \nA: How many distinct delegates are from counties with population larger than 50000? \n Additional table information: table: election"} -{"text": "Q: SELECT T3.forename, T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Australian Grand Prix' EXCEPT SELECT T3.forename, T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Chinese Grand Prix' \nA: What are the first and last names of all drivers who participated in the Australian Grand Prix but not the Chinese Grand Prix? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT COUNT(*) FROM Financial_transactions \nA: Count the number of transactions. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Badlands' \nA: Who performed the song named 'Badlands'? Show the first name and the last name. \n Additional table information: table: music_2"} -{"text": "Q: SELECT country, COUNT(*) FROM airlines GROUP BY country ORDER BY COUNT(*) DESC \nA: How many airlines operate out of each country in descending order? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT AVG(age), MAX(age), sex FROM student GROUP BY sex \nA: What is the average and oldest age for each gender of student? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT Publisher, COUNT(*) FROM publication GROUP BY Publisher \nA: Show different publishers together with the number of publications they have. \n Additional table information: table: book_2"} -{"text": "Q: SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration > (SELECT MIN(duration) FROM pitstops WHERE raceid = 841) \nA: Find the distinct driver id of all drivers that have a longer stop duration than some drivers in the race whose id is 841? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT CName FROM COURSE WHERE Credits = 3 UNION SELECT CName FROM COURSE WHERE Credits = 1 AND Hours = 4 \nA: What are the names of courses that give either 3 credits, or 1 credit and 4 hours? \n Additional table information: table: college_3"} -{"text": "Q: SELECT title FROM songs WHERE title LIKE '% the %' \nA: Find all the songs whose name contains the word 'the'. \n Additional table information: table: music_2"} -{"text": "Q: SELECT origin FROM program ORDER BY origin NULLS FIRST \nA: What is the list of program origins ordered alphabetically? \n Additional table information: table: program_share"} -{"text": "Q: SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Dameon' AND T2.staff_last_name = 'Frami' UNION SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Jolie' AND T2.staff_last_name = 'Weber' \nA: Which problems were reported by the staff named Dameon Frami or Jolie Weber? Give me the ids of the problems. \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT T1.name, COUNT(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING COUNT(*) > 1 \nA: Find the name of the user who tweeted more than once, and number of tweets tweeted by them. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT advisor FROM Student GROUP BY advisor ORDER BY COUNT(*) DESC LIMIT 1 \nA: Give the advisor with the most students. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1 \nA: What are the names of departments that have primarily affiliated physicians. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT title FROM Movie WHERE YEAR > (SELECT MAX(YEAR) FROM Movie WHERE director = 'Steven Spielberg') \nA: What are the names of all movies that were created after the most recent Steven Spielberg film? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT Official_Name FROM city WHERE NOT City_ID IN (SELECT Host_city_ID FROM farm_competition) \nA: What are the official names of cities that have not hosted a farm competition? \n Additional table information: table: farm"} -{"text": "Q: SELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = 'stanley.monahan@example.org' \nA: What is the id of the candidate whose email is stanley.monahan@example.org? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT COUNT(*), customer_id FROM Accounts GROUP BY customer_id \nA: Count the number of accounts corresponding to each customer id. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT COUNT(*) FROM Apartment_Bookings \nA: Count the total number of apartment bookings. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code JOIN Projects AS T3 ON T2.project_id = T3.project_id WHERE T3.project_details = 'sint' \nA: What are the result description of the project whose detail is 'sint'? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT song_name FROM song ORDER BY resolution NULLS FIRST \nA: Give me a list of the names of all songs ordered by their resolution. \n Additional table information: table: music_1"} -{"text": "Q: SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the manager with the most gas stations that opened after 2000? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'bangla' GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3 \nA: Find the top 3 artists who have the largest number of songs works whose language is Bangla. \n Additional table information: table: music_1"} -{"text": "Q: SELECT Title FROM film WHERE NOT Film_ID IN (SELECT Film_ID FROM film_market_estimation) \nA: What are the titles of films that do not have a film market estimation? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT DISTINCT T1.Leader_Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID WHERE T2.Country = 'Canada' \nA: Show the distinct leader names of colleges associated with members from country 'Canada'. \n Additional table information: table: decoration_competition"} -{"text": "Q: SELECT product_id, COUNT(DISTINCT order_id) FROM Order_items GROUP BY product_id \nA: Show the product ids and the number of unique orders containing each product. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT Name FROM member ORDER BY Name ASC NULLS FIRST \nA: List the names of members in ascending alphabetical order. \n Additional table information: table: decoration_competition"} -{"text": "Q: SELECT invoice_number FROM invoices WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25' \nA: What are the invoice numbers created before 1989-09-03 or after 2007-12-25? \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT Name FROM ship WHERE NOT Ship_ID IN (SELECT Ship_ID FROM mission) \nA: List the name of ships that are not involved in any mission \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT name, trade_name FROM medicine EXCEPT SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id JOIN enzyme AS T3 ON T3.id = T2.enzyme_id WHERE T3.product = 'Protoporphyrinogen IX' \nA: What are the medicine and trade names that cannot interact with the enzyme with the product 'Heme'? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT DISTINCT city FROM branch WHERE membership_amount >= 100 \nA: Show all distinct city where branches with at least 100 memberships are located. \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = 'Japan' AND t2.authorder = 1 AND t1.lname = 'Ohori' \nA: Which papers' first author is affiliated with an institution in the country 'Japan' and has last name 'Ohori'? Give me the titles of the papers. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT Name FROM journalist ORDER BY Years_working ASC NULLS FIRST \nA: List the names of journalists in ascending order of years working. \n Additional table information: table: news_report"} -{"text": "Q: SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 \nA: What are the names of banks that have loaned money to customers with credit scores below 100? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'photo' INTERSECT SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'film' \nA: What is the description of the service type which offers both the photo product and the film product? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT Elimination_Move FROM Elimination WHERE Team = 'Team Orton' \nA: What are the elimination moves of wrestlers whose team is 'Team Orton'? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT dorm_name FROM dorm WHERE NOT dormid IN (SELECT dormid FROM has_amenity) \nA: Find the name of dorms that do not have any amenity \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T1.rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank \nA: Show all the faculty ranks and the number of students advised by each rank. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT T1.date_incident_start, date_incident_end FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.last_name = 'Fahey' \nA: Find the start and end dates of behavior incidents of students with last name 'Fahey'. \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT COUNT(*), sex FROM student WHERE age > (SELECT AVG(age) FROM student) GROUP BY sex \nA: How many students are older than average for each gender? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT Product_Name, AVG(Product_Price) FROM PRODUCTS GROUP BY Product_Name \nA: For each distinct product name, show its average product price. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = 'operating system' OR T2.course_name = 'data structure' \nA: Find the addresses of the course authors who teach the course with name 'operating system' or 'data structure'. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1 \nA: Who is the nominee who has been nominated for the most musicals? \n Additional table information: table: musical"} -{"text": "Q: SELECT * FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code \nA: What is all the product data, as well as each product's manufacturer? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT product_id, COUNT(DISTINCT order_id) FROM Order_items GROUP BY product_id \nA: How many distinct order ids correspond to each product? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID \nA: From which hometowns did no gymnasts come from? \n Additional table information: table: gymnast"} -{"text": "Q: SELECT Shop_Name FROM shop WHERE NOT Shop_ID IN (SELECT Shop_ID FROM stock) \nA: List the names of shops that have no devices in stock. \n Additional table information: table: device"} -{"text": "Q: SELECT product, chromosome, porphyria FROM enzyme WHERE LOCATION = 'Cytosol' \nA: What is the product, chromosome and porphyria related to the enzymes which take effect at the location 'Cytosol'? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT nickname FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn' \nA: What is the nickname of staff with first name as Janessa and last name as Sawayn? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T1.surname, T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING COUNT(*) = 11 INTERSECT SELECT T1.surname, T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING COUNT(*) > 5 \nA: What are the last names and ids of all drivers who had 11 pit stops and participated in more than 5 races? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = 'Maryland' OR T2.College = 'Duke' \nA: What are the official languages of the countries of players from Maryland or Duke college? \n Additional table information: table: match_season"} -{"text": "Q: SELECT T1.first_name, T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the full name of employee who supported the most number of customers. \n Additional table information: table: store_1"} -{"text": "Q: SELECT COUNT(course_id) FROM Student_Course_Enrolment \nA: How many distinct courses are enrolled in by students? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT t1.customer_name, t2.order_date FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = 'Delivered' \nA: Find the customer name and date of the orders that have the status 'Delivered'. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT project_id, project_details FROM Projects \nA: What are the ids and details for each project? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT DISTINCT Carrier FROM phone WHERE Memory_in_G > 32 \nA: List the distinct carriers of phones with memories bigger than 32. \n Additional table information: table: phone_market"} -{"text": "Q: 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 \nA: Return the party email that has used party services the greatest number of times. \n Additional table information: table: e_government"} -{"text": "Q: SELECT T1.first_name, T1.last_name, T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Which staff handled least number of payments? List the full name and the id. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT MIN(distance), AVG(distance), MAX(distance) FROM Aircraft \nA: Return the minimum, average and maximum distances traveled across all aircrafts. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT name, salary FROM Employee ORDER BY salary NULLS FIRST \nA: What is the name and salary of all employees in order of salary? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT COUNT(*) FROM Ref_document_types \nA: How many document types are there? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT COUNT(*) FROM Addresses WHERE state_province_county = 'Georgia' \nA: How many staff live in state Georgia? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT State FROM representative GROUP BY State HAVING COUNT(*) >= 2 \nA: What states have at least two representatives? \n Additional table information: table: election_representative"} -{"text": "Q: SELECT player FROM match_season ORDER BY College ASC NULLS FIRST \nA: What are all the players who played in match season, sorted by college in ascending alphabetical order? \n Additional table information: table: match_season"} -{"text": "Q: SELECT T1.Team, T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID \nA: What are the team and the location of school each player belongs to? \n Additional table information: table: school_player"} -{"text": "Q: SELECT name, trade_name FROM medicine WHERE FDA_approved = 'Yes' \nA: What are the names and trade names of the medicines which has 'Yes' value in the FDA record? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT name FROM church EXCEPT SELECT T1.name FROM church AS T1 JOIN wedding AS T2 ON T1.church_id = T2.church_id WHERE T2.year = 2015 \nA: Show all church names except for those that had a wedding in year 2015. \n Additional table information: table: wedding"} -{"text": "Q: SELECT f_id FROM files ORDER BY duration DESC LIMIT 1 \nA: Find the id of the song that lasts the longest. \n Additional table information: table: music_1"} -{"text": "Q: SELECT T1.incident_type_code, T2.incident_type_description FROM Behavior_Incident AS T1 JOIN Ref_Incident_Type AS T2 ON T1.incident_type_code = T2.incident_type_code GROUP BY T1.incident_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the code and description of the most frequent behavior incident type? \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT order_id, COUNT(*) FROM Invoices GROUP BY order_id \nA: Show the order ids and the number of invoices for each order. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT name, city, country FROM airports ORDER BY elevation NULLS FIRST LIMIT 1 \nA: What is the name, city, and country of the airport with the lowest altitude? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT TYPE, COUNT(*) FROM store GROUP BY TYPE \nA: For each type of store, how many of them are there? \n Additional table information: table: store_product"} -{"text": "Q: SELECT T1.Name FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.Name HAVING COUNT(*) >= 2 \nA: Show the names of editors that are on at least two journal committees. \n Additional table information: table: journal_committee"} -{"text": "Q: SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Find the year in which the least people enter hall of fame. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT COUNT(*), dept_code FROM student GROUP BY dept_code \nA: Find the number of students for each department. \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(*) FROM entrepreneur \nA: Count the number of entrepreneurs. \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT card_type_code FROM Customers_cards GROUP BY card_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the card type code with most number of cards? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T1.service_id, T1.service_details, COUNT(*) FROM Services AS T1 JOIN Residents_Services AS T2 ON T1.service_id = T2.service_id GROUP BY T1.service_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the maximum number that a certain service is provided? List the service id, details and number. \n Additional table information: table: local_govt_and_lot"} -{"text": "Q: SELECT name FROM Person WHERE gender = 'male' ORDER BY age NULLS FIRST \nA: What is the name and age of every male? Order the results by age. \n Additional table information: table: network_2"} -{"text": "Q: SELECT first_name FROM actor GROUP BY first_name ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most popular first name of the actors? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT name, CLASS, rank FROM captain \nA: Find the name, class and rank of all captains. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT name FROM procedures WHERE cost > 1000 UNION SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen' \nA: Find all procedures which cost more than 1000 or which physician John Wen was trained in. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT LENGTH, Height FROM roller_coaster \nA: What are the lengths and heights of roller coasters? \n Additional table information: table: roller_coaster"} -{"text": "Q: SELECT state_province_county, country FROM addresses WHERE zip_postcode LIKE '4%' \nA: Find the state and country of all cities with post code starting with 4. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT COUNT(*) FROM editor \nA: How many editors are there? \n Additional table information: table: journal_committee"} -{"text": "Q: SELECT T1.name, COUNT(*) FROM camera_lens AS T1 JOIN photos AS T2 ON T1.id = T2.camera_lens_id GROUP BY T1.id ORDER BY COUNT(*) NULLS FIRST \nA: What is the name of each camera lens and the number of photos taken by it? Order the result by the count of photos. \n Additional table information: table: mountain_photos"} -{"text": "Q: SELECT headquarters, COUNT(*) FROM company GROUP BY headquarters \nA: For each headquarter, what are the headquarter and how many companies are centered there? \n Additional table information: table: gas_company"} -{"text": "Q: 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 \nA: Find the number of scientists involved for the projects that require more than 300 hours. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT COUNT(*) FROM Customers \nA: Count the number of customers. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT eid, salary FROM Employee WHERE name = 'Mark Young' \nA: Show the id and salary of Mark Young. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT t3.address_content FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t1.customer_name = 'Maudie Kertzmann' \nA: Return the address content for the customer whose name is 'Maudie Kertzmann'. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT COUNT(*) FROM park WHERE state = 'NY' \nA: Show me the number of parks the state of NY has. \n Additional table information: table: baseball_1"} -{"text": "Q: 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' \nA: What is the venue of the competition '1994 FIFA World Cup qualification' hosted by 'Nanjing ( Jiangsu )'? \n Additional table information: table: city_record"} -{"text": "Q: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = 'Katsuhiro' AND t1.lname = 'Ueno' \nA: What is the name of the institution the author 'Katsuhiro Ueno' belongs to? \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT budget_type_code, budget_type_description FROM Ref_budget_codes \nA: What are the type codes and descriptions of each budget type? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT gender FROM staff GROUP BY gender ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which gender makes up the majority of the staff? \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS = 'Third-rate ship of the line' \nA: Find the captain rank that has no captain in Third-rate ship of the line class. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT name, date FROM races ORDER BY date DESC LIMIT 1 \nA: What is the name and date of the race that occurred most recently? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T1.role_description, T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the role description and the id of the project staff involved in most number of project outcomes? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT name, headquarter, revenue FROM manufacturers ORDER BY revenue DESC \nA: Find the name, headquarter and revenue of all manufacturers sorted by their revenue in the descending order. \n Additional table information: table: manufactory_1"} -{"text": "Q: 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' \nA: How many lessons did the customer Ryan Goodwin complete? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance \nA: What are the ids of the students who either registered or attended a course? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T1.Title = 'Balls to the Wall' \nA: Find the name of the artist who made the album 'Balls to the Wall'. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY SUM(degrees) DESC LIMIT 1 \nA: In what year was the most degrees conferred? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT COUNT(DISTINCT job) FROM Person \nA: How many type of jobs do they have? \n Additional table information: table: network_2"} -{"text": "Q: SELECT T2.Name FROM phone_market AS T1 JOIN phone AS T2 ON T1.Phone_ID = T2.Phone_ID GROUP BY T2.Name HAVING SUM(T1.Num_of_stock) >= 2000 ORDER BY SUM(T1.Num_of_stock) DESC \nA: Show the names of phones that have total number of stocks bigger than 2000, in descending order of the total number of stocks. \n Additional table information: table: phone_market"} -{"text": "Q: SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID \nA: List the name of physicians who never took any appointment. \n Additional table information: table: hospital_1"} -{"text": "Q: 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' \nA: What is the zip code of the hosue of the employee named Janessa Sawayn? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT employee_id, first_name, last_name, job_id FROM employees WHERE salary > (SELECT MAX(salary) FROM employees WHERE job_id = 'PU_MAN') \nA: display the employee number, name( first name and last name ) and job title for all employees whose salary is more than any salary of those employees whose job title is PU_MAN. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT StuID FROM Student WHERE city_code = 'CHI' \nA: What are the ids of all students who live in CHI? \n Additional table information: table: game_1"} -{"text": "Q: SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the customer id and number of accounts with most accounts. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT SUM(gamesplayed) FROM Sportsinfo \nA: What is the total number of games played? \n Additional table information: table: game_1"} -{"text": "Q: SELECT crs_credit, crs_description FROM course WHERE crs_code = 'QM-261' \nA: Find the description and credit for the course QM-261? \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(*) FROM artwork \nA: How many artworks are there? \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT Name FROM WINE WHERE score > 90 \nA: List the names of all distinct wines that have scores higher than 90. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 2005 \nA: What is the average fee for a CSU campus in the year of 2005? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT COUNT(DISTINCT FDA_approved) FROM medicine \nA: How many different FDA approval statuses exist for medicines? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT document_name FROM documents WHERE document_name LIKE '%CV%' \nA: List all the document names which contains 'CV'. \n Additional table information: table: document_management"} -{"text": "Q: SELECT StuID FROM Student WHERE age = (SELECT MAX(age) FROM Student) \nA: Show the student id of the oldest student. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT SUM(acc_bal), state FROM customer WHERE credit_score > 100 GROUP BY state \nA: For each state, find the total account balance of customers whose credit score is above 100. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT DISTINCT directed_by FROM film \nA: Show all directors. \n Additional table information: table: cinema"} -{"text": "Q: SELECT firstname FROM list WHERE classroom = 108 \nA: What are the first names of students in room 108? \n Additional table information: table: student_1"} -{"text": "Q: SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50 \nA: Find the name of airports whose altitude is between -50 and 50. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT T1.name FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the name of airline which runs the most number of routes. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = 'North Coast' \nA: What are the distinct names of wines that have appellations in the North Coast area? \n Additional table information: table: wine_1"} -{"text": "Q: SELECT COUNT(*) FROM Band \nA: Find the number of bands. \n Additional table information: table: music_2"} -{"text": "Q: SELECT COUNT(*) FROM budget WHERE budgeted > 3000 AND YEAR <= 2001 \nA: How many budgets are above 3000 in year 2001 or before? \n Additional table information: table: school_finance"} -{"text": "Q: SELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Zach' AND T2.year = (SELECT MAX(YEAR) FROM PersonFriend WHERE name = 'Zach') \nA: What are the ages of all of Zach's friends who are in the longest relationship? \n Additional table information: table: network_2"} -{"text": "Q: SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the title and id of the film that has the greatest number of copies in inventory? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT * FROM employees WHERE NOT employee_id IN (SELECT employee_id FROM job_history) \nA: display all the information of those employees who did not have any job in the past. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT name FROM program EXCEPT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Morning' \nA: Which programs are never broadcasted in the morning? Give me the names of the programs. \n Additional table information: table: program_share"} -{"text": "Q: SELECT Date FROM performance ORDER BY Attendance DESC LIMIT 1 \nA: What is the date of the performance with the highest number of attendees? \n Additional table information: table: performance_attendance"} -{"text": "Q: SELECT T2.title, T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY T1.stars DESC LIMIT 3 \nA: What are the names and years of the movies that has the top 3 highest rating star? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT LOCATION FROM festival_detail ORDER BY Num_of_Audience DESC LIMIT 1 \nA: What is the location of the festival with the largest number of audience? \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.label = 'Universal Music Group' \nA: What are all the songs in albums under label 'Universal Music Group'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT T3.staff_first_name, T3.staff_last_name FROM problems AS T1, product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = 'rem' EXCEPT SELECT T3.staff_first_name, T3.staff_last_name FROM problems AS T1, product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = 'aut' \nA: Find the first and last name of the staff members who reported problems from the product 'rem' but not 'aut'? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: 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 \nA: Which cities have served as host cities more than once? Return me their GDP and population. \n Additional table information: table: city_record"} -{"text": "Q: SELECT COUNT(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.city_code = 'NYC' AND T2.Election_Cycle = 'Spring' \nA: Which students live in the city with code 'NYC' and have class senator votes in the spring election cycle? Count the numbers. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT i_id FROM item WHERE title = 'orange' \nA: Find the id of the item whose title is 'orange'. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT SUM(settlement_amount), AVG(settlement_amount) FROM settlements \nA: Find the total and average amount of settlements. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT MAX(Population), MIN(Population) FROM county \nA: Return the maximum and minimum population among all counties. \n Additional table information: table: election"} -{"text": "Q: SELECT Name, LOCATION FROM wrestler \nA: What are the names and location of the wrestlers? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes DESC \nA: What are the names of representatives in descending order of votes? \n Additional table information: table: election_representative"} -{"text": "Q: SELECT COUNT(*) FROM rent_arrears \nA: How many council taxes are collected for renting arrears ? \n Additional table information: table: local_govt_mdm"} -{"text": "Q: SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT AVG(balance) FROM savings)) \nA: What are the balances of checking accounts belonging to people with savings balances greater than the average savings balance? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT T3.Player_name, T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID \nA: Show the names of players and names of their coaches. \n Additional table information: table: riding_club"} -{"text": "Q: SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3 \nA: What are the ids of the top three products that were purchased in the largest amount? \n Additional table information: table: department_store"} -{"text": "Q: 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' \nA: Find out the first name and last name of staff lived in city Damianfort. \n Additional table information: table: driving_school"} -{"text": "Q: SELECT AVG(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' \nA: Compute the average salary of the players in the team called 'Boston Red Stockings'. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Accounts) \nA: Count the number of customers who do not have an account. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment ORDER BY T3.cost DESC LIMIT 1 \nA: Which physician was trained in the procedure that costs the most. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.start_date = (SELECT MAX(start_date) FROM policies) \nA: Find the customer who started a policy most recently. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT event_name FROM party_events GROUP BY event_name HAVING COUNT(*) > 2 \nA: find the event names that have more than 2 records. \n Additional table information: table: party_people"} -{"text": "Q: SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3 \nA: Report all majors that have less than 3 students. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T1.electoral_register_id FROM Electoral_Register AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id WHERE T2.source_system_code = 'Electoral' OR T2.source_system_code = 'Tax' \nA: What are the register ids of electoral registries that have the cross reference source system code 'Electoral' or 'Tax'? \n Additional table information: table: local_govt_mdm"} -{"text": "Q: SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room' \nA: What is the name of each dorm that has a TV Lounge but no study rooms? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T2.Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name \nA: What are the names of the technicians and how many machines are they assigned to repair? \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of teh studio that created the most films? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT DISTINCT CLASS FROM race \nA: Return the different classes of races. \n Additional table information: table: race_track"} -{"text": "Q: SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2 \nA: What are the nations that have more than two ships? \n Additional table information: table: ship_mission"} -{"text": "Q: 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 \nA: Find name of the services that has never been used. \n Additional table information: table: e_government"} -{"text": "Q: SELECT name, age, country FROM artist ORDER BY Year_Join NULLS FIRST \nA: What are the names, ages, and countries of artists, sorted by the year they joined? \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY COUNT(*) DESC LIMIT 1 \nA: find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30. \n Additional table information: table: aircraft"} -{"text": "Q: SELECT date_of_birth FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn' \nA: What is the birthday of the staff member with first name as Janessa and last name as Sawayn? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT Candidate_ID FROM candidate ORDER BY oppose_rate NULLS FIRST LIMIT 1 \nA: What is the id of the candidate with the lowest oppose rate? \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT T3.Fname, T3.LName, T2.gradepoint FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID \nA: Find the student first and last names and grade points of all enrollments. \n Additional table information: table: college_3"} -{"text": "Q: SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid JOIN airlines AS T3 ON T1.alid = T3.alid WHERE T2.country = 'Italy' AND T3.name = 'American Airlines' \nA: What is the number of routes operated by the airline American Airlines whose destinations are in Italy? \n Additional table information: table: flight_4"} -{"text": "Q: SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100 \nA: What is the response received date for the document described as Regular that was granted more than 100 dollars? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: 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' \nA: Which customers have both 'On Road' and 'Shipped' as order status? List the customer ids. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.share_count > 100 \nA: Show details of all investors if they make any transaction with share count greater than 100. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT Headquarters FROM company WHERE Industry = 'Banking' INTERSECT SELECT Headquarters FROM company WHERE Industry = 'Oil and gas' \nA: Show the headquarters that have both companies in banking industry and companies in oil and gas industry. \n Additional table information: table: company_employee"} -{"text": "Q: SELECT title, directed_by FROM film \nA: Show the title and director for all films. \n Additional table information: table: cinema"} -{"text": "Q: SELECT card_id, customer_id, card_type_code, card_number FROM Customers_cards \nA: What are card ids, customer ids, card types, and card numbers for each customer card? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT document_name FROM documents WHERE document_name LIKE '%CV%' \nA: What are the names of documents that contain the substring 'CV'? \n Additional table information: table: document_management"} -{"text": "Q: 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 \nA: Find the id of the customer who made the most orders. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT MAX(Cows), MIN(Cows) FROM farm \nA: What are the maximum and minimum number of cows across all farms. \n Additional table information: table: farm"} -{"text": "Q: SELECT dept_name, building FROM department WHERE budget > (SELECT AVG(budget) FROM department) \nA: Give the name and building of the departments with greater than average budget. \n Additional table information: table: college_2"} -{"text": "Q: SELECT t1.product_id, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code JOIN product_characteristics AS t3 ON t1.product_id = t3.product_id GROUP BY t1.product_id HAVING COUNT(*) >= 2 \nA: Find the id and color description of the products with at least 2 characteristics. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT name FROM instructor WHERE NOT id IN (SELECT id FROM teaches) \nA: Find the name of instructors who didn't teach any courses? \n Additional table information: table: college_2"} -{"text": "Q: SELECT T1.Delegate, T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID \nA: Show the delegates and the names of the party they belong to. \n Additional table information: table: election"} -{"text": "Q: SELECT T1.driverid, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds DESC LIMIT 1 \nA: What is the id and last name of the driver with the longest laptime? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = 'Maryland' OR T2.College = 'Duke' \nA: Return the official native languages of countries who have players from Maryland or Duke colleges. \n Additional table information: table: match_season"} -{"text": "Q: SELECT T1.name, T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id \nA: What are the names and types of the companies that have ever operated a flight? \n Additional table information: table: flight_company"} -{"text": "Q: SELECT SUM(no_of_customers) FROM bank WHERE city = 'New York City' \nA: What is the total number of customers who use banks in New York City? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT first_name, last_name, salary FROM employees WHERE first_name LIKE '%m' \nA: Display the first and last name, and salary for those employees whose first name is ending with the letter m. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in \nA: Show the ids of the faculty who don't participate in any activity. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT AVG(transaction_amount), MIN(transaction_amount), MAX(transaction_amount), SUM(transaction_amount) FROM Financial_transactions \nA: What is the average, minimum, maximum, and total transaction amount? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT COUNT(DISTINCT state) FROM college WHERE enr < (SELECT AVG(enr) FROM college) \nA: What is the number of states that has some colleges whose enrollment is smaller than the average enrollment? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT COUNT(*) FROM Financial_transactions \nA: How many transactions do we have? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT DISTINCT Director FROM film \nA: List the distinct director of all films. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT COUNT(*) FROM Visitors WHERE NOT Tourist_ID IN (SELECT Tourist_ID FROM Visits) \nA: How many tourists did not make any visit? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT MAX(Milliseconds), MIN(Milliseconds) FROM TRACK \nA: Find the maximum and minimum durations of tracks in milliseconds. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Customer_Payments) \nA: List the number of customers that did not have any payment history. \n Additional table information: table: driving_school"} -{"text": "Q: SELECT name FROM manufacturers WHERE revenue BETWEEN 100 AND 150 \nA: Find the name of companies whose revenue is between 100 and 150. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT minister FROM party WHERE party_name <> 'Progress Party' \nA: Show all ministers who do not belong to Progress Party. \n Additional table information: table: party_people"} -{"text": "Q: SELECT COUNT(DISTINCT Currency_Code) FROM Drama_Workshop_Groups \nA: Find the number of distinct currency codes used in drama workshop groups. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = 'West Germany' \nA: What are the different names of mountains ascended by climbers from the country of West Germany? \n Additional table information: table: climbing"} -{"text": "Q: SELECT T1.artist_name, T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate LIKE '%Mar%' \nA: What are the names and genders of all artists who released songs in the month of March? \n Additional table information: table: music_1"} -{"text": "Q: SELECT COUNT(*) FROM performance \nA: How many performances are there? \n Additional table information: table: performance_attendance"} -{"text": "Q: SELECT Player_name FROM player WHERE NOT Player_ID IN (SELECT Player_ID FROM player_coach) \nA: List the names of players that do not have coaches. \n Additional table information: table: riding_club"} -{"text": "Q: SELECT T1.emp_fname FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History' EXCEPT SELECT T4.emp_fname FROM employee AS T4 JOIN CLASS AS T5 ON T4.emp_num = T5.prof_num \nA: What is the first names of the professors from the history department who do not teach a class. \n Additional table information: table: college_1"} -{"text": "Q: SELECT T1.customer_name, T1.customer_phone FROM customers AS T1 JOIN mailshot_customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.outcome_code = 'No Response' \nA: Show the name and phone for customers with a mailshot with outcome code 'No Response'. \n Additional table information: table: customers_campaigns_ecommerce"} -{"text": "Q: SELECT mID, AVG(stars) FROM Rating GROUP BY mID HAVING COUNT(*) >= 2 \nA: For each movie that received more than 3 reviews, what is the average rating? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100 \nA: What are the descriptions of the service types with product price above 100? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT SUM(revenue) FROM manufacturers WHERE revenue > (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin') \nA: What is the total revenue of companies with revenue greater than the lowest revenue of any manufacturer in Austin? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT T3.location, T3.Representative_Name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id ORDER BY T2.Assets_billion DESC LIMIT 3 \nA: What are the locations and representatives' names of the gas stations owned by the companies with the 3 largest amounts of assets? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT cell_mobile_number, email_address FROM STUDENTS \nA: Return the cell phone number and email address for all students. \n Additional table information: table: behavior_monitoring"} -{"text": "Q: SELECT DISTINCT District_name FROM district ORDER BY city_area DESC \nA: Find all the distinct district names ordered by city area in descending. \n Additional table information: table: store_product"} -{"text": "Q: SELECT COUNT(*), city FROM employees WHERE title = 'IT Staff' GROUP BY city \nA: How many employees who are IT staff are from each city? \n Additional table information: table: store_1"} -{"text": "Q: SELECT document_name, access_count FROM documents ORDER BY access_count DESC LIMIT 1 \nA: Find the name of the document that has been accessed the greatest number of times, as well as the count of how many times it has been accessed? \n Additional table information: table: document_management"} -{"text": "Q: SELECT T1.student_id, COUNT(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id \nA: For every student who is registered for some course, how many courses are they registered for? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration > (SELECT MIN(duration) FROM pitstops WHERE raceid = 841) \nA: What are the different ids and stop durations of all the drivers whose stop lasted longer than the driver in the race with the id 841? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT Name FROM technician WHERE Age = 36 OR Age = 37 \nA: Show the name of technicians aged either 36 or 37 \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT open_date, COUNT(*) FROM church GROUP BY open_date \nA: Show all opening years and the number of churches that opened in that year. \n Additional table information: table: wedding"} -{"text": "Q: SELECT Carrier FROM phone WHERE Memory_in_G < 32 INTERSECT SELECT Carrier FROM phone WHERE Memory_in_G > 64 \nA: Show the carriers that have both phones with memory smaller than 32 and phones with memory bigger than 64. \n Additional table information: table: phone_market"} -{"text": "Q: SELECT LOCATION FROM cinema WHERE openning_year >= 2010 GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the location with the most cinemas opened in year 2010 or later? \n Additional table information: table: cinema"} -{"text": "Q: SELECT Major FROM STUDENT GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which major has the most students? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT Census_Ranking FROM city WHERE Status <> 'Village' \nA: Show the census ranking of cities whose status are not 'Village'. \n Additional table information: table: farm"} -{"text": "Q: SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID \nA: List the distinct hometowns that are not associated with any gymnast. \n Additional table information: table: gymnast"} -{"text": "Q: SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5 \nA: What are the titles of all movies that have rating star is between 3 and 5? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.overall_rating > (SELECT AVG(overall_rating) FROM Player_Attributes) \nA: List all player names who have an overall rating higher than the average. \n Additional table information: table: soccer_1"} -{"text": "Q: SELECT COUNT(*) FROM wrestler \nA: How many wrestlers are there? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT COUNT(DISTINCT services) FROM station \nA: How many different services are provided by all stations? \n Additional table information: table: station_weather"} -{"text": "Q: SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the people that have been governor the most times. \n Additional table information: table: election"} -{"text": "Q: SELECT AVG(no_of_customers) FROM bank WHERE state = 'Utah' \nA: What is the average number of customers across banks in the state of Utah? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT role_code FROM ROLES \nA: What are all role codes? \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT grade, COUNT(DISTINCT classroom), COUNT(*) FROM list GROUP BY grade \nA: For each grade, return the grade number, the number of classrooms used for the grade, and the total number of students enrolled in the grade. \n Additional table information: table: student_1"} -{"text": "Q: SELECT DISTINCT region_name FROM region ORDER BY Label NULLS FIRST \nA: Show all distinct region names ordered by their labels. \n Additional table information: table: party_people"} -{"text": "Q: SELECT T2.customer_name, T2.payment_method FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.outcome_code = 'Order' INTERSECT SELECT T2.customer_name, T2.payment_method FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.outcome_code = 'No Response' \nA: What are the name and payment method of customers who have both mailshots in 'Order' outcome and mailshots in 'No Response' outcome. \n Additional table information: table: customers_campaigns_ecommerce"} -{"text": "Q: SELECT T2.party_name, COUNT(*) FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id \nA: Show party names and the number of events for each party. \n Additional table information: table: party_people"} -{"text": "Q: SELECT COUNT(DISTINCT Software_Platform) FROM device \nA: How many different software platforms are there for devices? \n Additional table information: table: device"} -{"text": "Q: SELECT first_name FROM customer WHERE NOT customer_id IN (SELECT customer_id FROM rental WHERE rental_date > '2005-08-23 02:06:01') \nA: Return the first names of customers who did not rented a film after the date '2005-08-23 02:06:01'. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T3.Location, T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age NULLS FIRST \nA: For each party, find its location and the name of its host. Sort the result in ascending order of the age of the host. \n Additional table information: table: party_host"} -{"text": "Q: SELECT T1.customer_name, T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'New' INTERSECT SELECT T1.customer_name, T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Pending' \nA: Find the name and address of the customers who have both New and Pending orders. \n Additional table information: table: department_store"} -{"text": "Q: SELECT T1.name_first, T1.name_last, T1.player_id, COUNT(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which player has the most all star game experiences? Give me the first name, last name and id of the player, as well as the number of times the player participated in all star game. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT departure_date, arrival_date FROM Flight WHERE origin = 'Los Angeles' AND destination = 'Honolulu' \nA: Show me the departure date and arrival date for all flights from Los Angeles to Honolulu. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT apt_number FROM Apartments ORDER BY room_count ASC NULLS FIRST \nA: Sort the apartment numbers in ascending order of room count. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT Rating FROM Restaurant WHERE ResName = 'Subway' \nA: What is the rating of the restaurant Subway? \n Additional table information: table: restaurant_1"} -{"text": "Q: SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall' \nA: What are the names of the amenities that Smith Hall has? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total < 315 \nA: What are the heights of body builders with total score smaller than 315? \n Additional table information: table: body_builder"} -{"text": "Q: SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_from LIKE '2016%' \nA: Return the name and gender of the staff who was assigned in 2016. \n Additional table information: table: department_store"} -{"text": "Q: SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1 \nA: List the most common type of Status across cities. \n Additional table information: table: farm"} -{"text": "Q: 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 \nA: List first name and last name of customers that have more than 2 payments. \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = 'Fail' \nA: Find the cell mobile number of the candidates whose assessment code is 'Fail'? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT COUNT(*) FROM College WHERE enr > 15000 \nA: What is the number of colleges with a student population greater than 15000? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT bike_id FROM trip WHERE zip_code = 94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the id of the bike that traveled the most in 94002? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT AVG(T2.gradepoint) FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.LName = 'Smith' \nA: Find the average grade point of student whose last name is Smith. \n Additional table information: table: college_3"} -{"text": "Q: SELECT AVG(salary), MAX(salary) FROM Employee \nA: What is average and maximum salary of all employees. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT name, MAX(revenue), Headquarter FROM manufacturers GROUP BY Headquarter \nA: What are the names and revenues of the companies with the highest revenues in each headquarter city? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT Name FROM company WHERE Industry = 'Banking' OR Industry = 'Retailing' \nA: Show the names of companies in the banking or retailing industry? \n Additional table information: table: company_employee"} -{"text": "Q: SELECT Famous_Title FROM artist WHERE Artist = 'Triumfall' \nA: What are the famous titles of the artist 'Triumfall'? \n Additional table information: table: music_4"} -{"text": "Q: SELECT StuID FROM Student WHERE age > 20 \nA: Show all student ids who are older than 20. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT cust_name, acc_bal FROM customer WHERE cust_name LIKE '%a%' \nA: Find the name and account balance of the customer whose name includes the letter \u2018a\u2019. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT name FROM Person WHERE gender = 'male' AND age = (SELECT MIN(age) FROM person WHERE gender = 'male') \nA: Who is the youngest male? \n Additional table information: table: network_2"} -{"text": "Q: SELECT DISTINCT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Brittany Harris' OR T2.year > 2000 \nA: What are the names of all movies that were made after 2000 or reviewed by Brittany Harris? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T4.crs_description, T4.crs_credit FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num JOIN course AS T4 ON T4.crs_code = T1.crs_code WHERE T3.stu_lname = 'Smithson' \nA: What are the description and credit of the course which the student whose last name is Smithson took? \n Additional table information: table: college_1"} -{"text": "Q: SELECT DISTINCT date_moved_in FROM residents \nA: What are the distinct move in dates of the residents? \n Additional table information: table: local_govt_and_lot"} -{"text": "Q: SELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000 \nA: What are the investors who have invested in both entrepreneurs who requested more than 140000 and entrepreneurs who requested less than 120000? \n Additional table information: table: entrepreneur"} -{"text": "Q: SELECT COUNT(*) FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 100 OR T2.ticket_price < 10 \nA: How many exhibitions have a attendance more than 100 or have a ticket price below 10? \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT T3.dept_name FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T1.dept_code = T3.dept_code GROUP BY T1.dept_code ORDER BY SUM(T1.crs_credit) DESC LIMIT 1 \nA: Which department offers the most credits all together? \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid JOIN airlines AS T3 ON T1.alid = T3.alid WHERE T2.country = 'Italy' AND T3.name = 'American Airlines' \nA: Return the number of routes with destination airport in Italy operated by the airline with name 'American Airlines'. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*) <= 5 \nA: List the types of competition that have at most five competitions of that type. \n Additional table information: table: sports_competition"} -{"text": "Q: SELECT class_code FROM CLASS WHERE class_room = 'KLR209' \nA: List the codes of all courses that take place in room KLR209. \n Additional table information: table: college_1"} -{"text": "Q: SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010 \nA: What are the ids of courses offered in Fall of 2009 but not in Spring of 2010? \n Additional table information: table: college_2"} -{"text": "Q: SELECT dept_name, AVG(salary) FROM instructor GROUP BY dept_name HAVING AVG(salary) > 42000 \nA: What are the names and average salaries for departments with average salary higher than 42000? \n Additional table information: table: college_2"} -{"text": "Q: SELECT Name FROM county_public_safety ORDER BY Population DESC \nA: What are the names of the counties of public safety, ordered by population descending? \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT Lname FROM FACULTY WHERE Building = 'Barton' ORDER BY Lname NULLS FIRST \nA: Find the last names of faculties in building Barton in alphabetic order. \n Additional table information: table: college_3"} -{"text": "Q: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'shopping' \nA: Find the tourist attractions that have parking or shopping as their feature details. What are the names of the attractions? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT document_name, access_count FROM documents ORDER BY access_count DESC LIMIT 1 \nA: What is the name of the document which has been accessed the most times, as well as the number of times it has been accessed? \n Additional table information: table: document_management"} -{"text": "Q: SELECT name, total_passengers FROM station WHERE LOCATION <> 'London' \nA: Show the names and total passengers for all train stations not in London. \n Additional table information: table: train_station"} -{"text": "Q: SELECT DName FROM DEPARTMENT EXCEPT SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO \nA: Find the name of the department that has no students minored in? \n Additional table information: table: college_3"} -{"text": "Q: SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which location has the most corresponding counties? \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT name FROM physician WHERE POSITION LIKE '%senior%' \nA: Find the name of physicians whose position title contains the word 'senior'. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT title, YEAR, director FROM movie ORDER BY budget_million NULLS FIRST \nA: Show all movie titles, years, and directors, ordered by budget. \n Additional table information: table: culture_company"} -{"text": "Q: SELECT document_id, COUNT(DISTINCT employee_id) FROM Circulation_History GROUP BY document_id \nA: For each document, list the number of employees who have showed up in the circulation history of that document. List the document ids and number of employees. \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT name FROM Employee ORDER BY salary ASC NULLS FIRST LIMIT 3 \nA: What is the name of the 3 employees who get paid the least? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT state FROM park GROUP BY state HAVING COUNT(*) > 2 \nA: Which states have more than 2 parks? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT dept_name FROM department ORDER BY dept_name NULLS FIRST \nA: What are the names of all departments in alphabetical order? \n Additional table information: table: college_1"} -{"text": "Q: SELECT COUNT(*) FROM architect WHERE gender = 'female' \nA: How many architects are female? \n Additional table information: table: architecture"} -{"text": "Q: SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID HAVING COUNT(*) >= 3 \nA: What are the names of musicals who have at 3 or more actors? \n Additional table information: table: musical"} -{"text": "Q: SELECT SUM(Rating_in_percent), OWNER FROM channel GROUP BY OWNER \nA: Find the total rating ratio for each channel owner. \n Additional table information: table: program_share"} -{"text": "Q: SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code HAVING COUNT(*) >= 2 \nA: Show the product type codes that have at least two products. \n Additional table information: table: solvency_ii"} -{"text": "Q: SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2004 AND T2.campus = 'San Francisco State University' \nA: How many faculty lines are there in 'San Francisco State University' in year 2004? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT COUNT(*) FROM technician \nA: What is the number of technicians? \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT Date_of_ceremony FROM music_festival WHERE Category = 'Best Song' AND RESULT = 'Awarded' \nA: Return the dates of ceremony corresponding to music festivals that had the category 'Best Song' and result 'Awarded'. \n Additional table information: table: music_4"} -{"text": "Q: SELECT T3.Name, T2.Date, T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Negative = T3.People_ID ORDER BY T3.Name ASC NULLS FIRST \nA: Show the names of people, and dates and venues of debates they are on the negative side, ordered in ascending alphabetical order of name. \n Additional table information: table: debate"} -{"text": "Q: SELECT T2.Date FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1 \nA: Show the date of the tallest perpetrator. \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT DISTINCT product_name FROM product ORDER BY product_id NULLS FIRST \nA: List all the distinct product names ordered by product id? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = 'Clara') \nA: display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code = 'ORG' \nA: What is the description for the budget type with code ORG? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs' \nA: What is the unit of measuerment of the product category code 'Herbs'? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T1.first_name, T1.last_name, T1.employee_id, T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id \nA: What the full names, ids of each employee and the name of the country they are in? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT transaction_type, SUM(transaction_amount) FROM Financial_transactions GROUP BY transaction_type \nA: Show the transaction types and the total amount of transactions. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT COUNT(*), T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.age > 20 GROUP BY T3.dorm_name \nA: How many students are older than 20 in each dorm? \n Additional table information: table: dorm_1"} -{"text": "Q: 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 \nA: Find the white grape used to produce wines with scores above 90. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT T2.name, COUNT(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid \nA: Show aircraft names and number of flights for each aircraft. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid HAVING COUNT(*) > 1 \nA: Find the name of physicians who are in charge of more than one patient. \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT Rank FROM FACULTY GROUP BY Rank ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: What is the least common faculty rank? \n Additional table information: table: college_3"} -{"text": "Q: SELECT transaction_type, COUNT(*) FROM Financial_transactions GROUP BY transaction_type \nA: What are the different transaction types, and how many transactions of each have taken place? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT DISTINCT name FROM nurse ORDER BY name NULLS FIRST \nA: List the names of all distinct nurses ordered by alphabetical order? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT COUNT(DISTINCT Governor) FROM party \nA: Count the number of distinct governors. \n Additional table information: table: election"} -{"text": "Q: SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2 \nA: Report all advisors that advise more than 2 students. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT Author FROM submission ORDER BY Scores ASC NULLS FIRST \nA: Find the author for each submission and list them in ascending order of submission score. \n Additional table information: table: workshop_paper"} -{"text": "Q: SELECT COUNT(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = 'Australian Grand Prix' AND YEAR = 2009 \nA: How many drivers participated in the race Australian Grand Prix held in 2009? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT T2.Store_Name FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T1.Status_Code = 'stop' \nA: Which workshop groups have bookings with status code 'stop'? Give me the names. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'TARRING' AND T2.lastname = 'LEIA' \nA: How many students are taught by teacher TARRING LEIA? \n Additional table information: table: student_1"} -{"text": "Q: SELECT SUM(no_of_customers) FROM bank \nA: How many customers are there? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT AVG(Age) FROM STUDENT WHERE Sex = 'F' \nA: Find the average age of female students. \n Additional table information: table: voter_2"} -{"text": "Q: 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' \nA: Find the first names of the faculty members who participate in Canoeing and Kayaking. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT student_id FROM student_course_attendance WHERE course_id = 301 \nA: What are the ids of the students who registered for course 301? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT T2.roomName, T1.Rate, T1.CheckIn, T1.CheckOut FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY T1.Rate DESC LIMIT 1 \nA: Return the name, rate, check in and check out date for the room with the highest rate. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT T4.dept_name FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code GROUP BY T3.dept_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the department with the most students enrolled? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T1.Title, T2.AlbumID, COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId GROUP BY T2.AlbumID \nA: What are the names and ids of the different albums, and how many tracks are on each? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT T1.first_name, T1.last_name, T1.other_details, T3.skill_description FROM Maintenance_Engineers AS T1 JOIN Engineer_Skills AS T2 ON T1.engineer_id = T2.engineer_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id \nA: List all every engineer's first name, last name, details and coresponding skill description. \n Additional table information: table: assets_maintenance"} -{"text": "Q: SELECT Name FROM wrestler ORDER BY Days_held DESC \nA: What are the names of the wrestlers, ordered descending by days held? \n Additional table information: table: wrestler"} -{"text": "Q: SELECT COUNT(*) FROM BOOKINGS \nA: Count the total number of bookings made. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT SUM(gamesplayed) FROM Sportsinfo \nA: How many games are played for all students? \n Additional table information: table: game_1"} -{"text": "Q: SELECT MAX(stars), MIN(stars) FROM Rating \nA: What is the maximum and mininum number of stars a rating can receive? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T2.Lname FROM DEPARTMENT AS T1 JOIN FACULTY AS T2 ON T1.DNO = T3.DNO JOIN MEMBER_OF AS T3 ON T2.FacID = T3.FacID WHERE T1.DName = 'Computer Science' \nA: What are the last names of faculty who are part of the computer science department? \n Additional table information: table: college_3"} -{"text": "Q: SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 2 EXCEPT SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id JOIN Claims AS T3 ON T2.policy_id = T3.policy_id \nA: Which customer had at least 2 policies but did not file any claims? List the customer details and id. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT T1.id, T1.Name, T1.FDA_approved FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC \nA: What are the ids, names, and FDA approval status for medicines ordered by descending number of possible enzyme interactions? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10 \nA: display those departments where more than ten employees work who got a commission percentage. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT Price FROM publication WHERE Publisher = 'Person' OR Publisher = 'Wiley' \nA: Show the prices of publications whose publisher is either 'Person' or 'Wiley' \n Additional table information: table: book_2"} -{"text": "Q: SELECT SUM(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = 'San Jose State University' \nA: How many undergraduates are there in 'San Jose State University' in year 2004? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT DISTINCT product_name FROM product ORDER BY product_name NULLS FIRST \nA: List the names of all the distinct product names in alphabetical order? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT COUNT(*) FROM tryout WHERE pPos = 'goalie' \nA: What is the number of students playing as a goalie? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT COUNT(*) FROM inventory WHERE store_id = 1 \nA: How many items in inventory does store 1 have? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT school_name, LOCATION, mascot FROM school \nA: List the name, location, mascot for all schools. \n Additional table information: table: school_finance"} -{"text": "Q: SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID WHERE T2.Name = 'The Phantom of the Opera' \nA: Show names of actors that have appeared in musical with name 'The Phantom of the Opera'. \n Additional table information: table: musical"} -{"text": "Q: SELECT SUM(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010 \nA: What is the total salary paid by team Boston Red Stockings in 2010? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT COUNT(*) FROM useracct WHERE NOT u_id IN (SELECT u_id FROM review) \nA: Find the number of users who did not write any review. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT T2.account_name, T1.account_id, COUNT(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id \nA: Return the names and ids of each account, as well as the number of transactions. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT COUNT(*) FROM claims_processing_stages \nA: Find the number of distinct stages in claim processing. \n Additional table information: table: insurance_and_eClaims"} -{"text": "Q: SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id = t2.product_id JOIN store AS t3 ON t2.store_id = t3.store_id WHERE t3.store_name = 'Miramichi' \nA: What products are available at store named 'Miramichi'? \n Additional table information: table: store_product"} -{"text": "Q: SELECT Customer_Phone, Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = 'Harold' \nA: What are the phone and email for customer Harold? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT DName FROM DEPARTMENT WHERE Division = 'AS' UNION SELECT DName FROM DEPARTMENT WHERE Division = 'EN' AND Building = 'NEB' \nA: Find the names of departments that are either in division AS or in division EN and in Building NEB. \n Additional table information: table: college_3"} -{"text": "Q: SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_number = 'Suite 634' \nA: Tell me the booking status code for the apartment with number 'Suite 634'. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT catalog_entry_name, capacity FROM Catalog_Contents WHERE price_in_dollars > 700 \nA: Find the name and capacity of products with price greater than 700 (in USD). \n Additional table information: table: product_catalog"} -{"text": "Q: SELECT CLASS FROM race GROUP BY CLASS ORDER BY COUNT(*) DESC LIMIT 1 \nA: Give the class of races that is most common. \n Additional table information: table: race_track"} -{"text": "Q: SELECT DISTINCT card_type_code FROM Customers_Cards \nA: What are the different card type codes? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T2.name, COUNT(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id \nA: Show the name of track and the number of races in each track. \n Additional table information: table: race_track"} -{"text": "Q: SELECT roomName FROM Rooms WHERE basePrice < 160 AND beds = 2 AND decor = 'modern' \nA: Find the names of all modern rooms with a base price below $160 and two beds. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT COUNT(*) FROM region \nA: Count the number of regions. \n Additional table information: table: storm_record"} -{"text": "Q: SELECT COUNT(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE T1.EMP_LNAME = 'Graztevski' \nA: How many classes are professor whose last name is Graztevski has? \n Additional table information: table: college_1"} -{"text": "Q: SELECT fname FROM student WHERE city_code = 'PHL' AND age BETWEEN 20 AND 25 \nA: What is the first name of the students who are in age 20 to 25 and living in PHL city? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT MIN(bathroom_count), MAX(bathroom_count) FROM Apartments \nA: Give me the minimum and maximum bathroom count among all the apartments. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT name FROM Person WHERE job = 'student' AND age = (SELECT MAX(age) FROM person WHERE job = 'student') \nA: What is the name of the oldest student? \n Additional table information: table: network_2"} -{"text": "Q: 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 \nA: What is the document type name and the document type description and creation date for all the documents? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1 \nA: What is the name of the body builder with the greatest body weight? \n Additional table information: table: body_builder"} -{"text": "Q: SELECT name FROM Aircraft WHERE distance > (SELECT AVG(distance) FROM Aircraft) \nA: What are the names of all aircrafts that can cover more distances than average? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT AVG(total_passengers), MAX(total_passengers) FROM station WHERE LOCATION = 'London' OR LOCATION = 'Glasgow' \nA: What is the average and maximum number of total passengers for train stations in London or Glasgow? \n Additional table information: table: train_station"} -{"text": "Q: SELECT T1.Name FROM Tourist_Attractions AS T1, VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Alison' EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1, VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Rosalind' \nA: What are the names of tourist attraction that Alison visited but Rosalind did not visit? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: 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 \nA: What are the names of the customers who have made two or less orders? \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT flag FROM ship GROUP BY flag ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which flag is most widely used among all ships? \n Additional table information: table: ship_1"} -{"text": "Q: SELECT director FROM Movie GROUP BY director HAVING COUNT(*) = 1 \nA: What are the names of all directors who made one movie? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_status = 'Cancelled' \nA: Find the total quantity of products associated with the orders in the 'Cancelled' status. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT region_name FROM region WHERE NOT region_id IN (SELECT region_id FROM affected_region) \nA: What are the names of regions that were not affected? \n Additional table information: table: storm_record"} -{"text": "Q: SELECT name_first, name_last FROM player WHERE weight > 220 OR height < 75 \nA: List players' first name and last name who have weight greater than 220 or height shorter than 75. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT name FROM track WHERE NOT track_id IN (SELECT track_id FROM race) \nA: Return the names of tracks that have no had any races. \n Additional table information: table: race_track"} -{"text": "Q: SELECT Phone FROM EMPLOYEE \nA: List the phone numbers of all employees. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT Customer_Phone, Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = 'Harold' \nA: Find the phone number and email address of customer 'Harold'. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT MIN(Crime_rate), MAX(Crime_rate) FROM county_public_safety \nA: What are the minimum and maximum crime rate of counties? \n Additional table information: table: county_public_safety"} -{"text": "Q: 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 \nA: Give me a list of cities whose temperature in Mar is lower than that in Dec and which have never been host cities. \n Additional table information: table: city_record"} -{"text": "Q: SELECT COUNT(*) FROM scientists \nA: Find the total number of scientists. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT * FROM job_history AS T1 JOIN employees AS T2 ON T1.employee_id = T2.employee_id WHERE T2.salary >= 12000 \nA: What is all the job history info done by employees earning a salary greater than or equal to 12000? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee \nA: How many musicals has each nominee been nominated for? \n Additional table information: table: musical"} -{"text": "Q: SELECT COUNT(DISTINCT payment_method) FROM customers \nA: How many different payment methods are there? \n Additional table information: table: customer_deliveries"} -{"text": "Q: SELECT name FROM useracct WHERE NOT u_id IN (SELECT u_id FROM review) \nA: Find the names of users who did not leave any review. \n Additional table information: table: epinions_1"} -{"text": "Q: SELECT TYPE, COUNT(*) FROM artwork GROUP BY TYPE \nA: Please show different types of artworks with the corresponding number of artworks of each type. \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT T1.name FROM instructor AS T1 JOIN teaches AS T2 ON T1.id = T2.id JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.title = 'C Programming' \nA: What are the names of instructors who have taught C Programming courses? \n Additional table information: table: college_2"} -{"text": "Q: SELECT T2.Name, T1.Date FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID \nA: What are the names of representatives and the dates of elections they participated in. \n Additional table information: table: election_representative"} -{"text": "Q: SELECT AVG(age), sex FROM Student GROUP BY sex \nA: Show the average age for male and female students. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1 \nA: What is the name of the district with the most residents? \n Additional table information: table: store_product"} -{"text": "Q: SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which course is enrolled in by the most students? Give me the course name. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT name FROM city WHERE county_ID = (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1) \nA: Show the name of cities in the county that has the largest number of police officers. \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID \nA: What are the names of body builders? \n Additional table information: table: body_builder"} -{"text": "Q: SELECT name FROM buildings ORDER BY Height DESC \nA: List the names of buildings in descending order of building height. \n Additional table information: table: company_office"} -{"text": "Q: SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id \nA: find the name of all departments that do actually have one or more employees assigned to them. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id \nA: What is all the information regarding employees who are managers? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE T1.title = 'A Kiss Before You Go: Live in Hamburg' \nA: What are the song titles on the album 'A Kiss Before You Go: Live in Hamburg'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT name FROM Person WHERE age = (SELECT MAX(age) FROM person) \nA: Who is the oldest person? \n Additional table information: table: network_2"} -{"text": "Q: SELECT COUNT(DISTINCT UID) FROM tweets \nA: Find the number of users who posted some tweets. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT COUNT(*) FROM CHARACTERISTICS \nA: How many characteristics are there? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T2.product_name FROM problems AS T1, product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = 'Lacey' AND T3.staff_last_name = 'Bosco' INTERSECT SELECT T2.product_name FROM problems AS T1, product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = 'Kenton' AND T3.staff_last_name = 'Champlin' \nA: Find the products which have problems reported by both Lacey Bosco and Kenton Champlin? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT T2.title, T1.stars, T2.director, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T2.director \nA: For each director, what is the title and score of their most poorly rated movie? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT customer_name FROM customers WHERE customer_name LIKE '%Alex%' \nA: Which customer's name contains 'Alex'? Find the full name. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT COUNT(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = 'voluptatem' \nA: How many problems did the product called 'voluptatem' have in record? \n Additional table information: table: tracking_software_problems"} -{"text": "Q: SELECT title, director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1 \nA: What is the title and director for the movie with highest worldwide gross in the year 2000 or before? \n Additional table information: table: culture_company"} -{"text": "Q: SELECT Category, COUNT(*) FROM music_festival GROUP BY Category \nA: Please show the categories of the music festivals and the count. \n Additional table information: table: music_4"} -{"text": "Q: SELECT lastname FROM teachers WHERE classroom = 109 \nA: Find the last names of teachers teaching in classroom 109. \n Additional table information: table: student_1"} -{"text": "Q: 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 \nA: What are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters? \n Additional table information: table: architecture"} -{"text": "Q: SELECT T1.account_id, T1.date_account_opened, T1.account_name, T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan' \nA: Show the id, the account name, and other account details for all accounts by the customer with first name 'Meaghan'. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT name, city, country, elevation FROM airports WHERE city = 'New York' \nA: Find the name, city, country, and altitude (or elevation) of the airports in the city of New York. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT unit_price FROM tracks WHERE name = 'Fast As a Shark' \nA: What is the unit price of the tune 'Fast As a Shark'? \n Additional table information: table: store_1"} -{"text": "Q: SELECT COUNT(*) FROM customers GROUP BY customer_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: How many customers are there in the customer type with the most customers? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT T2.theme, T1.date, T1.attendance FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T2.year = 2004 \nA: What is the theme, date, and attendance for the exhibition in year 2004? \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT product_price FROM products WHERE NOT product_id IN (SELECT product_id FROM complaints) \nA: What are the prices of products that have never gotten a complaint? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT campus FROM campuses WHERE YEAR = 1958 \nA: Find all the campuses opened in 1958. \n Additional table information: table: csu_1"} -{"text": "Q: SELECT campus FROM campuses WHERE YEAR >= 1935 AND YEAR <= 1939 \nA: Which campus was opened between 1935 and 1939? \n Additional table information: table: csu_1"} -{"text": "Q: SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'researcher' \nA: When did researchers start and stop working? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT name FROM channel WHERE OWNER <> 'CCTV' \nA: Find the names of channels that are not owned by CCTV. \n Additional table information: table: program_share"} -{"text": "Q: SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code = t3.color_code WHERE t3.color_description = 'white' AND t2.unit_of_measure <> 'Handful' \nA: What are the names of products that are not 'white' in color and are not measured by the unit 'Handful'? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T1.subject_id, T2.subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) ASC NULLS FIRST \nA: List the subject ID, name of subject and the number of courses available for each subject in ascending order of the course counts. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT MAX(Weeks_on_Top), MIN(Weeks_on_Top) FROM volume \nA: Give the maximum and minimum weeks on top across all volumes. \n Additional table information: table: music_4"} -{"text": "Q: 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 \nA: Find the name and hours of project that has the most number of scientists. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT patient FROM undergoes ORDER BY dateundergoes NULLS FIRST LIMIT 1 \nA: Find the patient who has the most recent undergoing treatment? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T2.pName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = (SELECT cName FROM college ORDER BY enr DESC LIMIT 1) \nA: What are the names of all tryout participants who are from the largest college? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT flno FROM Flight WHERE distance > 2000 \nA: Show flight number for all flights with more than 2000 distance. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.firstname = 'Marianne' \nA: Find all the songs produced by artists with first name 'Marianne'. \n Additional table information: table: music_2"} -{"text": "Q: SELECT COUNT(*) FROM COURSE WHERE Credits > 2 \nA: Count the number of courses with more than 2 credits. \n Additional table information: table: college_3"} -{"text": "Q: SELECT title, director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1 \nA: Return the title and director of the movie released in the year 2000 or earlier that had the highest worldwide gross. \n Additional table information: table: culture_company"} -{"text": "Q: SELECT COUNT(*), address FROM member GROUP BY address \nA: Find the number of members living in each address. \n Additional table information: table: coffee_shop"} -{"text": "Q: SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame' \nA: What are all the characteristic names of product 'sesame'? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT T2.name, COUNT(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id \nA: Show all artist names and the number of exhibitions for each artist. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT clublocation FROM club WHERE clubname = 'Hopkins Student Enterprises' \nA: Tell me the location of the club 'Hopkins Student Enterprises'. \n Additional table information: table: club_1"} -{"text": "Q: SELECT T1.project_id, COUNT(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY COUNT(*) ASC NULLS FIRST \nA: For each project id, how many staff does it have? List them in increasing order. \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT T1.Store_Phone, T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID \nA: What are the phones and emails of workshop groups in which services are performed? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT SUM(Amount_Claimed) FROM Claims \nA: What is total amount claimed summed across all the claims? \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT customer_id, customer_first_name, customer_last_name, customer_phone FROM Customers \nA: Show ids, first names, last names, and phones for all customers. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT fuel_propulsion FROM \"vehicles\".\"cars\" WHERE fleet_series_quantity = '310-329 (20)' \nA: what is the fuel propulsion where the fleet series (quantity) is 310-329 (20)? \n Additional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion"} -{"text": "Q: SELECT title FROM course WHERE course_id IN (SELECT T1.course_id FROM prereq AS T1 JOIN course AS T2 ON T1.prereq_id = T2.course_id WHERE T2.title = 'Differential Geometry') \nA: What is the title of the course with Differential Geometry as a prerequisite? \n Additional table information: table: college_2"} -{"text": "Q: SELECT MIN(market_value), MAX(market_value), AVG(market_value) FROM company \nA: Show minimum, maximum, and average market value for all companies. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT COUNT(*) FROM tryout WHERE decision = 'yes' \nA: How many students received a yes from tryouts? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT T1.department_name, T2.city, T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id \nA: What are the department names, cities, and state provinces for each department? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id JOIN web_client_accelerator AS T3 ON T2.accelerator_id = T3.id WHERE T3.name = 'CProxy' AND T2.compatible_since_year > 1998 \nA: What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ? \n Additional table information: table: browser_web"} -{"text": "Q: SELECT name FROM person EXCEPT SELECT name FROM PersonFriend \nA: What are the names of all people who do not have friends? \n Additional table information: table: network_2"} -{"text": "Q: SELECT CLASS, COUNT(*) FROM race GROUP BY CLASS \nA: Show the race class and number of races in each class. \n Additional table information: table: race_track"} -{"text": "Q: SELECT MAX(Age) FROM STUDENT \nA: What is the oldest age among the students? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50 \nA: Show times of elimination of wrestlers with days held more than 50. \n Additional table information: table: wrestler"} -{"text": "Q: SELECT semester, YEAR FROM SECTION GROUP BY semester, YEAR ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the year and semester when offers the largest number of courses. \n Additional table information: table: college_2"} -{"text": "Q: SELECT title FROM course WHERE course_id IN (SELECT T1.course_id FROM prereq AS T1 JOIN course AS T2 ON T1.prereq_id = T2.course_id WHERE T2.title = 'Differential Geometry') \nA: Find the title of course whose prerequisite is course Differential Geometry. \n Additional table information: table: college_2"} -{"text": "Q: SELECT Order_Date FROM BOOKINGS \nA: List the order dates of all the bookings. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T2.Country = 'Japan' ORDER BY T1.Year DESC \nA: Please list the years of film market estimations when the market is in country 'Japan' in descending order. \n Additional table information: table: film_rank"} -{"text": "Q: SELECT COUNT(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing' \nA: Find the number of manufactures that are based in Tokyo or Beijing. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT fname, lname FROM authors ORDER BY lname NULLS FIRST \nA: Sort the list of all the first and last names of authors in alphabetical order of the last names. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT MIN(age), job FROM Person GROUP BY job \nA: What is minimum age for different job title? \n Additional table information: table: network_2"} -{"text": "Q: SELECT title FROM course GROUP BY title HAVING COUNT(*) > 1 \nA: Find the title of the course that is offered by more than one department. \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*) FROM Reviewer \nA: How many reviewers listed? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT T2.firstname, T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom GROUP BY T2.firstname, T2.lastname ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which teacher teaches the most students? Give me the first name and last name of the teacher. \n Additional table information: table: student_1"} -{"text": "Q: SELECT COUNT(*) FROM device \nA: How many devices are there? \n Additional table information: table: device"} -{"text": "Q: SELECT fname FROM student WHERE age > 20 \nA: What are the first names of all students who are older than 20? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT Lieutenant_Governor, Comptroller FROM party WHERE Party = 'Democratic' \nA: Show the lieutenant governor and comptroller from the democratic party. \n Additional table information: table: election"} -{"text": "Q: SELECT investor_id, AVG(share_count) FROM TRANSACTIONS GROUP BY investor_id \nA: Show the average share count of transactions for different investors. \n Additional table information: table: tracking_share_transactions"} -{"text": "Q: SELECT t1.product_id, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code JOIN product_characteristics AS t3 ON t1.product_id = t3.product_id GROUP BY t1.product_id HAVING COUNT(*) >= 2 \nA: What are the product ids and color descriptions for products with two or more characteristics? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID \nA: What are the names of all instructors who have taught a course, as well as the corresponding course id? \n Additional table information: table: college_2"} -{"text": "Q: 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 \nA: What is the name of the customer who has the largest number of orders? \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING COUNT(T1.track_id) > 100 \nA: What are the names of all playlists that have more than 100 tracks? \n Additional table information: table: store_1"} -{"text": "Q: SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID ORDER BY T2.quality_rank NULLS FIRST \nA: What are the names of the technicians by ascending order of quality rank for the machine they are assigned? \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT cust_name, acc_bal FROM customer WHERE cust_name LIKE '%a%' \nA: What are the names and account balances of customers with the letter a in their names? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT T1.Claim_id, COUNT(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id \nA: Find the number of settlements each claim corresponds to. Show the number together with the claim id. \n Additional table information: table: insurance_policies"} -{"text": "Q: SELECT customer_id, customer_first_name, customer_last_name, customer_phone FROM Customers \nA: What are the ids, full names, and phones of each customer? \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT DISTINCT state FROM college WHERE enr < (SELECT MAX(enr) FROM college) \nA: Find the states where have the colleges whose enrollments are less than the largest size. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT COUNT(DISTINCT payment_method_code) FROM parties \nA: Count the number of different payment method codes used by parties. \n Additional table information: table: e_government"} -{"text": "Q: SELECT Fname FROM STUDENT WHERE Age > 22 \nA: Find the first names of students with age above 22. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010 \nA: Which cities served as a host city after 2010? \n Additional table information: table: city_record"} -{"text": "Q: SELECT COUNT(*) FROM station WHERE city = 'Mountain View' \nA: How many stations are in Mountain View? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT T1.pName, T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' \nA: Find the name and college of students whose decisions are yes in the tryout. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT Description FROM aircraft \nA: What are the descriptions for the aircrafts? \n Additional table information: table: aircraft"} -{"text": "Q: SELECT DISTINCT name FROM nurse ORDER BY name NULLS FIRST \nA: What is the alphabetically ordered list of all the distinct names of nurses? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' INTERSECT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music' \nA: Find the name of tracks which are in both Movies and music playlists. \n Additional table information: table: store_1"} -{"text": "Q: SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Democratic' \nA: Which committees have delegates from the Democratic party? \n Additional table information: table: election"} -{"text": "Q: SELECT MIN(Order_Quantity), AVG(Order_Quantity), MAX(Order_Quantity) FROM INVOICES \nA: What are the minimum, average, and maximum quantities ordered? Check all the invoices. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT T4.crs_description, T4.crs_credit FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num JOIN course AS T4 ON T4.crs_code = T1.crs_code WHERE T3.stu_lname = 'Smithson' \nA: How many credits is the course that the student with the last name Smithson took, and what is its description? \n Additional table information: table: college_1"} -{"text": "Q: SELECT t1.dname FROM department AS t1 JOIN dept_locations AS t2 ON t1.dnumber = t2.dnumber WHERE t2.dlocation = 'Houston' \nA: Find the names of departments that are located in Houston. \n Additional table information: table: company_1"} -{"text": "Q: SELECT DISTINCT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Google' \nA: Which authors belong to the institution 'Google'? Show the first names and last names. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT friend FROM PersonFriend WHERE name = 'Zach' AND YEAR = (SELECT MAX(YEAR) FROM PersonFriend WHERE name = 'Zach') \nA: Who is the friend of Zach with longest year relationship? \n Additional table information: table: network_2"} -{"text": "Q: 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 \nA: Return the type name, type description, and date of creation for each document. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT dept_name, AVG(salary) FROM instructor GROUP BY dept_name HAVING AVG(salary) > 42000 \nA: Find the names and average salaries of all departments whose average salary is greater than 42000. \n Additional table information: table: college_2"} -{"text": "Q: SELECT composer FROM tracks WHERE name = 'Fast As a Shark' \nA: Who is the composer of track Fast As a Shark? \n Additional table information: table: store_1"} -{"text": "Q: SELECT COUNT(DISTINCT client) FROM web_client_accelerator \nA: How many different kinds of clients are supported by the web clients accelerators? \n Additional table information: table: browser_web"} -{"text": "Q: 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' \nA: How many lessons taken by customer with first name as Rylan and last name as Goodwin were completed? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT name FROM artist ORDER BY year_join DESC LIMIT 1 \nA: What is the name of the artist who joined latest? \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT COUNT(DISTINCT Country) FROM climber \nA: Count the number of different countries that climbers are from. \n Additional table information: table: climbing"} -{"text": "Q: SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999 \nA: What are all company names that have a corresponding movie directed in the year 1999? \n Additional table information: table: culture_company"} -{"text": "Q: SELECT T2.building, T2.room_number, T2.semester, T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = 'Psychology' ORDER BY T1.title NULLS FIRST \nA: Find the building, room number, semester and year of all courses offered by Psychology department sorted by course titles. \n Additional table information: table: college_2"} -{"text": "Q: SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Rock' \nA: Find the average unit price of tracks from the Rock genre. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT SUM(enrollment), affiliation FROM university GROUP BY affiliation \nA: What are the total enrollments of universities of each affiliation type? \n Additional table information: table: university_basketball"} -{"text": "Q: 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 \nA: Find the top 3 wineries with the greatest number of wines made of white color grapes. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT T1.subject_id, T2.subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id \nA: What are the subject ID, subject name, and the number of available courses for each subject? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT AVG(T1.salary), COUNT(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name = T2.dept_name ORDER BY T2.budget DESC LIMIT 1 \nA: Find the number and averaged salary of all instructors who are in the department with the highest budget. \n Additional table information: table: college_2"} -{"text": "Q: SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2 \nA: Which party has two or more records? \n Additional table information: table: election"} -{"text": "Q: SELECT Party_Theme, LOCATION FROM party \nA: Give me the theme and location of each party. \n Additional table information: table: party_host"} -{"text": "Q: SELECT Winery FROM WINE GROUP BY Winery HAVING COUNT(*) >= 4 \nA: Find the wineries that have at least four wines. \n Additional table information: table: wine_1"} -{"text": "Q: SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999 \nA: Which directors had a movie both in the year 1999 and 2000? \n Additional table information: table: culture_company"} -{"text": "Q: SELECT COUNT(*) FROM employees AS T1 JOIN customers AS T2 ON T2.support_rep_id = T1.id WHERE T1.first_name = 'Steve' AND T1.last_name = 'Johnson' \nA: What is the count of customers that Steve Johnson supports? \n Additional table information: table: store_1"} -{"text": "Q: SELECT COUNT(DISTINCT city) FROM stadium WHERE opening_year < 2006 \nA: How many cities have a stadium that was opened before the year of 2006? \n Additional table information: table: swimming"} -{"text": "Q: SELECT COUNT(*) FROM store \nA: Count the number of stores. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T1.date, T2.player FROM game AS T1 JOIN injury_accident AS T2 ON T1.id = T2.game_id ORDER BY T1.season DESC \nA: For each injury accident, find the date of the game and the name of the injured player in the game, and sort the results in descending order of game season. \n Additional table information: table: game_injury"} -{"text": "Q: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = 'Rock' \nA: What is the name of tracks whose genre is Rock? \n Additional table information: table: store_1"} -{"text": "Q: SELECT COUNT(DISTINCT complaint_type_code) FROM complaints \nA: How many distinct complaint type codes are there in the database? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT COUNT(DISTINCT T3.title) FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.type = 'Studio' \nA: How many songs appear in studio albums? \n Additional table information: table: music_2"} -{"text": "Q: SELECT T1.County_name, COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id \nA: Show the name of each county along with the corresponding number of delegates from that county. \n Additional table information: table: election"} -{"text": "Q: SELECT Title FROM ALBUM ORDER BY Title NULLS FIRST \nA: Please list all album titles in alphabetical order. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT DISTINCT T1.state, T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes' \nA: How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT DISTINCT publisher FROM book_club \nA: What are all the different book publishers? \n Additional table information: table: culture_company"} -{"text": "Q: SELECT Lieutenant_Governor, Comptroller FROM party WHERE Party = 'Democratic' \nA: Who are the lieutenant governor and comptroller from the democratic party? \n Additional table information: table: election"} -{"text": "Q: SELECT T2.Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name \nA: Show names of technicians and the number of machines they are assigned to repair. \n Additional table information: table: machine_repair"} -{"text": "Q: SELECT COUNT(DISTINCT customer_id) FROM Accounts \nA: Count the number of customers who have an account. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT headquarters, COUNT(*) FROM company GROUP BY headquarters \nA: List all headquarters and the number of companies in each headquarter. \n Additional table information: table: gas_company"} -{"text": "Q: SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE '%court%' \nA: What are the building full names that contain the word 'court'? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T1.dept_name = 'Art' \nA: What are the names of Art instructors who have taught a course, and the corresponding course id? \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton' AND capacity < 50 \nA: Count the number of rooms in Lamberton with capacity lower than 50. \n Additional table information: table: college_2"} -{"text": "Q: SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500 \nA: Show the status shared by cities with population bigger than 1500 and smaller than 500. \n Additional table information: table: farm"} -{"text": "Q: SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There \nA: List all the possible ways to get to attractions, together with the number of attractions accessible by these methods. \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT first_name, last_name, salary FROM employees WHERE commission_pct = 'null' \nA: Return the full names and salaries of employees with null commissions. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Show the account id with most number of transactions. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%' ORDER BY department_id NULLS FIRST \nA: display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M and make the result set in ascending order by department number. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT mailing_date FROM Documents_Mailed WHERE document_id = 7 \nA: What is the mail date of the document with id 7? \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT T2.party_name, COUNT(*) FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id \nA: How many events are there for each party? \n Additional table information: table: party_people"} -{"text": "Q: SELECT document_name FROM documents WHERE NOT document_code IN (SELECT document_code FROM document_sections) \nA: What are the names of documents that do not have any sections? \n Additional table information: table: document_management"} -{"text": "Q: SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = 'lead' \nA: How many songs have a lead vocal? \n Additional table information: table: music_2"} -{"text": "Q: SELECT T2.Governor FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 \nA: Find the parties associated with the delegates from district 1. Who served as governors of the parties? \n Additional table information: table: election"} -{"text": "Q: SELECT Name FROM musical WHERE NOT Musical_ID IN (SELECT Musical_ID FROM actor) \nA: List the name of musicals that do not have actors. \n Additional table information: table: musical"} -{"text": "Q: SELECT COUNT(*) FROM CHARACTERISTICS \nA: Count the number of characteristics. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name NULLS FIRST \nA: Sort the information about course authors and tutors in alphabetical order of the personal name. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31 \nA: What are the dates in which the mean sea level pressure was between 30.3 and 31? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT team_name FROM basketball_match ORDER BY All_Home DESC \nA: What are the names of all the teams in the basketball competition, sorted by all home scores in descending order? \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT DISTINCT name FROM instructor ORDER BY name NULLS FIRST \nA: List in alphabetic order the names of all distinct instructors. \n Additional table information: table: college_2"} -{"text": "Q: SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop' \nA: How many different instruments are used in the song 'Le Pop'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT customer_name, customer_phone, customer_email FROM Customers ORDER BY date_became_customer NULLS FIRST \nA: List the names, phone numbers, and emails of all customers sorted by their dates of becoming customers. \n Additional table information: table: customer_deliveries"} -{"text": "Q: SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name \nA: How many players are from each country? \n Additional table information: table: match_season"} -{"text": "Q: SELECT calendar_date, day_Number FROM Ref_calendar \nA: What are all the calendar dates and day Numbers? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'English' \nA: How many students are attending English courses? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT T1.Product_Name, COUNT(*) FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name \nA: Show the names of products and the number of events they are in. \n Additional table information: table: solvency_ii"} -{"text": "Q: SELECT Nominee FROM musical WHERE Award = 'Tony Award' OR Award = 'Cleavant Derricks' \nA: Show the musical nominee with award 'Bob Fosse' or 'Cleavant Derricks'. \n Additional table information: table: musical"} -{"text": "Q: SELECT DISTINCT POSITION FROM match_season WHERE College = 'UCLA' OR College = 'Duke' \nA: What are the different positions of players from UCLA or Duke colleges? \n Additional table information: table: match_season"} -{"text": "Q: SELECT name FROM station WHERE NOT station_id IN (SELECT station_id FROM train_station) \nA: Show station names without any trains. \n Additional table information: table: train_station"} -{"text": "Q: SELECT T1.lat, T1.long, T1.city FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id ORDER BY T2.duration NULLS FIRST LIMIT 1 \nA: What is the latitude, longitude, city of the station from which the shortest trip started? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC NULLS FIRST \nA: What are the crime rates of counties sorted by number of offices ascending? \n Additional table information: table: county_public_safety"} -{"text": "Q: SELECT Injured FROM perpetrator ORDER BY Injured ASC NULLS FIRST \nA: List the number of people injured by perpetrators in ascending order. \n Additional table information: table: perpetrator"} -{"text": "Q: SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20 \nA: Find the 'date became customers' of the customers whose ID is between 10 and 20. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT order_id, customer_id FROM orders ORDER BY date_order_placed NULLS FIRST LIMIT 1 \nA: what are the order id and customer id of the oldest order? \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT LastName FROM CUSTOMER EXCEPT SELECT T1.LastName FROM CUSTOMER AS T1 JOIN Invoice AS T2 ON T1.CustomerId = T2.CustomerId WHERE T2.total > 20 \nA: Find all the customer last names that do not have invoice totals larger than 20. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT COUNT(*), crs_code FROM CLASS GROUP BY crs_code \nA: How many sections does each course have? \n Additional table information: table: college_1"} -{"text": "Q: SELECT Theme FROM farm_competition ORDER BY YEAR ASC NULLS FIRST \nA: Return the themes of farm competitions, sorted by year ascending. \n Additional table information: table: farm"} -{"text": "Q: SELECT DISTINCT T1.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T3.market_share > 15 \nA: What distinct accelerator names are compatible with the browswers that have market share higher than 15? \n Additional table information: table: browser_web"} -{"text": "Q: SELECT COUNT(*) FROM COURSES \nA: Find the total number of courses offered. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT Name FROM ARTIST WHERE Name LIKE '%a%' \nA: Find the names of all artists that have 'a' in their names. \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT LOCATION FROM cinema WHERE openning_year = 2010 INTERSECT SELECT LOCATION FROM cinema WHERE openning_year = 2011 \nA: Show all the locations where some cinemas were opened in both year 2010 and year 2011. \n Additional table information: table: cinema"} -{"text": "Q: SELECT T1.account_name, T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan' AND T2.customer_last_name = 'Keeling' \nA: What are the names and other details for accounts corresponding to the customer named Meaghan Keeling? \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees) \nA: Find the count of universities whose campus fee is greater than the average campus fee. \n Additional table information: table: csu_1"} -{"text": "Q: SELECT T2.Year, T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID \nA: Give the years and official names of the cities of each competition. \n Additional table information: table: farm"} -{"text": "Q: SELECT name, country FROM people WHERE age < (SELECT AVG(age) FROM people) \nA: Show the name and country for all people whose age is smaller than the average. \n Additional table information: table: wedding"} -{"text": "Q: SELECT formats FROM files GROUP BY formats ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most popular file format? \n Additional table information: table: music_1"} -{"text": "Q: SELECT T3.name, T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id ORDER BY T1.register_year NULLS FIRST \nA: Show all member names and registered branch names sorted by register year. \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT card_type_code FROM Customers_cards GROUP BY card_type_code HAVING COUNT(*) >= 5 \nA: Show card type codes with at least 5 cards. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT flno, distance FROM Flight ORDER BY price DESC LIMIT 1 \nA: Show the flight number and distance of the flight with maximum price. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT DISTINCT last_name FROM Maintenance_Engineers \nA: What are all the distinct last names of all the engineers? \n Additional table information: table: assets_maintenance"} -{"text": "Q: 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' \nA: What are the names of the activities Mark Giuliano is involved in \n Additional table information: table: activity_1"} -{"text": "Q: SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown ORDER BY COUNT(*) DESC LIMIT 1 \nA: Return the hometown that is most common among gymnasts. \n Additional table information: table: gymnast"} -{"text": "Q: SELECT COUNT(DISTINCT Artist_ID) FROM volume \nA: How many distinct artists do the volumes associate to? \n Additional table information: table: music_4"} -{"text": "Q: SELECT name_first, name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998 \nA: What are first and last names of players participating in all star game in 1998? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT Nominee FROM musical WHERE Award = 'Tony Award' INTERSECT SELECT Nominee FROM musical WHERE Award = 'Drama Desk Award' \nA: Show the nominees that have nominated musicals for both 'Tony Award' and 'Drama Desk Award'. \n Additional table information: table: musical"} -{"text": "Q: SELECT Snatch, Clean_Jerk FROM body_builder ORDER BY Snatch ASC NULLS FIRST \nA: List the snatch score and clean jerk score of body builders in ascending order of snatch score. \n Additional table information: table: body_builder"} -{"text": "Q: SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Google' \nA: Find all the papers published by the institution 'Google'. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT AVG(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no' \nA: Find the average hours for the students whose tryout decision is no. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC \nA: Find the name of players whose card is yes in the descending order of training hours. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT DISTINCT building FROM classroom WHERE capacity > 50 \nA: Find the buildings which have rooms with capacity more than 50. \n Additional table information: table: college_2"} -{"text": "Q: SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount > 100 \nA: What are the cities that do not have any branches with more than 100 members? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT DISTINCT T1.Major FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote \nA: What are the distinct majors that students with treasurer votes are studying? \n Additional table information: table: voter_2"} -{"text": "Q: 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) \nA: What are the party emails associated with parties that used the party form that is the most common? \n Additional table information: table: e_government"} -{"text": "Q: SELECT COUNT(*) FROM ship \nA: Count the number of ships. \n Additional table information: table: ship_1"} -{"text": "Q: SELECT product_name, typical_buying_price FROM products \nA: Return the names and typical buying prices for all products. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT cName, state, MIN(enr) FROM college GROUP BY state \nA: What is the name of the school with smallest enrollment size per state? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT Chair_Name FROM festival_detail ORDER BY YEAR ASC NULLS FIRST \nA: What are the names of the chairs of festivals, sorted in ascending order of the year held? \n Additional table information: table: entertainment_awards"} -{"text": "Q: SELECT T1.name, T1.city, T2.src_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T2.src_apid ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the name and city of the airport which is the source for the most number of flight routes. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'KAWA' AND T2.lastname = 'GORDON' \nA: Find the number of students taught by the teacher KAWA GORDON. \n Additional table information: table: student_1"} -{"text": "Q: SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1 \nA: Return the song in the volume that has spent the most weeks on top? \n Additional table information: table: music_4"} -{"text": "Q: SELECT Customer_Name FROM Clients EXCEPT SELECT T2.Customer_Name FROM Bookings AS T1 JOIN Clients AS T2 ON T1.Customer_ID = T2.Client_ID \nA: What are the names of the clients who do not have any booking? \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT T2.title, T1.stars, T2.director, MAX(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE director <> 'null' GROUP BY director \nA: For each director, what are the titles and ratings for all the movies they reviewed? \n Additional table information: table: movie_1"} -{"text": "Q: SELECT AVG(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan) \nA: Find the average credit score of the customers who have some loan. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT t1.customer_name, t2.active_from_date FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t2.channel_code = 'Email' \nA: Find the name and active date of the customer that use email as the contact channel. \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC NULLS FIRST LIMIT 1 \nA: Which team had the least number of attendances in home games in 1980? \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1 \nA: Return the id and full name of the customer who has the fewest accounts. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT T1.member_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id WHERE T2.Party_name <> 'Progress Party' \nA: Show member names that are not in the Progress Party. \n Additional table information: table: party_people"} -{"text": "Q: SELECT DISTINCT name FROM races ORDER BY name DESC \nA: What are the different names of all the races in reverse alphabetical order? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT name, distance FROM Aircraft WHERE aid = 12 \nA: What is the name and distance for the aircraft that has an id of 12? \n Additional table information: table: flight_1"} -{"text": "Q: SELECT COUNT(*) FROM Staff WHERE first_name = 'Ludie' \nA: How many staff have the first name Ludie? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = 'Movies' \nA: List the name of all tracks in the playlists of Movies. \n Additional table information: table: store_1"} -{"text": "Q: SELECT county, COUNT(*), SUM(enrollment) FROM school GROUP BY county \nA: Show each county along with the number of schools and total enrollment in each county. \n Additional table information: table: school_finance"} -{"text": "Q: SELECT T2.title, T2.film_id, T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which film has the most number of actors or actresses? List the film name, film id and description. \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 UNION SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010 \nA: What are the ids for courses in the Fall of 2009 or the Spring of 2010? \n Additional table information: table: college_2"} -{"text": "Q: SELECT title FROM albums ORDER BY title NULLS FIRST \nA: List every album ordered by album title in ascending order. \n Additional table information: table: store_1"} -{"text": "Q: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = 'HOU' \nA: Find the names of the clubs that have at least a member from the city with city code 'HOU'. \n Additional table information: table: club_1"} -{"text": "Q: SELECT COUNT(*) FROM Ref_colors WHERE NOT color_code IN (SELECT color_code FROM products) \nA: Count the number of colors that are not used in any products. \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: 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' \nA: Find the details of all the distinct customers who have orders with status 'On Road'. \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT document_id FROM Documents WHERE document_type_code = 'CV' EXCEPT SELECT document_id FROM Documents_with_expenses \nA: What are the ids of documents with the type code CV that do not have expenses. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING MIN(bikes_available) < 7 \nA: What are the ids of all stations that have a latitude above 37.4 and have never had less than 7 bikes available? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT first_name, last_name FROM employees ORDER BY hire_date ASC NULLS FIRST LIMIT 10 \nA: List top 10 employee work longest in the company. List employee's first and last name. \n Additional table information: table: store_1"} -{"text": "Q: SELECT DISTINCT region_name FROM region ORDER BY Label NULLS FIRST \nA: What are the different region names, ordered by labels? \n Additional table information: table: party_people"} -{"text": "Q: SELECT name, furniture_id FROM furniture ORDER BY market_rate DESC LIMIT 1 \nA: Return the name and id of the furniture with the highest market rate. \n Additional table information: table: manufacturer"} -{"text": "Q: SELECT T1.name, T2.balance + T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance > (SELECT AVG(balance) FROM savings) \nA: What are the names and sum of checking and savings balances for accounts with savings balances higher than the average savings balance? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT name FROM playlists \nA: What are the names of all the playlists? \n Additional table information: table: store_1"} -{"text": "Q: SELECT StuID FROM Student WHERE Advisor = 1121 \nA: What are the ids of all students who have advisor number 1121? \n Additional table information: table: game_1"} -{"text": "Q: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) EXCEPT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30) \nA: What are the names of the people who are older 40 but no friends under age 30? \n Additional table information: table: network_2"} -{"text": "Q: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = 'Rock' AND T3.name = 'MPEG audio file' \nA: What are the names of all Rock tracks that are stored on MPEG audio files? \n Additional table information: table: store_1"} -{"text": "Q: SELECT roomName FROM Rooms WHERE bedType = 'King' OR bedType = 'Queen' \nA: What are the names of rooms that have either king or queen bed? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT COUNT(*) FROM products WHERE price >= 180 \nA: Compute the number of products with a price larger than or equal to $180. \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT MAX(authorder) FROM authorship) \nA: Which paper has the most authors? Give me the paper title. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT clubdesc FROM club WHERE clubname = 'Tennis Club' \nA: What is the description of the club named 'Tennis Club'? \n Additional table information: table: club_1"} -{"text": "Q: SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id HAVING COUNT(*) > 1 \nA: Show the names of the buildings that have more than one company offices. \n Additional table information: table: company_office"} -{"text": "Q: SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171 \nA: How many courses does the student with id 171 actually attend? \n Additional table information: table: student_assessment"} -{"text": "Q: SELECT T2.Name, COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID \nA: How many actors have appeared in each musical? \n Additional table information: table: musical"} -{"text": "Q: SELECT Name FROM TRACK WHERE Name LIKE '%you%' \nA: What are the names of tracks that contain the the word you in them? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT title FROM albums ORDER BY title NULLS FIRST \nA: What are the titles of all the albums alphabetically ascending? \n Additional table information: table: store_1"} -{"text": "Q: SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2 \nA: Which advisors have more than two students? \n Additional table information: table: voter_2"} -{"text": "Q: SELECT date_joined_staff FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn' \nA: When did the staff member with first name as Janessa and last name as Sawayn join the company? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT phone FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards' \nA: What is the the phone number of Nancy Edwards? \n Additional table information: table: store_1"} -{"text": "Q: 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 \nA: What is the name of the customer who has the most orders? \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT service_name FROM services ORDER BY service_name NULLS FIRST \nA: List all the services in the alphabetical order. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT Other_Details FROM LOCATIONS WHERE Location_Name = 'UK Gallery' \nA: What is the detail of the location UK Gallery? \n Additional table information: table: cre_Theme_park"} -{"text": "Q: SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T2.name = 'Airbus A340-300' \nA: Show all flight numbers with aircraft Airbus A340-300. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT POSITION, COUNT(*) FROM match_season GROUP BY POSITION \nA: How many players played each position? \n Additional table information: table: match_season"} -{"text": "Q: SELECT COUNT(*) FROM artist \nA: How many artists do we have? \n Additional table information: table: theme_gallery"} -{"text": "Q: 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 \nA: Show the station name with greatest number of trains. \n Additional table information: table: train_station"} -{"text": "Q: SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000 \nA: what is the phone number of employees whose salary is in the range of 8000 and 12000? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT title, director FROM film WHERE NOT film_id IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.Market_ID WHERE country = 'China') \nA: What are the titles and directors of the films were never presented in China? \n Additional table information: table: film_rank"} -{"text": "Q: SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989 \nA: Show all publishers which do not have a book in 1989. \n Additional table information: table: culture_company"} -{"text": "Q: SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' \nA: On average, how old are the members in the club 'Hopkins Student Enterprises'? \n Additional table information: table: club_1"} -{"text": "Q: SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which range contains the most mountains? \n Additional table information: table: climbing"} -{"text": "Q: SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the name of the course that has the most student enrollment? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT T2.title, MAX(T1.price) FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id \nA: Give me the title and highest price for each film. \n Additional table information: table: cinema"} -{"text": "Q: SELECT COUNT(*) FROM gymnast \nA: How many gymnasts are there? \n Additional table information: table: gymnast"} -{"text": "Q: SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = 'Sales Person' EXCEPT SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = 'Clerical Staff' \nA: Find the name and gender of the staff who has been assigned the job of Sales Person but never Clerical Staff. \n Additional table information: table: department_store"} -{"text": "Q: SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = '2192' \nA: Find the distinct last names of all the students who have president votes and whose advisor is not 2192. \n Additional table information: table: voter_2"} -{"text": "Q: SELECT t2.team_name FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE enrollment < (SELECT AVG(enrollment) FROM university) \nA: Find the team names of the universities whose enrollments are smaller than the average enrollment size. \n Additional table information: table: university_basketball"} -{"text": "Q: 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 \nA: Return the budget type codes, budget type descriptions and document ids for documents with expenses. \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT name FROM people WHERE height < (SELECT AVG(height) FROM people) \nA: find the name of people whose height is lower than the average. \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT COUNT(*) FROM Project_outcomes WHERE outcome_code = 'Patent' \nA: How many patents outcomes were listed for all the projects? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT Phone FROM EMPLOYEE \nA: What are the phone numbers for each employee? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT T1.Builder FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID WHERE T2.Name = 'Andaman Exp' \nA: Show the builder of railways associated with the trains named 'Andaman Exp'. \n Additional table information: table: railway"} -{"text": "Q: SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.crs_description LIKE '%Statistics%' \nA: What is the name of the department that offers a course that has a description including the word 'Statistics'? \n Additional table information: table: college_1"} -{"text": "Q: SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = 'Julio' \nA: Find the names of courses taught by the tutor who has personal name 'Julio'. \n Additional table information: table: e_learning"} -{"text": "Q: SELECT SUM(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name <> 'Brown' \nA: What is the total balance of savings accounts not belonging to someone with the name Brown? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses \nA: What are the ids of documents which don't have expense budgets? \n Additional table information: table: cre_Docs_and_Epenses"} -{"text": "Q: SELECT cName FROM college ORDER BY enr DESC LIMIT 3 \nA: What are the names of the schools with the top 3 largest class sizes? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY COUNT(*) NULLS FIRST LIMIT 5 \nA: What is first names of the top 5 staff who have handled the greatest number of complaints? \n Additional table information: table: customer_complaints"} -{"text": "Q: SELECT T3.Player_name, T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID ORDER BY T3.Votes DESC \nA: Show the names of players and names of their coaches in descending order of the votes of players. \n Additional table information: table: riding_club"} -{"text": "Q: SELECT name FROM instructor ORDER BY salary DESC LIMIT 1 \nA: Give the name of the highest paid instructor. \n Additional table information: table: college_2"} -{"text": "Q: SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7 \nA: Return the unique name for stations that have ever had 7 bikes available. \n Additional table information: table: bike_1"} -{"text": "Q: SELECT RoomId, roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1 \nA: Which room has the highest base price? \n Additional table information: table: inn_1"} -{"text": "Q: SELECT Carrier FROM device ORDER BY Carrier ASC NULLS FIRST \nA: List the carriers of devices in ascending alphabetical order. \n Additional table information: table: device"} -{"text": "Q: SELECT T3.name FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id JOIN artist AS T3 ON T3.artist_id = T2.artist_id GROUP BY T3.artist_id HAVING AVG(T1.attendance) > 200 \nA: Show all artist names with an average exhibition attendance over 200. \n Additional table information: table: theme_gallery"} -{"text": "Q: SELECT COUNT(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = 'F' AND T1.allergy = 'Milk' OR T1.allergy = 'Eggs' \nA: How many female students have milk or egg allergies? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT COUNT(*) FROM Student WHERE age > 18 AND NOT StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food' OR T2.allergytype = 'animal') \nA: How many students are over 18 and do not have allergy to food type or animal type? \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT job_id, hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05' \nA: Find job id and date of hire for those employees who was hired between November 5th, 2007 and July 5th, 2009. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE T1.title = 'A Kiss Before You Go: Live in Hamburg' \nA: What are the songs in album 'A Kiss Before You Go: Live in Hamburg'? \n Additional table information: table: music_2"} -{"text": "Q: SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.city = 'new york city' \nA: Who has a friend that is from new york city? \n Additional table information: table: network_2"} -{"text": "Q: SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = 'United States' \nA: What are the different fates of the mission that involved ships from the United States? \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = 'red' AND t3.characteristic_name = 'fast' \nA: What are the names of the products that have a color description of 'red' and the 'fast' characteristic? \n Additional table information: table: products_gen_characteristics"} -{"text": "Q: SELECT cust_name FROM customer EXCEPT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE T2.loan_type = 'Mortgages' \nA: What are the names of customers who have not taken a Mortage loan? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie') \nA: How many states that have some college students playing in the mid position but not in the goalie position. \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT g_name, rating FROM genre ORDER BY g_name NULLS FIRST \nA: List the names of all genres in alphabetical oder, together with its ratings. \n Additional table information: table: music_1"} -{"text": "Q: SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = 'lead' \nA: Find all the songs that do not have a lead vocal. \n Additional table information: table: music_2"} -{"text": "Q: SELECT DISTINCT YEAR FROM party WHERE Governor = 'Eliot Spitzer' \nA: Find the distinct years when the governor was named 'Eliot Spitzer'. \n Additional table information: table: election"} -{"text": "Q: SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1 \nA: Show names of shops that have more than one kind of device in stock. \n Additional table information: table: device"} -{"text": "Q: SELECT COUNT(*) FROM COURSES \nA: How many courses are there in total? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT AVG(balance) FROM checking) INTERSECT SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM savings) \nA: What are the names of accounts with checking balances greater than the average checking balance and savings balances below the average savings balance? \n Additional table information: table: small_bank_1"} -{"text": "Q: SELECT t3.headquartered_city, COUNT(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city \nA: Find the number of stores in each city. \n Additional table information: table: store_product"} -{"text": "Q: SELECT state_province_county FROM addresses WHERE line_1_number_building LIKE '%6862 Kaitlyn Knolls%' \nA: Which state can address '6862 Kaitlyn Knolls' possibly be in? \n Additional table information: table: e_government"} -{"text": "Q: SELECT COUNT(*) FROM services \nA: Count the number of services. \n Additional table information: table: e_government"} -{"text": "Q: SELECT dept_name FROM course GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 3 \nA: What are the names of the 3 departments with the most courses? \n Additional table information: table: college_2"} -{"text": "Q: SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform \nA: What are the different software platforms for devices, and how many devices have each? \n Additional table information: table: device"} -{"text": "Q: SELECT SUM(no_of_customers) FROM bank \nA: What is the total number of customers across banks? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name = 'Green' \nA: What is the attribute data type of the attribute with name 'Green'? \n Additional table information: table: product_catalog"} -{"text": "Q: 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' \nA: How long is the total lesson time took by the customer named Rylan Goodwin? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3.Lname = 'Smith' AND T3.Fname = 'Linda' \nA: Show all game names played by Linda Smith \n Additional table information: table: game_1"} -{"text": "Q: SELECT store_id FROM inventory GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which store owns most items? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT T3.title, T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building = T2.building AND T1.room_number = T2.room_number JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.capacity = (SELECT MAX(capacity) FROM classroom) \nA: What is the title and credits of the course that is taught in the largest classroom (with the highest capacity)? \n Additional table information: table: college_2"} -{"text": "Q: SELECT T1.name_first, T1.name_last, T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 3 \nA: Which 3 players won the most player awards? List their full name and id. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT name FROM company WHERE Sales_in_Billion > 200 ORDER BY Sales_in_Billion NULLS FIRST, Profits_in_Billion DESC \nA: list the names of the companies with more than 200 sales in the descending order of sales and profits. \n Additional table information: table: company_employee"} -{"text": "Q: SELECT COUNT(*) FROM patient WHERE NOT SSN IN (SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication = T2.Code WHERE T2.name = 'Procrastin-X') \nA: How many patients are not using Procrastin-X as medication? \n Additional table information: table: hospital_1"} -{"text": "Q: SELECT T3.Name, T2.District FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID ORDER BY T2.Ranking NULLS FIRST \nA: Show the names of phones and the districts of markets they are on, in ascending order of the ranking of the market. \n Additional table information: table: phone_market"} -{"text": "Q: SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC LIMIT 1 \nA: List the industry shared by the most companies. \n Additional table information: table: company_office"} -{"text": "Q: 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' \nA: Find the number of activities Mark Giuliano is involved in. \n Additional table information: table: activity_1"} -{"text": "Q: 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 \nA: What is the customer id of the customer who has the most orders? \n Additional table information: table: tracking_orders"} -{"text": "Q: SELECT building, room_number FROM classroom WHERE capacity BETWEEN 50 AND 100 \nA: Find the room number of the rooms which can sit 50 to 100 students and their buildings. \n Additional table information: table: college_2"} -{"text": "Q: SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC NULLS FIRST \nA: What details are there on the research staff? List the result in ascending alphabetical order. \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT product_type_code, MAX(product_price), MIN(product_price) FROM products GROUP BY product_type_code \nA: What are the maximum and minimum product prices for each product type? \n Additional table information: table: department_store"} -{"text": "Q: SELECT T1.name, COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 5 \nA: How many tracks does each genre have and what are the names of the top 5? \n Additional table information: table: store_1"} -{"text": "Q: SELECT f_id FROM song WHERE resolution > (SELECT AVG(resolution) FROM song WHERE genre_is = 'modern') \nA: What is ids of the songs whose resolution is higher than the average resolution of songs in modern genre? \n Additional table information: table: music_1"} -{"text": "Q: SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which payment method is used by most customers? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT COUNT(*) FROM Video_games WHERE gtype = 'Massively multiplayer online game' \nA: How many video games have type Massively multiplayer online game? \n Additional table information: table: game_1"} -{"text": "Q: SELECT Name FROM ARTIST WHERE Name LIKE '%a%' \nA: What are the names of artist who have the letter 'a' in their names? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT document_name FROM documents EXCEPT SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code JOIN document_sections_images AS t3 ON t2.section_id = t3.section_id \nA: Find names of the document without any images. \n Additional table information: table: document_management"} -{"text": "Q: SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = 'Female' AND T2.languages = 'bangla' \nA: What is the country of origin of the artist who is female and produced a song in Bangla? \n Additional table information: table: music_1"} -{"text": "Q: SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed \nA: What are the ids of all the employees who have destroyed documents? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid \nA: Count the number of players who enter hall of fame for each year. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT town_city FROM customers WHERE customer_type_code = 'Good Credit Rating' GROUP BY town_city ORDER BY COUNT(*) NULLS FIRST LIMIT 1 \nA: Which city has the least number of customers whose type code is 'Good Credit Rating'? \n Additional table information: table: customer_complaints"} -{"text": "Q: 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' \nA: What is the zip code of staff with first name as Janessa and last name as Sawayn lived? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT COUNT(*) FROM Person WHERE gender = 'female' \nA: How many females does this network has? \n Additional table information: table: network_2"} -{"text": "Q: SELECT Team FROM player ORDER BY Team ASC NULLS FIRST \nA: Find the team of each player and sort them in ascending alphabetical order. \n Additional table information: table: school_player"} -{"text": "Q: SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T2.bathroom_count > 2 \nA: Which buildings have apartments that have more than two bathrooms? Give me the addresses of the buildings. \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT Grape, Appelation, Name FROM WINE WHERE Score > 93 ORDER BY Name NULLS FIRST \nA: List the grape, appelation and name of wines whose score is higher than 93 ordered by Name. \n Additional table information: table: wine_1"} -{"text": "Q: 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%' \nA: Find the name of the project for which a scientist whose name contains \u2018Smith\u2019 is assigned to. \n Additional table information: table: scientist_1"} -{"text": "Q: SELECT T1.Location, T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID \nA: What are the location and nickname of each school? \n Additional table information: table: school_player"} -{"text": "Q: SELECT dept_name FROM student GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the name of department has the highest amount of students? \n Additional table information: table: college_2"} -{"text": "Q: SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING SUM(hoursperweek) > 10 \nA: What are the student IDs for everybody who worked for more than 10 hours per week on all sports? \n Additional table information: table: game_1"} -{"text": "Q: SELECT Publication_Date FROM publication ORDER BY Price ASC NULLS FIRST LIMIT 3 \nA: List the publication dates of publications with 3 lowest prices. \n Additional table information: table: book_2"} -{"text": "Q: SELECT Country, COUNT(*) FROM climber GROUP BY Country \nA: How many climbers are from each country? \n Additional table information: table: climbing"} -{"text": "Q: SELECT T2.Store_Email_Address FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.State_County = 'Alaska' \nA: List the email addresses of the drama workshop groups located in Alaska state. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT MAX(T1.length_meters), T2.name FROM bridge AS T1 JOIN architect AS T2 ON T1.architect_id = T2.id \nA: What is the maximum length in meters for the bridges and what are the architects' names? \n Additional table information: table: architecture"} -{"text": "Q: SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton' \nA: Count the number of classrooms in Lamberton. \n Additional table information: table: college_2"} -{"text": "Q: SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Pending' ORDER BY T2.customer_id NULLS FIRST \nA: Return the distinct name of customers whose order status is Pending, in the order of customer id. \n Additional table information: table: department_store"} -{"text": "Q: SELECT COUNT(DISTINCT driverId) FROM results WHERE NOT raceId IN (SELECT raceId FROM races WHERE YEAR <> 2009) \nA: How many drivers did not participate in the races held in 2009? \n Additional table information: table: formula_1"} -{"text": "Q: SELECT organized_by, name FROM church WHERE open_date BETWEEN 1830 AND 1840 \nA: Show the organizer and name for churches that opened between 1830 and 1840. \n Additional table information: table: wedding"} -{"text": "Q: SELECT Party FROM people ORDER BY Age ASC NULLS FIRST LIMIT 1 \nA: What is the party of the youngest people? \n Additional table information: table: debate"} -{"text": "Q: SELECT T1.department_name, T2.city, T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id \nA: display the department name, city, and state province for each department. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT district_name FROM district ORDER BY city_area ASC NULLS FIRST LIMIT 1 \nA: Which district has the least area? \n Additional table information: table: store_product"} -{"text": "Q: SELECT Name, Country FROM member \nA: What are the names and countries of members? \n Additional table information: table: decoration_competition"} -{"text": "Q: SELECT first_name, middle_name, last_name FROM Staff \nA: What are the first, middle, and last names of all staff? \n Additional table information: table: driving_school"} -{"text": "Q: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Olin' AND t1.lname = 'Shivers' \nA: Find the papers which have 'Olin Shivers' as an author. \n Additional table information: table: icfp_1"} -{"text": "Q: SELECT Fname, Lname FROM Student \nA: Show first name and last name for all students. \n Additional table information: table: allergy_1"} -{"text": "Q: SELECT Official_Name FROM city WHERE NOT City_ID IN (SELECT Host_city_ID FROM farm_competition) \nA: List the official names of cities that have not held any competition. \n Additional table information: table: farm"} -{"text": "Q: SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the most common type of ships? \n Additional table information: table: ship_mission"} -{"text": "Q: SELECT cmi_cross_ref_id FROM cmi_cross_references EXCEPT SELECT cmi_cross_ref_id FROM parking_fines \nA: Which cmi cross reference id is not related to any parking taxes? \n Additional table information: table: local_govt_mdm"} -{"text": "Q: SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy' \nA: Find the number of routes with destination airports in Italy. \n Additional table information: table: flight_4"} -{"text": "Q: SELECT name FROM playlists \nA: List the name of all playlist. \n Additional table information: table: store_1"} -{"text": "Q: SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 GROUP BY T2.bname ORDER BY SUM(T1.amount) DESC LIMIT 1 \nA: Find the name of bank branch that provided the greatest total amount of loans to customers with credit score is less than 100. \n Additional table information: table: loan_1"} -{"text": "Q: SELECT COUNT(*), gender FROM artist GROUP BY gender \nA: What is the number of artists for each gender? \n Additional table information: table: music_1"} -{"text": "Q: SELECT member_name FROM member EXCEPT SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id \nA: What are the names of members who are not in charge of any events? \n Additional table information: table: party_people"} -{"text": "Q: SELECT firstname FROM teachers WHERE classroom = 110 \nA: Find the first names of all the teachers that teach in classroom 110. \n Additional table information: table: student_1"} -{"text": "Q: SELECT Draft_Pick_Number, Draft_Class FROM match_season WHERE POSITION = 'Defender' \nA: Show the draft pick numbers and draft classes of players whose positions are defenders. \n Additional table information: table: match_season"} -{"text": "Q: SELECT draft_details FROM Document_Drafts WHERE document_id = 7 \nA: What is draft detail of the document with id 7? \n Additional table information: table: cre_Doc_Control_Systems"} -{"text": "Q: SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211' AND T2.enroll_grade = 'C' \nA: What is the first name of students enrolled in class ACCT-211 and got grade C? \n Additional table information: table: college_1"} -{"text": "Q: SELECT SUM(enrollment), affiliation FROM university GROUP BY affiliation \nA: Find the total student enrollment for different affiliation type schools. \n Additional table information: table: university_basketball"} -{"text": "Q: SELECT MAX(settlement_amount), MIN(settlement_amount) FROM settlements \nA: What are the maximum and minimum settlement amount on record? \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT COUNT(DISTINCT StuID) FROM Plays_games \nA: How many students play video games? \n Additional table information: table: game_1"} -{"text": "Q: SELECT company, headquarters FROM company ORDER BY market_value DESC \nA: What are the names and headquarters of all companies ordered by descending market value? \n Additional table information: table: gas_company"} -{"text": "Q: SELECT aid, name FROM Aircraft ORDER BY distance DESC LIMIT 1 \nA: Show the id and name of the aircraft with the maximum distance. \n Additional table information: table: flight_1"} -{"text": "Q: SELECT Age FROM editor GROUP BY Age ORDER BY COUNT(*) DESC LIMIT 1 \nA: Please show the most common age of editors. \n Additional table information: table: journal_committee"} -{"text": "Q: SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = 'Professor' \nA: Which students have professors as their advisors? Find their student ids. \n Additional table information: table: activity_1"} -{"text": "Q: SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.project_id HAVING COUNT(*) > 2 \nA: What are the task details, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes? \n Additional table information: table: tracking_grants_for_research"} -{"text": "Q: SELECT name FROM church ORDER BY open_date DESC \nA: List all church names in descending order of opening date. \n Additional table information: table: wedding"} -{"text": "Q: SELECT T1.first_name, T1.last_name, T3.city FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T1.first_name LIKE '%z%' \nA: display those employees who contain a letter z to their first name and also display their last name, city. \n Additional table information: table: hr_1"} -{"text": "Q: SELECT T1.id, T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id WHERE T2.interaction_type = 'activitor' GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What is the id and name of the enzyme that can interact with the most medicines as an activator? \n Additional table information: table: medicine_enzyme_interaction"} -{"text": "Q: SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games \nA: Show ids of students who play video game and play sports. \n Additional table information: table: game_1"} -{"text": "Q: SELECT image_name, image_url FROM images ORDER BY image_name NULLS FIRST \nA: What are the names and urls of images, sorted alphabetically? \n Additional table information: table: document_management"} -{"text": "Q: SELECT COUNT(*) FROM Customers_cards \nA: Show the number of customer cards. \n Additional table information: table: customers_card_transactions"} -{"text": "Q: SELECT * FROM products WHERE price BETWEEN 60 AND 120 \nA: What is all the information of all the products that have a price between 60 and 120? \n Additional table information: table: manufactory_1"} -{"text": "Q: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games \nA: Show ids of students who don't play video game. \n Additional table information: table: game_1"} -{"text": "Q: SELECT cust_name FROM customer WHERE acc_type = 'saving' INTERSECT SELECT cust_name FROM customer WHERE acc_type = 'checking' \nA: What are the names of customers who have both savings and checking accounts? \n Additional table information: table: loan_1"} -{"text": "Q: SELECT DISTINCT instrument FROM Instruments \nA: What are all the instruments used? \n Additional table information: table: music_2"} -{"text": "Q: SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Americano' \nA: What are the names of customers who have purchased both products Latte and Americano? \n Additional table information: table: customers_and_addresses"} -{"text": "Q: SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id GROUP BY T2.country_id HAVING COUNT(*) >= 3 \nA: Which countries have at least 3 cities? \n Additional table information: table: sakila_1"} -{"text": "Q: SELECT COUNT(*) FROM Invoices \nA: Count the number of invoices. \n Additional table information: table: customers_and_invoices"} -{"text": "Q: SELECT COUNT(*) FROM files WHERE duration LIKE '4:%' \nA: How many songs have 4 minute duration? \n Additional table information: table: music_1"} -{"text": "Q: SELECT COUNT(DISTINCT city) FROM EMPLOYEE \nA: How many distinct cities does the employees live in? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT t1.name, t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id ORDER BY t2.support_rate DESC LIMIT 1 \nA: Find the name and gender of the candidate who got the highest support rate. \n Additional table information: table: candidate_poll"} -{"text": "Q: SELECT COUNT(DISTINCT bedType) FROM Rooms \nA: Find the number of distinct bed types available in this inn. \n Additional table information: table: inn_1"} -{"text": "Q: SELECT emp_jobcode, COUNT(*) FROM employee GROUP BY emp_jobcode ORDER BY COUNT(*) DESC LIMIT 1 \nA: Find the count and code of the job has most employees. \n Additional table information: table: college_1"} -{"text": "Q: SELECT name, address_road, city FROM branch ORDER BY open_year NULLS FIRST \nA: What are the names, address roads, and cities of the branches ordered by opening year? \n Additional table information: table: shop_membership"} -{"text": "Q: SELECT * FROM employees WHERE NOT employee_id IN (SELECT employee_id FROM job_history) \nA: What is all the information about employees who have never had a job in the past? \n Additional table information: table: hr_1"} -{"text": "Q: SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = 'Dayana Robel' \nA: Tell me the types of the policy used by the customer named 'Dayana Robel'. \n Additional table information: table: insurance_fnol"} -{"text": "Q: SELECT category, COUNT(*) FROM book_club GROUP BY category \nA: Show all book categories and the number of books in each category. \n Additional table information: table: culture_company"} -{"text": "Q: 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' \nA: What are the first name and last name of Linda Smith's advisor? \n Additional table information: table: activity_1"} -{"text": "Q: SELECT Product_Name FROM Products ORDER BY Product_Price ASC NULLS FIRST \nA: List all product names in ascending order of price. \n Additional table information: table: cre_Drama_Workshop_Groups"} -{"text": "Q: SELECT city FROM park GROUP BY city HAVING COUNT(*) BETWEEN 2 AND 4 \nA: Find all the cities that have 2 to 4 parks. \n Additional table information: table: baseball_1"} -{"text": "Q: SELECT T1.event_details FROM EVENTS AS T1 JOIN Services AS T2 ON T1.Service_ID = T2.Service_ID WHERE T2.Service_Type_Code = 'Marriage' \nA: what are the event details of the services that have the type code 'Marriage'? \n Additional table information: table: local_govt_in_alabama"} -{"text": "Q: SELECT AVG(T1.age), T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name \nA: What is the average age for each dorm and what are the names of each dorm? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT COUNT(*), class_room FROM CLASS GROUP BY class_room HAVING COUNT(*) >= 2 \nA: For each classroom with at least 2 classes, how many classes are offered? \n Additional table information: table: college_1"} -{"text": "Q: SELECT Age, COUNT(*) FROM editor GROUP BY Age \nA: What are the different ages of editors? Show each age along with the number of editors of that age. \n Additional table information: table: journal_committee"} -{"text": "Q: SELECT AVG(T1.lat), AVG(T1.long) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id \nA: What is the average latitude and longitude of the starting points of all trips? \n Additional table information: table: bike_1"} -{"text": "Q: SELECT DISTINCT (UnitPrice) FROM TRACK \nA: What are the distinct unit prices of all tracks? \n Additional table information: table: chinook_1"} -{"text": "Q: SELECT T1.student_id, T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1 \nA: What are the student ID and login name of the student who are enrolled in the most courses? \n Additional table information: table: e_learning"} -{"text": "Q: SELECT artist_name FROM artist WHERE country = 'UK' INTERSECT SELECT artist_name FROM song WHERE languages = 'english' \nA: Find the names of the artists who are from UK and have produced English songs. \n Additional table information: table: music_1"} -{"text": "Q: SELECT document_type_code, document_type_name FROM Ref_document_types \nA: List all document type codes and document type names. \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown HAVING COUNT(*) >= 2 \nA: What are the hometowns that are shared by at least two gymnasts? \n Additional table information: table: gymnast"} -{"text": "Q: SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC \nA: Please show different denominations and the corresponding number of schools in descending order. \n Additional table information: table: school_player"} -{"text": "Q: SELECT COUNT(*) FROM follows GROUP BY f1 \nA: Find the number of followers for each user. \n Additional table information: table: twitter_1"} -{"text": "Q: SELECT DPhone FROM DEPARTMENT WHERE Room = 268 \nA: What are the phones of departments in Room 268? \n Additional table information: table: college_3"} -{"text": "Q: SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName NULLS FIRST \nA: What are the names of all students who tried out in alphabetical order? \n Additional table information: table: soccer_2"} -{"text": "Q: SELECT Num_of_Component, name FROM furniture WHERE Num_of_Component > 10 \nA: Find the component amounts and names of all furnitures that have more than 10 components. \n Additional table information: table: manufacturer"} -{"text": "Q: SELECT T2.emp_fname, T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num \nA: Find the first names of all instructors who have taught some course and the course code. \n Additional table information: table: college_1"} -{"text": "Q: SELECT born_state FROM head GROUP BY born_state HAVING COUNT(*) >= 3 \nA: What are the names of the states where at least 3 heads were born? \n Additional table information: table: department_management"} -{"text": "Q: SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1 \nA: Which apartment type code appears the most often? \n Additional table information: table: apartment_rentals"} -{"text": "Q: SELECT T1.fname, T1.lname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge') \nA: What are the first and last names of all students who are living in a dorm with a TV Lounge? \n Additional table information: table: dorm_1"} -{"text": "Q: SELECT T2.employee_name, T3.employee_name FROM Documents_to_be_destroyed AS T1 JOIN Employees AS T2 ON T1.Destruction_Authorised_by_Employee_ID = T2.employee_id JOIN Employees AS T3 ON T1.Destroyed_by_Employee_ID = T3.employee_id \nA: What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents? \n Additional table information: table: cre_Doc_Tracking_DB"} -{"text": "Q: SELECT shop_id, address FROM shop WHERE score < (SELECT AVG(score) FROM shop) \nA: Find the id and address of the shops whose score is below the average score. \n Additional table information: table: coffee_shop"} +{"question": "SELECT T2.address_id, T1.city FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id ORDER BY AVG(monthly_rental) DESC LIMIT 1", "answer": "Find the id and city of the student address with the highest average monthly rental.\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT name FROM driver WHERE NOT driver_id IN (SELECT driver_id FROM school_bus)", "answer": "Show the names of the drivers without a school bus.\nAdditional table information: table: school_bus"} +{"question": "SELECT name, damage_millions_USD FROM storm ORDER BY max_speed DESC", "answer": "List name and damage for all storms in a descending order of max speed.\nAdditional table information: table: storm_record"} +{"question": "SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1", "answer": "Please show the categories of the music festivals with count more than 1.\nAdditional table information: table: music_4"} +{"question": "SELECT MAX(num_of_shops), AVG(Num_of_Factories) FROM manufacturer WHERE open_year < 1990", "answer": "what is the average number of factories and maximum number of shops for manufacturers that opened before 1990.\nAdditional table information: table: manufacturer"} +{"question": "SELECT cName FROM college WHERE enr > (SELECT MAX(enr) FROM college WHERE state = 'FL')", "answer": "Find names of all colleges whose enrollment is greater than that of all colleges in the FL state.\nAdditional table information: table: soccer_2"} +{"question": "SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Badlands'", "answer": "What are the first and last names of the artist who perfomed the song 'Badlands'?\nAdditional table information: table: music_2"} +{"question": "SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.major = '600' GROUP BY t1.clubname ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which club has the most members majoring in '600'?\nAdditional table information: table: club_1"} +{"question": "SELECT AVG(prominence) FROM mountain WHERE country = 'Morocco'", "answer": "What are the average prominence of the mountains in country 'Morocco'?\nAdditional table information: table: mountain_photos"} +{"question": "SELECT COUNT(DISTINCT T2.id), COUNT(DISTINCT T3.id), T3.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_name = T2.dept_name JOIN instructor AS T3 ON T1.dept_name = T3.dept_name GROUP BY T3.dept_name", "answer": "How many students and instructors are in each department?\nAdditional table information: table: college_2"} +{"question": "SELECT city, MAX(lat) FROM station GROUP BY city", "answer": "For each city, what is the highest latitude for its stations?\nAdditional table information: table: bike_1"} +{"question": "SELECT campus FROM campuses WHERE LOCATION = 'Northridge' AND county = 'Los Angeles' UNION SELECT campus FROM campuses WHERE LOCATION = 'San Francisco' AND county = 'San Francisco'", "answer": "What campuses are located in Northridge, Los Angeles or in San Francisco, San Francisco?\nAdditional table information: table: csu_1"} +{"question": "SELECT T1.problem_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T2.product_name = 'voluptatem' AND T1.date_problem_reported > '1995'", "answer": "List the ids of the problems from the product 'voluptatem' that are reported after 1995?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT decor, COUNT(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor", "answer": "Find the number of rooms with price higher than 120 for different decor.\nAdditional table information: table: inn_1"} +{"question": "SELECT DISTINCT CLASS FROM race", "answer": "What are the distinct classes that races can have?\nAdditional table information: table: race_track"} +{"question": "SELECT DISTINCT name FROM races ORDER BY name DESC", "answer": "List the names of all distinct races in reversed lexicographic order?\nAdditional table information: table: formula_1"} +{"question": "SELECT DISTINCT TYPE FROM vocals", "answer": "What are the different types of vocals?\nAdditional table information: table: music_2"} +{"question": "SELECT Name FROM wrestler WHERE NOT Wrestler_ID IN (SELECT Wrestler_ID FROM elimination)", "answer": "List the names of wrestlers that have not been eliminated.\nAdditional table information: table: wrestler"} +{"question": "SELECT COUNT(DISTINCT state) FROM college WHERE enr < (SELECT AVG(enr) FROM college)", "answer": "What is the number of states that has some colleges whose enrollment is smaller than the average enrollment?\nAdditional table information: table: soccer_2"} +{"question": "SELECT AVG(long) FROM station WHERE NOT id IN (SELECT station_id FROM status GROUP BY station_id HAVING MAX(bikes_available) > 10)", "answer": "What is the average longitude of stations that never had bike availability more than 10?\nAdditional table information: table: bike_1"} +{"question": "SELECT T2.Date FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1", "answer": "Show the date of the tallest perpetrator.\nAdditional table information: table: perpetrator"} +{"question": "SELECT name, prominence FROM mountain EXCEPT SELECT T1.name, T1.prominence FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T3.brand = 'Sigma'", "answer": "Show the name and prominence of the mountains whose picture is not taken by a lens of brand 'Sigma'.\nAdditional table information: table: mountain_photos"} +{"question": "SELECT name FROM station WHERE lat < 37.5", "answer": "What are the names of all stations with a latitude smaller than 37.5?\nAdditional table information: table: bike_1"} +{"question": "SELECT document_type_code FROM Ref_document_types WHERE document_type_name = 'Paper'", "answer": "Find the code of the document type 'Paper'.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT DISTINCT T1.Fname, T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.President_VOTE WHERE T1.sex = 'F'", "answer": "Find the first and last names of all the female (sex is F) students who have president votes.\nAdditional table information: table: voter_2"} +{"question": "SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = 'Walter Hill'", "answer": "Which studios have never worked with the director Walter Hill?\nAdditional table information: table: film_rank"} +{"question": "SELECT account_id, COUNT(*) FROM Financial_transactions GROUP BY account_id", "answer": "Show the account id and the number of transactions for each account\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT DISTINCT card_type_code FROM Customers_Cards", "answer": "Show all card type codes.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT name, cost FROM procedures ORDER BY cost DESC", "answer": "Sort the list of names and costs of all procedures in the descending order of cost.\nAdditional table information: table: hospital_1"} +{"question": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t1.sex = 'F' ORDER BY t1.name NULLS FIRST", "answer": "list all female (sex is F) candidate names in the alphabetical order.\nAdditional table information: table: candidate_poll"} +{"question": "SELECT part_id, chargeable_amount FROM Parts ORDER BY chargeable_amount ASC NULLS FIRST LIMIT 1", "answer": "Which part has the least chargeable amount? List the part id and amount.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population < 100000", "answer": "Find the delegates who are from counties with population below 100000.\nAdditional table information: table: election"} +{"question": "SELECT COUNT(*) FROM actor", "answer": "Count the number of actors.\nAdditional table information: table: musical"} +{"question": "SELECT Num_of_Audience FROM festival_detail WHERE YEAR = 2008 OR YEAR = 2010", "answer": "Show the number of audience in year 2008 or 2010.\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT clubdesc FROM club WHERE clubname = 'Tennis Club'", "answer": "What is the description of the club named 'Tennis Club'?\nAdditional table information: table: club_1"} +{"question": "SELECT DISTINCT product_name FROM product ORDER BY product_name NULLS FIRST", "answer": "Sort all the distinct product names in alphabetical order.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT International_Passengers, Domestic_Passengers FROM airport WHERE Airport_Name = 'London Heathrow'", "answer": "How many international and domestic passengers are there in the airport London Heathrow?\nAdditional table information: table: aircraft"} +{"question": "SELECT T2.product_name FROM view_product_availability AS T1 JOIN products_for_hire AS T2 ON T1.product_id = T2.product_id WHERE T1.available_yn = 1", "answer": "What are the names of products whose availability equals to 1?\nAdditional table information: table: products_for_hire"} +{"question": "SELECT TYPE FROM ship WHERE flag = 'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag = 'Malta'", "answer": "Find the ship type that are used by both ships with Panama and Malta flags.\nAdditional table information: table: ship_1"} +{"question": "SELECT Name FROM WINE WHERE score > 90", "answer": "What are the names of wines with scores higher than 90?\nAdditional table information: table: wine_1"} +{"question": "SELECT state FROM park GROUP BY state HAVING COUNT(*) > 2", "answer": "List the names of states that have more than 2 parks.\nAdditional table information: table: baseball_1"} +{"question": "SELECT T2.Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown", "answer": "What are the hometowns of gymnasts and the corresponding number of gymnasts?\nAdditional table information: table: gymnast"} +{"question": "SELECT COUNT(DISTINCT driverId) FROM results WHERE NOT raceId IN (SELECT raceId FROM races WHERE YEAR <> 2009)", "answer": "How many drivers did not race in 2009?\nAdditional table information: table: formula_1"} +{"question": "SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId WHERE T1.Name = 'AAC audio file'", "answer": "Count the number of tracks that are of the media type 'AAC audio file'.\nAdditional table information: table: chinook_1"} +{"question": "SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50", "answer": "Find the name of airports whose altitude is between -50 and 50.\nAdditional table information: table: flight_4"} +{"question": "SELECT T1.name, T1.city, T2.src_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T2.src_apid ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name and city of the airport from most of the routes start?\nAdditional table information: table: flight_4"} +{"question": "SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most frequent status of bookings?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT T2.title, AVG(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY AVG(T1.stars) NULLS FIRST LIMIT 1", "answer": "What are the titles and average ratings for all movies that have the lowest average rating?\nAdditional table information: table: movie_1"} +{"question": "SELECT T1.Name FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId GROUP BY T2.GenreId ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name of the genre that is most frequent across all tracks.\nAdditional table information: table: chinook_1"} +{"question": "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", "answer": "On which day was the order placed whose shipment tracking number is 3452?\nAdditional table information: table: tracking_orders"} +{"question": "SELECT COUNT(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = 'voluptatem'", "answer": "How many problems did the product called 'voluptatem' have in record?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT AVG(access_count) FROM documents GROUP BY document_structure_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Find the average access count of documents with the least popular structure.\nAdditional table information: table: document_management"} +{"question": "SELECT T1.Participant_ID, T1.Participant_Type_Code, COUNT(*) FROM Participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID GROUP BY T1.Participant_ID", "answer": "How many events have each participants attended? List the participant id, type and the number.\nAdditional table information: table: local_govt_in_alabama"} +{"question": "SELECT member_name FROM member WHERE party_id = 3 INTERSECT SELECT member_name FROM member WHERE party_id = 1", "answer": "Which member names are shared among members in the party with the id 3 and the party with the id 1?\nAdditional table information: table: party_people"} +{"question": "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'", "answer": "What are all the company names that have a book published by Alyson?\nAdditional table information: table: culture_company"} +{"question": "SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = 'Clara') AND first_name <> 'Clara'", "answer": "What are the full names and hire dates for employees in the same department as someone with the first name Clara, not including Clara?\nAdditional table information: table: hr_1"} +{"question": "SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details NULLS FIRST", "answer": "What are all the details of the organisations described as 'Sponsor'? Sort the result in an ascending order.\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT Shop_Name FROM shop ORDER BY Open_Year ASC NULLS FIRST", "answer": "What are the names of shops in ascending order of open year?\nAdditional table information: table: device"} +{"question": "SELECT Carrier FROM device WHERE Software_Platform <> 'Android'", "answer": "What are the carriers of devices whose software platforms are not 'Android'?\nAdditional table information: table: device"} +{"question": "SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Demon Kitty Rag'", "answer": "What are the types of vocals used in the song 'Demon Kitty Rag'?\nAdditional table information: table: music_2"} +{"question": "SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Rock'", "answer": "Count the number of tracks that are part of the rock genre.\nAdditional table information: table: chinook_1"} +{"question": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name HAVING COUNT(*) >= 2", "answer": "What are characteristic names used at least twice across all products?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT customer_id, COUNT(*) FROM Customers_cards GROUP BY customer_id", "answer": "What are the different customer ids, and how many cards does each one hold?\nAdditional table information: table: customers_card_transactions"} +{"question": "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'", "answer": "Which faculty members are playing either Canoeing or Kayaking? Tell me their first names.\nAdditional table information: table: activity_1"} +{"question": "SELECT gender FROM TEACHERS WHERE last_name = 'Medhurst'", "answer": "What is the gender of the teacher with last name 'Medhurst'?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT COUNT(*) FROM architect WHERE gender = 'female'", "answer": "How many architects are female?\nAdditional table information: table: architecture"} +{"question": "SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.'", "answer": "What is the total number of professors with a Ph.D. ?\nAdditional table information: table: college_1"} +{"question": "SELECT name, Assets_billion FROM Companies ORDER BY name ASC NULLS FIRST", "answer": "List the name and assets of each company in ascending order of company name.\nAdditional table information: table: company_office"} +{"question": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'", "answer": "Find the name of tracks which are in Movies playlist but not in music playlist.\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(*) FROM store", "answer": "How many stores are there?\nAdditional table information: table: sakila_1"} +{"question": "SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING COUNT(*) >= 2", "answer": "Show all storm names except for those with at least two affected regions.\nAdditional table information: table: storm_record"} +{"question": "SELECT FacID FROM Faculty WHERE Sex = 'M'", "answer": "Show ids for all the male faculty.\nAdditional table information: table: activity_1"} +{"question": "SELECT T2.party_name FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id HAVING COUNT(*) >= 2", "answer": "Return the names of parties that have two or more events.\nAdditional table information: table: party_people"} +{"question": "SELECT service_name FROM services ORDER BY service_name NULLS FIRST", "answer": "List all the services in the alphabetical order.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT T1.Name, T2.Name FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID", "answer": "Show names of cities and names of counties they are in.\nAdditional table information: table: county_public_safety"} +{"question": "SELECT AVG(Scores) FROM submission", "answer": "What is the average score of submissions?\nAdditional table information: table: workshop_paper"} +{"question": "SELECT SUM(no_of_customers) FROM bank WHERE city = 'New York City'", "answer": "What is the total number of customers who use banks in New York City?\nAdditional table information: table: loan_1"} +{"question": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1", "answer": "What are the names of shops that have more than a single kind of device in stock?\nAdditional table information: table: device"} +{"question": "SELECT name, LOCATION FROM station ORDER BY Annual_entry_exit NULLS FIRST, Annual_interchanges NULLS FIRST", "answer": "List the names and locations of all stations ordered by their yearly entry exit and interchange amounts.\nAdditional table information: table: train_station"} +{"question": "SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' OR T3.name = 'Psychiatry'", "answer": "Which physicians are affiliated with either Surgery or Psychiatry department? Give me their names.\nAdditional table information: table: hospital_1"} +{"question": "SELECT cust_name FROM customer WHERE credit_score < (SELECT AVG(credit_score) FROM customer)", "answer": "What are the names of customers with credit score less than the average credit score across customers?\nAdditional table information: table: loan_1"} +{"question": "SELECT MAX(followers), SUM(followers) FROM user_profiles", "answer": "Find the maximum and total number of followers of all users.\nAdditional table information: table: twitter_1"} +{"question": "SELECT t2.document_structure_description FROM documents AS t1 JOIN document_structures AS t2 ON t1.document_structure_code = t2.document_structure_code GROUP BY t1.document_structure_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the structure of the document with the least number of accesses?\nAdditional table information: table: document_management"} +{"question": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.major = '600'", "answer": "Which members of 'Bootup Baltimore' major in '600'? Give me their first names and last names.\nAdditional table information: table: club_1"} +{"question": "SELECT school, LOCATION FROM university WHERE affiliation = 'Public'", "answer": "What are the public schools and what are their locations?\nAdditional table information: table: university_basketball"} +{"question": "SELECT COUNT(*) FROM services", "answer": "Count the number of services.\nAdditional table information: table: e_government"} +{"question": "SELECT store_id FROM inventory GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which store owns most items?\nAdditional table information: table: sakila_1"} +{"question": "SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE YEAR = 2009 OR YEAR = 2010", "answer": "What are the names of the students who took classes in 2009 or 2010?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(DISTINCT sportname) FROM Sportsinfo", "answer": "How many different types of sports do we offer?\nAdditional table information: table: game_1"} +{"question": "SELECT Winery FROM WINE GROUP BY Winery HAVING COUNT(*) >= 4", "answer": "Find the wineries that have at least four wines.\nAdditional table information: table: wine_1"} +{"question": "SELECT T1.first_name, T1.last_name, T1.employee_id, T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id", "answer": "What the full names, ids of each employee and the name of the country they are in?\nAdditional table information: table: hr_1"} +{"question": "SELECT T2.emp_fname, T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Accounting'", "answer": "What are the first names of all Accounting professors who teach and what are the classrooms of the courses they teach?\nAdditional table information: table: college_1"} +{"question": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.major = '600'", "answer": "Find all members of 'Bootup Baltimore' whose major is '600'. Show the first name and last name.\nAdditional table information: table: club_1"} +{"question": "SELECT SUM(T1.crs_credit), T1.dept_code FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code GROUP BY T1.dept_code", "answer": "Find the total credits of all classes offered by each department.\nAdditional table information: table: college_1"} +{"question": "SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18'", "answer": "What roles did staff members play between '2003-04-19 15:06:20' and '2016-03-15 00:33:18'?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT COUNT(*) FROM enzyme", "answer": "How many kinds of enzymes are there?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT StuID FROM Student WHERE major = 600 INTERSECT SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'", "answer": "What are the student ids for those on scholarship in major number 600?\nAdditional table information: table: game_1"} +{"question": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) >= 2", "answer": "Which locations have 2 or more cinemas with capacity over 300?\nAdditional table information: table: cinema"} +{"question": "SELECT TIME FROM elimination WHERE Eliminated_By = 'Punk' OR Eliminated_By = 'Orton'", "answer": "Show the times of elimination by 'Punk' or 'Orton'.\nAdditional table information: table: wrestler"} +{"question": "SELECT COUNT(DISTINCT payment_method_code) FROM parties", "answer": "Count the number of different payment method codes used by parties.\nAdditional table information: table: e_government"} +{"question": "SELECT song_name FROM song WHERE genre_is = 'modern' OR languages = 'english'", "answer": "Find the names of songs whose genre is modern or language is English.\nAdditional table information: table: music_1"} +{"question": "SELECT COUNT(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8", "answer": "What is the number of days that had an average humity above 50 and an average visibility above 8?\nAdditional table information: table: bike_1"} +{"question": "SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the type of vocables that appears most frequently?\nAdditional table information: table: music_2"} +{"question": "SELECT COUNT(*) FROM dorm", "answer": "How many dorms are in the database?\nAdditional table information: table: dorm_1"} +{"question": "SELECT job_title, AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id GROUP BY T2.job_title", "answer": "What is the average salary for each job title?\nAdditional table information: table: hr_1"} +{"question": "SELECT DISTINCT T3.Fname FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T2.gradepoint >= 3.8", "answer": "Find the distinct student first names of all students that have grade point at least 3.8 in one course.\nAdditional table information: table: college_3"} +{"question": "SELECT AVG(enrollment), MAX(enrollment), MIN(enrollment) FROM school", "answer": "Show the average, maximum, minimum enrollment of all schools.\nAdditional table information: table: school_finance"} +{"question": "SELECT AVG(T1.lat), AVG(T1.long) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id", "answer": "What is the average latitude and longitude of the starting points of all trips?\nAdditional table information: table: bike_1"} +{"question": "SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = 'Balls to the Wall'", "answer": "What is the name of the album that has the track Ball to the Wall?\nAdditional table information: table: store_1"} +{"question": "SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC", "answer": "What are the total points for all gymnasts, ordered by total points descending?\nAdditional table information: table: gymnast"} +{"question": "SELECT DISTINCT (BillingCountry) FROM INVOICE", "answer": "Find the different billing countries for all invoices.\nAdditional table information: table: chinook_1"} +{"question": "SELECT COUNT(*) FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 100 OR T2.ticket_price < 10", "answer": "How many exhibitions have a attendance more than 100 or have a ticket price below 10?\nAdditional table information: table: theme_gallery"} +{"question": "SELECT location_name, location_description FROM Ref_locations WHERE location_code = 'x'", "answer": "Give me the name and description of the location with code x.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT COUNT(*) FROM exhibition WHERE YEAR >= 2005", "answer": "Count the number of exhibitions that happened in or after 2005.\nAdditional table information: table: theme_gallery"} +{"question": "SELECT COUNT(*) FROM enzyme", "answer": "What is the total count of enzymes?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT Major FROM STUDENT WHERE Sex = 'F' GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the major that is studied by the most female students.\nAdditional table information: table: voter_2"} +{"question": "SELECT COUNT(DISTINCT bedType) FROM Rooms", "answer": "How many different types of beds are there?\nAdditional table information: table: inn_1"} +{"question": "SELECT COUNT(*), time_of_day FROM broadcast GROUP BY time_of_day", "answer": "Count the number of programs broadcast for each time section of a day.\nAdditional table information: table: program_share"} +{"question": "SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "In which year did the least people enter hall of fame?\nAdditional table information: table: baseball_1"} +{"question": "SELECT DISTINCT T1.Fname, T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_President_VOTE WHERE T1.age = 18", "answer": "Find the first and last name of all the students of age 18 who have vice president votes.\nAdditional table information: table: voter_2"} +{"question": "SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t2.acc_percent NULLS FIRST LIMIT 1", "answer": "What is the primary conference of the school that has the lowest acc percent score in the competition?\nAdditional table information: table: university_basketball"} +{"question": "SELECT COUNT(*), T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name ORDER BY COUNT(*) DESC", "answer": "Find the number of routes and airport name for each source airport, order the results by decreasing number of routes.\nAdditional table information: table: flight_4"} +{"question": "SELECT T1.interaction_type FROM medicine_enzyme_interaction AS T1 JOIN medicine AS T2 ON T1.medicine_id = T2.id JOIN enzyme AS T3 ON T1.enzyme_id = T3.id WHERE T3.name = 'ALA synthase' AND T2.name = 'Aripiprazole'", "answer": "What is the type of interaction for the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT product_id, product_type_code FROM products ORDER BY product_price NULLS FIRST LIMIT 1", "answer": "What are the product id and product type of the cheapest product?\nAdditional table information: table: department_store"} +{"question": "SELECT Reign, Days_held FROM wrestler", "answer": "Show the reign and days held of wrestlers.\nAdditional table information: table: wrestler"} +{"question": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName NULLS FIRST", "answer": "Find the name of all students who were in the tryout sorted in alphabetic order.\nAdditional table information: table: soccer_2"} +{"question": "SELECT account_id, COUNT(*) FROM Financial_transactions GROUP BY account_id", "answer": "What are the different account ids that have made financial transactions, as well as how many transactions correspond to each?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name HAVING COUNT(*) >= 1", "answer": "Find the name and country of origin for all artists who have release at least one song of resolution above 900.\nAdditional table information: table: music_1"} +{"question": "SELECT T1.event_details FROM EVENTS AS T1 JOIN Services AS T2 ON T1.Service_ID = T2.Service_ID WHERE T2.Service_Type_Code = 'Marriage'", "answer": "what are the event details of the services that have the type code 'Marriage'?\nAdditional table information: table: local_govt_in_alabama"} +{"question": "SELECT region_name FROM region WHERE NOT region_id IN (SELECT region_id FROM affected_region)", "answer": "What are the names of regions that were not affected?\nAdditional table information: table: storm_record"} +{"question": "SELECT AVG(active_to_date - active_from_date) FROM customer_contact_channels", "answer": "What is the average time span of contact channels in the database?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT COUNT(DISTINCT dormid) FROM has_amenity", "answer": "How many dorms have amenities?\nAdditional table information: table: dorm_1"} +{"question": "SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'", "answer": "Find the names of schools that have some students playing in goalie and mid positions.\nAdditional table information: table: soccer_2"} +{"question": "SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T2.name = 'Creative Labs' INTERSECT SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T2.name = 'Sony'", "answer": "Find the name of product that is produced by both companies Creative Labs and Sony.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT T1.Name, T3.Visit_Date FROM Tourist_Attractions AS T1, VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Vincent' OR T2.Tourist_Details = 'Vivian'", "answer": "What are the names of the tourist attractions and the dates when the tourists named Vincent or Vivian visited there?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT COUNT(*) FROM catalog_contents", "answer": "Find the total number of catalog contents.\nAdditional table information: table: product_catalog"} +{"question": "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", "answer": "What is the city with the most customers?\nAdditional table information: table: driving_school"} +{"question": "SELECT project_id, project_details FROM Projects", "answer": "What are the ids and details for each project?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1)", "answer": "What are the names of all the stores in the largest district by population?\nAdditional table information: table: store_product"} +{"question": "SELECT name FROM enzyme WHERE name LIKE '%ALA%'", "answer": "Which enzyme names have the substring 'ALA'?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT Team FROM Elimination WHERE Eliminated_By = 'Orton' INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = 'Benjamin'", "answer": "Show the teams that have both wrestlers eliminated by 'Orton' and wrestlers eliminated by 'Benjamin'.\nAdditional table information: table: wrestler"} +{"question": "SELECT city FROM addresses WHERE NOT city IN (SELECT DISTINCT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id)", "answer": "What are the cities no customers live in?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID ORDER BY T2.quality_rank NULLS FIRST", "answer": "What are the names of the technicians by ascending order of quality rank for the machine they are assigned?\nAdditional table information: table: machine_repair"} +{"question": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID WHERE T2.Name = 'The Phantom of the Opera'", "answer": "Show names of actors that have appeared in musical with name 'The Phantom of the Opera'.\nAdditional table information: table: musical"} +{"question": "SELECT product_category_code FROM products WHERE product_name = 'flax'", "answer": "What is the code of the category that the product with the name 'flax' belongs to?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT T1.County_name, COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id", "answer": "For each county, find the name of the county and the number of delegates from that county.\nAdditional table information: table: election"} +{"question": "SELECT T1.editor_id, T1.Name, COUNT(*) FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.editor_id", "answer": "Show the id, name of each editor and the number of journal committees they are on.\nAdditional table information: table: journal_committee"} +{"question": "SELECT CLASS FROM captain GROUP BY CLASS HAVING COUNT(*) > 2", "answer": "Which classes have more than two captains?\nAdditional table information: table: ship_1"} +{"question": "SELECT name FROM captain ORDER BY age NULLS FIRST LIMIT 1", "answer": "Return the name of the youngest captain.\nAdditional table information: table: ship_1"} +{"question": "SELECT name, street_address, floors FROM building ORDER BY floors NULLS FIRST", "answer": "Show the name, street address, and number of floors for all buildings ordered by the number of floors.\nAdditional table information: table: protein_institute"} +{"question": "SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE country = 'Canada'", "answer": "How many routes end in a Canadian airport?\nAdditional table information: table: flight_4"} +{"question": "SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype = 'food'", "answer": "Show all allergies with type food.\nAdditional table information: table: allergy_1"} +{"question": "SELECT title FROM Movie WHERE director = 'Steven Spielberg'", "answer": "Find the titles of all movies directed by steven spielberg.\nAdditional table information: table: movie_1"} +{"question": "SELECT T2.Name, T1.ArtistId FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistID GROUP BY T1.ArtistId HAVING COUNT(*) >= 3 ORDER BY T2.Name NULLS FIRST", "answer": "What are the names and ids of artists with 3 or more albums, listed in alphabetical order?\nAdditional table information: table: chinook_1"} +{"question": "SELECT phone_number FROM customers UNION SELECT phone_number FROM staff", "answer": "Find the phone number of all the customers and staff.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT SUM(amount) FROM payment", "answer": "What is the total amount of all payments?\nAdditional table information: table: sakila_1"} +{"question": "SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Demon Kitty Rag'", "answer": "Find the number of vocal types used in song 'Demon Kitty Rag'?\nAdditional table information: table: music_2"} +{"question": "SELECT DISTINCT T2.name, T2.friend, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT AVG(age) FROM person)", "answer": "Who has friends that are older than the average age? Print their friends and their ages as well\nAdditional table information: table: network_2"} +{"question": "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'", "answer": "What are the names of the activities Mark Giuliano is involved in\nAdditional table information: table: activity_1"} +{"question": "SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = 'Matthias' AND t1.lname = 'Blume'", "answer": "What is the name of the institution that 'Matthias Blume' belongs to?\nAdditional table information: table: icfp_1"} +{"question": "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'", "answer": "What are the dates for the documents with both 'GV' type and 'SF' type expenses?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1", "answer": "Show the height of the mountain climbed by the climber with the maximum points.\nAdditional table information: table: climbing"} +{"question": "SELECT chip_model, screen_mode FROM phone WHERE Hardware_Model_name = 'LG-P760'", "answer": "What are the chip model and screen mode of the phone with hardware model name 'LG-P760'?\nAdditional table information: table: phone_1"} +{"question": "SELECT DISTINCT staff_first_name, staff_last_name FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T2.problem_id = 1", "answer": "List the first and last names of all distinct staff members who are assigned to the problem whose id is 1.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT StuID FROM Student WHERE sex = 'F' INTERSECT SELECT StuID FROM Sportsinfo WHERE sportname = 'Football'", "answer": "Show student ids who are female and play football.\nAdditional table information: table: game_1"} +{"question": "SELECT vehicle_flight_number, date, pilot FROM flight ORDER BY altitude ASC NULLS FIRST", "answer": "List the vehicle flight number, date and pilot of all the flights, ordered by altitude.\nAdditional table information: table: flight_company"} +{"question": "SELECT instrument FROM instruments GROUP BY instrument ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What instrument is used the most?\nAdditional table information: table: music_2"} +{"question": "SELECT customer_id, customer_name FROM customers WHERE customer_address LIKE '%WY%' AND payment_method_code <> 'Credit Card'", "answer": "Find the id and name of customers whose address contains WY state and do not use credit card for payment.\nAdditional table information: table: department_store"} +{"question": "SELECT COUNT(DISTINCT Birth_Place) FROM people", "answer": "How many distinct birth places are there?\nAdditional table information: table: body_builder"} +{"question": "SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Rock'", "answer": "Find the average unit price of tracks from the Rock genre.\nAdditional table information: table: chinook_1"} +{"question": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'", "answer": "Find the names of the students who are in the position of striker and got a yes tryout decision.\nAdditional table information: table: soccer_2"} +{"question": "SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500", "answer": "What are the names of players whose training hours is between 500 and 1500?\nAdditional table information: table: soccer_2"} +{"question": "SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = 'USA' GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1", "answer": "List the state in the US with the most invoices.\nAdditional table information: table: store_1"} +{"question": "SELECT service_type_code FROM services ORDER BY service_type_code NULLS FIRST", "answer": "List the type of the services in alphabetical order.\nAdditional table information: table: local_govt_in_alabama"} +{"question": "SELECT name FROM people WHERE height > 200 OR height < 190", "answer": "find the names of people who are taller than 200 or lower than 190.\nAdditional table information: table: candidate_poll"} +{"question": "SELECT date_of_birth FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "answer": "What is the date of birth for the staff member named Janessa Sawayn?\nAdditional table information: table: driving_school"} +{"question": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.'", "answer": "What are the names of all instructors in the Comp. Sci. department?\nAdditional table information: table: college_2"} +{"question": "SELECT LName FROM STUDENT WHERE Major = 50", "answer": "What are the last names of students studying major 50?\nAdditional table information: table: voter_2"} +{"question": "SELECT COUNT(DISTINCT name) FROM products WHERE NOT name IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T2.name = 'Sony')", "answer": "Find number of products which Sony does not make.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT SUM(city_population) FROM district ORDER BY city_area DESC LIMIT 3", "answer": "Find the total population of the top 3 districts with the largest area.\nAdditional table information: table: store_product"} +{"question": "SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price > (SELECT AVG(Product_Price) FROM PRODUCTS)", "answer": "Show all the distinct product names with price higher than the average.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT AVG(T1.age), T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name", "answer": "Find the average age of students living in each dorm and the name of dorm.\nAdditional table information: table: dorm_1"} +{"question": "SELECT COUNT(*) FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id WHERE T1.name = 'England'", "answer": "How many leagues are there in England?\nAdditional table information: table: soccer_1"} +{"question": "SELECT COUNT(DISTINCT language_id) FROM film", "answer": "How many languages are in these films?\nAdditional table information: table: sakila_1"} +{"question": "SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Dameon' AND T2.staff_last_name = 'Frami' UNION SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Jolie' AND T2.staff_last_name = 'Weber'", "answer": "Which problems were reported by the staff named Dameon Frami or Jolie Weber? Give me the ids of the problems.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT T1.name, T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance < T2.balance", "answer": "Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT T2.Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown", "answer": "How many gymnasts are from each hometown?\nAdditional table information: table: gymnast"} +{"question": "SELECT SUM(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T1.state = 'New York'", "answer": "Find the total amount of loans provided by bank branches in the state of New York.\nAdditional table information: table: loan_1"} +{"question": "SELECT T2.Dname, T2.Room FROM COURSE AS T1 JOIN DEPARTMENT AS T2 ON T1.DNO = T2.DNO WHERE T1.CName = 'INTRODUCTION TO COMPUTER SCIENCE'", "answer": "Find the department name and room of the course INTRODUCTION TO COMPUTER SCIENCE.\nAdditional table information: table: college_3"} +{"question": "SELECT Open_Date, Open_Year FROM shop WHERE Shop_Name = 'Apple'", "answer": "What are the open dates and years for the shop named Apple?\nAdditional table information: table: device"} +{"question": "SELECT T2.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance NULLS FIRST LIMIT 1", "answer": "Find the name and checking balance of the account with the lowest saving balance.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen'", "answer": "Find the names of procedures which physician John Wen was trained in.\nAdditional table information: table: hospital_1"} +{"question": "SELECT AVG(transaction_amount), SUM(transaction_amount) FROM Financial_transactions", "answer": "What is the average and total transaction amount?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT T1.interaction_type FROM medicine_enzyme_interaction AS T1 JOIN medicine AS T2 ON T1.medicine_id = T2.id JOIN enzyme AS T3 ON T1.enzyme_id = T3.id WHERE T3.name = 'ALA synthase' AND T2.name = 'Aripiprazole'", "answer": "What is the interaction type of the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT T1.id FROM trip AS T1 JOIN weather AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.zip_code HAVING AVG(T2.mean_temperature_f) > 60", "answer": "Give me ids for all the trip that took place in a zip code area with average mean temperature above 60.\nAdditional table information: table: bike_1"} +{"question": "SELECT title, rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1", "answer": "Which film has the highest rental rate? And what is the rate?\nAdditional table information: table: sakila_1"} +{"question": "SELECT T2.Delegate, T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District", "answer": "Show the delegates and the names of county they belong to.\nAdditional table information: table: election"} +{"question": "SELECT director FROM Movie WHERE director <> 'null' GROUP BY director HAVING COUNT(*) = 1", "answer": "What are the names of all directors who have made one movie except for the director named NULL?\nAdditional table information: table: movie_1"} +{"question": "SELECT roomName, bedType FROM Rooms WHERE decor = 'traditional'", "answer": "List the type of bed and name of all traditional rooms.\nAdditional table information: table: inn_1"} +{"question": "SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the language that was used most often in songs with resolution above 500?\nAdditional table information: table: music_1"} +{"question": "SELECT city FROM park GROUP BY city HAVING COUNT(*) BETWEEN 2 AND 4", "answer": "Which cities have 2 to 4 parks?\nAdditional table information: table: baseball_1"} +{"question": "SELECT trade_name, COUNT(*) FROM medicine GROUP BY trade_name", "answer": "How many medicines are offered by each trade name?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT dept_name, building FROM department ORDER BY budget DESC", "answer": "What are the names and buildings of the deparments, sorted by budget descending?\nAdditional table information: table: college_2"} +{"question": "SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id > 8", "answer": "What are the catalog entry names of the products with next entry ID above 8?\nAdditional table information: table: product_catalog"} +{"question": "SELECT T2.date_moved_in, T1.customer_id, T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id", "answer": "What is each customer's move in date, and the corresponding customer id and details?\nAdditional table information: table: local_govt_and_lot"} +{"question": "SELECT Roles.role_description, COUNT(Employees.employee_id) FROM ROLES JOIN Employees ON Employees.role_code = Roles.role_code GROUP BY Employees.role_code HAVING COUNT(Employees.employee_id) > 1", "answer": "List roles that have more than one employee. List the role description and number of employees.\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT MAX(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'", "answer": "What are the maximum scores the team Boston Red Stockings got when the team won in postseason?\nAdditional table information: table: baseball_1"} +{"question": "SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1", "answer": "What is the school color of the school with the largest enrollment?\nAdditional table information: table: school_player"} +{"question": "SELECT country FROM stadium GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the country that has the most stadiums.\nAdditional table information: table: swimming"} +{"question": "SELECT COUNT(*) FROM Has_allergy WHERE Allergy = 'Cat'", "answer": "How many students have cat allergies?\nAdditional table information: table: allergy_1"} +{"question": "SELECT COUNT(DISTINCT sportname) FROM Sportsinfo", "answer": "How many sports do we have?\nAdditional table information: table: game_1"} +{"question": "SELECT T2.title, T1.stars, T2.director, MAX(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE director <> 'null' GROUP BY director", "answer": "For each director, what are the titles and ratings for all the movies they reviewed?\nAdditional table information: table: movie_1"} +{"question": "SELECT CLASS FROM race GROUP BY CLASS HAVING COUNT(*) >= 2", "answer": "What are the classes of races that have two or more corresponding races?\nAdditional table information: table: race_track"} +{"question": "SELECT Name FROM ship WHERE Nationality <> 'United States'", "answer": "What are the names of the ships that are not from the United States?\nAdditional table information: table: ship_mission"} +{"question": "SELECT clubdesc FROM club WHERE clubname = 'Pen and Paper Gaming'", "answer": "What is the description of the club 'Pen and Paper Gaming'?\nAdditional table information: table: club_1"} +{"question": "SELECT T1.member_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id WHERE T2.Party_name <> 'Progress Party'", "answer": "Which member names corresponding to members who are not in the Progress Party?\nAdditional table information: table: party_people"} +{"question": "SELECT T1.Name, T2.Tourist_Attraction_ID, COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID", "answer": "Show different tourist attractions' names, ids, and the corresponding number of visits.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT country FROM airports ORDER BY elevation DESC LIMIT 1", "answer": "What is the country of the airport with the highest elevation?\nAdditional table information: table: flight_4"} +{"question": "SELECT STATEMENT_ID, statement_details FROM Statements", "answer": "What are the ids and details of all statements?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which marketing region has the most drama workshop groups? Give me the region code.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT fname, sex FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Milk' EXCEPT SELECT StuID FROM Has_allergy WHERE Allergy = 'Cat')", "answer": "What are the first name and gender of the students who have allergy to milk but can put up with cats?\nAdditional table information: table: allergy_1"} +{"question": "SELECT COUNT(*) FROM Faculty WHERE Sex = 'F' AND Rank = 'Professor'", "answer": "Count the number of female Professors we have.\nAdditional table information: table: activity_1"} +{"question": "SELECT COUNT(*) FROM claims_processing_stages", "answer": "Find the number of distinct stages in claim processing.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%'", "answer": "What is the type of the document whose description starts with the word 'Initial'?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT district FROM address GROUP BY district HAVING COUNT(*) >= 2", "answer": "Which districts have at least two addresses?\nAdditional table information: table: sakila_1"} +{"question": "SELECT Rank FROM FACULTY GROUP BY Rank ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What is the least common faculty rank?\nAdditional table information: table: college_3"} +{"question": "SELECT zip_code FROM weather GROUP BY zip_code HAVING AVG(mean_visibility_miles) < 10", "answer": "Find the zip code in which the average mean visibility is lower than 10.\nAdditional table information: table: bike_1"} +{"question": "SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 2005", "answer": "What is the average fee on a CSU campus in 2005?\nAdditional table information: table: csu_1"} +{"question": "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", "answer": "Which city does has most number of customers?\nAdditional table information: table: driving_school"} +{"question": "SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'", "answer": "How many vocal types are used in the song 'Le Pop'?\nAdditional table information: table: music_2"} +{"question": "SELECT name FROM instructor WHERE NOT id IN (SELECT id FROM teaches)", "answer": "What are the names of instructors who didn't teach?\nAdditional table information: table: college_2"} +{"question": "SELECT state_province_county, country FROM addresses WHERE zip_postcode LIKE '4%'", "answer": "Find the state and country of all cities with post code starting with 4.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T2.guest_first_name, T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T1.booking_status_code = 'Confirmed'", "answer": "Which guests have apartment bookings with status code 'Confirmed'? Return their first names and last names.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant'", "answer": "Find the name of captains whose rank are either Midshipman or Lieutenant.\nAdditional table information: table: ship_1"} +{"question": "SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_Staff WHERE role_code = 'researcher')", "answer": "List the project details of the projects which did not hire any staff for a researcher role.\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT title FROM item WHERE NOT i_id IN (SELECT i_id FROM review)", "answer": "Find the names of the items that did not receive any review.\nAdditional table information: table: epinions_1"} +{"question": "SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id = t2.campus WHERE t2.faculty >= 600 AND t2.faculty <= 1000 AND T1.year = 2004", "answer": "What are the campuses that had between 600 and 1000 faculty members in 2004?\nAdditional table information: table: csu_1"} +{"question": "SELECT COUNT(*) FROM club_rank WHERE Total < 10", "answer": "What is the total number of clubs that have less than 10 medals in total?\nAdditional table information: table: sports_competition"} +{"question": "SELECT Name FROM editor WHERE Age = 24 OR Age = 25", "answer": "Show the names of editors of age either 24 or 25.\nAdditional table information: table: journal_committee"} +{"question": "SELECT name, dates_active, number_deaths FROM storm WHERE number_deaths >= 1", "answer": "List name, dates active, and number of deaths for all storms with at least 1 death.\nAdditional table information: table: storm_record"} +{"question": "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", "answer": "find the name of driver who is driving the school bus with the longest working history.\nAdditional table information: table: school_bus"} +{"question": "SELECT job_title FROM jobs WHERE min_salary > 9000", "answer": "Which job titles correspond to jobs with salaries over 9000?\nAdditional table information: table: hr_1"} +{"question": "SELECT MAX(stars), MIN(stars) FROM Rating", "answer": "What is the maximum and mininum number of stars a rating can receive?\nAdditional table information: table: movie_1"} +{"question": "SELECT CLASS FROM race GROUP BY CLASS ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Give the class of races that is most common.\nAdditional table information: table: race_track"} +{"question": "SELECT COUNT(*) FROM Students WHERE NOT student_id IN (SELECT student_id FROM Student_Course_Enrolment)", "answer": "Count the number of students who did not enroll in any course.\nAdditional table information: table: e_learning"} +{"question": "SELECT T1.customer_name, T1.customer_phone FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T3.order_id = T2.order_id GROUP BY T1.customer_id ORDER BY SUM(T3.order_quantity) DESC LIMIT 1", "answer": "What are the name and phone of the customer with the most ordered product quantity?\nAdditional table information: table: customers_and_products_contacts"} +{"question": "SELECT rank, sex, COUNT(*) FROM Faculty GROUP BY rank, sex", "answer": "How many faculty members do we have for each rank and gender?\nAdditional table information: table: activity_1"} +{"question": "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", "answer": "Which cities have higher temperature in Feb than in Jun or have once served as host cities?\nAdditional table information: table: city_record"} +{"question": "SELECT eid, salary FROM Employee WHERE name = 'Mark Young'", "answer": "Show the id and salary of Mark Young.\nAdditional table information: table: flight_1"} +{"question": "SELECT MIN(product_price), MAX(product_price), AVG(product_price) FROM products", "answer": "Show the minimum, maximum, average price for all products.\nAdditional table information: table: customers_and_products_contacts"} +{"question": "SELECT id, name, market_share FROM browser", "answer": "List the ids, names and market shares of all browsers.\nAdditional table information: table: browser_web"} +{"question": "SELECT * FROM Albums WHERE YEAR = 2010", "answer": "What are the albums produced in year 2010?\nAdditional table information: table: music_2"} +{"question": "SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name = 'Ashley'", "answer": "What is the phone number of the performer Ashley?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT T2.party_name, COUNT(*) FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id", "answer": "How many events are there for each party?\nAdditional table information: table: party_people"} +{"question": "SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the membership level with most number of members.\nAdditional table information: table: shop_membership"} +{"question": "SELECT AVG(enr) FROM College", "answer": "What is the average enrollment number?\nAdditional table information: table: soccer_2"} +{"question": "SELECT building, room_number FROM classroom WHERE capacity BETWEEN 50 AND 100", "answer": "Find the room number of the rooms which can sit 50 to 100 students and their buildings.\nAdditional table information: table: college_2"} +{"question": "SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = 'Nominated'", "answer": "What are the songs in volumes that have resulted in a nomination at music festivals?\nAdditional table information: table: music_4"} +{"question": "SELECT COUNT(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid WHERE t1.clubname = 'Bootup Baltimore'", "answer": "How many different roles are there in the club 'Bootup Baltimore'?\nAdditional table information: table: club_1"} +{"question": "SELECT StuID FROM Student WHERE Sex = 'M'", "answer": "What are the student ids for all male students?\nAdditional table information: table: allergy_1"} +{"question": "SELECT Name FROM team WHERE NOT Team_id IN (SELECT Team FROM match_season)", "answer": "What are the names of teams that do no have match season record?\nAdditional table information: table: match_season"} +{"question": "SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989", "answer": "Show all publishers which do not have a book in 1989.\nAdditional table information: table: culture_company"} +{"question": "SELECT artist_name FROM artist WHERE country = 'UK' AND gender = 'Male'", "answer": "What are the names of artists who are Male and are from UK?\nAdditional table information: table: music_1"} +{"question": "SELECT cName FROM College WHERE enr < 13000 AND state = 'AZ' UNION SELECT cName FROM College WHERE enr > 15000 AND state = 'LA'", "answer": "What are the names of colleges in LA that have more than 15,000 students and of colleges in AZ with less than 13,000 students?\nAdditional table information: table: soccer_2"} +{"question": "SELECT COUNT(*) FROM Restaurant JOIN Type_Of_Restaurant ON Restaurant.ResID = Type_Of_Restaurant.ResID JOIN Restaurant_Type ON Type_Of_Restaurant.ResTypeID = Restaurant_Type.ResTypeID GROUP BY Type_Of_Restaurant.ResTypeID HAVING Restaurant_Type.ResTypeName = 'Sandwich'", "answer": "How many restaurant is the Sandwich type restaurant?\nAdditional table information: table: restaurant_1"} +{"question": "SELECT COUNT(*), building FROM classroom WHERE capacity > 50 GROUP BY building", "answer": "Find the number of rooms with more than 50 capacity for each building.\nAdditional table information: table: college_2"} +{"question": "SELECT card_number FROM member WHERE Hometown LIKE '%Kentucky%'", "answer": "What are the card numbers of members from Kentucky?\nAdditional table information: table: shop_membership"} +{"question": "SELECT email_address, phone_number FROM customers ORDER BY email_address NULLS FIRST, phone_number NULLS FIRST", "answer": "What are the emails and phone numbers of all customers, sorted by email address and phone number?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = 'red' AND t3.characteristic_name = 'slow'", "answer": "How many products have the color description 'red' and the characteristic name 'slow'?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT LOCATION FROM school WHERE NOT School_ID IN (SELECT School_ID FROM Player)", "answer": "Which schools do not have any player? Give me the school locations.\nAdditional table information: table: school_player"} +{"question": "SELECT lname, sex FROM Student WHERE StuID IN (SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = 'Call of Destiny' INTERSECT SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = 'Works of Widenius')", "answer": "Find the last name and gender of the students who are playing both Call of Destiny and Works of Widenius games.\nAdditional table information: table: game_1"} +{"question": "SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T1.amenid = T2.amenid GROUP BY T2.amenid ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common amenity in the dorms?\nAdditional table information: table: dorm_1"} +{"question": "SELECT * FROM people", "answer": "List all info about all people.\nAdditional table information: table: candidate_poll"} +{"question": "SELECT T3.course_name, COUNT(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id JOIN courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id", "answer": "How many registed students do each course have? List course name and the number of their registered students?\nAdditional table information: table: student_assessment"} +{"question": "SELECT payment_method_code, COUNT(*) FROM Customer_Payments GROUP BY payment_method_code", "answer": "For each payment method, how many payments were made?\nAdditional table information: table: driving_school"} +{"question": "SELECT COUNT(*) FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY'", "answer": "How many times does ROY SWEAZY has reserved a room.\nAdditional table information: table: inn_1"} +{"question": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 INTERSECT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010", "answer": "Find courses that ran in Fall 2009 and in Spring 2010.\nAdditional table information: table: college_2"} +{"question": "SELECT DISTINCT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Brittany Harris' OR T2.year > 2000", "answer": "What are the names of all movies that were made after 2000 or reviewed by Brittany Harris?\nAdditional table information: table: movie_1"} +{"question": "SELECT customer_event_id, date_moved_in, property_id FROM customer_events", "answer": "List the customer event id and the corresponding move in date and property id.\nAdditional table information: table: local_govt_and_lot"} +{"question": "SELECT t3.name, t3.time FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id JOIN train AS t3 ON t2.train_id = t3.id WHERE t1.local_authority = 'Chiltern'", "answer": "Find names and times of trains that run through stations for the local authority Chiltern.\nAdditional table information: table: station_weather"} +{"question": "SELECT DISTINCT building FROM Faculty", "answer": "Show all the distinct buildings that have faculty rooms.\nAdditional table information: table: activity_1"} +{"question": "SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the most prominent max page size among all the products.\nAdditional table information: table: store_product"} +{"question": "SELECT origin FROM train GROUP BY origin HAVING COUNT(*) > 1", "answer": "Find the origins from which more than 1 train starts.\nAdditional table information: table: station_weather"} +{"question": "SELECT COUNT(DISTINCT rating) FROM film", "answer": "How many kinds of different ratings are listed?\nAdditional table information: table: sakila_1"} +{"question": "SELECT COUNT(*) FROM camera_lens WHERE NOT id IN (SELECT camera_lens_id FROM photos)", "answer": "How many camera lenses are not used in taking any photos?\nAdditional table information: table: mountain_photos"} +{"question": "SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999", "answer": "What are all company names that have a corresponding movie directed in the year 1999?\nAdditional table information: table: culture_company"} +{"question": "SELECT fname FROM student WHERE age > 20", "answer": "Find the first name of students who is older than 20.\nAdditional table information: table: dorm_1"} +{"question": "SELECT T2.Name, T1.Team FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC", "answer": "List the names of wrestlers and the teams in elimination in descending order of days held.\nAdditional table information: table: wrestler"} +{"question": "SELECT COUNT(*) FROM ASSESSMENT_NOTES", "answer": "How many assessment notes are there in total?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC NULLS FIRST", "answer": "List the themes of parties in ascending order of number of hosts.\nAdditional table information: table: party_host"} +{"question": "SELECT name FROM projects ORDER BY hours DESC LIMIT 1", "answer": "Find the name of project that continues for the longest time.\nAdditional table information: table: scientist_1"} +{"question": "SELECT Census_Ranking FROM city WHERE Status <> 'Village'", "answer": "Show the census ranking of cities whose status are not 'Village'.\nAdditional table information: table: farm"} +{"question": "SELECT COUNT(*), country FROM airports GROUP BY country ORDER BY COUNT(*) DESC", "answer": "How many airports are there per country? Order the countries by decreasing number of airports.\nAdditional table information: table: flight_4"} +{"question": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Bob'", "answer": "What are the names of all of Bob's friends?\nAdditional table information: table: network_2"} +{"question": "SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*) > 1", "answer": "Show the official names of the cities that have hosted more than one competition.\nAdditional table information: table: farm"} +{"question": "SELECT Title FROM ALBUM ORDER BY Title NULLS FIRST", "answer": "Please list all album titles in alphabetical order.\nAdditional table information: table: chinook_1"} +{"question": "SELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = 'stanley.monahan@example.org'", "answer": "Find id of the candidate whose email is stanley.monahan@example.org?\nAdditional table information: table: student_assessment"} +{"question": "SELECT age, COUNT(*) FROM Student GROUP BY age", "answer": "Show all ages and corresponding number of students.\nAdditional table information: table: allergy_1"} +{"question": "SELECT name FROM procedures WHERE cost > 1000 UNION SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen'", "answer": "What are the procedures that cost more than 1000 or are specialized in by physician John Wen?\nAdditional table information: table: hospital_1"} +{"question": "SELECT DISTINCT Region FROM club ORDER BY Region ASC NULLS FIRST", "answer": "What are the different regions of clubs in ascending alphabetical order?\nAdditional table information: table: sports_competition"} +{"question": "SELECT phone FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards'", "answer": "What is the the phone number of Nancy Edwards?\nAdditional table information: table: store_1"} +{"question": "SELECT DISTINCT country FROM artist", "answer": "Return the different countries for artists.\nAdditional table information: table: theme_gallery"} +{"question": "SELECT customer_name FROM customers", "answer": "Find the name of all customers.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT CLASS FROM race GROUP BY CLASS ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the race class with most number of races.\nAdditional table information: table: race_track"} +{"question": "SELECT name, CLASS, rank FROM captain", "answer": "What are the names, classes, and ranks of all captains?\nAdditional table information: table: ship_1"} +{"question": "SELECT COUNT(DISTINCT FDA_approved) FROM medicine", "answer": "How many different FDA approval statuses exist for medicines?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT T1.student_id, T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) >= 2", "answer": "Which student are enrolled in at least two courses? Give me the student ID and personal name.\nAdditional table information: table: e_learning"} +{"question": "SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Badlands'", "answer": "Who performed the song named 'Badlands'? Show the first name and the last name.\nAdditional table information: table: music_2"} +{"question": "SELECT company, main_industry FROM company WHERE headquarters <> 'USA'", "answer": "Show the company name and the main industry for all companies whose headquarters are not from USA.\nAdditional table information: table: gas_company"} +{"question": "SELECT Name FROM actor WHERE Age <> 20", "answer": "What are the names of actors who are not 20 years old?\nAdditional table information: table: musical"} +{"question": "SELECT T2.star_rating_description FROM HOTELS AS T1 JOIN Ref_Hotel_Star_Ratings AS T2 ON T1.star_rating_code = T2.star_rating_code WHERE T1.price_range > 10000", "answer": "Give me the star rating descriptions of the hotels that cost more than 10000.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT start_station_name, end_station_name FROM trip ORDER BY id NULLS FIRST LIMIT 3", "answer": "Give me the start station and end station for the trips with the three oldest id.\nAdditional table information: table: bike_1"} +{"question": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'", "answer": "What are the names of all students who successfully tried out for the position of striker?\nAdditional table information: table: soccer_2"} +{"question": "SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed", "answer": "Which employees do not authorize destruction for any document? Give me their employee ids.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3", "answer": "List the 3 highest salaries of the players in 2001?\nAdditional table information: table: baseball_1"} +{"question": "SELECT Character FROM actor ORDER BY age DESC", "answer": "Return the characters for actors, ordered by age descending.\nAdditional table information: table: musical"} +{"question": "SELECT COUNT(*) FROM member", "answer": "How many members are there?\nAdditional table information: table: decoration_competition"} +{"question": "SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public'", "answer": "What are the schools that were either founded before 1850 or are public?\nAdditional table information: table: university_basketball"} +{"question": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id", "answer": "What are the names of customers who never made an order.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT Name FROM technician ORDER BY Age ASC NULLS FIRST", "answer": "List the names of technicians in ascending order of age.\nAdditional table information: table: machine_repair"} +{"question": "SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars = 3 INTERSECT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars = 4", "answer": "What are the names of all movies that received 3 or 4 stars?\nAdditional table information: table: movie_1"} +{"question": "SELECT city, MAX(lat) FROM station GROUP BY city", "answer": "For each city, return the highest latitude among its stations.\nAdditional table information: table: bike_1"} +{"question": "SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING AVG(bikes_available) > 10 EXCEPT SELECT name FROM station WHERE city = 'San Jose'", "answer": "What are names of stations that have average bike availability above 10 and are not located in San Jose city?\nAdditional table information: table: bike_1"} +{"question": "SELECT COUNT(*) FROM manufacturers WHERE founder = 'Andy'", "answer": "How many companies were created by Andy?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT T1.customer_name, T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'New' INTERSECT SELECT T1.customer_name, T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Pending'", "answer": "Find the name and address of the customers who have both New and Pending orders.\nAdditional table information: table: department_store"} +{"question": "SELECT Party FROM people GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the party that has the most people.\nAdditional table information: table: debate"} +{"question": "SELECT MAX(LEVEL) FROM manager WHERE Country <> 'Australia\t'", "answer": "What is the maximum level of managers in countries that are not 'Australia'?\nAdditional table information: table: railway"} +{"question": "SELECT COUNT(*) FROM savings WHERE balance > (SELECT AVG(balance) FROM savings)", "answer": "How many accounts have a savings balance above the average savings balance?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT last_name FROM staff WHERE email_address LIKE '%wrau%'", "answer": "What are the last names of staff with email addressed containing the substring 'wrau'?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT clublocation FROM club WHERE clubname = 'Pen and Paper Gaming'", "answer": "Find the location of the club 'Pen and Paper Gaming'.\nAdditional table information: table: club_1"} +{"question": "SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises'", "answer": "Who are the members of the club named 'Hopkins Student Enterprises'? Show the last name.\nAdditional table information: table: club_1"} +{"question": "SELECT COUNT(*) FROM authors", "answer": "Count the number of authors.\nAdditional table information: table: icfp_1"} +{"question": "SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE Votes > 10000", "answer": "What are the names of representatives with more than 10000 votes in election?\nAdditional table information: table: election_representative"} +{"question": "SELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id = T2.address_id WHERE T2.customer_id = 10", "answer": "What is the address for the customer with id 10?\nAdditional table information: table: department_store"} +{"question": "SELECT COUNT(DISTINCT director) FROM movie", "answer": "How many movie directors are there?\nAdditional table information: table: culture_company"} +{"question": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Mortgages' INTERSECT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Auto'", "answer": "What are the names of customers who have taken both Mortgage and Auto loans?\nAdditional table information: table: loan_1"} +{"question": "SELECT COUNT(DISTINCT class_code) FROM CLASS", "answer": "How many different classes are there?\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(*) FROM addresses WHERE country = 'USA'", "answer": "How many addresses are there in country USA?\nAdditional table information: table: customers_and_products_contacts"} +{"question": "SELECT fname, major FROM Student WHERE NOT StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Soy')", "answer": "Find the first name and major of the students who are not allegry to soy.\nAdditional table information: table: allergy_1"} +{"question": "SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses", "answer": "Return the ids of documents that do not have expenses.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT COUNT(*), T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name", "answer": "Find the number of checking accounts for each account name.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT address_line_1 FROM Course_Authors_and_Tutors", "answer": "List the addresses of all the course authors or tutors.\nAdditional table information: table: e_learning"} +{"question": "SELECT T2.emp_fname, T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Accounting'", "answer": "Find the first names of all professors in the Accounting department who is teaching some course and the class room.\nAdditional table information: table: college_1"} +{"question": "SELECT Nominee FROM musical WHERE Award = 'Tony Award' OR Award = 'Cleavant Derricks'", "answer": "Show the musical nominee with award 'Bob Fosse' or 'Cleavant Derricks'.\nAdditional table information: table: musical"} +{"question": "SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE '%Functional%'", "answer": "Who has written a paper that has the word 'Functional' in its title? Return the first names of the authors.\nAdditional table information: table: icfp_1"} +{"question": "SELECT company, rank FROM company ORDER BY Sales_billion DESC", "answer": "List the company name and rank for all companies in the decreasing order of their sales.\nAdditional table information: table: gas_company"} +{"question": "SELECT sportname, COUNT(*) FROM Sportsinfo GROUP BY sportname", "answer": "Show all sport name and the number of students.\nAdditional table information: table: game_1"} +{"question": "SELECT zip_code, AVG(mean_temperature_f) FROM weather WHERE date LIKE '8/%' GROUP BY zip_code", "answer": "For each zip code, what is the average mean temperature for all dates that start with '8'?\nAdditional table information: table: bike_1"} +{"question": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Heathrow' INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Gatwick'", "answer": "Show the names of aircrafts that are associated with both an airport named 'London Heathrow' and an airport named 'London Gatwick'\nAdditional table information: table: aircraft"} +{"question": "SELECT SUM(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000", "answer": "How many home games did the team Boston Red Stockings play from 1990 to 2000 in total?\nAdditional table information: table: baseball_1"} +{"question": "SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Please show the team that has the most number of technicians.\nAdditional table information: table: machine_repair"} +{"question": "SELECT date_of_enrolment, date_of_completion FROM Student_Course_Enrolment", "answer": "List all the dates of enrollment and completion of students.\nAdditional table information: table: e_learning"} +{"question": "SELECT invoice_number, COUNT(*) FROM Financial_transactions GROUP BY invoice_number", "answer": "How many transactions correspond to each invoice number?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common type code across products.\nAdditional table information: table: solvency_ii"} +{"question": "SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id = t2.product_id JOIN store AS t3 ON t2.store_id = t3.store_id WHERE t3.store_name = 'Miramichi'", "answer": "What products are sold at the store named Miramichi?\nAdditional table information: table: store_product"} +{"question": "SELECT COUNT(DISTINCT Status_of_Thing_Code) FROM Timed_Status_of_Things", "answer": "How many different status codes of things are there?\nAdditional table information: table: local_govt_and_lot"} +{"question": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY SUM(T2.amount) DESC LIMIT 1", "answer": "Find the name of customer who has the highest amount of loans.\nAdditional table information: table: loan_1"} +{"question": "SELECT Fname FROM STUDENT ORDER BY Age DESC", "answer": "What are the first names of students, ordered by age from greatest to least?\nAdditional table information: table: college_3"} +{"question": "SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration < (SELECT MAX(duration) FROM pitstops WHERE raceid = 841)", "answer": "Find the distinct driver id and the stop number of all drivers that have a shorter pit stop duration than some drivers in the race with id 841.\nAdditional table information: table: formula_1"} +{"question": "SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name NULLS FIRST", "answer": "List all the information about course authors and tutors in alphabetical order of the personal name.\nAdditional table information: table: e_learning"} +{"question": "SELECT name FROM person EXCEPT SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.job = 'student'", "answer": "What are the names of the people who have no friends who are students?\nAdditional table information: table: network_2"} +{"question": "SELECT name FROM Companies ORDER BY Market_Value_billion DESC", "answer": "Sort the company names in descending order of the company's market value.\nAdditional table information: table: company_office"} +{"question": "SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 2", "answer": "What are the ids and full names of customers who hold two or more cards?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT party FROM driver WHERE home_city = 'Hartford' AND age > 40", "answer": "Show the party with drivers from Hartford and drivers older than 40.\nAdditional table information: table: school_bus"} +{"question": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the course that has the most student enrollment?\nAdditional table information: table: e_learning"} +{"question": "SELECT age, COUNT(*) FROM Student GROUP BY age", "answer": "How old is each student and how many students are each age?\nAdditional table information: table: allergy_1"} +{"question": "SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning'", "answer": "Find the names of the channels that are broadcast in the morning.\nAdditional table information: table: program_share"} +{"question": "SELECT name FROM buildings WHERE NOT id IN (SELECT building_id FROM Office_locations)", "answer": "Which buildings do not have any company office? Give me the building names.\nAdditional table information: table: company_office"} +{"question": "SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = '8'", "answer": "What are the names of catalog entries with level number 8?\nAdditional table information: table: product_catalog"} +{"question": "SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Initial Application'", "answer": "For grants with both documents described as 'Regular' and documents described as 'Initial Application', list its start date.\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT Major FROM STUDENT WHERE Sex = 'M'", "answer": "What are the majors of male (sex is M) students?\nAdditional table information: table: voter_2"} +{"question": "SELECT COUNT(*) FROM dependent WHERE sex = 'F'", "answer": "how many female dependents are there?\nAdditional table information: table: company_1"} +{"question": "SELECT city FROM branch WHERE open_year = 2001 AND membership_amount > 100", "answer": "Show all city with a branch opened in 2001 and a branch with more than 100 membership.\nAdditional table information: table: shop_membership"} +{"question": "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", "answer": "What are the GDP and population of the city that already served as a host more than once?\nAdditional table information: table: city_record"} +{"question": "SELECT Customer_Name FROM Clients EXCEPT SELECT T2.Customer_Name FROM Bookings AS T1 JOIN Clients AS T2 ON T1.Customer_ID = T2.Client_ID", "answer": "Show the names of all the clients with no booking.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT DISTINCT region_name FROM region ORDER BY Label NULLS FIRST", "answer": "Show all distinct region names ordered by their labels.\nAdditional table information: table: party_people"} +{"question": "SELECT MAX(weight), MIN(weight) FROM Player", "answer": "What is the maximum and minimum height of all players?\nAdditional table information: table: soccer_1"} +{"question": "SELECT T1.id, T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id", "answer": "What is the installation date for each ending station on all the trips?\nAdditional table information: table: bike_1"} +{"question": "SELECT t2.id, t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id GROUP BY t1.station_id HAVING MAX(t1.precipitation) > 50", "answer": "Find the id and local authority of the station whose maximum precipitation is higher than 50.\nAdditional table information: table: station_weather"} +{"question": "SELECT COUNT(*), major FROM student GROUP BY major", "answer": "How many students are there in each major?\nAdditional table information: table: dorm_1"} +{"question": "SELECT COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'", "answer": "Find the number of routes operated by American Airlines.\nAdditional table information: table: flight_4"} +{"question": "SELECT name FROM track EXCEPT SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id WHERE T1.class = 'GT'", "answer": "What are the names for tracks without a race in class 'GT'.\nAdditional table information: table: race_track"} +{"question": "SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1", "answer": "List the name of film studio that have the most number of films.\nAdditional table information: table: film_rank"} +{"question": "SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the poll resource associated with the most candidates.\nAdditional table information: table: candidate_poll"} +{"question": "SELECT stu_gpa, stu_phone, stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5", "answer": "What is the first name, GPA, and phone number of the students with the top 5 GPAs?\nAdditional table information: table: college_1"} +{"question": "SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS = 'Third-rate ship of the line'", "answer": "Find the captain rank that has no captain in Third-rate ship of the line class.\nAdditional table information: table: ship_1"} +{"question": "SELECT Age FROM editor GROUP BY Age ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Please show the most common age of editors.\nAdditional table information: table: journal_committee"} +{"question": "SELECT T2.department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY T2.department_name", "answer": "display the department name and number of employees in each of the department.\nAdditional table information: table: hr_1"} +{"question": "SELECT Player_name FROM player ORDER BY Votes ASC NULLS FIRST", "answer": "List the names of players in ascending order of votes.\nAdditional table information: table: riding_club"} +{"question": "SELECT COUNT(DISTINCT Currency_Code) FROM Drama_Workshop_Groups", "answer": "How many distinct currency codes are there for all drama workshop groups?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT T2.product_name FROM problems AS T1, product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = 'Lacey' AND T3.staff_last_name = 'Bosco' INTERSECT SELECT T2.product_name FROM problems AS T1, product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = 'Kenton' AND T3.staff_last_name = 'Champlin'", "answer": "Which products have problems reported by both the staff named Lacey Bosco and the staff named Kenton Champlin?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT COUNT(DISTINCT city) FROM airports WHERE country = 'Greenland'", "answer": "How many different cities do have some airport in the country of Greenland?\nAdditional table information: table: flight_4"} +{"question": "SELECT COUNT(*) FROM customers GROUP BY customer_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "How many customers are there in the customer type with the most customers?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Elsa'", "answer": "Give the address of the staff member who has the first name Elsa.\nAdditional table information: table: sakila_1"} +{"question": "SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma'", "answer": "What is the average price of wines produced in appelations in Sonoma County?\nAdditional table information: table: wine_1"} +{"question": "SELECT SUM(hours) FROM projects", "answer": "What is the total number of hours for all projects?\nAdditional table information: table: scientist_1"} +{"question": "SELECT gender FROM staff GROUP BY gender ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which gender makes up the majority of the staff?\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT COUNT(T1.SSN) FROM patient AS T1 JOIN prescribes AS T2 ON T1.SSN = T2.patient JOIN physician AS T3 ON T2.physician = T3.employeeid WHERE T3.name = 'John Dorian'", "answer": "Find the number of patients' prescriptions physician John Dorian made.\nAdditional table information: table: hospital_1"} +{"question": "SELECT name FROM manufacturers WHERE revenue > (SELECT AVG(revenue) FROM manufacturers)", "answer": "What are the names of manufacturers with revenue greater than the average of all revenues?\nAdditional table information: table: manufactory_1"} +{"question": "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", "answer": "Show the budget type code and description and the corresponding document id.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 2", "answer": "Show id, first and last names for all customers with at least two cards.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT T3.name, T2.title, T1.stars, T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID ORDER BY T3.name NULLS FIRST, T2.title NULLS FIRST, T1.stars NULLS FIRST", "answer": "What is the reviewer name, film title, movie rating, and rating date for every movie ordered by reviewer name, movie title, then finally rating?\nAdditional table information: table: movie_1"} +{"question": "SELECT T1.problem_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T2.product_name = 'voluptatem' AND T1.date_problem_reported > '1995'", "answer": "What are the ids of the problems that are from the product 'voluptatem' and are reported after 1995?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT COUNT(*), T1.claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY T1.Date_Claim_Settled DESC LIMIT 1", "answer": "How many settlements were made on the claim with the most recent claim settlement date? List the number and the claim id.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT T1.role_description, T2.role_code, COUNT(*) FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code GROUP BY T2.role_code", "answer": "How many employees does each role have? List role description, id and number of employees.\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT friend FROM PersonFriend WHERE name = 'Zach' AND YEAR = (SELECT MAX(YEAR) FROM PersonFriend WHERE name = 'Zach')", "answer": "Who is the friend of Zach with longest year relationship?\nAdditional table information: table: network_2"} +{"question": "SELECT Product_Name FROM Products ORDER BY Product_Price ASC NULLS FIRST", "answer": "List all product names in ascending order of price.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 1", "answer": "Find the name of the user who has the largest number of followers.\nAdditional table information: table: twitter_1"} +{"question": "SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa NULLS FIRST LIMIT 1", "answer": "What is the department name of the students with lowest gpa belongs to?\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(DISTINCT Team) FROM match_season", "answer": "Count the number of different teams involved in match season.\nAdditional table information: table: match_season"} +{"question": "SELECT COUNT(*) FROM Companies", "answer": "How many companies are there?\nAdditional table information: table: company_office"} +{"question": "SELECT Author FROM submission ORDER BY Scores ASC NULLS FIRST", "answer": "Find the author for each submission and list them in ascending order of submission score.\nAdditional table information: table: workshop_paper"} +{"question": "SELECT project_id FROM Documents GROUP BY project_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What is the id of the project with least number of documents?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T2.order_id, T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id GROUP BY T2.order_id HAVING COUNT(*) > 2", "answer": "Return the order ids and details for orderes with two or more invoices.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Christop' AND T2.staff_last_name = 'Berge' INTERSECT SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.closure_authorised_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Ashley' AND T2.staff_last_name = 'Medhurst'", "answer": "What are the product ids for the problems reported by Christop Berge with closure authorised by Ashley Medhurst?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT name FROM stadium WHERE name LIKE '%Bank%'", "answer": "Which stadium name contains the substring 'Bank'?\nAdditional table information: table: game_injury"} +{"question": "SELECT Date_of_ceremony FROM music_festival WHERE Category = 'Best Song' AND RESULT = 'Awarded'", "answer": "Return the dates of ceremony corresponding to music festivals that had the category 'Best Song' and result 'Awarded'.\nAdditional table information: table: music_4"} +{"question": "SELECT Name FROM technician WHERE Age = 36 OR Age = 37", "answer": "Show the name of technicians aged either 36 or 37\nAdditional table information: table: machine_repair"} +{"question": "SELECT First_year, Last_year FROM party WHERE Party_Theme = 'Spring' OR Party_Theme = 'Teqnology'", "answer": "What are the first year and last year of the parties whose theme is 'Spring' or 'Teqnology'?\nAdditional table information: table: party_host"} +{"question": "SELECT minister FROM party WHERE took_office > 1961 OR took_office < 1959", "answer": "Who are the ministers who took office after 1961 or before 1959?\nAdditional table information: table: party_people"} +{"question": "SELECT COUNT(*) FROM device", "answer": "Count the number of devices.\nAdditional table information: table: device"} +{"question": "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)", "answer": "What are the SSN and names of scientists working on the project with the most hours?\nAdditional table information: table: scientist_1"} +{"question": "SELECT t1.product_name, COUNT(*) FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name", "answer": "What are all the different product names, and how many complains has each received?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT COUNT(*) FROM Aircraft WHERE distance BETWEEN 1000 AND 5000", "answer": "How many aircrafts have distance between 1000 and 5000?\nAdditional table information: table: flight_1"} +{"question": "SELECT COUNT(*) FROM dorm_amenity", "answer": "Find the number of distinct amenities.\nAdditional table information: table: dorm_1"} +{"question": "SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = 'Karson'", "answer": "List the dates of enrollment and completion of the student with personal name 'Karson'.\nAdditional table information: table: e_learning"} +{"question": "SELECT AVG(Product_Price) FROM Products", "answer": "What is the average price for products?\nAdditional table information: table: solvency_ii"} +{"question": "SELECT T2.emp_fname, T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num", "answer": "Find the first names of all instructors who have taught some course and the course code.\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(DISTINCT product_type_code) FROM products", "answer": "Count the number of distinct product types.\nAdditional table information: table: department_store"} +{"question": "SELECT COUNT(*) FROM manufacturers WHERE founder = 'Andy'", "answer": "Return the number of companies created by Andy.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num GROUP BY T2.stu_num HAVING COUNT(*) = 1", "answer": "What are the first names of student who only took one course?\nAdditional table information: table: college_1"} +{"question": "SELECT T2.Country, T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID", "answer": "Please list the countries and years of film market estimations.\nAdditional table information: table: film_rank"} +{"question": "SELECT Lname FROM FACULTY WHERE Building = 'Barton' ORDER BY Lname NULLS FIRST", "answer": "Find the last names of faculties in building Barton in alphabetic order.\nAdditional table information: table: college_3"} +{"question": "SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T2.decor ORDER BY COUNT(T2.decor) ASC NULLS FIRST LIMIT 1", "answer": "What kind of decor has the least number of reservations?\nAdditional table information: table: inn_1"} +{"question": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id", "answer": "What are the different cities where students live?\nAdditional table information: table: student_assessment"} +{"question": "SELECT title FROM Movie WHERE YEAR = (SELECT MAX(YEAR) FROM Movie)", "answer": "What is the title of the newest movie?\nAdditional table information: table: movie_1"} +{"question": "SELECT home_city FROM driver GROUP BY home_city ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the home city with the most number of drivers.\nAdditional table information: table: school_bus"} +{"question": "SELECT fname, major FROM Student WHERE NOT StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Soy')", "answer": "What are the first name and major of the students who are able to consume soy?\nAdditional table information: table: allergy_1"} +{"question": "SELECT COUNT(*) FROM CUSTOMERS", "answer": "How many customers do we have?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT T1.Date_Claim_Made, T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id HAVING COUNT(*) > 2 UNION SELECT T1.Date_Claim_Made, T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id WHERE T1.Amount_Claimed = (SELECT MAX(Amount_Claimed) FROM Claims)", "answer": "Which claims caused more than 2 settlements or have the maximum claim value? List the date the claim was made and the claim id.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT name FROM stadium WHERE capacity < (SELECT AVG(capacity) FROM stadium)", "answer": "Find the names of stadiums whose capacity is smaller than the average capacity.\nAdditional table information: table: swimming"} +{"question": "SELECT T1.Name FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.Name HAVING COUNT(*) >= 2", "answer": "Show the names of editors that are on at least two journal committees.\nAdditional table information: table: journal_committee"} +{"question": "SELECT first_name, last_name FROM Customers", "answer": "What are the first and last names for all customers?\nAdditional table information: table: driving_school"} +{"question": "SELECT T2.name, T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T1.register_year = 2016", "answer": "Show the member name and hometown who registered a branch in 2016.\nAdditional table information: table: shop_membership"} +{"question": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Linda' AND t3.lname = 'Smith'", "answer": "How many clubs does 'Linda Smith' belong to?\nAdditional table information: table: club_1"} +{"question": "SELECT T2.Party, COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party", "answer": "Show the name of each party and the corresponding number of delegates from that party.\nAdditional table information: table: election"} +{"question": "SELECT COUNT(*) FROM actor", "answer": "How many actors are there?\nAdditional table information: table: musical"} +{"question": "SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = 'Japanese' AND T2.points > 5", "answer": "What are the names of all the Japanese constructors that have earned more than 5 points?\nAdditional table information: table: formula_1"} +{"question": "SELECT T2.lname, T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.SportName = 'Football' OR T1.SportName = 'Lacrosse'", "answer": "What is the first and last name of all students who play Football or Lacrosse?\nAdditional table information: table: game_1"} +{"question": "SELECT COUNT(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE T1.EMP_LNAME = 'Graztevski'", "answer": "How many classes are professor whose last name is Graztevski has?\nAdditional table information: table: college_1"} +{"question": "SELECT apt_type_code, bathroom_count, bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY SUM(room_count) DESC LIMIT 1", "answer": "Show the apartment type code that has the largest number of total rooms, together with the number of bathrooms and number of bedrooms.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT T1.thing_id, T1.type_of_Thing_Code, T2.organization_details FROM Things AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_id", "answer": "List the id and type of each thing, and the details of the organization that owns it.\nAdditional table information: table: local_govt_and_lot"} +{"question": "SELECT amount, donator_name FROM endowment ORDER BY amount DESC LIMIT 1", "answer": "List the amount and donor name for the largest amount of donation.\nAdditional table information: table: school_finance"} +{"question": "SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM employment)", "answer": "List the names of people that are not employed by any company\nAdditional table information: table: company_employee"} +{"question": "SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%'", "answer": "What are the first names for students who have an 'a' in their first name?\nAdditional table information: table: college_3"} +{"question": "SELECT product FROM product WHERE product <> (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "What are the names of all products that are not the most frequently-used maximum page size?\nAdditional table information: table: store_product"} +{"question": "SELECT AVG(weight), MIN(weight), sex FROM people GROUP BY sex", "answer": "What are the average and minimum weights for people of each sex?\nAdditional table information: table: candidate_poll"} +{"question": "SELECT open_year, name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1", "answer": "Which manufacturer has the most number of shops? List its name and year of opening.\nAdditional table information: table: manufacturer"} +{"question": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = 'Solveig' GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which vocal type has the band mate with first name 'Solveig' played the most?\nAdditional table information: table: music_2"} +{"question": "SELECT COUNT(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Ray'", "answer": "How many lesson does customer with first name Ray took?\nAdditional table information: table: driving_school"} +{"question": "SELECT t1.product_name, t1.product_price FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id = t2.product_id GROUP BY t2.product_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name and price of the product that has been ordered the greatest number of times.\nAdditional table information: table: customer_deliveries"} +{"question": "SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = 'USA' GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the states with the most invoices?\nAdditional table information: table: store_1"} +{"question": "SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.family_name = 'Zieme' AND T2.personal_name = 'Bernie'", "answer": "List the dates of enrollment and completion of the student with family name 'Zieme' and personal name 'Bernie'.\nAdditional table information: table: e_learning"} +{"question": "SELECT name, open_date FROM church ORDER BY open_date DESC LIMIT 3", "answer": "Show the name and opening year for three churches that opened most recently.\nAdditional table information: table: wedding"} +{"question": "SELECT role_description FROM Staff_Roles WHERE role_code = 'researcher'", "answer": "What is the complete description of the researcher role.\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT id FROM instructor EXCEPT SELECT id FROM teaches", "answer": "Find the id of instructors who didn't teach any courses?\nAdditional table information: table: college_2"} +{"question": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Jeremy' AND t1.lname = 'Gibbons'", "answer": "What are the titles of papers published by 'Jeremy Gibbons'?\nAdditional table information: table: icfp_1"} +{"question": "SELECT name FROM Aircraft WHERE distance > (SELECT AVG(distance) FROM Aircraft)", "answer": "What are the names of all aircrafts that can cover more distances than average?\nAdditional table information: table: flight_1"} +{"question": "SELECT product_name FROM products WHERE product_category_code = 'Spices'", "answer": "What are the names of products with category 'Spices'?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT COUNT(*), constructorid FROM constructorStandings GROUP BY constructorid", "answer": "For each constructor id, how many races are there?\nAdditional table information: table: formula_1"} +{"question": "SELECT name FROM Person WHERE age < 30", "answer": "Who is the person whose age is below 30?\nAdditional table information: table: network_2"} +{"question": "SELECT origin, COUNT(*) FROM Flight GROUP BY origin", "answer": "For each origin, how many flights came from there?\nAdditional table information: table: flight_1"} +{"question": "SELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3", "answer": "What are the names for the 3 branches that have the most memberships?\nAdditional table information: table: shop_membership"} +{"question": "SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.overall_rating > (SELECT AVG(overall_rating) FROM Player_Attributes)", "answer": "List all player names who have an overall rating higher than the average.\nAdditional table information: table: soccer_1"} +{"question": "SELECT T1.fault_log_entry_id, T1.fault_description, T1.fault_log_entry_datetime FROM Fault_Log AS T1 JOIN Fault_Log_Parts AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which fault log included the most number of faulty parts? List the fault log id, description and record time.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT Studio FROM film GROUP BY Studio HAVING AVG(Gross_in_dollar) >= 4500000", "answer": "Which studios have an average gross of over 4500000?\nAdditional table information: table: film_rank"} +{"question": "SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room'", "answer": "What is the name of each dorm that has a TV Lounge but no study rooms?\nAdditional table information: table: dorm_1"} +{"question": "SELECT POSITION FROM pilot WHERE Join_Year < 2000 INTERSECT SELECT POSITION FROM pilot WHERE Join_Year > 2005", "answer": "Show the pilot positions that have both pilots joining after year 2005 and pilots joining before 2000.\nAdditional table information: table: pilot_record"} +{"question": "SELECT document_type_code FROM documents WHERE document_name = 'David CV'", "answer": "What is the type of the document named 'David CV'?\nAdditional table information: table: document_management"} +{"question": "SELECT name FROM races WHERE YEAR = 2017", "answer": "Find the names of all races held in 2017.\nAdditional table information: table: formula_1"} +{"question": "SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name, COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id", "answer": "What are the the full names and ids for all customers, and how many accounts does each have?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = 'BAL'", "answer": "Which clubs have one or more members from the city with code 'BAL'? Give me the names of the clubs.\nAdditional table information: table: club_1"} +{"question": "SELECT name, openning_year, capacity FROM cinema", "answer": "Show name, opening year, and capacity for each cinema.\nAdditional table information: table: cinema"} +{"question": "SELECT COUNT(DISTINCT acc_type) FROM customer", "answer": "How many distinct types of accounts are there?\nAdditional table information: table: loan_1"} +{"question": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'flax'", "answer": "Count the number of characteristics of the 'flax' product.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT TYPE, COUNT(*) FROM store GROUP BY TYPE", "answer": "For each type of store, how many of them are there?\nAdditional table information: table: store_product"} +{"question": "SELECT role_description FROM ROLES WHERE role_code = 'ED'", "answer": "What is the description of role code ED?\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student", "answer": "What are ids of the faculty members who not only participate in an activity but also advise a student.\nAdditional table information: table: activity_1"} +{"question": "SELECT DISTINCT Director FROM film", "answer": "What are the different film Directors?\nAdditional table information: table: film_rank"} +{"question": "SELECT COUNT(DISTINCT Software_Platform) FROM device", "answer": "Count the number of different software platforms.\nAdditional table information: table: device"} +{"question": "SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1", "answer": "Return the apartment number with the largest number of bedrooms.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT DISTINCT T1.EMP_FNAME, T1.EMP_DOB FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE CRS_CODE = 'ACCT-211'", "answer": "What are the first names and birthdates of the professors in charge of ACCT-211?\nAdditional table information: table: college_1"} +{"question": "SELECT T1.rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank", "answer": "How many students are advised by each rank of faculty? List the rank and the number of students.\nAdditional table information: table: activity_1"} +{"question": "SELECT Team, COUNT(*) FROM elimination GROUP BY Team", "answer": "How many eliminations did each team have?\nAdditional table information: table: wrestler"} +{"question": "SELECT Team, COUNT(*) FROM elimination GROUP BY Team", "answer": "Show different teams in eliminations and the number of eliminations from each team.\nAdditional table information: table: wrestler"} +{"question": "SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4", "answer": "What are department ids for departments with managers managing more than 3 employees?\nAdditional table information: table: hr_1"} +{"question": "SELECT title FROM course WHERE course_id IN (SELECT T1.course_id FROM prereq AS T1 JOIN course AS T2 ON T1.prereq_id = T2.course_id WHERE T2.title = 'Differential Geometry')", "answer": "What is the title of the course with Differential Geometry as a prerequisite?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = 'Heilo'", "answer": "How many different instruments does the musician with the last name 'Heilo' use?\nAdditional table information: table: music_2"} +{"question": "SELECT Shop_Name FROM shop WHERE NOT Shop_ID IN (SELECT Shop_ID FROM stock)", "answer": "List the names of shops that have no devices in stock.\nAdditional table information: table: device"} +{"question": "SELECT date_valid_from, date_valid_to FROM Customers_cards WHERE card_number = '4560596484842'", "answer": "What are the valid from and valid to dates for the card with the number 4560596484842?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT DISTINCT President_Vote, VICE_President_Vote FROM VOTING_RECORD", "answer": "Report the distinct president vote and the vice president vote.\nAdditional table information: table: voter_2"} +{"question": "SELECT DISTINCT grade FROM list WHERE classroom = 103", "answer": "Which grade is studying in classroom 103?\nAdditional table information: table: student_1"} +{"question": "SELECT COUNT(*), semester, YEAR FROM SECTION GROUP BY semester, YEAR", "answer": "Find the number of courses provided in each semester and year.\nAdditional table information: table: college_2"} +{"question": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 2", "answer": "What document types have more than 2 corresponding documents?\nAdditional table information: table: document_management"} +{"question": "SELECT T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Contracts AS T2 ON T1.company_id = T2.maintenance_contract_company_id ORDER BY T2.contract_start_date ASC NULLS FIRST LIMIT 1", "answer": "Which company started the earliest the maintenance contract? Show the company name.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT T1.cust_name, T1.acc_type FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING SUM(T2.amount) > 5000", "answer": "What are the names and account balances for customers who have taken a total amount of more than 5000 in loans?\nAdditional table information: table: loan_1"} +{"question": "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", "answer": "Give the color of the grape whose wine products have the highest average price?\nAdditional table information: table: wine_1"} +{"question": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2", "answer": "Which advisors are advising more than 2 students?\nAdditional table information: table: voter_2"} +{"question": "SELECT date_stored FROM All_documents WHERE Document_name = 'Marry CV'", "answer": "What is the date when the document 'Marry CV' was stored?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT COUNT(DISTINCT OWNER) FROM channel", "answer": "what is the number of different channel owners?\nAdditional table information: table: program_share"} +{"question": "SELECT SUM(balance) FROM checking", "answer": "What is the total checking balance in all accounts?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT personal_name, family_name FROM Students ORDER BY family_name NULLS FIRST", "answer": "List the personal names and family names of all the students in alphabetical order of family name.\nAdditional table information: table: e_learning"} +{"question": "SELECT login_name, family_name FROM Course_Authors_and_Tutors", "answer": "List all the login names and family names of course author and tutors.\nAdditional table information: table: e_learning"} +{"question": "SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_id", "answer": "What are the last names of individuals who have been contact individuals for an organization?\nAdditional table information: table: e_government"} +{"question": "SELECT region_code, region_name FROM region ORDER BY region_code NULLS FIRST", "answer": "What are the codes and names for all regions, sorted by codes?\nAdditional table information: table: storm_record"} +{"question": "SELECT mID, AVG(stars) FROM Rating GROUP BY mID HAVING COUNT(*) >= 2", "answer": "Find the average rating star for each movie that received at least 2 ratings.\nAdditional table information: table: movie_1"} +{"question": "SELECT rID FROM Reviewer WHERE name LIKE '%Mike%'", "answer": "What is the id of the reviewer whose name includes the word 'Mike'?\nAdditional table information: table: movie_1"} +{"question": "SELECT date, cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5", "answer": "What are the dates that have the 5 highest cloud cover rates and what are the rates?\nAdditional table information: table: bike_1"} +{"question": "SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1", "answer": "Which district has the largest population?\nAdditional table information: table: store_product"} +{"question": "SELECT COUNT(DISTINCT dept_name) FROM course", "answer": "Count the number of departments which offer courses.\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(*) FROM region", "answer": "How many regions do we have?\nAdditional table information: table: party_people"} +{"question": "SELECT T1.fname, T1.age FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE NOT T2.dormid IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge')", "answer": "Find the first name and age of students who are living in the dorms that do not have amenity TV Lounge.\nAdditional table information: table: dorm_1"} +{"question": "SELECT order_id FROM shipments WHERE shipment_tracking_number = '3452'", "answer": "Which order's shipment tracking number is '3452'? Give me the id of the order.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING COUNT(*) > 1", "answer": "Find the dates on which more than one revisions were made.\nAdditional table information: table: product_catalog"} +{"question": "SELECT date_from FROM Project_Staff ORDER BY date_from ASC NULLS FIRST LIMIT 1", "answer": "When did the first staff member start working?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT employee_id, salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam')", "answer": "What are the employee ids of employees who report to Payam, and what are their salaries?\nAdditional table information: table: hr_1"} +{"question": "SELECT crs_credit, crs_description FROM course WHERE crs_code = 'CIS-220'", "answer": "How many credits does course CIS-220 have, and what its description?\nAdditional table information: table: college_1"} +{"question": "SELECT AVG(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Provisional'", "answer": "What is the average room count of the apartments whose booking status code is 'Provisional'?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT DISTINCT LOCATION FROM track", "answer": "What are distinct locations where tracks are located?\nAdditional table information: table: race_track"} +{"question": "SELECT COUNT(DISTINCT role_code) FROM Project_Staff", "answer": "How many kinds of roles are there for the staff?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT name FROM Person WHERE gender = 'male' AND age = (SELECT MIN(age) FROM person WHERE gender = 'male')", "answer": "Who is the youngest male?\nAdditional table information: table: network_2"} +{"question": "SELECT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds NULLS FIRST LIMIT 1", "answer": "What are the forename and surname of the driver who has the smallest laptime?\nAdditional table information: table: formula_1"} +{"question": "SELECT COUNT(*), class_room FROM CLASS GROUP BY class_room HAVING COUNT(*) >= 2", "answer": "For each classroom with at least 2 classes, how many classes are offered?\nAdditional table information: table: college_1"} +{"question": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC NULLS FIRST", "answer": "Please show the different statuses, ordered by the number of cities that have each.\nAdditional table information: table: farm"} +{"question": "SELECT Advisor FROM STUDENT WHERE city_code = 'BAL'", "answer": "Show the advisors of the students whose city of residence has city code 'BAL'.\nAdditional table information: table: voter_2"} +{"question": "SELECT COUNT(*) FROM Ref_document_types", "answer": "How many document types are there?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT COUNT(*) FROM appointment", "answer": "Count how many appointments have been made in total.\nAdditional table information: table: hospital_1"} +{"question": "SELECT team_name FROM basketball_match ORDER BY All_Home DESC", "answer": "What are the names of all the teams in the basketball competition, sorted by all home scores in descending order?\nAdditional table information: table: university_basketball"} +{"question": "SELECT DISTINCT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.rating > 9", "answer": "List the name and country of origin for all singers who have produced songs with rating above 9.\nAdditional table information: table: music_1"} +{"question": "SELECT T2.organisation_id, T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING SUM(T1.grant_amount) > 6000", "answer": "What are the ids and details for all organizations that have grants of more than 6000 dollars?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT name FROM Companies WHERE Headquarters <> 'USA'", "answer": "Find the names of the companies whose headquarters are not located in 'USA'.\nAdditional table information: table: company_office"} +{"question": "SELECT name FROM Person WHERE job = 'student' AND age = (SELECT MAX(age) FROM person WHERE job = 'student')", "answer": "What is the name of the oldest student?\nAdditional table information: table: network_2"} +{"question": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Country <> 'China'", "answer": "What are the names of perpetrators whose country is not 'China'?\nAdditional table information: table: perpetrator"} +{"question": "SELECT SUM(enrollment), AVG(enrollment) FROM school", "answer": "What are the total and average enrollment of all schools?\nAdditional table information: table: school_finance"} +{"question": "SELECT T1.Service_Type_Description, T1.Service_Type_Code FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T1.Service_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the description and code of the type of service that is performed the most often?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT Fname, Lname FROM Student", "answer": "What are the full names of all students\nAdditional table information: table: allergy_1"} +{"question": "SELECT LOCATION FROM station GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the location with most number of train stations.\nAdditional table information: table: train_station"} +{"question": "SELECT T2.title, T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY T1.stars DESC LIMIT 3", "answer": "What are the names and years released for the movies with the top 3 highest ratings?\nAdditional table information: table: movie_1"} +{"question": "SELECT COUNT(*) FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq)", "answer": "How many courses that do not have prerequisite?\nAdditional table information: table: college_2"} +{"question": "SELECT name FROM ship ORDER BY built_year NULLS FIRST, CLASS NULLS FIRST", "answer": "List all ship names in the order of built year and class.\nAdditional table information: table: ship_1"} +{"question": "SELECT COUNT(*) FROM Customers_cards", "answer": "Show the number of customer cards.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT * FROM departments WHERE department_name = 'Marketing'", "answer": "What is all the information about the Marketing department?\nAdditional table information: table: hr_1"} +{"question": "SELECT Builder, COUNT(*) FROM railway GROUP BY Builder", "answer": "Show different builders of railways, along with the corresponding number of railways using each builder.\nAdditional table information: table: railway"} +{"question": "SELECT label FROM albums GROUP BY label ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the label that has the most albums?\nAdditional table information: table: music_2"} +{"question": "SELECT Writer FROM book ORDER BY Writer ASC NULLS FIRST", "answer": "List the writers of the books in ascending alphabetical order.\nAdditional table information: table: book_2"} +{"question": "SELECT Price FROM publication WHERE Publisher = 'Person' OR Publisher = 'Wiley'", "answer": "Show the prices of publications whose publisher is either 'Person' or 'Wiley'\nAdditional table information: table: book_2"} +{"question": "SELECT T1.Attraction_Type_Description, T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which attraction type does the most tourist attractions belong to? Tell me its attraction type description and code.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT AVG(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Provisional'", "answer": "Show the average room count of the apartments that have booking status code 'Provisional'.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC", "answer": "Please show the industries of companies in descending order of the number of companies.\nAdditional table information: table: company_office"} +{"question": "SELECT Name FROM Team", "answer": "Show all team names.\nAdditional table information: table: match_season"} +{"question": "SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.song_name LIKE '%love%'", "answer": "What is the name and country of origin of the artist who released a song that has 'love' in its title?\nAdditional table information: table: music_1"} +{"question": "SELECT MAX(gradepoint), MIN(gradepoint) FROM GRADECONVERSION", "answer": "Find the max and min grade point for all letter grade.\nAdditional table information: table: college_3"} +{"question": "SELECT DISTINCT product_name FROM product ORDER BY product_id NULLS FIRST", "answer": "What is the list of distinct product names sorted by product id?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT T3.Shop_Name, T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID", "answer": "What are the names of device shops, and what are the carriers that they carry devices in stock for?\nAdditional table information: table: device"} +{"question": "SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211' AND T2.enroll_grade = 'C'", "answer": "What are the first names of all students who took ACCT-211 and received a C?\nAdditional table information: table: college_1"} +{"question": "SELECT DISTINCT blockcode FROM room WHERE unavailable = 0", "answer": "What are the unique block codes that have available rooms?\nAdditional table information: table: hospital_1"} +{"question": "SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%'", "answer": "What is the checking balance of the account whose owner\u2019s name contains the substring \u2018ee\u2019?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT shop_id, COUNT(*) FROM happy_hour GROUP BY shop_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "which shop has happy hour most frequently? List its id and number of happy hours.\nAdditional table information: table: coffee_shop"} +{"question": "SELECT COUNT(DISTINCT dept_address) FROM department WHERE school_code = 'BUS'", "answer": "How many different locations does the school with code BUS has?\nAdditional table information: table: college_1"} +{"question": "SELECT T2.customer_first_name, T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 2", "answer": "Show first name and id for all customers with at least 2 accounts.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT COUNT(*) FROM COURSES", "answer": "How many courses are there in total?\nAdditional table information: table: e_learning"} +{"question": "SELECT Country, COUNT(*) FROM climber GROUP BY Country", "answer": "Please show the countries and the number of climbers from each country.\nAdditional table information: table: climbing"} +{"question": "SELECT i_id FROM item WHERE title = 'orange'", "answer": "Find the id of the item whose title is 'orange'.\nAdditional table information: table: epinions_1"} +{"question": "SELECT COUNT(*) FROM Aircraft WHERE distance BETWEEN 1000 AND 5000", "answer": "What is the count of aircrafts that have a distance between 1000 and 5000?\nAdditional table information: table: flight_1"} +{"question": "SELECT DISTINCT location_code FROM Document_locations", "answer": "What are the different location codes for documents?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = 'US museum'", "answer": "Tell me the name of the staff in charge of the attraction called 'US museum'.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which type of policy is most frequently used? Give me the policy type code.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT COUNT(*) FROM (SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings')", "answer": "How many times in total did the team Boston Red Stockings participate in postseason games?\nAdditional table information: table: baseball_1"} +{"question": "SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1", "answer": "What is the author of the submission with the highest score?\nAdditional table information: table: workshop_paper"} +{"question": "SELECT t1.Effective_Date FROM claims AS t1 JOIN settlements AS t2 ON t1.claim_id = t2.claim_id GROUP BY t1.claim_id ORDER BY SUM(t2.settlement_amount) DESC LIMIT 1", "answer": "Find the claim that has the largest total settlement amount. Return the effective date of the claim.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT song_name FROM song WHERE rating < (SELECT MIN(rating) FROM song WHERE languages = 'english')", "answer": "What are the names of the songs whose rating is below the rating of all songs in English?\nAdditional table information: table: music_1"} +{"question": "SELECT city_code FROM student GROUP BY city_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the code of city where most of students are living in.\nAdditional table information: table: dorm_1"} +{"question": "SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed NULLS FIRST", "answer": "List the ids of all distinct orders ordered by placed date.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the name of the characteristic that is most common across all products.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT name FROM club ORDER BY name DESC", "answer": "What are the names of all the clubs ordered in descending alphabetical order?\nAdditional table information: table: sports_competition"} +{"question": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the last name of the artist who sang the most songs?\nAdditional table information: table: music_2"} +{"question": "SELECT start_station_name, start_station_id FROM trip WHERE start_date LIKE '8/%' GROUP BY start_station_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which start station had the most trips starting from August? Give me the name and id of the station.\nAdditional table information: table: bike_1"} +{"question": "SELECT SUM(amount) FROM payment", "answer": "Return the sum of all payment amounts.\nAdditional table information: table: sakila_1"} +{"question": "SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'statistics' ORDER BY T2.registration_date NULLS FIRST", "answer": "What are the ids of the students who registered course statistics by order of registration date?\nAdditional table information: table: student_assessment"} +{"question": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "What is the type with the fewest games?\nAdditional table information: table: game_1"} +{"question": "SELECT COUNT(DISTINCT Team) FROM match_season", "answer": "How many distinct teams are involved in match seasons?\nAdditional table information: table: match_season"} +{"question": "SELECT DISTINCT gtype FROM Video_games", "answer": "Show all video game types.\nAdditional table information: table: game_1"} +{"question": "SELECT T1.product_name, T2.color_description, T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code = T2.color_code WHERE product_category_code = 'Herbs'", "answer": "List the names, color descriptions and product descriptions of products with category 'Herbs'.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'Red' AND T2.price > 50", "answer": "What are the wines that have prices higher than 50 and made of Red color grapes?\nAdditional table information: table: wine_1"} +{"question": "SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id ORDER BY T3.tot_cred DESC LIMIT 1", "answer": "Find the name of instructor who is the advisor of the student who has the highest number of total credits.\nAdditional table information: table: college_2"} +{"question": "SELECT dept_name, budget FROM department WHERE budget > (SELECT AVG(budget) FROM department)", "answer": "Find the name and budget of departments whose budgets are more than the average budget.\nAdditional table information: table: college_2"} +{"question": "SELECT AVG(elevation), country FROM airports GROUP BY country", "answer": "For each country, what is the average elevation of that country's airports?\nAdditional table information: table: flight_4"} +{"question": "SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which catalog publisher has published the most catalogs?\nAdditional table information: table: product_catalog"} +{"question": "SELECT T2.Name, T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested NULLS FIRST", "answer": "What are the names of entrepreneurs and their corresponding investors, ordered descending by the amount of money requested?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT RoomId, roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3", "answer": "What are the name and id of the three highest priced rooms?\nAdditional table information: table: inn_1"} +{"question": "SELECT AVG(enr) FROM College WHERE state = 'FL'", "answer": "What is average number of students enrolled in Florida colleges?\nAdditional table information: table: soccer_2"} +{"question": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' AND t2.position = 'CTO'", "answer": "Find the first name and last name for the 'CTO' of the club 'Hopkins Student Enterprises'?\nAdditional table information: table: club_1"} +{"question": "SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999", "answer": "Show all company names with a movie directed in year 1999.\nAdditional table information: table: culture_company"} +{"question": "SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1", "answer": "What details do we have on the students who registered for courses most recently?\nAdditional table information: table: student_assessment"} +{"question": "SELECT COUNT(DISTINCT Status) FROM city", "answer": "How many different statuses do cities have?\nAdditional table information: table: farm"} +{"question": "SELECT COUNT(*) FROM classroom WHERE building <> 'Lamberton'", "answer": "Count the number of rooms that are not in the Lamberton building.\nAdditional table information: table: college_2"} +{"question": "SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the airport with the most number of routes that start in China?\nAdditional table information: table: flight_4"} +{"question": "SELECT transaction_type_description FROM Ref_Transaction_Types WHERE transaction_type_code = 'PUR'", "answer": "Show the description of transaction type with code 'PUR'.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT COUNT(*) FROM CHARACTERISTICS", "answer": "How many characteristics are there?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT name FROM church ORDER BY open_date DESC", "answer": "List all church names in descending order of opening date.\nAdditional table information: table: wedding"} +{"question": "SELECT campus FROM campuses WHERE LOCATION = 'Northridge' AND county = 'Los Angeles' UNION SELECT campus FROM campuses WHERE LOCATION = 'San Francisco' AND county = 'San Francisco'", "answer": "Find the name of the campuses that is in Northridge, Los Angeles or in San Francisco, San Francisco.\nAdditional table information: table: csu_1"} +{"question": "SELECT Name FROM WINE WHERE YEAR < (SELECT MIN(YEAR) FROM WINE WHERE Winery = 'Brander')", "answer": "What are the names of wines whose production year are before the year of all wines by Brander winery?\nAdditional table information: table: wine_1"} +{"question": "SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1", "answer": "What is the duration of the oldest actor?\nAdditional table information: table: musical"} +{"question": "SELECT name FROM event ORDER BY YEAR DESC LIMIT 1", "answer": "What is the name of the event that happened in the most recent year?\nAdditional table information: table: swimming"} +{"question": "SELECT AVG(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = 'Female'", "answer": "What is the average rating of songs produced by female artists?\nAdditional table information: table: music_1"} +{"question": "SELECT phone FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards'", "answer": "What is employee Nancy Edwards's phone number?\nAdditional table information: table: store_1"} +{"question": "SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 1996", "answer": "What is the average fee for a CSU campus in the year of 1996?\nAdditional table information: table: csu_1"} +{"question": "SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id GROUP BY T2.country_id HAVING COUNT(*) >= 3", "answer": "What are the countries that contain 3 or more cities?\nAdditional table information: table: sakila_1"} +{"question": "SELECT date_became_customer FROM Customers WHERE first_name = 'Carole' AND last_name = 'Bernhard'", "answer": "When did customer with first name as Carole and last name as Bernhard became a customer?\nAdditional table information: table: driving_school"} +{"question": "SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name = 'Open'", "answer": "Find the description of the claim status 'Open'.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT t2.team_name, t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t1.founded NULLS FIRST LIMIT 1", "answer": "Return the name of the team and the acc during the regular season for the school that was founded the earliest.\nAdditional table information: table: university_basketball"} +{"question": "SELECT AVG(bikes_available) FROM status WHERE NOT station_id IN (SELECT id FROM station WHERE city = 'Palo Alto')", "answer": "What is the average bike availablility for stations not in Palo Alto?\nAdditional table information: table: bike_1"} +{"question": "SELECT T1.name, COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 5", "answer": "How many tracks does each genre have and what are the names of the top 5?\nAdditional table information: table: store_1"} +{"question": "SELECT company, main_industry FROM company WHERE NOT company_id IN (SELECT company_id FROM station_company)", "answer": "What are the main industries of the companies without gas stations and what are the companies?\nAdditional table information: table: gas_company"} +{"question": "SELECT Name FROM journalist ORDER BY Years_working ASC NULLS FIRST", "answer": "List the names of journalists in ascending order of years working.\nAdditional table information: table: news_report"} +{"question": "SELECT T1.School_name, T1.Mascot, T1.IHSAA_Football_Class FROM school AS T1 JOIN budget AS T2 ON T1.school_id = T2.school_id WHERE Budgeted > 6000 OR YEAR < 2003 ORDER BY T2.total_budget_percent_invested NULLS FIRST, T2.total_budget_percent_budgeted NULLS FIRST", "answer": "List the name, IHSAA Football Class, and Mascot of the schools that have more than 6000 of budgeted amount or were founded before 2003, in the order of percent of total invested budget and total budgeted budget.\nAdditional table information: table: school_finance"} +{"question": "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'", "answer": "List the name of all the distinct customers who have orders with status 'Packing'.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT T2.party_name FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id HAVING COUNT(*) >= 2", "answer": "What are the names of parties with at least 2 events?\nAdditional table information: table: party_people"} +{"question": "SELECT T2.dept_name FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "What is the name of department where has the smallest number of professors?\nAdditional table information: table: college_1"} +{"question": "SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T3.Number_of_hosts > 20", "answer": "Which parties have more than 20 hosts? Give me the host names for these parties.\nAdditional table information: table: party_host"} +{"question": "SELECT COUNT(*) FROM pilot", "answer": "How many pilots are there?\nAdditional table information: table: pilot_record"} +{"question": "SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Australian Grand Prix' INTERSECT SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Chinese Grand Prix'", "answer": "What is the id and first name of all the drivers who participated in the Australian Grand Prix and the Chinese Grand Prix?\nAdditional table information: table: formula_1"} +{"question": "SELECT organization_name FROM organizations WHERE organization_name LIKE '%Party%'", "answer": "Find the name of organizations whose names contain 'Party'.\nAdditional table information: table: e_government"} +{"question": "SELECT name, price FROM products WHERE price >= 180 ORDER BY price DESC, name ASC NULLS FIRST", "answer": "What are the names and prices of products that cost at least 180, sorted by price decreasing and name ascending?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT personal_name, family_name FROM Students ORDER BY family_name NULLS FIRST", "answer": "What are the personal names and family names of the students? Sort the result in alphabetical order of the family name.\nAdditional table information: table: e_learning"} +{"question": "SELECT dorm_name FROM dorm ORDER BY student_capacity DESC LIMIT 1", "answer": "Find the name of the dorm with the largest capacity.\nAdditional table information: table: dorm_1"} +{"question": "SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = 'West Germany'", "answer": "What are the different names of mountains ascended by climbers from the country of West Germany?\nAdditional table information: table: climbing"} +{"question": "SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = '254 Ottilie Junction' OR T2.How_to_Get_There = 'bus'", "answer": "Find the names of the tourist attractions that is either accessible by bus or at address 254 Ottilie Junction.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T1.id, T1.Name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 2", "answer": "What are the ids and names of the medicine that can interact with two or more enzymes?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT T2.name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name", "answer": "What is the average rating star for each reviewer?\nAdditional table information: table: movie_1"} +{"question": "SELECT COUNT(*) FROM CUSTOMERS", "answer": "Count the number of customers recorded.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT address_line_1, address_line_2 FROM customers WHERE email_address = 'vbogisich@example.org'", "answer": "Find the address line 1 and 2 of the customer with email 'vbogisich@example.org'.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT SUM(duration), MAX(duration) FROM trip WHERE bike_id = 636", "answer": "What is the total and maximum duration of trips with bike id 636?\nAdditional table information: table: bike_1"} +{"question": "SELECT COUNT(*) FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'Canada') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States')", "answer": "How many routes go from the United States to Canada?\nAdditional table information: table: flight_4"} +{"question": "SELECT COUNT(*) FROM Faculty", "answer": "How many faculty do we have?\nAdditional table information: table: activity_1"} +{"question": "SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the city_code of the city that the most students live in?\nAdditional table information: table: voter_2"} +{"question": "SELECT payment_method_code, COUNT(*) FROM INVOICES GROUP BY payment_method_code", "answer": "List the distinct payment method codes with the number of orders made\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "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", "answer": "What is the first name of all employees who do not give any lessons?\nAdditional table information: table: driving_school"} +{"question": "SELECT COUNT(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000", "answer": "How many distinct delegates are from counties with population larger than 50000?\nAdditional table information: table: election"} +{"question": "SELECT Name FROM phone WHERE NOT Phone_id IN (SELECT Phone_ID FROM phone_market)", "answer": "List the names of phones that are not on any market.\nAdditional table information: table: phone_market"} +{"question": "SELECT COUNT(*) FROM railway", "answer": "How many railways are there?\nAdditional table information: table: railway"} +{"question": "SELECT COUNT(DISTINCT role_code) FROM Project_Staff", "answer": "How many different roles are there on the project staff?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT SUM(Points) FROM player", "answer": "Show total points of all players.\nAdditional table information: table: sports_competition"} +{"question": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'", "answer": "What are the types of vocals used in the song 'Le Pop'?\nAdditional table information: table: music_2"} +{"question": "SELECT T2.Store_Email_Address FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.State_County = 'Alaska'", "answer": "What are the email addresses of the drama workshop groups with address in Alaska state?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT first_name, last_name, salary, department_id, MAX(salary) FROM employees GROUP BY department_id", "answer": "What are the department ids, full names, and salaries for employees who make the most in their departments?\nAdditional table information: table: hr_1"} +{"question": "SELECT DISTINCT name FROM medication ORDER BY name NULLS FIRST", "answer": "List the names of all distinct medications, ordered in an alphabetical order.\nAdditional table information: table: hospital_1"} +{"question": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' INTERSECT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'", "answer": "Find the name of tracks which are in both Movies and music playlists.\nAdditional table information: table: store_1"} +{"question": "SELECT Name FROM phone ORDER BY Price ASC NULLS FIRST", "answer": "List the names of phones in ascending order of price.\nAdditional table information: table: phone_market"} +{"question": "SELECT COUNT(*), affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation", "answer": "Find the number of universities that have over a 20000 enrollment size for each affiliation type.\nAdditional table information: table: university_basketball"} +{"question": "SELECT T1.Store_Phone, T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T2.Product_Name = 'film'", "answer": "Find the names of the workshop groups where services with product name 'film' are performed.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT rank, sex, COUNT(*) FROM Faculty GROUP BY rank, sex", "answer": "Show all the ranks and the number of male and female faculty for each rank.\nAdditional table information: table: activity_1"} +{"question": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 UNION SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010", "answer": "Find courses that ran in Fall 2009 or in Spring 2010.\nAdditional table information: table: college_2"} +{"question": "SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = 'Maryland' OR T2.College = 'Duke'", "answer": "Return the official native languages of countries who have players from Maryland or Duke colleges.\nAdditional table information: table: match_season"} +{"question": "SELECT COUNT(*) FROM classroom WHERE building <> 'Lamberton'", "answer": "How many classrooms are not in Lamberton?\nAdditional table information: table: college_2"} +{"question": "SELECT T1.Title, T2.Publication_Date FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID", "answer": "Show the title and publication dates of books.\nAdditional table information: table: book_2"} +{"question": "SELECT name FROM department GROUP BY departmentID ORDER BY COUNT(departmentID) DESC LIMIT 1", "answer": "Find the department with the most employees.\nAdditional table information: table: hospital_1"} +{"question": "SELECT name, phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn GROUP BY T1.patient HAVING COUNT(*) > 1", "answer": "what are name and phone number of patients who had more than one appointment?\nAdditional table information: table: hospital_1"} +{"question": "SELECT T1.title, T1.i_id FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY AVG(T2.rating) DESC LIMIT 1", "answer": "Find the name and id of the item with the highest average rating.\nAdditional table information: table: epinions_1"} +{"question": "SELECT date_of_birth FROM Guests WHERE gender_code = 'Male'", "answer": "Return the date of birth for all the guests with gender code 'Male'.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT T1.activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID", "answer": "Show all the activity names and the number of faculty involved in each activity.\nAdditional table information: table: activity_1"} +{"question": "SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common position of players in match seasons.\nAdditional table information: table: match_season"} +{"question": "SELECT T4.dept_name FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code GROUP BY T3.dept_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the department that has the largest number of students enrolled?\nAdditional table information: table: college_1"} +{"question": "SELECT eid, name FROM Employee ORDER BY salary DESC LIMIT 1", "answer": "Show the id and name of the employee with maximum salary.\nAdditional table information: table: flight_1"} +{"question": "SELECT AVG(RAM_MiB) FROM chip_model WHERE NOT model_name IN (SELECT chip_model FROM phone)", "answer": "Find the average ram mib size of the chip models that are never used by any phone.\nAdditional table information: table: phone_1"} +{"question": "SELECT COUNT(DISTINCT s_id) FROM advisor", "answer": "How many students have advisors?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(*) FROM team_franchise WHERE active = 'Y'", "answer": "Find the number of team franchises that are active (have 'Y' as 'active' information).\nAdditional table information: table: baseball_1"} +{"question": "SELECT clubname FROM club", "answer": "What are the names of all clubs?\nAdditional table information: table: club_1"} +{"question": "SELECT stu_fname, stu_gpa FROM student WHERE stu_gpa < (SELECT AVG(stu_gpa) FROM student)", "answer": "Find the first name and gpa of the students whose gpa is lower than the average gpa of all students.\nAdditional table information: table: college_1"} +{"question": "SELECT Competition_type, COUNT(*) FROM competition GROUP BY Competition_type", "answer": "What are the types of competition and number of competitions for that type?\nAdditional table information: table: sports_competition"} +{"question": "SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4", "answer": "What are the unique ids of those departments where any manager is managing 4 or more employees.\nAdditional table information: table: hr_1"} +{"question": "SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'Close a policy' OR t3.service_name = 'Upgrade a policy'", "answer": "Find the names of customers who have used either the service 'Close a policy' or the service 'Upgrade a policy'.\nAdditional table information: table: insurance_fnol"} +{"question": "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'", "answer": "What is the zip code of the customer Carole Bernhard?\nAdditional table information: table: driving_school"} +{"question": "SELECT date_left_staff FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "answer": "When did the staff member Janessa Sawayn leave the company?\nAdditional table information: table: driving_school"} +{"question": "SELECT publisher, COUNT(*) FROM book_club GROUP BY publisher", "answer": "Show all publishers and the number of books for each publisher.\nAdditional table information: table: culture_company"} +{"question": "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'", "answer": "What are the first and last names of all customers who lived in Lockmanfurt?\nAdditional table information: table: driving_school"} +{"question": "SELECT DISTINCT city FROM addresses", "answer": "Show all distinct cities in the address record.\nAdditional table information: table: customers_and_products_contacts"} +{"question": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_President_VOTE", "answer": "Find the distinct last names of the students who have class president votes.\nAdditional table information: table: voter_2"} +{"question": "SELECT COUNT(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.maxOccupancy = T1.Adults + T1.Kids", "answer": "How many times the number of adults and kids staying in a room reached the maximum capacity of the room?\nAdditional table information: table: inn_1"} +{"question": "SELECT DISTINCT customer_details FROM Customers", "answer": "Return the distinct customer details.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT COUNT(*) FROM party_events", "answer": "How many party events do we have?\nAdditional table information: table: party_people"} +{"question": "SELECT account_id, date_account_opened, account_name, other_account_details FROM Accounts", "answer": "What are the ids, date opened, name, and other details for all accounts?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING COUNT(*) > 2", "answer": "Which types of policy are chosen by more than 2 customers? Give me the policy type codes.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT Name FROM ship ORDER BY Tonnage ASC NULLS FIRST", "answer": "List the name of ships in ascending order of tonnage.\nAdditional table information: table: ship_mission"} +{"question": "SELECT COUNT(DISTINCT crs_code) FROM CLASS", "answer": "How many courses are offered?\nAdditional table information: table: college_1"} +{"question": "SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50", "answer": "What are the names of all airports whose elevation is between -50 and 50?\nAdditional table information: table: flight_4"} +{"question": "SELECT pilot FROM flight GROUP BY pilot ORDER BY COUNT(*) DESC LIMIT 1", "answer": "which pilot is in charge of the most number of flights?\nAdditional table information: table: flight_company"} +{"question": "SELECT interaction_type, COUNT(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common interaction type between enzymes and medicine? And how many are there?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT city_code FROM Student WHERE LName = 'Kim'", "answer": "Give the city that the student whose family name is Kim lives in.\nAdditional table information: table: allergy_1"} +{"question": "SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid HAVING COUNT(*) > 1", "answer": "Find the name of physicians who are in charge of more than one patient.\nAdditional table information: table: hospital_1"} +{"question": "SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus'", "answer": "What are the names of the tourist attractions that can be accessed by bus?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T1.name, T1.date, T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id", "answer": "Show the name and date for each race and its track name.\nAdditional table information: table: race_track"} +{"question": "SELECT COUNT(DISTINCT Name) FROM PHOTOS", "answer": "How many distinct names are associated with all the photos?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'", "answer": "Which language does the film AIRPORT POLLOCK use? List the language name.\nAdditional table information: table: sakila_1"} +{"question": "SELECT country FROM stadium WHERE capacity > 60000 INTERSECT SELECT country FROM stadium WHERE capacity < 50000", "answer": "Which country has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000?\nAdditional table information: table: swimming"} +{"question": "SELECT AVG(transaction_amount), SUM(transaction_amount) FROM Financial_transactions", "answer": "Return the average transaction amount, as well as the total amount of all transactions.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT other_details FROM Residents WHERE other_details LIKE '%Miss%'", "answer": "What are the resident details containing the substring 'Miss'?\nAdditional table information: table: local_govt_and_lot"} +{"question": "SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance", "answer": "What are the ids of the students who either registered or attended a course?\nAdditional table information: table: student_assessment"} +{"question": "SELECT COUNT(*), dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code", "answer": "How many classes are held in each department?\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(*), semester, YEAR FROM SECTION GROUP BY semester, YEAR", "answer": "How many courses are provided in each semester and year?\nAdditional table information: table: college_2"} +{"question": "SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001", "answer": "What were all the salary values of players in 2010 and 2001?\nAdditional table information: table: baseball_1"} +{"question": "SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id = T2.document_id JOIN Ref_locations AS T3 ON T2.location_code = T3.location_code WHERE T1.document_name = 'Robin CV'", "answer": "What is the location name of the document 'Robin CV'?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "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'", "answer": "What is the country in which the customer Carole Bernhard lived?\nAdditional table information: table: driving_school"} +{"question": "SELECT clublocation FROM club WHERE clubname = 'Pen and Paper Gaming'", "answer": "Where is the club 'Pen and Paper Gaming' located?\nAdditional table information: table: club_1"} +{"question": "SELECT Name FROM team WHERE NOT Team_id IN (SELECT Team FROM match_season)", "answer": "Return the names of teams that have no match season record.\nAdditional table information: table: match_season"} +{"question": "SELECT T2.Season, T2.Player, T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country", "answer": "Show the season, the player, and the name of the country that player belongs to.\nAdditional table information: table: match_season"} +{"question": "SELECT project_details FROM Projects WHERE organisation_id IN (SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "List the project details of the projects launched by the organisation\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT Grape, Winery, YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR NULLS FIRST", "answer": "List the grape, winery and year of the wines whose price is bigger than 100 ordered by year.\nAdditional table information: table: wine_1"} +{"question": "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", "answer": "Give me a list of cities whose temperature in March is lower than that in July or higher than that in Oct?\nAdditional table information: table: city_record"} +{"question": "SELECT Company, Investor FROM entrepreneur", "answer": "What are the companies and investors that correspond to each entrepreneur?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT T2.Fname, T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID WHERE T1.CName = 'COMPUTER LITERACY'", "answer": "What is the full name of the instructor who has a course named COMPUTER LITERACY?\nAdditional table information: table: college_3"} +{"question": "SELECT origin FROM Flight WHERE destination = 'Honolulu'", "answer": "What are the origins of all flights that are headed to Honolulu?\nAdditional table information: table: flight_1"} +{"question": "SELECT COUNT(*) FROM artist", "answer": "How many artists are there?\nAdditional table information: table: music_4"} +{"question": "SELECT Name FROM People ORDER BY Age DESC LIMIT 5", "answer": "List the names of the top 5 oldest people.\nAdditional table information: table: gymnast"} +{"question": "SELECT order_id FROM shipments WHERE shipment_date > '2000-01-01'", "answer": "Which orders have shipment after 2000-01-01? Give me the order ids.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT DISTINCT YEAR FROM party WHERE Governor = 'Eliot Spitzer'", "answer": "In which distinct years was the governor 'Eliot Spitzer'?\nAdditional table information: table: election"} +{"question": "SELECT COUNT(*), class_room FROM CLASS GROUP BY class_room HAVING COUNT(*) >= 2", "answer": "Find the number of classes offered for all class rooms that held at least 2 classes.\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(*) FROM list", "answer": "Find the number of students in total.\nAdditional table information: table: student_1"} +{"question": "SELECT T1.source_system_code, T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Benefits_Overpayments AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id ORDER BY T2.council_tax_id NULLS FIRST", "answer": "What is the tax source system code related to the benefits and overpayments? List the code and the benifit id, order by benifit id.\nAdditional table information: table: local_govt_mdm"} +{"question": "SELECT MIN(age), MAX(age), AVG(age) FROM people", "answer": "Show the minimum, maximum, and average age for all people.\nAdditional table information: table: wedding"} +{"question": "SELECT COUNT(*) FROM company", "answer": "How many gas companies are there?\nAdditional table information: table: gas_company"} +{"question": "SELECT COUNT(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000", "answer": "What is the number of employees that have a salary between 100000 and 200000?\nAdditional table information: table: flight_1"} +{"question": "SELECT name FROM instructor WHERE salary > (SELECT MIN(salary) FROM instructor WHERE dept_name = 'Biology')", "answer": "Find names of instructors with salary greater than that of some (at least one) instructor in the Biology department.\nAdditional table information: table: college_2"} +{"question": "SELECT Sponsor_name FROM player WHERE Residence = 'Brandon' OR Residence = 'Birtle'", "answer": "Show the names of sponsors of players whose residence is either 'Brandon' or 'Birtle'.\nAdditional table information: table: riding_club"} +{"question": "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", "answer": "For each customer who has at least two orders, find the customer name and number of orders made.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010", "answer": "Find the cities which were once a host city after 2010?\nAdditional table information: table: city_record"} +{"question": "SELECT AVG(T2.fastestlapspeed), T1.name, T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year NULLS FIRST", "answer": "What are the average fastest lap speed in races held after 2004 grouped by race name and ordered by year?\nAdditional table information: table: formula_1"} +{"question": "SELECT customer_id, customer_name FROM customers ORDER BY customer_id ASC NULLS FIRST", "answer": "List all the customers in increasing order of IDs.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT SUM(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990", "answer": "How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total?\nAdditional table information: table: baseball_1"} +{"question": "SELECT Name FROM musical WHERE Nominee = 'Bob Fosse'", "answer": "Return the names of musicals who have the nominee Bob Fosse.\nAdditional table information: table: musical"} +{"question": "SELECT T2.balance, T3.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid", "answer": "What are the names, checking balances, and savings balances for all customers?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT COUNT(DISTINCT FDA_approved) FROM medicine", "answer": "How many distinct FDA approval statuses are there for the medicines?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the role code with the largest number of employees?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT COUNT(*) FROM customer_orders WHERE order_details = 'Second time'", "answer": "How many orders have detail 'Second time'?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT MIN(age), job FROM Person GROUP BY job", "answer": "What is minimum age for different job title?\nAdditional table information: table: network_2"} +{"question": "SELECT company, rank FROM company ORDER BY Sales_billion DESC", "answer": "What is the name and rank of every company ordered by descending number of sales?\nAdditional table information: table: gas_company"} +{"question": "SELECT Nationality FROM journalist GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common nationality for journalists.\nAdditional table information: table: news_report"} +{"question": "SELECT COUNT(*), T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.age > 20 GROUP BY T3.dorm_name", "answer": "How many students are older than 20 in each dorm?\nAdditional table information: table: dorm_1"} +{"question": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported < (SELECT MIN(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = 'Lysanne' AND T4.staff_last_name = 'Turcotte')", "answer": "Which problems were reported before the date of any problem reported by the staff Lysanne Turcotte? Give me the ids of the problems.\nAdditional table information: table: tracking_software_problems"} +{"question": "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'", "answer": "Which students are advised by Michael Goodrich? Give me their first and last names.\nAdditional table information: table: activity_1"} +{"question": "SELECT T2.Author, T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID", "answer": "For each submission, find its author and acceptance result.\nAdditional table information: table: workshop_paper"} +{"question": "SELECT Ref_Shipping_Agents.shipping_agent_name, COUNT(Documents.document_id) FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code GROUP BY Ref_Shipping_Agents.shipping_agent_code ORDER BY COUNT(Documents.document_id) DESC LIMIT 1", "answer": "Which shipping agent shipped the most documents? List the shipping agent name and the number of documents.\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = 'City Mall' INTERSECT SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = 'Village Store'", "answer": "Find the names of districts where have both city mall and village store type stores.\nAdditional table information: table: store_product"} +{"question": "SELECT DISTINCT T1.Major FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote", "answer": "Find the distinct majors of students who have treasurer votes.\nAdditional table information: table: voter_2"} +{"question": "SELECT customer_phone FROM available_policies", "answer": "What are all the phone numbers?\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT T1.name_first, T1.name_last, T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the manager's first name, last name and id who won the most manager award?\nAdditional table information: table: baseball_1"} +{"question": "SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = 'white'", "answer": "What are the names of products with 'white' as their color description?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT apt_type_code, MAX(room_count), MIN(room_count) FROM Apartments GROUP BY apt_type_code", "answer": "Show each apartment type code, and the maximum and minimum number of rooms for each type.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT SUM(credits), dept_name FROM course GROUP BY dept_name", "answer": "How many total credits are offered by each department?\nAdditional table information: table: college_2"} +{"question": "SELECT emp_jobcode, COUNT(*) FROM employee GROUP BY emp_jobcode ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the count and code of the job has most employees.\nAdditional table information: table: college_1"} +{"question": "SELECT Name FROM GENRE", "answer": "List the names of all music genres.\nAdditional table information: table: chinook_1"} +{"question": "SELECT AVG(price) FROM Flight WHERE origin = 'Los Angeles' AND destination = 'Honolulu'", "answer": "What is the average price for flights from Los Angeles to Honolulu.\nAdditional table information: table: flight_1"} +{"question": "SELECT Nickname FROM school_details WHERE Division <> 'Division 1'", "answer": "Show the nicknames of schools that are not in division 1.\nAdditional table information: table: school_player"} +{"question": "SELECT COUNT(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.maxOccupancy = T1.Adults + T1.Kids", "answer": "List how many times the number of people in the room reached the maximum occupancy of the room. The number of people include adults and kids.\nAdditional table information: table: inn_1"} +{"question": "SELECT COUNT(DISTINCT LEVEL) FROM member", "answer": "How many different levels do members have?\nAdditional table information: table: shop_membership"} +{"question": "SELECT COUNT(*), T1.claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY T1.Date_Claim_Settled DESC LIMIT 1", "answer": "Find the claim id and the number of settlements made for the claim with the most recent settlement date.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT T1.fname, T1.age FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE NOT T2.dormid IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge')", "answer": "What is the first name and age of every student who lives in a dorm with a TV Lounge?\nAdditional table information: table: dorm_1"} +{"question": "SELECT College, COUNT(*) FROM submission GROUP BY College", "answer": "Show different colleges along with the number of authors of submission from each college.\nAdditional table information: table: workshop_paper"} +{"question": "SELECT Product_Name FROM Products ORDER BY Product_Price DESC LIMIT 1", "answer": "What is the name of the product with the highest price?\nAdditional table information: table: solvency_ii"} +{"question": "SELECT COUNT(*) FROM (SELECT * FROM endowment WHERE amount > 8.5 GROUP BY school_id HAVING COUNT(*) > 1)", "answer": "Find the number of schools that have more than one donator whose donation amount is less than 8.5.\nAdditional table information: table: school_finance"} +{"question": "SELECT title FROM film WHERE rating = 'R'", "answer": "Return the titles of any movies with an R rating.\nAdditional table information: table: sakila_1"} +{"question": "SELECT T1.name FROM nurse AS T1 JOIN appointment AS T2 ON T1.employeeid = T2.prepnurse GROUP BY T1.employeeid ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name of the nurse who has the largest number of appointments.\nAdditional table information: table: hospital_1"} +{"question": "SELECT roomName, decor FROM Rooms WHERE bedtype = 'King' ORDER BY basePrice NULLS FIRST", "answer": "List the names and decor of rooms that have a king bed. Sort the list by their price.\nAdditional table information: table: inn_1"} +{"question": "SELECT campus FROM degrees GROUP BY campus ORDER BY SUM(degrees) DESC LIMIT 1", "answer": "Which campus has the most degrees conferred in all times?\nAdditional table information: table: csu_1"} +{"question": "SELECT SUM(Amount_Payment) FROM Payments", "answer": "Compute the total amount of payment processed.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT name FROM Companies WHERE Headquarters <> 'USA'", "answer": "What are the names of companies whose headquarters are not 'USA'?\nAdditional table information: table: company_office"} +{"question": "SELECT AVG(amount_due) FROM payments", "answer": "What is the average amount due for all the payments?\nAdditional table information: table: products_for_hire"} +{"question": "SELECT T1.institution, COUNT(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id GROUP BY T1.institution_id", "answer": "Show institution names along with the number of proteins for each institution.\nAdditional table information: table: protein_institute"} +{"question": "SELECT lname FROM student WHERE sex = 'F' AND city_code = 'BAL' UNION SELECT lname FROM student WHERE sex = 'M' AND age < 20", "answer": "What is the last name of every student who is either female or living in a city with the code BAL or male and under 20?\nAdditional table information: table: dorm_1"} +{"question": "SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000", "answer": "What are the names of mountains that have a height of over 5000 or a prominence of over 1000?\nAdditional table information: table: climbing"} +{"question": "SELECT T2.address_id, T1.zip_postcode FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id ORDER BY monthly_rental DESC LIMIT 1", "answer": "What are the id and zip code of the address with the highest monthly rental?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Find the country of origin for the artist who made the least number of songs?\nAdditional table information: table: music_1"} +{"question": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211' AND T1.stu_lname LIKE 'S%'", "answer": "What is the first name of the student whose last name starts with the letter S and is taking ACCT-211?\nAdditional table information: table: college_1"} +{"question": "SELECT MAX(cost), MIN(cost), AVG(cost) FROM procedures", "answer": "Tell me the highest, lowest, and average cost of procedures.\nAdditional table information: table: hospital_1"} +{"question": "SELECT name, LOCATION FROM enzyme", "answer": "What are the names and locations of all enzymes listed?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT name FROM swimmer ORDER BY meter_100 NULLS FIRST", "answer": "Find the names of all swimmers, sorted by their 100 meter scores in ascending order.\nAdditional table information: table: swimming"} +{"question": "SELECT DISTINCT T1.Director FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID WHERE T2.Year = 1995", "answer": "Show the distinct director of films with market estimation in the year of 1995.\nAdditional table information: table: film_rank"} +{"question": "SELECT StuID FROM Has_allergy GROUP BY StuID HAVING COUNT(*) >= 2", "answer": "What are the students ids of students who have more than one allergy?\nAdditional table information: table: allergy_1"} +{"question": "SELECT document_type_code, COUNT(*) FROM Documents GROUP BY document_type_code", "answer": "List document type codes and the number of documents in each code.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct <> 'null' OR department_id <> 40", "answer": "Return all information about employees with salaries between 8000 and 12000 for which commission is not null or where their department id is not 40.\nAdditional table information: table: hr_1"} +{"question": "SELECT POSITION FROM player WHERE Points > 20 INTERSECT SELECT POSITION FROM player WHERE Points < 10", "answer": "What are the positions of both players that have more than 20 20 points and less than 10 points?\nAdditional table information: table: sports_competition"} +{"question": "SELECT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname ORDER BY SUM(T2.amount) DESC LIMIT 1", "answer": "Find the name of bank branch that provided the greatest total amount of loans.\nAdditional table information: table: loan_1"} +{"question": "SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1", "answer": "Return the famous release date for the oldest artist.\nAdditional table information: table: music_4"} +{"question": "SELECT YEAR, book_title, publisher FROM book_club ORDER BY YEAR DESC", "answer": "Show the years, book titles, and publishers for all books, in descending order by year.\nAdditional table information: table: culture_company"} +{"question": "SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.payment_method_code = 'Credit Card' GROUP BY T1.customer_id HAVING COUNT(*) > 2", "answer": "Show the names of customers who use Credit Card payment method and have more than 2 orders.\nAdditional table information: table: customers_and_products_contacts"} +{"question": "SELECT COUNT(*) FROM Companies WHERE Industry = 'Banking' OR Industry = 'Conglomerate'", "answer": "Find the number of companies whose industry is 'Banking' or 'Conglomerate',\nAdditional table information: table: company_office"} +{"question": "SELECT COUNT(*) FROM Employees", "answer": "How many employees do we have?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T2.dept_name FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "What is the name of the department with the fewest professors?\nAdditional table information: table: college_1"} +{"question": "SELECT MAX(Milliseconds), MIN(Milliseconds) FROM TRACK", "answer": "What are the durations of the longest and the shortest tracks in milliseconds?\nAdditional table information: table: chinook_1"} +{"question": "SELECT COUNT(*) FROM Student_Tests_Taken WHERE test_result = 'Fail'", "answer": "How many tests have result 'Fail'?\nAdditional table information: table: e_learning"} +{"question": "SELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name = T2.name JOIN PersonFriend AS T3 ON T1.friend = T3.name JOIN PersonFriend AS T4 ON T3.friend = T4.name WHERE T2.name = 'Alice' AND T4.name <> 'Alice'", "answer": "Find Alice's friends of friends.\nAdditional table information: table: network_2"} +{"question": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Mortgages' INTERSECT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Auto'", "answer": "Find the name of customers who have loans of both Mortgages and Auto.\nAdditional table information: table: loan_1"} +{"question": "SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING COUNT(T1.track_id) > 100", "answer": "List the name of playlist which has number of tracks greater than 100.\nAdditional table information: table: store_1"} +{"question": "SELECT DISTINCT (catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE '%Murray%'", "answer": "Which catalog publishers have substring 'Murray' in their names?\nAdditional table information: table: product_catalog"} +{"question": "SELECT T1.title, T1.director FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title ORDER BY T1.director NULLS FIRST, T1.title NULLS FIRST", "answer": "For all directors who directed more than one movie, return the titles of all movies directed by them, along with the director name. Sort by director name, then movie title.\nAdditional table information: table: movie_1"} +{"question": "SELECT Name FROM technician WHERE Team <> 'NYY'", "answer": "List the name of technicians whose team is not 'NYY'.\nAdditional table information: table: machine_repair"} +{"question": "SELECT Enrollment FROM school WHERE Denomination <> 'Catholic'", "answer": "List the enrollment for each school that does not have 'Catholic' as denomination.\nAdditional table information: table: school_player"} +{"question": "SELECT student_id FROM student_course_attendance", "answer": "What are the ids of all students who have attended at least one course?\nAdditional table information: table: student_assessment"} +{"question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games", "answer": "Show ids of students who don't play video game.\nAdditional table information: table: game_1"} +{"question": "SELECT COUNT(DISTINCT transaction_type) FROM Financial_Transactions", "answer": "Show the number of transaction types.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT SUM(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_short_name = 'Columbus Square'", "answer": "Show the total number of rooms of the apartments in the building with short name 'Columbus Square'.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT dept_address FROM department WHERE dept_name = 'History'", "answer": "what is the address of history department?\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(*) FROM Settlements", "answer": "Count the total number of settlements made.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT document_name FROM documents WHERE NOT document_code IN (SELECT document_code FROM document_sections)", "answer": "Find all the name of documents without any sections.\nAdditional table information: table: document_management"} +{"question": "SELECT first_name, last_name, salary FROM employees WHERE first_name LIKE '%m'", "answer": "Return the full names and salaries for employees with first names that end with the letter m.\nAdditional table information: table: hr_1"} +{"question": "SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18'", "answer": "What are the staff roles of the staff who\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code = 'PIT'", "answer": "What are the distinct first names of the students who have vice president votes and reside in a city whose city code is not PIT?\nAdditional table information: table: voter_2"} +{"question": "SELECT title FROM albums WHERE title LIKE 'A%' ORDER BY title NULLS FIRST", "answer": "What are the titles of all albums that start with A in alphabetical order?\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(DISTINCT LEVEL) FROM member", "answer": "What are the different membership levels?\nAdditional table information: table: shop_membership"} +{"question": "SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2003 ORDER BY T2.faculty DESC LIMIT 1", "answer": "What campus has the most faculties in 2003?\nAdditional table information: table: csu_1"} +{"question": "SELECT COUNT(DISTINCT cName) FROM tryout", "answer": "How many different colleges do attend the tryout test?\nAdditional table information: table: soccer_2"} +{"question": "SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id", "answer": "What are the names of products that have never been ordered?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT product FROM product WHERE product LIKE '%Scanner%'", "answer": "What are all of the products whose name includes the substring 'Scanner'?\nAdditional table information: table: store_product"} +{"question": "SELECT Votes FROM election ORDER BY Votes DESC", "answer": "List the votes of elections in descending order.\nAdditional table information: table: election_representative"} +{"question": "SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id GROUP BY t2.swimmer_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name of the swimmer who has the most records.\nAdditional table information: table: swimming"} +{"question": "SELECT Name, LOCATION FROM wrestler", "answer": "What are the names and location of the wrestlers?\nAdditional table information: table: wrestler"} +{"question": "SELECT t2.product_details, t2.product_id FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY SUM(t1.order_quantity) NULLS FIRST LIMIT 1", "answer": "Find the name and ID of the product whose total order quantity is the largest.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT organization_name FROM organizations ORDER BY date_formed ASC NULLS FIRST", "answer": "List all the name of organizations in order of the date formed.\nAdditional table information: table: e_government"} +{"question": "SELECT COUNT(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing'", "answer": "How many manufacturers have headquarters in either Tokyo or Beijing?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate", "answer": "What are the ids of all employees that don't have certificates?\nAdditional table information: table: flight_1"} +{"question": "SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age NULLS FIRST LIMIT 1", "answer": "what is the name and age of the youngest winning pilot?\nAdditional table information: table: aircraft"} +{"question": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' AND t3.sex = 'M'", "answer": "Find all the male members of club 'Hopkins Student Enterprises'. Show the first name and last name.\nAdditional table information: table: club_1"} +{"question": "SELECT COUNT(*), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name", "answer": "How many products are there for each manufacturer?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT COUNT(*), dept_code FROM professor WHERE prof_high_degree = 'Ph.D.' GROUP BY dept_code", "answer": "Find the number of professors with a Ph.D. degree in each department.\nAdditional table information: table: college_1"} +{"question": "SELECT T2.Pilot_name, COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name", "answer": "Show the names of pilots and the number of records they have.\nAdditional table information: table: pilot_record"} +{"question": "SELECT rank FROM captain GROUP BY rank ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which rank is the most common among captains?\nAdditional table information: table: ship_1"} +{"question": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height ASC NULLS FIRST", "answer": "What are the names of gymnasts, ordered by their heights ascending?\nAdditional table information: table: gymnast"} +{"question": "SELECT order_id, COUNT(*) FROM Invoices GROUP BY order_id", "answer": "Show the order ids and the number of invoices for each order.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises'", "answer": "On average, how old are the members in the club 'Hopkins Student Enterprises'?\nAdditional table information: table: club_1"} +{"question": "SELECT AVG(T2.fastestlapspeed), T1.name, T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year NULLS FIRST", "answer": "What is the average fastest lap speed for races held after 2004, for each race, ordered by year?\nAdditional table information: table: formula_1"} +{"question": "SELECT formats FROM files GROUP BY formats ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most popular file format?\nAdditional table information: table: music_1"} +{"question": "SELECT rID FROM Reviewer WHERE name = 'Daniel Lewis'", "answer": "What is the reviewer id of Daniel Lewis?\nAdditional table information: table: movie_1"} +{"question": "SELECT Name, Arrival FROM train", "answer": "What are the names and arrival times of trains?\nAdditional table information: table: railway"} +{"question": "SELECT clubname FROM club", "answer": "Give me the name of each club.\nAdditional table information: table: club_1"} +{"question": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = 'HOU'", "answer": "Find the names of the clubs that have at least a member from the city with city code 'HOU'.\nAdditional table information: table: club_1"} +{"question": "SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid JOIN airlines AS T3 ON T1.alid = T3.alid WHERE T2.country = 'Italy' AND T3.name = 'American Airlines'", "answer": "Return the number of routes with destination airport in Italy operated by the airline with name 'American Airlines'.\nAdditional table information: table: flight_4"} +{"question": "SELECT Advisor, COUNT(*) FROM STUDENT GROUP BY Advisor", "answer": "For each advisor, report the total number of students advised by him or her.\nAdditional table information: table: voter_2"} +{"question": "SELECT LOCATION FROM bridge WHERE name = 'Kolob Arch' OR name = 'Rainbow Bridge'", "answer": "What is the location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'?\nAdditional table information: table: architecture"} +{"question": "SELECT name, operating_system FROM web_client_accelerator EXCEPT SELECT T1.name, T1.operating_system FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T3.name = 'Opera'", "answer": "Show the accelerator names and supporting operating systems that are not compatible with the browser named 'Opera'.\nAdditional table information: table: browser_web"} +{"question": "SELECT MIN(Order_Quantity), AVG(Order_Quantity), MAX(Order_Quantity) FROM INVOICES", "answer": "What are the minimum, average, and maximum quantities ordered? Check all the invoices.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT policy_type_code, COUNT(*) FROM policies GROUP BY policy_type_code", "answer": "Find the number of records of each policy type and its type code.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT name, manufacturer_id FROM manufacturer ORDER BY open_year NULLS FIRST", "answer": "List all manufacturer names and ids ordered by their opening year.\nAdditional table information: table: manufacturer"} +{"question": "SELECT AVG(enr) FROM College WHERE state = 'FL'", "answer": "What is average enrollment of colleges in the state FL?\nAdditional table information: table: soccer_2"} +{"question": "SELECT COUNT(*) FROM airlines", "answer": "What is the total number of airlines?\nAdditional table information: table: flight_4"} +{"question": "SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code", "answer": "Find the number of departments in each school.\nAdditional table information: table: college_1"} +{"question": "SELECT T2.product_name, SUM(T1.product_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name", "answer": "Show all product names and the total quantity ordered for each product name.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT T1.project_id, COUNT(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY COUNT(*) ASC NULLS FIRST", "answer": "For each project id, how many staff does it have? List them in increasing order.\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT other_hotel_details, star_rating_code FROM HOTELS ORDER BY price_range ASC NULLS FIRST LIMIT 3", "answer": "What are the details and star ratings of the three hotels with the lowest price ranges?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT campus FROM campuses WHERE YEAR = 1958", "answer": "What are the campuses that opened in 1958?\nAdditional table information: table: csu_1"} +{"question": "SELECT mID FROM Rating EXCEPT SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = 'Brittany Harris'", "answer": "What are the ids of all moviest hat have not been reviewed by Britanny Harris?\nAdditional table information: table: movie_1"} +{"question": "SELECT MAX(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE '%5%'", "answer": "What are the account details with the largest value or with value having char '5' in it?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT state_province_county FROM addresses WHERE line_1_number_building LIKE '%6862 Kaitlyn Knolls%'", "answer": "Which state can address '6862 Kaitlyn Knolls' possibly be in?\nAdditional table information: table: e_government"} +{"question": "SELECT COUNT(DISTINCT eid) FROM Certificate", "answer": "How many employees have certificate.\nAdditional table information: table: flight_1"} +{"question": "SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'Close a policy' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'New policy application'", "answer": "Which customers have used both the service named 'Close a policy' and the service named 'Upgrade a policy'? Give me the customer names.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT COUNT(*), dept_code FROM student GROUP BY dept_code", "answer": "How many students are in each department?\nAdditional table information: table: college_1"} +{"question": "SELECT roomName FROM Rooms WHERE basePrice < 160 AND beds = 2 AND decor = 'modern'", "answer": "Find the names of all modern rooms with a base price below $160 and two beds.\nAdditional table information: table: inn_1"} +{"question": "SELECT AVG(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = 'Robinson R-22'", "answer": "What is the average total number of passengers for all airports that the aircraft 'Robinson R-22' visits?\nAdditional table information: table: aircraft"} +{"question": "SELECT DISTINCT asset_model FROM Assets", "answer": "What are all the distinct asset models?\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2", "answer": "What are the employee ids for those who had two or more jobs.\nAdditional table information: table: hr_1"} +{"question": "SELECT SUM(gamesplayed) FROM Sportsinfo", "answer": "What is the total number of games played?\nAdditional table information: table: game_1"} +{"question": "SELECT T2.name FROM photos AS T1 JOIN camera_lens AS T2 ON T1.camera_lens_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the names of the cameras that have taken picture of the most mountains?\nAdditional table information: table: mountain_photos"} +{"question": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3", "answer": "Find the names of reviewers who had given higher than 3 star ratings.\nAdditional table information: table: movie_1"} +{"question": "SELECT roomName FROM Rooms WHERE basePrice < 160 AND beds = 2 AND decor = 'modern'", "answer": "What are the names of modern rooms that have a base price lower than $160 and two beds.\nAdditional table information: table: inn_1"} +{"question": "SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.Lastname = 'Heilo'", "answer": "What are the names of the songs by the artist whose last name is 'Heilo'?\nAdditional table information: table: music_2"} +{"question": "SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which kind of policy type was chosen by the most customers?\nAdditional table information: table: insurance_policies"} +{"question": "SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80", "answer": "Which colleges have both authors with submission score above 90 and authors with submission score below 80?\nAdditional table information: table: workshop_paper"} +{"question": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Americano'", "answer": "What are the names of customers who have purchased both products Latte and Americano?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T3.name FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id JOIN artist AS T3 ON T3.artist_id = T2.artist_id GROUP BY T3.artist_id HAVING AVG(T1.attendance) > 200", "answer": "What are the names of artist whose exhibitions draw over 200 attendees on average?\nAdditional table information: table: theme_gallery"} +{"question": "SELECT County_name FROM county ORDER BY Population ASC NULLS FIRST", "answer": "Sort the names of all counties in ascending order of population.\nAdditional table information: table: election"} +{"question": "SELECT title FROM songs WHERE title LIKE '% the %'", "answer": "Find all the songs whose name contains the word 'the'.\nAdditional table information: table: music_2"} +{"question": "SELECT CLASS, COUNT(*) FROM race GROUP BY CLASS", "answer": "Show the race class and number of races in each class.\nAdditional table information: table: race_track"} +{"question": "SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'", "answer": "Find the states where have some college students in tryout and their decisions are yes.\nAdditional table information: table: soccer_2"} +{"question": "SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What is the customer id, first and last name with least number of accounts.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT T1.region_name, COUNT(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id", "answer": "Show the name for regions and the number of storms for each region.\nAdditional table information: table: storm_record"} +{"question": "SELECT T1.name, T1.long, AVG(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id GROUP BY T2.start_station_id", "answer": "For each start station id, what is its name, longitude and average duration of trips started there?\nAdditional table information: table: bike_1"} +{"question": "SELECT COUNT(*) FROM patient WHERE NOT SSN IN (SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication = T2.Code WHERE T2.name = 'Procrastin-X')", "answer": "Find the number of patients who are not using the medication of Procrastin-X.\nAdditional table information: table: hospital_1"} +{"question": "SELECT artist_name FROM artist WHERE country = 'UK' INTERSECT SELECT artist_name FROM song WHERE languages = 'english'", "answer": "What are the names of the artists that are from the UK and sang songs in English?\nAdditional table information: table: music_1"} +{"question": "SELECT cName FROM college ORDER BY enr DESC LIMIT 3", "answer": "What are the names of schools with the top 3 largest size?\nAdditional table information: table: soccer_2"} +{"question": "SELECT flno FROM Flight ORDER BY distance ASC NULLS FIRST LIMIT 3", "answer": "Show the flight number of flights with three lowest distances.\nAdditional table information: table: flight_1"} +{"question": "SELECT T1.project_details, T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the details and id of the project with the most outcomes?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT venue FROM MATCH ORDER BY date DESC", "answer": "What are the venues of all the matches? Sort them in the descending order of match date.\nAdditional table information: table: city_record"} +{"question": "SELECT event_name FROM party_events GROUP BY event_name HAVING COUNT(*) > 2", "answer": "Which event names were used more than twice for party events?\nAdditional table information: table: party_people"} +{"question": "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%'", "answer": "What is the name of the project that has a scientist assigned to it whose name contains 'Smith'?\nAdditional table information: table: scientist_1"} +{"question": "SELECT T2.team_id, T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id ORDER BY AVG(T1.attendance) DESC LIMIT 1", "answer": "Find the id and rank of the team that has the highest average attendance rate in 2014.\nAdditional table information: table: baseball_1"} +{"question": "SELECT text_bg_color FROM \"regional_marketing\" WHERE State/territory = 'Australian Capital Territory'", "answer": "Name the background colour for the Australian Capital Territory. \nAdditional table information: table: regional_marketing\ncolumns: state_territory, text_bg_color, format, current_slogan, current_series, Notes"} +{"question": "SELECT name FROM program ORDER BY launch DESC LIMIT 1", "answer": "Which program was launched most recently? Return the program name.\nAdditional table information: table: program_share"} +{"question": "SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T1.dept_code = T3.dept_code WHERE T3.dept_name = 'History' AND T1.prof_high_degree <> 'Ph.D.'", "answer": "What are the first names and offices of history professors who don't have Ph.D.s?\nAdditional table information: table: college_1"} +{"question": "SELECT t1.attribute_name, t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 0", "answer": "Which attribute definitions have attribute value 0? Give me the attribute name and attribute ID.\nAdditional table information: table: product_catalog"} +{"question": "SELECT country FROM airlines WHERE name LIKE 'Orbit%'", "answer": "Find the country of the airlines whose name starts with 'Orbit'.\nAdditional table information: table: flight_4"} +{"question": "SELECT product_price FROM products WHERE NOT product_id IN (SELECT product_id FROM complaints)", "answer": "Find the prices of products which has never received a single complaint.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT SUM(market_rate) FROM furniture ORDER BY market_rate DESC LIMIT 2", "answer": "find the total market rate of the furnitures that have the top 2 market shares.\nAdditional table information: table: manufacturer"} +{"question": "SELECT YEAR, AVG(attendance) FROM home_game GROUP BY YEAR", "answer": "What is the average number of attendance at home games for each year?\nAdditional table information: table: baseball_1"} +{"question": "SELECT SUM(acc_bal), state FROM customer WHERE credit_score > 100 GROUP BY state", "answer": "What is the total account balance for customers with a credit score of above 100 for the different states?\nAdditional table information: table: loan_1"} +{"question": "SELECT Name FROM ARTIST WHERE Name LIKE '%a%'", "answer": "What are the names of artist who have the letter 'a' in their names?\nAdditional table information: table: chinook_1"} +{"question": "SELECT song_name FROM song WHERE rating < (SELECT MIN(rating) FROM song WHERE languages = 'english')", "answer": "What are the song names for every song whose rating is less than the minimum rating for English songs?\nAdditional table information: table: music_1"} +{"question": "SELECT T2.Name FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID WHERE T3.Sales > 3000", "answer": "Show the names of editors that are on the committee of journals with sales bigger than 3000.\nAdditional table information: table: journal_committee"} +{"question": "SELECT payment_method_code, COUNT(*) FROM customers GROUP BY payment_method_code", "answer": "How many customers use each payment method?\nAdditional table information: table: department_store"} +{"question": "SELECT Address FROM LOCATIONS WHERE Location_Name = 'UK Gallery'", "answer": "Find the address of the location named 'UK Gallery'.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT AVG(credit_score) FROM customer WHERE NOT cust_id IN (SELECT cust_id FROM loan)", "answer": "Find the average credit score of the customers who do not have any loan.\nAdditional table information: table: loan_1"} +{"question": "SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Give the budget type code that is most common among documents with expenses.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT product_id, product_name FROM products WHERE product_price < 600 OR product_price > 900", "answer": "What are id and name of the products whose price is lower than 600 or higher than 900?\nAdditional table information: table: department_store"} +{"question": "SELECT T1.name_first, T1.name_last, T1.player_id, COUNT(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the first name, last name and id of the player with the most all star game experiences? Also list the count.\nAdditional table information: table: baseball_1"} +{"question": "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", "answer": "Which activity has the most faculty members participating in? Find the activity name.\nAdditional table information: table: activity_1"} +{"question": "SELECT Famous_Title FROM artist WHERE Artist = 'Triumfall'", "answer": "What are the famous titles of the artist 'Triumfall'?\nAdditional table information: table: music_4"} +{"question": "SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2", "answer": "What are the names of studios that have made two or more films?\nAdditional table information: table: film_rank"} +{"question": "SELECT COUNT(*) FROM Accounts", "answer": "Count the number of accounts.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT MAX(budget_in_billions), MIN(budget_in_billions) FROM department", "answer": "What are the maximum and minimum budget of the departments?\nAdditional table information: table: department_management"} +{"question": "SELECT AVG(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "answer": "Return the average age across all gymnasts.\nAdditional table information: table: gymnast"} +{"question": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'", "answer": "What are the states of the colleges where students who tried out for the striker position attend?\nAdditional table information: table: soccer_2"} +{"question": "SELECT MAX(T2.fastestlapspeed), T1.name, T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year NULLS FIRST", "answer": "For each race name, What is the maximum fastest lap speed for races after 2004 ordered by year?\nAdditional table information: table: formula_1"} +{"question": "SELECT DISTINCT T2.Type FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID WHERE T3.Year = 2007", "answer": "Show distinct types of artworks that are nominated in festivals in 2007.\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT AVG(Number_of_hosts) FROM party", "answer": "Compute the average number of hosts for parties.\nAdditional table information: table: party_host"} +{"question": "SELECT COUNT(*) FROM aircraft", "answer": "How many aircrafts are there?\nAdditional table information: table: aircraft"} +{"question": "SELECT T2.Comptroller FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2", "answer": "Find the parties associated with the delegates from district 1 or 2. Who served as comptrollers of the parties?\nAdditional table information: table: election"} +{"question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'LORIA' AND T2.lastname = 'ONDERSMA'", "answer": "Count the number of students the teacher LORIA ONDERSMA teaches.\nAdditional table information: table: student_1"} +{"question": "SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200", "answer": "Find all the films longer than 100 minutes, or rated PG, except those who cost more than 200 for replacement. List the titles.\nAdditional table information: table: sakila_1"} +{"question": "SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'inhibitor' INTERSECT SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'activitor'", "answer": "List the medicine name and trade name which can both interact as 'inhibitor' and 'activitor' with enzymes.\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT MAX(T2.resolution), MIN(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE '3:%'", "answer": "What are the maximum and minimum resolution of songs whose duration is 3 minutes?\nAdditional table information: table: music_1"} +{"question": "SELECT COUNT(*) FROM book_club", "answer": "How many book clubs are there?\nAdditional table information: table: culture_company"} +{"question": "SELECT AVG(Money_Requested) FROM entrepreneur", "answer": "What is the average money requested by all entrepreneurs?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the busiest destination airport that runs most number of routes in China.\nAdditional table information: table: flight_4"} +{"question": "SELECT COUNT(course_id) FROM Student_Course_Enrolment", "answer": "How many distinct courses are enrolled in by students?\nAdditional table information: table: e_learning"} +{"question": "SELECT student_capacity, gender FROM dorm WHERE dorm_name LIKE '%Donor%'", "answer": "Find the capacity and gender type of the dorm whose name has substring \u2018Donor\u2019.\nAdditional table information: table: dorm_1"} +{"question": "SELECT T2.Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID ORDER BY T3.Year NULLS FIRST", "answer": "Show the names of artworks in ascending order of the year they are nominated in.\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Pen and Paper Gaming'", "answer": "How many people have membership in the club 'Pen and Paper Gaming'?\nAdditional table information: table: club_1"} +{"question": "SELECT T1.emp_lname, T1.emp_hiredate FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num WHERE T2.prof_office = 'DRE 102'", "answer": "What is the last name of the professor whose office is located in DRE 102, and when were they hired?\nAdditional table information: table: college_1"} +{"question": "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'", "answer": "List all company names with a book published by Alyson.\nAdditional table information: table: culture_company"} +{"question": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'", "answer": "What are the names of all tracks that are on the Movies playlist but not in the music playlist?\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(*) FROM artist WHERE age > 46 AND year_join > 1990", "answer": "How many artists are above age 46 and joined after 1990?\nAdditional table information: table: theme_gallery"} +{"question": "SELECT AVG(Event_Attendance), MAX(Event_Attendance) FROM event", "answer": "what are the average and maximum attendances of all events?\nAdditional table information: table: news_report"} +{"question": "SELECT District_name, City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000", "answer": "Find the name and population of district with population between 200000 and 2000000\nAdditional table information: table: store_product"} +{"question": "SELECT Player, Years_Played FROM player", "answer": "Who are the different players and how many years has each played?\nAdditional table information: table: match_season"} +{"question": "SELECT T1.first_name, T1.last_name, T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Which staff handled least number of payments? List the full name and the id.\nAdditional table information: table: sakila_1"} +{"question": "SELECT T1.country, T1.name, COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.country, T1.name", "answer": "What is the total number of routes for each country and airline in that country?\nAdditional table information: table: flight_4"} +{"question": "SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name of the user who gives the most reviews.\nAdditional table information: table: epinions_1"} +{"question": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING COUNT(*) >= 2", "answer": "Show the product type codes which have at least two products.\nAdditional table information: table: customers_and_products_contacts"} +{"question": "SELECT DISTINCT T1.name, T1.location, T1.product FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.enzyme_id = T1.id WHERE T2.interaction_type = 'inhibitor'", "answer": "What are the different names, locations, and products of the enzymes that are capable inhibitor interactions?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT name, distance FROM Aircraft", "answer": "What are the names and distances for all airplanes?\nAdditional table information: table: flight_1"} +{"question": "SELECT T3.location, T3.Representative_Name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id ORDER BY T2.Assets_billion DESC LIMIT 3", "answer": "find the location and Representative name of the gas stations owned by the companies with top 3 Asset amounts.\nAdditional table information: table: gas_company"} +{"question": "SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4", "answer": "Find the ids of the departments where any manager is managing 4 or more employees.\nAdditional table information: table: hr_1"} +{"question": "SELECT city, GDP FROM city ORDER BY GDP NULLS FIRST LIMIT 1", "answer": "What is the city with the smallest GDP? Return the city and its GDP.\nAdditional table information: table: city_record"} +{"question": "SELECT T2.roomName, T1.Rate, T1.CheckIn, T1.CheckOut FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY T1.Rate DESC LIMIT 1", "answer": "Return the name, rate, check in and check out date for the room with the highest rate.\nAdditional table information: table: inn_1"} +{"question": "SELECT MIN(bathroom_count), MAX(bathroom_count) FROM Apartments", "answer": "Give me the minimum and maximum bathroom count among all the apartments.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT StuID FROM Student WHERE sex = 'F' INTERSECT SELECT StuID FROM Sportsinfo WHERE sportname = 'Football'", "answer": "What are the ids of all female students who play football?\nAdditional table information: table: game_1"} +{"question": "SELECT AVG(HS) FROM Player", "answer": "How many hours do the players train on average?\nAdditional table information: table: soccer_2"} +{"question": "SELECT cust_name FROM customer EXCEPT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE T2.loan_type = 'Mortgages'", "answer": "What are the names of customers who have not taken a Mortage loan?\nAdditional table information: table: loan_1"} +{"question": "SELECT T1.name, T2.alid FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T2.alid ORDER BY COUNT(*) DESC LIMIT 10", "answer": "Find the names of the top 10 airlines that operate the most number of routes.\nAdditional table information: table: flight_4"} +{"question": "SELECT COUNT(DISTINCT state) FROM college WHERE enr > (SELECT AVG(enr) FROM college)", "answer": "What is the number of states that has some college whose enrollment is larger than the average enrollment?\nAdditional table information: table: soccer_2"} +{"question": "SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID WHERE T2.Rank_in_Round > 3", "answer": "Show the names of members that have a rank in round higher than 3.\nAdditional table information: table: decoration_competition"} +{"question": "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%'", "answer": "What are the ids of documents with letter 's' in the name with any expense budgets.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT COUNT(*), sex FROM people WHERE weight > 85 GROUP BY sex", "answer": "Count the number of people of each sex who have a weight higher than 85.\nAdditional table information: table: candidate_poll"} +{"question": "SELECT Time_of_purchase, age, address FROM member ORDER BY Time_of_purchase NULLS FIRST", "answer": "Find the purchase time, age and address of each member, and show the results in the order of purchase time.\nAdditional table information: table: coffee_shop"} +{"question": "SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3.Lname = 'Smith' AND T3.Fname = 'Linda'", "answer": "What are the names of all games played by Linda Smith?\nAdditional table information: table: game_1"} +{"question": "SELECT DISTINCT forename FROM drivers ORDER BY forename ASC NULLS FIRST", "answer": "What are the first names of all the different drivers in alphabetical order?\nAdditional table information: table: formula_1"} +{"question": "SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code HAVING COUNT(DISTINCT dept_name) < 5", "answer": "Find the number of different departments in each school whose number of different departments is less than 5.\nAdditional table information: table: college_1"} +{"question": "SELECT title FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid GROUP BY T1.songid ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the song with the most vocals?\nAdditional table information: table: music_2"} +{"question": "SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1", "answer": "What is the id of the candidate who most recently accessed the course?\nAdditional table information: table: student_assessment"} +{"question": "SELECT MAX(Points) FROM climber WHERE Country = 'United Kingdom'", "answer": "What is the maximum point for climbers whose country is United Kingdom?\nAdditional table information: table: climbing"} +{"question": "SELECT director FROM Movie WHERE director <> 'null' GROUP BY director HAVING COUNT(*) = 1", "answer": "What are the names of the directors who made exactly one movie excluding director NULL?\nAdditional table information: table: movie_1"} +{"question": "SELECT T1.organisation_id, T1.organisation_type, T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which organisation hired the most number of research staff? List the organisation id, type and detail.\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT T2.weight FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T1.snatch > 140 OR T2.height > 200", "answer": "List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200.\nAdditional table information: table: body_builder"} +{"question": "SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY SUM(transaction_amount) DESC LIMIT 1", "answer": "Return the type of transaction with the highest total amount.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT SUM(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000", "answer": "Count the total number of games the team Boston Red Stockings attended from 1990 to 2000.\nAdditional table information: table: baseball_1"} +{"question": "SELECT catalog_entry_name, capacity FROM Catalog_Contents WHERE price_in_dollars > 700", "answer": "Which catalog contents has price above 700 dollars? Show their catalog entry names and capacities.\nAdditional table information: table: product_catalog"} +{"question": "SELECT MIN(distance), AVG(distance), MAX(distance) FROM Aircraft", "answer": "Return the minimum, average and maximum distances traveled across all aircrafts.\nAdditional table information: table: flight_1"} +{"question": "SELECT T1.stu_fname, T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'C' OR T2.enroll_grade = 'A'", "answer": "What are the names of all students taking a course who received an A or C?\nAdditional table information: table: college_1"} +{"question": "SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed", "answer": "Show the ids of the employees who don't authorize destruction for any document.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T2.party_name, COUNT(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id", "answer": "Show all party names and the number of members in each party.\nAdditional table information: table: party_people"} +{"question": "SELECT COUNT(DISTINCT bike_id) FROM trip", "answer": "From the trip record, find the number of unique bikes.\nAdditional table information: table: bike_1"} +{"question": "SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed", "answer": "Which employees have either destroyed a document or made an authorization to do so? Return their employee ids.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_price > 2000", "answer": "Find the order detail for the products with price above 2000.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT mID, AVG(stars) FROM Rating WHERE NOT mID IN (SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = 'Brittany Harris') GROUP BY mID", "answer": "What is the average rating for each movie that has never been reviewed by Brittany Harris?\nAdditional table information: table: movie_1"} +{"question": "SELECT T1.total FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T2.Birth_Date LIKE '%January%'", "answer": "What are the total scores of the body builders whose birthday contains the string 'January' ?\nAdditional table information: table: body_builder"} +{"question": "SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = 'Fall'", "answer": "Find the distinct ages of students who have secretary votes in the fall election cycle.\nAdditional table information: table: voter_2"} +{"question": "SELECT AVG(Money_Requested) FROM entrepreneur", "answer": "Return the average money requested across all entrepreneurs.\nAdditional table information: table: entrepreneur"} +{"question": "SELECT COUNT(*) FROM artwork", "answer": "How many artworks are there?\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT campus FROM campuses WHERE county = 'Los Angeles' AND YEAR > 1950", "answer": "Which university is in Los Angeles county and opened after 1950?\nAdditional table information: table: csu_1"} +{"question": "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", "answer": "In which city do the most employees live and how many of them live there?\nAdditional table information: table: driving_school"} +{"question": "SELECT Industry, COUNT(*) FROM Companies GROUP BY Industry", "answer": "Please show each industry and the corresponding number of companies in that industry.\nAdditional table information: table: company_office"} +{"question": "SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'", "answer": "What is the name of the language that the film 'AIRPORT POLLOCK' is in?\nAdditional table information: table: sakila_1"} +{"question": "SELECT name FROM physician WHERE POSITION LIKE '%senior%'", "answer": "Find the name of physicians whose position title contains the word 'senior'.\nAdditional table information: table: hospital_1"} +{"question": "SELECT T2.customer_name, T2.payment_method FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.outcome_code = 'Order' INTERSECT SELECT T2.customer_name, T2.payment_method FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.outcome_code = 'No Response'", "answer": "What are the name and payment method of customers who have both mailshots in 'Order' outcome and mailshots in 'No Response' outcome.\nAdditional table information: table: customers_campaigns_ecommerce"} +{"question": "SELECT COUNT(DISTINCT major), COUNT(DISTINCT city_code) FROM student", "answer": "Find the numbers of different majors and cities.\nAdditional table information: table: dorm_1"} +{"question": "SELECT hire_date FROM employees WHERE NOT first_name LIKE '%M%'", "answer": "On what dates were employees without the letter M in their first names hired?\nAdditional table information: table: hr_1"} +{"question": "SELECT TYPE, COUNT(*), SUM(enrollment) FROM institution GROUP BY TYPE", "answer": "Show institution types, along with the number of institutions and total enrollment for each type.\nAdditional table information: table: protein_institute"} +{"question": "SELECT town_city FROM customers WHERE customer_type_code = 'Good Credit Rating' GROUP BY town_city ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Return the city with the customer type code 'Good Credit Rating' that had the fewest customers.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Please show the most common reigns of wrestlers.\nAdditional table information: table: wrestler"} +{"question": "SELECT SUM(Enrollment), affiliation FROM university WHERE founded > 1850 GROUP BY affiliation", "answer": "Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type.\nAdditional table information: table: university_basketball"} +{"question": "SELECT COUNT(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE '%a%'", "answer": "How many lessons taught by staff whose first name has letter 'a' in it?\nAdditional table information: table: driving_school"} +{"question": "SELECT login_name FROM Students WHERE family_name = 'Ward'", "answer": "Return the login names of the students whose family name is 'Ward'.\nAdditional table information: table: e_learning"} +{"question": "SELECT t1.name, t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id ORDER BY t2.support_rate DESC LIMIT 1", "answer": "What is the name and sex of the candidate with the highest support rate?\nAdditional table information: table: candidate_poll"} +{"question": "SELECT DISTINCT T1.service_type_code FROM services AS T1 JOIN organizations AS T2 ON T1.organization_id = T2.organization_id WHERE T2.organization_details = 'Denesik and Sons Party'", "answer": "What is the distinct service types that are provided by the organization which has detail 'Denesik and Sons Party'?\nAdditional table information: table: local_govt_and_lot"} +{"question": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which policy type appears most frequently in the available policies?\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT Name FROM member WHERE NOT Member_ID IN (SELECT Member_ID FROM round)", "answer": "List the names of members who did not participate in any round.\nAdditional table information: table: decoration_competition"} +{"question": "SELECT MAX(amount_of_transaction) FROM TRANSACTIONS", "answer": "Show the maximum amount of transaction.\nAdditional table information: table: tracking_share_transactions"} +{"question": "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", "answer": "What are the first and last names of all customers with more than 2 payments?\nAdditional table information: table: driving_school"} +{"question": "SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING COUNT(*) >= 2 INTERSECT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING SUM(T2.number_city_affected) >= 10", "answer": "Show storm name with at least two regions and 10 cities affected.\nAdditional table information: table: storm_record"} +{"question": "SELECT COUNT(*), T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name", "answer": "Find number of tracks in each genre?\nAdditional table information: table: store_1"} +{"question": "SELECT customer_first_name, customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name, T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id", "answer": "What are the full names of customers who do not have any accounts?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT origin FROM Flight GROUP BY origin ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What place has the most flights coming from there?\nAdditional table information: table: flight_1"} +{"question": "SELECT name FROM student WHERE NOT id IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.dept_name = 'Biology')", "answer": "Find the name of students who didn't take any course from Biology department.\nAdditional table information: table: college_2"} +{"question": "SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "What is the id of the department with the least number of staff?\nAdditional table information: table: department_store"} +{"question": "SELECT grant_id, COUNT(*) FROM Documents GROUP BY grant_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "For each grant id, how many documents does it have, and which one has the most?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT job_title, max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000", "answer": "display job Title, the difference between minimum and maximum salaries for those jobs which max salary within the range 12000 to 18000.\nAdditional table information: table: hr_1"} +{"question": "SELECT MAX(Population), MIN(Population) FROM county", "answer": "What are the maximum and minimum population of the counties?\nAdditional table information: table: election"} +{"question": "SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50", "answer": "What are the times of elimination for wrestlers with over 50 days held?\nAdditional table information: table: wrestler"} +{"question": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING COUNT(*) >= 2", "answer": "What are the names for all aircrafts with at least 2 flights?\nAdditional table information: table: flight_1"} +{"question": "SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = 'game1'", "answer": "What is the name of the tourist attraction that is associated with the photo 'game1'?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT Room FROM FACULTY WHERE Rank = 'Professor' AND Building = 'NEB'", "answer": "Find the rooms of faculties with rank professor who live in building NEB.\nAdditional table information: table: college_3"} +{"question": "SELECT COUNT(DISTINCT state) FROM bank", "answer": "Find the number of different states which banks are located at.\nAdditional table information: table: loan_1"} +{"question": "SELECT t2.claim_status_name FROM claims_processing AS t1 JOIN claims_processing_stages AS t2 ON t1.claim_stage_id = t2.claim_stage_id GROUP BY t1.claim_stage_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which claim processing stage has the most claims? Show the claim status name.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT COUNT(*), POSITION FROM player WHERE points < 30 GROUP BY POSITION", "answer": "What is the number of players who have points less than 30 for each position?\nAdditional table information: table: sports_competition"} +{"question": "SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Google'", "answer": "Find all the papers published by the institution 'Google'.\nAdditional table information: table: icfp_1"} +{"question": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Accounting' INTERSECT SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Computer Info. Systems'", "answer": "Find the first name of student who is taking classes from accounting and Computer Info. Systems departments\nAdditional table information: table: college_1"} +{"question": "SELECT Fname FROM FACULTY WHERE Rank = 'Professor' ORDER BY Fname NULLS FIRST", "answer": "Find the first names of faculties of rank Professor in alphabetic order.\nAdditional table information: table: college_3"} +{"question": "SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' INTERSECT SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Night'", "answer": "what are the names of the channels that broadcast in both morning and night?\nAdditional table information: table: program_share"} +{"question": "SELECT head FROM department GROUP BY departmentID ORDER BY COUNT(departmentID) NULLS FIRST LIMIT 1", "answer": "Tell me the employee id of the head of the department with the least employees.\nAdditional table information: table: hospital_1"} +{"question": "SELECT t2.document_structure_description FROM documents AS t1 JOIN document_structures AS t2 ON t1.document_structure_code = t2.document_structure_code GROUP BY t1.document_structure_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the structure description of the document that has been accessed the fewest number of times.\nAdditional table information: table: document_management"} +{"question": "SELECT document_type_code FROM Documents WHERE document_id = 2", "answer": "List the document type code for the document with the id 2.\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT city FROM addresses WHERE NOT city IN (SELECT DISTINCT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id)", "answer": "Find the list of cities that no customer is living in.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT minister, took_office, left_office FROM party ORDER BY left_office NULLS FIRST", "answer": "Who are the ministers, when did they take office, and when did they leave office, ordered by when they left office?\nAdditional table information: table: party_people"} +{"question": "SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Psychiatry'", "answer": "Which physicians are affiliated with both Surgery and Psychiatry departments? Tell me their names.\nAdditional table information: table: hospital_1"} +{"question": "SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id", "answer": "What is all the information regarding employees who are managers?\nAdditional table information: table: hr_1"} +{"question": "SELECT Description FROM aircraft", "answer": "What are the descriptions for the aircrafts?\nAdditional table information: table: aircraft"} +{"question": "SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001", "answer": "List all the salary values players received in 2010 and 2001.\nAdditional table information: table: baseball_1"} +{"question": "SELECT Zip_code FROM county WHERE County_name = 'Howard'", "answer": "What is the zip code the county named 'Howard' is located in?\nAdditional table information: table: election"} +{"question": "SELECT T1.name, AVG(trust) FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id GROUP BY T2.target_u_id", "answer": "Find each target user's name and average trust score.\nAdditional table information: table: epinions_1"} +{"question": "SELECT COUNT(*) FROM member WHERE address <> 'Hartford'", "answer": "How many members are not living in Hartford?\nAdditional table information: table: coffee_shop"} +{"question": "SELECT COUNT(DISTINCT dept_name) FROM department", "answer": "How many departments does the college has?\nAdditional table information: table: college_1"} +{"question": "SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date = '08/30/2015'", "answer": "What are the distinct president votes on 08/30/2015?\nAdditional table information: table: voter_2"} +{"question": "SELECT name FROM program ORDER BY launch DESC LIMIT 1", "answer": "find the name of the program that was launched most recently.\nAdditional table information: table: program_share"} +{"question": "SELECT advisor FROM Student GROUP BY advisor ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which advisor has most number of students?\nAdditional table information: table: allergy_1"} +{"question": "SELECT AVG(height), AVG(weight) FROM people WHERE sex = 'M'", "answer": "Find the average height and weight for all males (sex is M).\nAdditional table information: table: candidate_poll"} +{"question": "SELECT Player_name FROM player WHERE NOT Player_ID IN (SELECT Player_ID FROM player_coach)", "answer": "List the names of players that do not have coaches.\nAdditional table information: table: riding_club"} +{"question": "SELECT order_id, SUM(product_quantity) FROM Order_items GROUP BY order_id", "answer": "Show order ids and the total quantity in each order.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT T2.firstname, T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'EVELINA' AND T1.lastname = 'BROMLEY'", "answer": "Which teachers teach the student named EVELINA BROMLEY? Give me the first and last name of the teachers.\nAdditional table information: table: student_1"} +{"question": "SELECT COUNT(*) FROM campuses WHERE county = 'Los Angeles'", "answer": "How many campuses exist are in the county of LA?\nAdditional table information: table: csu_1"} +{"question": "SELECT course_description FROM COURSES WHERE course_name = 'database'", "answer": "What are the descriptions of the courses with name 'database'?\nAdditional table information: table: e_learning"} +{"question": "SELECT login_name FROM Students WHERE family_name = 'Ward'", "answer": "What are the login names of the students with family name 'Ward'?\nAdditional table information: table: e_learning"} +{"question": "SELECT T1.project_details, T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which project made the most number of outcomes? List the project details and the project id.\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 AND T2.points > 20", "answer": "Find all the forenames of distinct drivers who won in position 1 as driver standing and had more than 20 points?\nAdditional table information: table: formula_1"} +{"question": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T2.balance > T3.balance", "answer": "Find the name of accounts whose checking balance is higher than corresponding saving balance.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT languages FROM song GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the languages that are used most often in songs?\nAdditional table information: table: music_1"} +{"question": "SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211' AND T2.enroll_grade = 'C'", "answer": "What is the first name of students enrolled in class ACCT-211 and got grade C?\nAdditional table information: table: college_1"} +{"question": "SELECT T2.theme, T1.date, T1.attendance FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T2.year = 2004", "answer": "Return the themes, dates, and attendance for exhibitions that happened in 2004.\nAdditional table information: table: theme_gallery"} +{"question": "SELECT patient FROM undergoes ORDER BY dateundergoes NULLS FIRST LIMIT 1", "answer": "Find the patient who has the most recent undergoing treatment?\nAdditional table information: table: hospital_1"} +{"question": "SELECT card_type_code, COUNT(*) FROM Customers_cards GROUP BY card_type_code", "answer": "Show all card type codes and the number of cards in each type.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = 'Balls to the Wall'", "answer": "What is title of album which track Balls to the Wall belongs to?\nAdditional table information: table: store_1"} +{"question": "SELECT customer_name FROM customers", "answer": "What are the names of all the customers?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = 'Rock' AND T3.name = 'MPEG audio file'", "answer": "What are the names of all Rock tracks that are stored on MPEG audio files?\nAdditional table information: table: store_1"} +{"question": "SELECT state FROM customers GROUP BY state ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Give the state that has the most customers.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT COUNT(*), T1.maintenance_contract_id FROM Maintenance_Contracts AS T1 JOIN Assets AS T2 ON T1.maintenance_contract_id = T2.maintenance_contract_id GROUP BY T1.maintenance_contract_id", "answer": "How many assets does each maintenance contract contain? List the number and the contract id.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT Sex FROM Student WHERE Fname = 'Linda' AND Lname = 'Smith'", "answer": "What is the gender of the student Linda Smith?\nAdditional table information: table: restaurant_1"} +{"question": "SELECT T1.City_Town FROM Addresses AS T1 JOIN Customers AS T2 ON T1.Address_ID = T2.Address_ID EXCEPT SELECT T1.City_Town FROM Addresses AS T1 JOIN Performers AS T2 ON T1.Address_ID = T2.Address_ID", "answer": "Which cities have at least one customer but no performer?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT COUNT(T1.SSN) FROM patient AS T1 JOIN prescribes AS T2 ON T1.SSN = T2.patient JOIN physician AS T3 ON T2.physician = T3.employeeid WHERE T3.name = 'John Dorian'", "answer": "How many patients' prescriptions are made by physician John Dorian?\nAdditional table information: table: hospital_1"} +{"question": "SELECT name, lat, city FROM station ORDER BY lat NULLS FIRST LIMIT 1", "answer": "What is the name, latitude, and city of the station that is located the furthest South?\nAdditional table information: table: bike_1"} +{"question": "SELECT COUNT(*) FROM county_public_safety", "answer": "How many counties are there?\nAdditional table information: table: county_public_safety"} +{"question": "SELECT COUNT(*), T1.blockcode FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockcode", "answer": "Find the number of rooms for different block code?\nAdditional table information: table: hospital_1"} +{"question": "SELECT T1.company_id, T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Engineers AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id HAVING COUNT(*) >= 2 UNION SELECT T3.company_id, T3.company_name FROM Third_Party_Companies AS T3 JOIN Maintenance_Contracts AS T4 ON T3.company_id = T4.maintenance_contract_company_id GROUP BY T3.company_id HAVING COUNT(*) >= 2", "answer": "Which third party companies have at least 2 maintenance engineers or have at least 2 maintenance contracts? List the company id and name.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT AVG(ticket_price), MIN(ticket_price), MAX(ticket_price) FROM exhibition WHERE YEAR < 2009", "answer": "Show the average, minimum, and maximum ticket prices for exhibitions for all years before 2009.\nAdditional table information: table: theme_gallery"} +{"question": "SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T1.dept_name = 'Art'", "answer": "What are the names of Art instructors who have taught a course, and the corresponding course id?\nAdditional table information: table: college_2"} +{"question": "SELECT Phone FROM EMPLOYEE", "answer": "What are the phone numbers for each employee?\nAdditional table information: table: chinook_1"} +{"question": "SELECT T2.Name FROM phone_market AS T1 JOIN phone AS T2 ON T1.Phone_ID = T2.Phone_ID GROUP BY T2.Name HAVING SUM(T1.Num_of_stock) >= 2000 ORDER BY SUM(T1.Num_of_stock) DESC", "answer": "Show the names of phones that have total number of stocks bigger than 2000, in descending order of the total number of stocks.\nAdditional table information: table: phone_market"} +{"question": "SELECT cName, state, MIN(enr) FROM college GROUP BY state", "answer": "What is the name of school that has the smallest enrollment in each state?\nAdditional table information: table: soccer_2"} +{"question": "SELECT COUNT(DISTINCT Governor) FROM party", "answer": "Count the number of distinct governors.\nAdditional table information: table: election"} +{"question": "SELECT cust_name, acc_bal FROM customer WHERE cust_name LIKE '%a%'", "answer": "What are the names and account balances of customers with the letter a in their names?\nAdditional table information: table: loan_1"} +{"question": "SELECT DISTINCT product_name FROM products ORDER BY product_name NULLS FIRST", "answer": "List the names of all distinct products in alphabetical order.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT Official_Name FROM city ORDER BY Population DESC", "answer": "What are the official names of cities, ordered descending by population?\nAdditional table information: table: farm"} +{"question": "SELECT SUM(revenue), name FROM manufacturers GROUP BY name", "answer": "What is the total revenue of each manufacturer?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT product_category_description FROM ref_product_categories WHERE product_category_code = 'Spices'", "answer": "Find the product category description of the product category with code 'Spices'.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT LOCATION FROM cinema WHERE openning_year >= 2010 GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the location with the most cinemas opened in year 2010 or later?\nAdditional table information: table: cinema"} +{"question": "SELECT AVG(T1.HS), MAX(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'", "answer": "Find the average and maximum hours for the students whose tryout decision is yes.\nAdditional table information: table: soccer_2"} +{"question": "SELECT semester, YEAR FROM takes GROUP BY semester, YEAR ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Find the semester and year which has the least number of student taking any class.\nAdditional table information: table: college_2"} +{"question": "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'", "answer": "Which customers have both 'On Road' and 'Shipped' as order status? List the customer ids.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT COUNT(*) FROM player WHERE birth_country = 'USA' AND bats = 'R'", "answer": "How many players born in USA are right-handed batters? That is, have the batter value 'R'.\nAdditional table information: table: baseball_1"} +{"question": "SELECT COUNT(*), T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id", "answer": "For each product with some problems, list the count of problems and the product id.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT format FROM \"regional_marketing\" WHERE state_territory = 'South Australia'", "answer": "What is the format for South Australia?\nAdditional table information: table: regional_marketing\ncolumns: state_territory, text_bg_color, format, current_slogan, current_series, Notes"} +{"question": "SELECT T2.name, COUNT(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id", "answer": "Show the name of track and the number of races in each track.\nAdditional table information: table: race_track"} +{"question": "SELECT DISTINCT T1.cust_name, T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id", "answer": "What are the different names and credit scores of customers who have taken a loan?\nAdditional table information: table: loan_1"} +{"question": "SELECT COUNT(DISTINCT FacID) FROM Faculty_participates_in", "answer": "How many faculty members participate in an activity?\nAdditional table information: table: activity_1"} +{"question": "SELECT semester, YEAR FROM takes GROUP BY semester, YEAR ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Which semeseter and year had the fewest students?\nAdditional table information: table: college_2"} +{"question": "SELECT LENGTH, Height FROM roller_coaster", "answer": "What are the lengths and heights of roller coasters?\nAdditional table information: table: roller_coaster"} +{"question": "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", "answer": "What are the ids and names of the companies that operated more than one flight?\nAdditional table information: table: flight_company"} +{"question": "SELECT T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID WHERE T2.Role = 'Violin'", "answer": "Show the dates of performances with attending members whose roles are 'Violin'.\nAdditional table information: table: performance_attendance"} +{"question": "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'", "answer": "What is the first and last name of all employees who live in the city Damianfort?\nAdditional table information: table: driving_school"} +{"question": "SELECT COUNT(*) FROM Statements", "answer": "How many statements do we have?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%'", "answer": "display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M.\nAdditional table information: table: hr_1"} +{"question": "SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'", "answer": "What are the names of the schools with some players in the mid position but no goalies?\nAdditional table information: table: soccer_2"} +{"question": "SELECT dept_name FROM student GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the deparment with the highest enrollment?\nAdditional table information: table: college_2"} +{"question": "SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration NULLS FIRST LIMIT 1", "answer": "What is the name of the artist who produced the shortest song?\nAdditional table information: table: music_1"} +{"question": "SELECT T1.firstname, T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0", "answer": "Find the first and last names of people who payed more than the rooms' base prices.\nAdditional table information: table: inn_1"} +{"question": "SELECT document_id, COUNT(*) FROM Draft_Copies GROUP BY document_id HAVING COUNT(*) > 1", "answer": "Which documents have more than 1 draft copies? List document id and number of draft copies.\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT COUNT(*) FROM CHARACTERISTICS", "answer": "Count the number of characteristics.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT SUM(no_of_customers) FROM bank", "answer": "What is the total number of customers across banks?\nAdditional table information: table: loan_1"} +{"question": "SELECT advisor, COUNT(*) FROM Student GROUP BY advisor", "answer": "How many students does each advisor have?\nAdditional table information: table: allergy_1"} +{"question": "SELECT document_name, access_count FROM documents ORDER BY access_count DESC LIMIT 1", "answer": "Find the name of the document that has been accessed the greatest number of times, as well as the count of how many times it has been accessed?\nAdditional table information: table: document_management"} +{"question": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1", "answer": "Show the name of the shop that have the largest quantity of devices in stock.\nAdditional table information: table: device"} +{"question": "SELECT DISTINCT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age < (SELECT AVG(age) FROM person)", "answer": "What are the different names of friends who are younger than the average age for a friend?\nAdditional table information: table: network_2"} +{"question": "SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = 'Walter Hill'", "answer": "Show the studios that have not produced films with director 'Walter Hill'.\nAdditional table information: table: film_rank"} +{"question": "SELECT T1.Status FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the status of the city that has hosted the greatest number of competitions.\nAdditional table information: table: farm"} +{"question": "SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the countries with the most airlines whose active status is Y?\nAdditional table information: table: flight_4"} +{"question": "SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2", "answer": "Which locations are shared by more than two wrestlers?\nAdditional table information: table: wrestler"} +{"question": "SELECT AVG(enrollment) FROM university WHERE founded < 1850", "answer": "What are the average enrollment size of the universities that are founded before 1850?\nAdditional table information: table: university_basketball"} +{"question": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.age > 18", "answer": "How many members of 'Bootup Baltimore' are older than 18?\nAdditional table information: table: club_1"} +{"question": "SELECT College FROM match_season GROUP BY College ORDER BY COUNT(*) DESC LIMIT 3", "answer": "What are the three colleges from which the most players are from?\nAdditional table information: table: match_season"} +{"question": "SELECT T1.address_line_1, T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id HAVING COUNT(*) >= 2", "answer": "Find the addresses and author IDs of the course authors that teach at least two courses.\nAdditional table information: table: e_learning"} +{"question": "SELECT apt_number, room_count FROM Apartments", "answer": "Return the apartment number and the number of rooms for each apartment.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number = t2.catalog_level_number ORDER BY t1.price_in_dollars NULLS FIRST LIMIT 1", "answer": "What is the level name of the cheapest catalog (in USD)?\nAdditional table information: table: product_catalog"} +{"question": "SELECT COUNT(*) FROM election", "answer": "How many elections are there?\nAdditional table information: table: election_representative"} +{"question": "SELECT County_name FROM county ORDER BY Population DESC LIMIT 1", "answer": "Which county has the largest population? Give me the name of the county.\nAdditional table information: table: election"} +{"question": "SELECT Team, COUNT(*) FROM technician GROUP BY Team", "answer": "Show different teams of technicians and the number of technicians in each team.\nAdditional table information: table: machine_repair"} +{"question": "SELECT DISTINCT location_code FROM Document_locations", "answer": "Give me all the distinct location codes for documents.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id HAVING COUNT(*) > 1", "answer": "Show the names of the buildings that have more than one company offices.\nAdditional table information: table: company_office"} +{"question": "SELECT COUNT(*) FROM Customers", "answer": "Show the number of customers.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT student_id FROM students WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance)", "answer": "What are the ids of every student who has never attended a course?\nAdditional table information: table: student_assessment"} +{"question": "SELECT AVG(age), MIN(age), CLASS FROM captain GROUP BY CLASS", "answer": "What are the average and minimum age of captains in different class?\nAdditional table information: table: ship_1"} +{"question": "SELECT DISTINCT T1.Leader_Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID WHERE T2.Country = 'Canada'", "answer": "Show the distinct leader names of colleges associated with members from country 'Canada'.\nAdditional table information: table: decoration_competition"} +{"question": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = 'Duplex'", "answer": "Return the booking start date and end date for the apartments that have type code 'Duplex'.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'", "answer": "Which colleges does each player with a name that starts with the letter D who tried out go to?\nAdditional table information: table: soccer_2"} +{"question": "SELECT T1.member_name, T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id", "answer": "List member names and their party names.\nAdditional table information: table: party_people"} +{"question": "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", "answer": "Find name of the services that has never been used.\nAdditional table information: table: e_government"} +{"question": "SELECT city FROM station GROUP BY city ORDER BY MAX(lat) DESC", "answer": "List all the cities in a decreasing order of each city's stations' highest latitude.\nAdditional table information: table: bike_1"} +{"question": "SELECT COUNT(*), T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name ORDER BY COUNT(*) DESC", "answer": "For each airport name, how many routes start at that airport, ordered from most to least?\nAdditional table information: table: flight_4"} +{"question": "SELECT DISTINCT rank FROM Faculty", "answer": "Find the list of distinct ranks for faculty.\nAdditional table information: table: activity_1"} +{"question": "SELECT Title FROM film WHERE NOT Film_ID IN (SELECT Film_ID FROM film_market_estimation)", "answer": "List the title of films that do not have any market estimation.\nAdditional table information: table: film_rank"} +{"question": "SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the name of the customer who has the most orders.\nAdditional table information: table: customers_and_products_contacts"} +{"question": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = 'back'", "answer": "What are the different names of all songs without back vocals?\nAdditional table information: table: music_2"} +{"question": "SELECT city, state FROM bank WHERE bname = 'morningside'", "answer": "Find the city and state of the bank branch named morningside.\nAdditional table information: table: loan_1"} +{"question": "SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MEMBER_OF AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Find the name of the department that has the fewest members.\nAdditional table information: table: college_3"} +{"question": "SELECT CLASS FROM captain GROUP BY CLASS HAVING COUNT(*) > 2", "answer": "Give the classes that have more than two captains.\nAdditional table information: table: ship_1"} +{"question": "SELECT roomName, RoomId FROM Rooms WHERE basePrice > 160 AND maxOccupancy > 2", "answer": "Find all the rooms that have a price higher than 160 and can accommodate more than 2 people. Report room names and ids.\nAdditional table information: table: inn_1"} +{"question": "SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade = 'B'", "answer": "Find the number of students that have at least one grade 'B'.\nAdditional table information: table: college_3"} +{"question": "SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid WHERE T2.distance > 5000 GROUP BY T1.aid ORDER BY COUNT(*) >= 5 NULLS FIRST", "answer": "Show the name and distance of the aircrafts with more than 5000 distance and which at least 5 people have its certificate.\nAdditional table information: table: flight_1"} +{"question": "SELECT name FROM artist ORDER BY year_join DESC LIMIT 1", "answer": "What is the name of the artist who joined latest?\nAdditional table information: table: theme_gallery"} +{"question": "SELECT AVG(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan)", "answer": "Find the average credit score of the customers who have some loan.\nAdditional table information: table: loan_1"} +{"question": "SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Der Kapitan' AND T1.StagePosition = 'back'", "answer": "Who is performing in the back stage position for the song 'Der Kapitan'? Show the first name and last name.\nAdditional table information: table: music_2"} +{"question": "SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC", "answer": "List the total points of gymnasts in descending order.\nAdditional table information: table: gymnast"} +{"question": "SELECT Amount_Settled, Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC NULLS FIRST LIMIT 1", "answer": "Find the claimed amount in the claim with the least amount settled. Show both the settlement amount and claim amount.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT COUNT(DISTINCT s_id) FROM advisor", "answer": "Count the number of students who have advisors.\nAdditional table information: table: college_2"} +{"question": "SELECT * FROM Assessment_Notes ORDER BY date_of_notes ASC NULLS FIRST", "answer": "List all information about the assessment notes sorted by date in ascending order.\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT composer FROM tracks WHERE name = 'Fast As a Shark'", "answer": "Who is the composer of track Fast As a Shark?\nAdditional table information: table: store_1"} +{"question": "SELECT cName FROM College WHERE enr > 18000 ORDER BY cName NULLS FIRST", "answer": "What is the name of every college in alphabetical order that has more than 18000 students enrolled?\nAdditional table information: table: soccer_2"} +{"question": "SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises'", "answer": "Return the last name for the members of the club named 'Hopkins Student Enterprises'.\nAdditional table information: table: club_1"} +{"question": "SELECT city, COUNT(*) FROM station GROUP BY city HAVING COUNT(*) >= 15", "answer": "List the name and the number of stations for all the cities that have at least 15 stations.\nAdditional table information: table: bike_1"} +{"question": "SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.Lastname = 'Heilo'", "answer": "Find all the songs performed by artist with last name 'Heilo'\nAdditional table information: table: music_2"} +{"question": "SELECT DISTINCT Major FROM Student", "answer": "Show all majors.\nAdditional table information: table: allergy_1"} +{"question": "SELECT Category FROM music_festival WHERE RESULT = 'Awarded'", "answer": "What are the category of music festivals with result 'Awarded'?\nAdditional table information: table: music_4"} +{"question": "SELECT city_code FROM Student WHERE Fname = 'Linda' AND Lname = 'Smith'", "answer": "Which city does student Linda Smith live in?\nAdditional table information: table: restaurant_1"} +{"question": "SELECT T2.name, T2.location FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id HAVING COUNT(*) = 1", "answer": "Show the name and location of track with 1 race.\nAdditional table information: table: race_track"} +{"question": "SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises'", "answer": "Find the average age of members of the club 'Hopkins Student Enterprises'.\nAdditional table information: table: club_1"} +{"question": "SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1", "answer": "Return the poll source corresponding to the candidate who has the oppose rate.\nAdditional table information: table: candidate_poll"} +{"question": "SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'", "answer": "What are the ids for all sporty students who are on scholarship?\nAdditional table information: table: game_1"} +{"question": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2", "answer": "display the ID for those employees who did two or more jobs in the past.\nAdditional table information: table: hr_1"} +{"question": "SELECT COUNT(DISTINCT Artist_ID) FROM volume", "answer": "Count the number of artists who have had volumes.\nAdditional table information: table: music_4"} +{"question": "SELECT country FROM airports ORDER BY elevation DESC LIMIT 1", "answer": "Which country is the airport that has the highest altitude located in?\nAdditional table information: table: flight_4"} +{"question": "SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.firstname = 'Marianne'", "answer": "Find all the songs produced by artists with first name 'Marianne'.\nAdditional table information: table: music_2"} +{"question": "SELECT t2.service_name FROM first_notification_of_loss AS t1 JOIN services AS t2 ON t1.service_id = t2.service_id GROUP BY t1.service_id HAVING COUNT(*) > 2", "answer": "Find the name of services that have been used for more than 2 times in first notification of loss.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the denomination of the school the most players belong to?\nAdditional table information: table: school_player"} +{"question": "SELECT T1.invoice_date, T1.order_id, T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id", "answer": "Show invoice dates and order id and details for all invoices.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT T1.first_name, T1.last_name, T3.city FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T1.first_name LIKE '%z%'", "answer": "display those employees who contain a letter z to their first name and also display their last name, city.\nAdditional table information: table: hr_1"} +{"question": "SELECT Amount_Settled, Amount_Claimed FROM Claims ORDER BY Amount_Claimed DESC LIMIT 1", "answer": "Among all the claims, what is the settlement amount of the claim with the largest claim amount? List both the settlement amount and claim amount.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT title FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq)", "answer": "What are the titles of courses without prerequisites?\nAdditional table information: table: college_2"} +{"question": "SELECT Name, Score FROM WINE", "answer": "List the names and scores of all wines.\nAdditional table information: table: wine_1"} +{"question": "SELECT * FROM departments WHERE department_name = 'Marketing'", "answer": "What is all the information about the Marketing department?\nAdditional table information: table: hr_1"} +{"question": "SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = 'San Jose State University' AND t2.year = 2000", "answer": "How many degrees were conferred in 'San Jose State University' in 2000?\nAdditional table information: table: csu_1"} +{"question": "SELECT name FROM Employee EXCEPT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Boeing 737-800'", "answer": "Show names for all employees who do not have certificate of Boeing 737-800.\nAdditional table information: table: flight_1"} +{"question": "SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING COUNT(*) > 3", "answer": "What are the attribute data types with more than 3 attribute definitions?\nAdditional table information: table: product_catalog"} +{"question": "SELECT billing_country, COUNT(*) FROM invoices GROUP BY billing_country ORDER BY COUNT(*) DESC LIMIT 5", "answer": "What are the top 5 countries by number of invoices and how many do they have?\nAdditional table information: table: store_1"} +{"question": "SELECT DISTINCT donator_name FROM endowment", "answer": "Show all donor names.\nAdditional table information: table: school_finance"} +{"question": "SELECT COUNT(*) FROM rooms WHERE NOT roomid IN (SELECT DISTINCT room FROM reservations)", "answer": "How many rooms have not had any reservation yet?\nAdditional table information: table: inn_1"} +{"question": "SELECT COUNT(*), T3.product_id FROM orders AS T1, 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", "answer": "List the count and id of each product in all the orders.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the color description that is most common across all products.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT t1.catalog_name, t1.date_of_publication FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id = t2.catalog_id WHERE catalog_level_number > 5", "answer": "What are the name and publication date of the catalogs with catalog level number above 5?\nAdditional table information: table: product_catalog"} +{"question": "SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = 'Fall'", "answer": "What are the distinct ages of students who have secretary votes in the fall election cycle?\nAdditional table information: table: voter_2"} +{"question": "SELECT SUM(enr) FROM College", "answer": "How many students are enrolled in college?\nAdditional table information: table: soccer_2"} +{"question": "SELECT SUM(gamesplayed) FROM Sportsinfo", "answer": "How many games are played for all students?\nAdditional table information: table: game_1"} +{"question": "SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Jazz'", "answer": "Find the average unit price of jazz tracks.\nAdditional table information: table: chinook_1"} +{"question": "SELECT department_id, AVG(salary) FROM employees WHERE commission_pct <> 'null' GROUP BY department_id", "answer": "display the average salary of employees for each department who gets a commission percentage.\nAdditional table information: table: hr_1"} +{"question": "SELECT DName FROM DEPARTMENT EXCEPT SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO", "answer": "What is the name of the department htat has no students minoring in it?\nAdditional table information: table: college_3"} +{"question": "SELECT * FROM job_history AS T1 JOIN employees AS T2 ON T1.employee_id = T2.employee_id WHERE T2.salary >= 12000", "answer": "What is all the job history info done by employees earning a salary greater than or equal to 12000?\nAdditional table information: table: hr_1"} +{"question": "SELECT COUNT(*), affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation", "answer": "What are the different affiliations, and how many schools with each have an enrollment size of above 20000?\nAdditional table information: table: university_basketball"} +{"question": "SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Google'", "answer": "Which papers were written by authors from the institution 'Google'?\nAdditional table information: table: icfp_1"} +{"question": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = '2192'", "answer": "Find the distinct last names of all the students who have president votes and whose advisor is not 2192.\nAdditional table information: table: voter_2"} +{"question": "SELECT rid FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'United States') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States')", "answer": "What is the id of the routes whose source and destination airports are in the United States?\nAdditional table information: table: flight_4"} +{"question": "SELECT COUNT(DISTINCT roomtype) FROM room", "answer": "Find the number of distinct room types available.\nAdditional table information: table: hospital_1"} +{"question": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1", "answer": "List the name of the aircraft that has been named winning aircraft the most number of times.\nAdditional table information: table: aircraft"} +{"question": "SELECT customer_id, COUNT(*) FROM Customers_cards GROUP BY customer_id", "answer": "Show all customer ids and the number of cards owned by each customer.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Davis' AND t3.lname = 'Steven'", "answer": "What are the names of the clubs that have 'Davis Steven' as a member?\nAdditional table information: table: club_1"} +{"question": "SELECT Shop_Name FROM shop ORDER BY Open_Year ASC NULLS FIRST", "answer": "Return the names of shops, ordered by year of opening ascending.\nAdditional table information: table: device"} +{"question": "SELECT COUNT(DISTINCT t3.product_id) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = 'Rodrick Heaney'", "answer": "Find the number of distinct products Rodrick Heaney has bought so far.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = 'Daan' AND T4.last_name = 'Peeters'", "answer": "List all tracks bought by customer Daan Peeters.\nAdditional table information: table: store_1"} +{"question": "SELECT name FROM enzyme ORDER BY name DESC", "answer": "List the name of enzymes in descending lexicographical order.\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT Residence FROM player WHERE gender = 'M' INTERSECT SELECT Residence FROM player WHERE gender = 'F'", "answer": "Show the residences that have both a player of gender 'M' and a player of gender 'F'.\nAdditional table information: table: riding_club"} +{"question": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2", "answer": "Report all advisors that advise more than 2 students.\nAdditional table information: table: voter_2"} +{"question": "SELECT T2.city, COUNT(*), T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the city name, id, and number of addresses corresponding to the city with the most addressed?\nAdditional table information: table: sakila_1"} +{"question": "SELECT ResTypeName FROM Restaurant_Type", "answer": "List all restaurant types.\nAdditional table information: table: restaurant_1"} +{"question": "SELECT t1.address, t1.shop_id FROM shop AS t1 JOIN happy_hour AS t2 ON t1.shop_id = t2.shop_id WHERE MONTH = 'May'", "answer": "What are the id and address of the shops which have a happy hour in May?\nAdditional table information: table: coffee_shop"} +{"question": "SELECT T2.invoice_number, T2.invoice_date FROM Financial_transactions AS T1 JOIN Invoices AS T2 ON T1.invoice_number = T2.invoice_number GROUP BY T1.invoice_number ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the invoice number and invoice date corresponding to the invoice with the greatest number of transactions?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games", "answer": "What are the ids of all students who played video games and sports?\nAdditional table information: table: game_1"} +{"question": "SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1", "answer": "What is the name of the organization that was formed most recently?\nAdditional table information: table: e_government"} +{"question": "SELECT COUNT(*) FROM BOOKINGS", "answer": "Count the total number of bookings made.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "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", "answer": "Return the ids and details corresponding to projects for which there are more than two documents.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.sex = 'F'", "answer": "Give me the first name and last name for all the female members of the club 'Bootup Baltimore'.\nAdditional table information: table: club_1"} +{"question": "SELECT channel_code, contact_number FROM customer_contact_channels WHERE active_to_date - active_from_date = (SELECT active_to_date - active_from_date FROM customer_contact_channels ORDER BY (active_to_date - active_from_date) DESC LIMIT 1)", "answer": "What is the channel code and contact number of the customer contact channel that was active for the longest time?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T1.account_name, T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan' AND T2.customer_last_name = 'Keeling'", "answer": "What are the names and other details for accounts corresponding to the customer named Meaghan Keeling?\nAdditional table information: table: customers_and_invoices"} +{"question": "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'", "answer": "Which orders are made by the customer named 'Jeramie'? Give me the order ids and status.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT StuID FROM Student WHERE city_code = 'CHI'", "answer": "What are the ids of all students who live in CHI?\nAdditional table information: table: game_1"} +{"question": "SELECT role_name, role_description FROM ROLES WHERE role_code = 'MG'", "answer": "Find the name and description of the role with code 'MG'.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT COUNT(*) FROM Customers_cards WHERE card_type_code = 'Debit'", "answer": "How many debit cards do we have?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010", "answer": "Find the distinct names of wines produced before the year of 2000 or after the year of 2010.\nAdditional table information: table: wine_1"} +{"question": "SELECT COUNT(*) FROM camera_lens WHERE focal_length_mm > 15", "answer": "How many camera lenses have a focal length longer than 15 mm?\nAdditional table information: table: mountain_photos"} +{"question": "SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID", "answer": "List the name of physicians who took some appointment.\nAdditional table information: table: hospital_1"} +{"question": "SELECT T1.name FROM church AS T1 JOIN wedding AS T2 ON T1.church_id = T2.church_id GROUP BY T1.church_id HAVING COUNT(*) >= 2", "answer": "Show all church names that have hosted least two weddings.\nAdditional table information: table: wedding"} +{"question": "SELECT Total FROM body_builder ORDER BY Total ASC NULLS FIRST", "answer": "List the total scores of body builders in ascending order.\nAdditional table information: table: body_builder"} +{"question": "SELECT COUNT(*), flag FROM ship GROUP BY flag", "answer": "Group by ships by flag, and return number of ships that have each flag.\nAdditional table information: table: ship_1"} +{"question": "SELECT Hispanic FROM city WHERE Black > 10", "answer": "What are the percentage of hispanics in cities with the black percentage higher than 10?\nAdditional table information: table: county_public_safety"} +{"question": "SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'A' AND T2.class_code = 10018", "answer": "What is the last name of the student who got a grade A in the class with code 10018.\nAdditional table information: table: college_1"} +{"question": "SELECT zip_code FROM weather GROUP BY zip_code ORDER BY AVG(mean_sea_level_pressure_inches) NULLS FIRST LIMIT 1", "answer": "What is the zip code in which the average mean sea level pressure is the lowest?\nAdditional table information: table: bike_1"} +{"question": "SELECT COUNT(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = 'Australian Grand Prix' AND YEAR = 2009", "answer": "How many drivers participated in the race Australian Grand Prix held in 2009?\nAdditional table information: table: formula_1"} +{"question": "SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the denomination of the school that has the most players.\nAdditional table information: table: school_player"} +{"question": "SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150", "answer": "Find the name of rooms whose base price is between 120 and 150.\nAdditional table information: table: inn_1"} +{"question": "SELECT COUNT(DISTINCT Artist_ID) FROM volume", "answer": "How many distinct artists do the volumes associate to?\nAdditional table information: table: music_4"} +{"question": "SELECT T1.name, COUNT(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id", "answer": "How many regions were affected by each storm?\nAdditional table information: table: storm_record"} +{"question": "SELECT flag FROM ship GROUP BY flag ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the flag that is most common among all ships.\nAdditional table information: table: ship_1"} +{"question": "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)", "answer": "What are the names of scientists who are not working on the project with the most hours?\nAdditional table information: table: scientist_1"} +{"question": "SELECT T2.dept_name, AVG(T1.stu_gpa) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY AVG(T1.stu_gpa) DESC LIMIT 1", "answer": "What is the name and the average gpa of department whose students have the highest average gpa?\nAdditional table information: table: college_1"} +{"question": "SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games", "answer": "Show ids of students who play video game and play sports.\nAdditional table information: table: game_1"} +{"question": "SELECT title FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq)", "answer": "Find the name of the courses that do not have any prerequisite?\nAdditional table information: table: college_2"} +{"question": "SELECT name, Num_of_Component FROM furniture ORDER BY market_rate NULLS FIRST LIMIT 1", "answer": "Find the name and component amount of the least popular furniture.\nAdditional table information: table: manufacturer"} +{"question": "SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35", "answer": "Which nations have both hosts of age above 45 and hosts of age below 35?\nAdditional table information: table: party_host"} +{"question": "SELECT COUNT(*), Competition FROM MATCH GROUP BY Competition", "answer": "For each competition, count the number of matches.\nAdditional table information: table: city_record"} +{"question": "SELECT characteristic_name, other_characteristic_details, characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name, t1.other_characteristic_details, t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id = t2.characteristic_id", "answer": "Give the names, details, and data types of characteristics that are not found in any product.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT DISTINCT name FROM nurse ORDER BY name NULLS FIRST", "answer": "What is the alphabetically ordered list of all the distinct names of nurses?\nAdditional table information: table: hospital_1"} +{"question": "SELECT T2.monthly_rental FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id WHERE T1.state_province_county = 'Texas'", "answer": "What are the monthly rentals of student addresses in Texas state?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING COUNT(*) >= 2", "answer": "List categories that have at least two books after year 1989.\nAdditional table information: table: culture_company"} +{"question": "SELECT Fname, Lname, phone FROM Faculty WHERE Sex = 'F'", "answer": "What are the first name, last name, and phone number of all the female faculty members?\nAdditional table information: table: activity_1"} +{"question": "SELECT Studio FROM film GROUP BY Studio HAVING AVG(Gross_in_dollar) >= 4500000", "answer": "List the studios which average gross is above 4500000.\nAdditional table information: table: film_rank"} +{"question": "SELECT company, main_industry FROM company WHERE headquarters <> 'USA'", "answer": "What are the companies and main industries of all companies that are not headquartered in the United States?\nAdditional table information: table: gas_company"} +{"question": "SELECT MAX(t2.active_to_date) FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Tillman Ernser'", "answer": "What is the 'active to date' of the latest contact channel used by 'Tillman Ernser'?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = 'Balls to the Wall'", "answer": "List name of all tracks in Balls to the Wall.\nAdditional table information: table: store_1"} +{"question": "SELECT t3.headquartered_city, COUNT(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city", "answer": "How many stores are headquarted in each city?\nAdditional table information: table: store_product"} +{"question": "SELECT document_name FROM documents WHERE NOT document_code IN (SELECT document_code FROM document_sections)", "answer": "What are the names of documents that do not have any sections?\nAdditional table information: table: document_management"} +{"question": "SELECT lot_details FROM Lots EXCEPT SELECT T1.lot_details FROM Lots AS T1 JOIN transactions_lots AS T2 ON T1.lot_id = T2.lot_id", "answer": "What are the details of the lots which are not used in any transactions?\nAdditional table information: table: tracking_share_transactions"} +{"question": "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'", "answer": "Show ids for all documents with budget types described as 'Government'.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = 'Marianne' GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the vocal type of the band mate whose first name is 'Marianne' played the most?\nAdditional table information: table: music_2"} +{"question": "SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id = T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type = T4.organisation_type WHERE T2.grant_amount > 5000 AND T4.organisation_type_description = 'Research'", "answer": "Find out the send dates of the documents with the grant amount of more than 5000 were granted by organisation type described\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT phone, postal_code FROM address WHERE address = '1031 Daugavpils Parkway'", "answer": "What is the phone number and postal code of the address 1031 Daugavpils Parkway?\nAdditional table information: table: sakila_1"} +{"question": "SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars = 3 INTERSECT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars = 4", "answer": "What are the names of movies that get 3 star and 4 star?\nAdditional table information: table: movie_1"} +{"question": "SELECT MAX(Number_cities), MIN(Number_cities) FROM market", "answer": "Return the maximum and minimum number of cities across all markets.\nAdditional table information: table: film_rank"} +{"question": "SELECT Studio FROM film WHERE Director = 'Nicholas Meyer' INTERSECT SELECT Studio FROM film WHERE Director = 'Walter Hill'", "answer": "What are the names of studios that have produced films with both Nicholas Meyer and Walter Hill?\nAdditional table information: table: film_rank"} +{"question": "SELECT advisor FROM Student GROUP BY advisor HAVING COUNT(*) >= 2", "answer": "Show all advisors who have at least two students.\nAdditional table information: table: game_1"} +{"question": "SELECT first_name, last_name FROM Maintenance_Engineers WHERE NOT engineer_id IN (SELECT engineer_id FROM Engineer_Visits)", "answer": "Which engineers have never visited to maintain the assets? List the engineer first name and last name.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims)", "answer": "Among all the claims, which settlements have a claimed amount that is no more than the average? List the claim start date.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT T1.student_details FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is detail of the student who registered the most number of courses?\nAdditional table information: table: student_assessment"} +{"question": "SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100", "answer": "What are the names of banks that have loaned money to customers with credit scores below 100?\nAdditional table information: table: loan_1"} +{"question": "SELECT flno FROM Flight WHERE origin = 'Los Angeles'", "answer": "What are the numbers of all flights coming from Los Angeles?\nAdditional table information: table: flight_1"} +{"question": "SELECT first_name, last_name FROM employees ORDER BY birth_date DESC LIMIT 1", "answer": "Who is the youngest employee in the company? List employee's first and last name.\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(*) FROM College", "answer": "How many colleges in total?\nAdditional table information: table: soccer_2"} +{"question": "SELECT t1.title FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID ORDER BY high_estimate DESC LIMIT 1", "answer": "What is the title of the film that has the highest high market estimation.\nAdditional table information: table: film_rank"} +{"question": "SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed", "answer": "Show the ids of all employees who have destroyed a document.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT AVG(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University'", "answer": "What is the average height of the players from the college named 'Yale University'?\nAdditional table information: table: baseball_1"} +{"question": "SELECT title FROM film WHERE rating = 'R'", "answer": "What are all the movies rated as R? List the titles.\nAdditional table information: table: sakila_1"} +{"question": "SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id > 8", "answer": "Name all the products with next entry ID greater than 8.\nAdditional table information: table: product_catalog"} +{"question": "SELECT title FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq)", "answer": "What are the names of courses without prerequisites?\nAdditional table information: table: college_2"} +{"question": "SELECT customer_details FROM customers WHERE customer_details LIKE '%Diana%'", "answer": "Find the names of customers whose name contains 'Diana'.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT hotel_id, star_rating_code FROM HOTELS ORDER BY price_range ASC NULLS FIRST", "answer": "Show the id and star rating of each hotel, ordered by its price from low to high.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT name FROM Person WHERE age > (SELECT MIN(age) FROM person WHERE job = 'engineer') ORDER BY age NULLS FIRST", "answer": "What is the name of all the people who are older than at least one engineer? Order them by age.\nAdditional table information: table: network_2"} +{"question": "SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = 'Clara')", "answer": "What are the full names and hire dates for employees in the same department as someone with the first name Clara?\nAdditional table information: table: hr_1"} +{"question": "SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC", "answer": "What are the companies of entrepreneurs, ordered descending by amount of money requested?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT * FROM employees WHERE hire_date < '2002-06-21'", "answer": "display all the details from Employees table for those employees who was hired before 2002-06-21.\nAdditional table information: table: hr_1"} +{"question": "SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId", "answer": "Find the names of artists that do not have any albums.\nAdditional table information: table: chinook_1"} +{"question": "SELECT T1.name, T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T2.balance DESC LIMIT 3", "answer": "What are names and savings balances of the three accounts with the highest savings balances?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT COUNT(*) FROM HOTELS", "answer": "Find the total number of available hotels.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT Rank FROM FACULTY GROUP BY Rank ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Find the rank of the faculty that the fewest faculties belong to.\nAdditional table information: table: college_3"} +{"question": "SELECT name FROM races ORDER BY date DESC LIMIT 1", "answer": "What is the name of the race held most recently?\nAdditional table information: table: formula_1"} +{"question": "SELECT transaction_type_code, MAX(share_count), MIN(share_count) FROM TRANSACTIONS GROUP BY transaction_type_code", "answer": "Show the maximum and minimum share count of different transaction types.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT song_name FROM song WHERE languages = 'english'", "answer": "What are the names of all songs in English?\nAdditional table information: table: music_1"} +{"question": "SELECT COUNT(*) FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE T1.participant_details LIKE '%Dr.%'", "answer": "How many events had participants whose details had the substring 'Dr.'\nAdditional table information: table: local_govt_in_alabama"} +{"question": "SELECT AVG(no_of_customers) FROM bank", "answer": "Find the average number of customers cross all banks.\nAdditional table information: table: loan_1"} +{"question": "SELECT T2.name, AVG(T1.age) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend GROUP BY T2.name ORDER BY AVG(T1.age) DESC LIMIT 1", "answer": "Which person whose friends have the oldest average age?\nAdditional table information: table: network_2"} +{"question": "SELECT T1.id, COUNT(*) FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id GROUP BY T1.id", "answer": "How many games has each stadium held?\nAdditional table information: table: game_injury"} +{"question": "SELECT major FROM Student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the largest major?\nAdditional table information: table: allergy_1"} +{"question": "SELECT pets_allowed_yn, AVG(price_range) FROM HOTELS GROUP BY pets_allowed_yn", "answer": "Show the average price of hotels for different pet policy.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000", "answer": "What are the investors who have invested in both entrepreneurs who requested more than 140000 and entrepreneurs who requested less than 120000?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT DISTINCT headquarter FROM manufacturers", "answer": "What are the different cities listed?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'CIS-220' INTERSECT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'QM-261'", "answer": "Find the first name of the professor who is teaching two courses with code CIS-220 and QM-261.\nAdditional table information: table: college_1"} +{"question": "SELECT T1.employee_id, T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id", "answer": "Find employee with ID and name of the country presently where (s)he is working.\nAdditional table information: table: hr_1"} +{"question": "SELECT Name FROM People ORDER BY Weight ASC NULLS FIRST", "answer": "Return the names of people, ordered by weight ascending.\nAdditional table information: table: entrepreneur"} +{"question": "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'", "answer": "How much in total does customer with first name as Carole and last name as Bernhard paid?\nAdditional table information: table: driving_school"} +{"question": "SELECT COUNT(*) FROM DEPARTMENT WHERE Division = 'AS'", "answer": "How many departments are in the division AS?\nAdditional table information: table: college_3"} +{"question": "SELECT COUNT(*), T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name", "answer": "For each airport name, how many routes start at that airport?\nAdditional table information: table: flight_4"} +{"question": "SELECT name FROM accounts ORDER BY name NULLS FIRST", "answer": "List all customers\u2019 names in the alphabetical order.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT MAX(height), AVG(height) FROM mountain", "answer": "What are the maximum and average height of the mountains?\nAdditional table information: table: mountain_photos"} +{"question": "SELECT product_id FROM Order_Items GROUP BY product_id HAVING COUNT(*) > 3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING SUM(total_amount_purchased) > 80000", "answer": "What are the ids of all products that were either ordered more than 3 times or have a cumulative amount purchased of above 80000?\nAdditional table information: table: department_store"} +{"question": "SELECT T3.Player_name, T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID", "answer": "Show the names of players and names of their coaches.\nAdditional table information: table: riding_club"} +{"question": "SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars >= 4 ORDER BY T1.year NULLS FIRST", "answer": "In what years did a movie receive a 4 or 5 star rating, and list the years from oldest to most recently?\nAdditional table information: table: movie_1"} +{"question": "SELECT COUNT(*) FROM customers", "answer": "How many customers are there?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT COUNT(*), T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name", "answer": "What are the names of customers with accounts, and how many checking accounts do each of them have?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT name FROM buildings ORDER BY Height DESC", "answer": "List the names of buildings in descending order of building height.\nAdditional table information: table: company_office"} +{"question": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the code of the card type that is most common.\nAdditional table information: table: customers_card_transactions"} +{"question": "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'", "answer": "What are the titles of movies and books corresponding to companies incorporated in China?\nAdditional table information: table: culture_company"} +{"question": "SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid HAVING COUNT(*) > 1", "answer": "Which physicians are in charge of more than one patient? Give me their names.\nAdditional table information: table: hospital_1"} +{"question": "SELECT T1.name, T3.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T2.PrimaryAffiliation = 1", "answer": "What are the name and primarily affiliated department name of each physician?\nAdditional table information: table: hospital_1"} +{"question": "SELECT T2.Name, T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID", "answer": "Show the names of trains and locations of railways they are in.\nAdditional table information: table: railway"} +{"question": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Boeing 737-800'", "answer": "What are the names of all employees who have a certificate to fly Boeing 737-800?\nAdditional table information: table: flight_1"} +{"question": "SELECT Nationality, Age FROM journalist", "answer": "What are the nationalities and ages of journalists?\nAdditional table information: table: news_report"} +{"question": "SELECT Name FROM editor WHERE NOT editor_id IN (SELECT editor_id FROM journal_committee)", "answer": "List the names of editors that are not on any journal committee.\nAdditional table information: table: journal_committee"} +{"question": "SELECT order_id, COUNT(DISTINCT product_id) FROM Order_items GROUP BY order_id", "answer": "Show order ids and the number of products in each order.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID", "answer": "What are the names of body builders?\nAdditional table information: table: body_builder"} +{"question": "SELECT COUNT(*) FROM Student WHERE age > 18 AND NOT StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food' OR T2.allergytype = 'animal')", "answer": "How many students are over 18 and do not have allergy to food type or animal type?\nAdditional table information: table: allergy_1"} +{"question": "SELECT DISTINCT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' OR T2.friend = 'Alice'", "answer": "Find the name and age of the person who is a friend of Dan or Alice.\nAdditional table information: table: network_2"} +{"question": "SELECT COUNT(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Blanche' AND T2.customer_last_name = 'Huels' AND T1.card_type_code = 'Credit'", "answer": "Count the number of credit cards that the customer with first name Blanche and last name Huels has.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT email_address FROM Students WHERE first_name = 'Emma' AND last_name = 'Rohan'", "answer": "What is the email of the student with first name 'Emma' and last name 'Rohan'?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT id, duration FROM trip ORDER BY duration DESC LIMIT 3", "answer": "What are the ids and durations of the trips with the top 3 durations?\nAdditional table information: table: bike_1"} +{"question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'CHRISSY' AND T1.lastname = 'NABOZNY'", "answer": "Find the number of teachers who teach the student called CHRISSY NABOZNY.\nAdditional table information: table: student_1"} +{"question": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the characteristic name used by most number of the products?\nAdditional table information: table: products_gen_characteristics"} +{"question": "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'", "answer": "Find the venue of the competition '1994 FIFA World Cup qualification' which was hosted by 'Nanjing ( Jiangsu )'.\nAdditional table information: table: city_record"} +{"question": "SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the payment method that is used the most often in all the invoices. Give me its code.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT composer FROM tracks WHERE name = 'Fast As a Shark'", "answer": "What is the composer who created the track 'Fast As a Shark'?\nAdditional table information: table: store_1"} +{"question": "SELECT name FROM procedures WHERE cost < 5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen'", "answer": "What procedures cost less than 5000 and have John Wen as a trained physician?\nAdditional table information: table: hospital_1"} +{"question": "SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the people that have been governor the most times.\nAdditional table information: table: election"} +{"question": "SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC NULLS FIRST", "answer": "List the total number of horses on farms in ascending order.\nAdditional table information: table: farm"} +{"question": "SELECT login_name, family_name FROM Course_Authors_and_Tutors", "answer": "What are the login names and family names of course author and tutors?\nAdditional table information: table: e_learning"} +{"question": "SELECT COUNT(DISTINCT nationality) FROM swimmer", "answer": "How many different countries are all the swimmers from?\nAdditional table information: table: swimming"} +{"question": "SELECT T2.Name, T1.Date FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID", "answer": "What are the names of representatives and the dates of elections they participated in.\nAdditional table information: table: election_representative"} +{"question": "SELECT rank FROM Faculty GROUP BY rank ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Find the faculty rank that has the least members.\nAdditional table information: table: activity_1"} +{"question": "SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.Fname = 'David' AND T2.Lname = 'Shieber'", "answer": "Show total hours per week and number of games played for student David Shieber.\nAdditional table information: table: game_1"} +{"question": "SELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_price > 2000", "answer": "What are the order details of the products with price higher than 2000?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT DISTINCT building FROM Faculty", "answer": "What buildings have faculty offices?\nAdditional table information: table: activity_1"} +{"question": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC", "answer": "What are the names of actors ordered descending by the year in which their musical was awarded?\nAdditional table information: table: musical"} +{"question": "SELECT DISTINCT instrument FROM Instruments", "answer": "What are all the instruments used?\nAdditional table information: table: music_2"} +{"question": "SELECT name FROM Reviewer UNION SELECT title FROM Movie", "answer": "Return all reviewer names and movie names together in a single list.\nAdditional table information: table: movie_1"} +{"question": "SELECT COUNT(*) FROM Person WHERE gender = 'female'", "answer": "How many females does this network has?\nAdditional table information: table: network_2"} +{"question": "SELECT T1.claim_id, T1.date_claim_made, COUNT(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the claim id and claim date of the claim that incurred the most settlement count. Also tell me the count.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT Name FROM Products", "answer": "Select the names of all the products in the store.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT COUNT(*) FROM Settlements", "answer": "How many settlements are there in total?\nAdditional table information: table: insurance_policies"} +{"question": "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'", "answer": "How many lessons taken by customer with first name as Rylan and last name as Goodwin were completed?\nAdditional table information: table: driving_school"} +{"question": "SELECT rank, company, market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion NULLS FIRST, profits_billion NULLS FIRST", "answer": "What is the rank, company, and market value of every comapny in the banking industry ordered by sales and profits?\nAdditional table information: table: gas_company"} +{"question": "SELECT customer_details FROM customers EXCEPT SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id", "answer": "Find the names of customers who have no policies associated.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT SUM(grant_amount), organisation_id FROM Grants GROUP BY organisation_id", "answer": "What is the total amount of grants given by each organisations? Also list the organisation id.\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT T1.id, T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id GROUP BY T1.id HAVING COUNT(*) >= 2", "answer": "What are the id and name of the mountains that have at least 2 photos?\nAdditional table information: table: mountain_photos"} +{"question": "SELECT MAX(t2.active_to_date) FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Tillman Ernser'", "answer": "Return the the 'active to date' of the latest contact channel used by the customer named 'Tillman Ernser'.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T1.driverid, T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the ids and last names of all drivers who participated in the most races?\nAdditional table information: table: formula_1"} +{"question": "SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which payment method is used by most customers?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses", "answer": "What are the names of all cities and states?\nAdditional table information: table: e_government"} +{"question": "SELECT country FROM customers WHERE first_name = 'Roberto' AND last_name = 'Almeida'", "answer": "What country does Roberto Almeida live?\nAdditional table information: table: store_1"} +{"question": "SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Morning' INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Night'", "answer": "Who are the owners of the programs that broadcast both in the morning and at night?\nAdditional table information: table: program_share"} +{"question": "SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%' ORDER BY department_id NULLS FIRST", "answer": "What are the full name, hire data, salary and department id for employees without the letter M in their first name, ordered by ascending department id?\nAdditional table information: table: hr_1"} +{"question": "SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Who is the nominee who has been nominated for the most musicals?\nAdditional table information: table: musical"} +{"question": "SELECT T1.White, T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID", "answer": "What are the white percentages of cities, and the corresponding crime rates of the counties they correspond to?\nAdditional table information: table: county_public_safety"} +{"question": "SELECT campus FROM campuses WHERE county = 'Los Angeles' AND YEAR > 1950", "answer": "What campuses are located in Los Angeles county and opened after 1950?\nAdditional table information: table: csu_1"} +{"question": "SELECT T2.Year, T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID", "answer": "Show the years and the official names of the host cities of competitions.\nAdditional table information: table: farm"} +{"question": "SELECT Studio, COUNT(*) FROM film GROUP BY Studio", "answer": "List the studios of each film and the number of films produced by that studio.\nAdditional table information: table: film_rank"} +{"question": "SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price > (SELECT AVG(Product_Price) FROM PRODUCTS)", "answer": "What are the distinct names of the products that cost more than the average?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT fname, lname FROM Faculty WHERE Rank = 'Instructor'", "answer": "Show the first name and last name for all the instructors.\nAdditional table information: table: activity_1"} +{"question": "SELECT T2.Season, T2.Player, T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country", "answer": "For each player, what are their name, season, and country that they belong to?\nAdditional table information: table: match_season"} +{"question": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID HAVING COUNT(*) >= 3", "answer": "Find the names of all reviewers who have contributed three or more ratings.\nAdditional table information: table: movie_1"} +{"question": "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", "answer": "Which customers have made at least two orders? Give me each customer name and number of orders made.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT team_name FROM basketball_match ORDER BY All_Home DESC", "answer": "List names of all teams in the basketball competition, ordered by all home scores in descending order.\nAdditional table information: table: university_basketball"} +{"question": "SELECT name FROM captain ORDER BY age DESC", "answer": "What are the names of captains, sorted by age descending?\nAdditional table information: table: ship_1"} +{"question": "SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room'", "answer": "Find the name of dorms which have TV Lounge but no Study Room as amenity.\nAdditional table information: table: dorm_1"} +{"question": "SELECT t1.name FROM stadium AS t1 JOIN event AS t2 ON t1.id = t2.stadium_id GROUP BY t2.stadium_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the stadium which held the most events?\nAdditional table information: table: swimming"} +{"question": "SELECT name, job FROM Person ORDER BY name NULLS FIRST", "answer": "list the name, job title of all people ordered by their names.\nAdditional table information: table: network_2"} +{"question": "SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant'", "answer": "What are the names of captains that have either the rank Midshipman or Lieutenant?\nAdditional table information: table: ship_1"} +{"question": "SELECT project_id FROM Documents GROUP BY project_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Return the id of the project that has the fewest corresponding documents.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT COUNT(DISTINCT T3.title) FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.type = 'Studio'", "answer": "How many songs appear in studio albums?\nAdditional table information: table: music_2"} +{"question": "SELECT transaction_id FROM Financial_transactions WHERE transaction_amount > (SELECT AVG(transaction_amount) FROM Financial_transactions)", "answer": "Show ids for all transactions whose amounts are greater than the average.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT T2.Fname, T2.Lname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID = T2.StuID WHERE T1.DNO = 140", "answer": "What are the first names and last names of the students that minor in the department with DNO 140.\nAdditional table information: table: college_3"} +{"question": "SELECT SUM(access_count) FROM documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the total access count of documents that are of the most common document type?\nAdditional table information: table: document_management"} +{"question": "SELECT date, zip_code FROM weather WHERE min_dew_point_f < (SELECT MIN(min_dew_point_f) FROM weather WHERE zip_code = 94107)", "answer": "On which day and in which zip code was the min dew point lower than any day in zip code 94107?\nAdditional table information: table: bike_1"} +{"question": "SELECT COUNT(DISTINCT school_code) FROM department", "answer": "how many schools exist in total?\nAdditional table information: table: college_1"} +{"question": "SELECT AVG(Age) FROM manager", "answer": "What is the average age for all managers?\nAdditional table information: table: railway"} +{"question": "SELECT Name FROM mountain WHERE NOT Mountain_ID IN (SELECT Mountain_ID FROM climber)", "answer": "What are the names of countains that no climber has climbed?\nAdditional table information: table: climbing"} +{"question": "SELECT first_name, department_id FROM employees WHERE last_name = 'McEwen'", "answer": "Display the first name, and department number for all employees whose last name is 'McEwen'.\nAdditional table information: table: hr_1"} +{"question": "SELECT College FROM match_season WHERE POSITION = 'Midfielder' INTERSECT SELECT College FROM match_season WHERE POSITION = 'Defender'", "answer": "Return the colleges that have players who play the Midfielder position, as well as players who play the Defender position.\nAdditional table information: table: match_season"} +{"question": "SELECT FacID FROM Faculty WHERE Sex = 'M'", "answer": "What are the faculty ids of all the male faculty members?\nAdditional table information: table: activity_1"} +{"question": "SELECT LOCATION, COUNT(*) FROM gas_station GROUP BY LOCATION ORDER BY COUNT(*) NULLS FIRST", "answer": "Show all locations and the number of gas stations in each location ordered by the count.\nAdditional table information: table: gas_company"} +{"question": "SELECT DISTINCT cName FROM tryout ORDER BY cName NULLS FIRST", "answer": "Find the name of different colleges involved in the tryout in alphabetical order.\nAdditional table information: table: soccer_2"} +{"question": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Democratic' INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Liberal'", "answer": "Which committees have delegates from both democratic party and liberal party?\nAdditional table information: table: election"} +{"question": "SELECT COUNT(*) FROM rooms WHERE NOT roomid IN (SELECT DISTINCT room FROM reservations)", "answer": "Find the number of rooms that do not have any reservation.\nAdditional table information: table: inn_1"} +{"question": "SELECT Notes FROM \"regional_marketing\" WHERE current_slogan = 'SOUTH AUSTRALIA'", "answer": "Tell me what the notes are for South Australia. \nAdditional table information: table: regional_marketing\ncolumns: state_territory, text_bg_color, format, current_slogan, current_series, Notes"} +{"question": "SELECT MAX(T2.gradepoint), MIN(T2.gradepoint) FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.city_code = 'NYC'", "answer": "Give the maximum and minimum gradepoints for students living in NYC?\nAdditional table information: table: college_3"} +{"question": "SELECT COUNT(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Columbus Crew'", "answer": "Count the number of different colleges that players who play for Columbus Crew are from.\nAdditional table information: table: match_season"} +{"question": "SELECT StuID FROM Student WHERE major = 600 INTERSECT SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'", "answer": "Show student ids who are on scholarship and have major 600.\nAdditional table information: table: game_1"} +{"question": "SELECT hotel_id, star_rating_code FROM HOTELS ORDER BY price_range ASC NULLS FIRST", "answer": "Find the id and star rating of each hotel and sort them in increasing order of price.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT COUNT(DISTINCT President_Vote) FROM VOTING_RECORD", "answer": "Find the distinct number of president votes.\nAdditional table information: table: voter_2"} +{"question": "SELECT rank FROM captain GROUP BY rank ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the rank for which there are the fewest captains.\nAdditional table information: table: ship_1"} +{"question": "SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance NULLS FIRST", "answer": "Find the total checking and saving balance of all accounts sorted by the total balance in ascending order.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT name, total_passengers FROM station WHERE LOCATION <> 'London'", "answer": "Show the names and total passengers for all train stations not in London.\nAdditional table information: table: train_station"} +{"question": "SELECT roomName FROM Rooms ORDER BY basePrice NULLS FIRST", "answer": "List the name of all rooms sorted by their prices.\nAdditional table information: table: inn_1"} +{"question": "SELECT Name FROM Representative WHERE Party <> 'Republican'", "answer": "What are the names of representatives whose party is not 'Republican'?\nAdditional table information: table: election_representative"} +{"question": "SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees)", "answer": "Find the count of universities whose campus fee is greater than the average campus fee.\nAdditional table information: table: csu_1"} +{"question": "SELECT t3.characteristic_name, t3.characteristic_data_type FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'cumin'", "answer": "What are the names and data types of the characteristics of the 'cumin' product?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC", "answer": "What are the names of all pilots 30 years old or young in descending alphabetical order?\nAdditional table information: table: aircraft"} +{"question": "SELECT COUNT(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'", "answer": "How many cities are in Australia?\nAdditional table information: table: sakila_1"} +{"question": "SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2", "answer": "Show the team that have at least two technicians.\nAdditional table information: table: machine_repair"} +{"question": "SELECT COUNT(*) FROM Financial_transactions", "answer": "How many transactions do we have?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT COUNT(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'", "answer": "Count the number of cities in Australia.\nAdditional table information: table: sakila_1"} +{"question": "SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major <> 600 AND Sex = 'F'", "answer": "List all female students age is older than 18 who is not majoring in 600. List students' first name and last name.\nAdditional table information: table: restaurant_1"} +{"question": "SELECT vehicle_id FROM Vehicles", "answer": "List all vehicle id\nAdditional table information: table: driving_school"} +{"question": "SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1", "answer": "What are the ids of the students who registered for course 301 most recently?\nAdditional table information: table: student_assessment"} +{"question": "SELECT * FROM student_course_registrations WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance)", "answer": "What are all details of the students who registered but did not attend any course?\nAdditional table information: table: student_assessment"} +{"question": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported > (SELECT MAX(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = 'Rylan' AND T4.staff_last_name = 'Homenick')", "answer": "Find the ids of the problems reported after the date of any problems reported by the staff Rylan Homenick.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT First_year, Last_year FROM party WHERE Party_Theme = 'Spring' OR Party_Theme = 'Teqnology'", "answer": "Show the first year and last year of parties with theme 'Spring' or 'Teqnology'.\nAdditional table information: table: party_host"} +{"question": "SELECT * FROM election", "answer": "Return all the information for each election record.\nAdditional table information: table: election"} +{"question": "SELECT COUNT(*) FROM medicine WHERE FDA_approved = 'No'", "answer": "How many medicines have the FDA approval status 'No' ?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT COUNT(*) FROM device", "answer": "How many devices are there?\nAdditional table information: table: device"} +{"question": "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", "answer": "Return the party email that has used party services the greatest number of times.\nAdditional table information: table: e_government"} +{"question": "SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Return the id and full name of the customer who has the fewest accounts.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT T2.product_name, COUNT(*) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T3.order_id = T1.order_id GROUP BY T2.product_name", "answer": "What are teh names of the different products, as well as the number of customers who have ordered each product.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT t2.section_title FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code WHERE t1.document_name = 'David CV'", "answer": "What are all the section titles of the document named 'David CV'?\nAdditional table information: table: document_management"} +{"question": "SELECT COUNT(DISTINCT dept_address), school_code FROM department GROUP BY school_code", "answer": "How many different locations does each school have?\nAdditional table information: table: college_1"} +{"question": "SELECT T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID WHERE T2.Type = 'Program Talent Show'", "answer": "Show the names of festivals that have nominated artworks of type 'Program Talent Show'.\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT COUNT(*) FROM Flight", "answer": "How many flights do we have?\nAdditional table information: table: flight_1"} +{"question": "SELECT Gender, Occupation FROM player", "answer": "What are the gender and occupation of players?\nAdditional table information: table: riding_club"} +{"question": "SELECT COUNT(DISTINCT StuID) FROM Plays_games", "answer": "How many students play video games?\nAdditional table information: table: game_1"} +{"question": "SELECT COUNT(*) FROM Documents WHERE document_status_code = 'done'", "answer": "How many documents have the status code done?\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance", "answer": "What are the id of students who registered courses or attended courses?\nAdditional table information: table: student_assessment"} +{"question": "SELECT SUM(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = 'San Jose State University'", "answer": "How many undergraduates are there in 'San Jose State University' in year 2004?\nAdditional table information: table: csu_1"} +{"question": "SELECT T1.customer_id, T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 3", "answer": "What are the id and details of the customers who have at least 3 events?\nAdditional table information: table: local_govt_and_lot"} +{"question": "SELECT COUNT(*), address FROM member GROUP BY address", "answer": "Find the number of members living in each address.\nAdditional table information: table: coffee_shop"} +{"question": "SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500", "answer": "What are the names of players who train between 500 and 1500 hours?\nAdditional table information: table: soccer_2"} +{"question": "SELECT id FROM station WHERE city = 'San Francisco' INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING AVG(bikes_available) > 10", "answer": "What are the ids of the stations in San Francisco that normally have more than 10 bikes available?\nAdditional table information: table: bike_1"} +{"question": "SELECT AVG(credit_score) FROM customer WHERE NOT cust_id IN (SELECT cust_id FROM loan)", "answer": "What is the average credit score for customers who have never taken a loan?\nAdditional table information: table: loan_1"} +{"question": "SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Accounts)", "answer": "Show the number of all customers without an account.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT T1.course_description, T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) > 2", "answer": "Return the descriptions and names of the courses that have more than two students enrolled in.\nAdditional table information: table: e_learning"} +{"question": "SELECT COUNT(DISTINCT allergy) FROM Allergy_type", "answer": "How many allergies are there?\nAdditional table information: table: allergy_1"} +{"question": "SELECT COUNT(*) FROM postseason WHERE YEAR = 1885 AND ties = 1", "answer": "Find the number of tied games (the value of 'ties' is '1') in 1885 postseason.\nAdditional table information: table: baseball_1"} +{"question": "SELECT address FROM member EXCEPT SELECT address FROM member WHERE Membership_card = 'Black'", "answer": "Which address do not have any member with the black membership card?\nAdditional table information: table: coffee_shop"} +{"question": "SELECT date, mean_temperature_f, mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3", "answer": "What are the date, mean temperature and mean humidity for the top 3 days with the largest max gust speeds?\nAdditional table information: table: bike_1"} +{"question": "SELECT title, Studio FROM film WHERE Studio LIKE '%Universal%'", "answer": "What are the titles and studios of films that have been produced by a studio whose name contains 'Universal'?\nAdditional table information: table: film_rank"} +{"question": "SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn' INTERSECT SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Triton'", "answer": "Show the names of donors who donated to both school 'Glenn' and 'Triton.'\nAdditional table information: table: school_finance"} +{"question": "SELECT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds NULLS FIRST LIMIT 1", "answer": "What is the forename and surname of the driver with the shortest laptime?\nAdditional table information: table: formula_1"} +{"question": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What type has the most games?\nAdditional table information: table: game_1"} +{"question": "SELECT T1.personal_name, T1.family_name, T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the personal name, family name, and author ID of the course author who teaches the most courses?\nAdditional table information: table: e_learning"} +{"question": "SELECT COUNT(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'", "answer": "What is the number of different different airports that are destinations for American Airlines?\nAdditional table information: table: flight_4"} +{"question": "SELECT COUNT(DISTINCT language_id) FROM film", "answer": "Count the number of different languages in these films.\nAdditional table information: table: sakila_1"} +{"question": "SELECT employee_ID FROM Employees WHERE employee_name = 'Ebba'", "answer": "What is the id for the employee called Ebba?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = 'Female' AND T2.languages = 'bangla'", "answer": "What is the country of origin of the artist who is female and produced a song in Bangla?\nAdditional table information: table: music_1"} +{"question": "SELECT DISTINCT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 1 EXCEPT SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'OTHA' AND T2.lastname = 'MOYER'", "answer": "Find all first-grade students who are NOT taught by OTHA MOYER. Report their first and last names.\nAdditional table information: table: student_1"} +{"question": "SELECT Date FROM performance ORDER BY Attendance DESC LIMIT 1", "answer": "What is the date of the performance with the highest number of attendees?\nAdditional table information: table: performance_attendance"} +{"question": "SELECT T2.name, T2.year FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T1.driverid = T3.driverid WHERE T3.forename = 'Lewis'", "answer": "What are the names and years of all races that had a driver with the last name Lewis?\nAdditional table information: table: formula_1"} +{"question": "SELECT T1.Location, T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID", "answer": "What are the location and nickname of each school?\nAdditional table information: table: school_player"} +{"question": "SELECT AVG(followers) FROM user_profiles WHERE NOT UID IN (SELECT UID FROM tweets)", "answer": "Find the average number of followers for the users who do not have any tweet.\nAdditional table information: table: twitter_1"} +{"question": "SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the account id with most number of transactions.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT DISTINCT classroom FROM list WHERE grade = 5", "answer": "Show me the classrooms grade 5 is using.\nAdditional table information: table: student_1"} +{"question": "SELECT T1.title, T1.director FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title ORDER BY T1.director NULLS FIRST, T1.title NULLS FIRST", "answer": "For all directors who have directed more than one movie, what movies have they directed and what are their names?\nAdditional table information: table: movie_1"} +{"question": "SELECT StuID FROM Student WHERE sex = 'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname = 'Football'", "answer": "Show all male student ids who don't play football.\nAdditional table information: table: game_1"} +{"question": "SELECT Name FROM county_public_safety ORDER BY Population DESC", "answer": "What are the names of the counties of public safety, ordered by population descending?\nAdditional table information: table: county_public_safety"} +{"question": "SELECT DISTINCT building FROM classroom WHERE capacity > 50", "answer": "What are the distinct buildings with capacities of greater than 50?\nAdditional table information: table: college_2"} +{"question": "SELECT AVG(price) FROM products WHERE manufacturer = 2", "answer": "Compute the average price of all products with manufacturer code equal to 2.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT COUNT(DISTINCT dept_address), school_code FROM department GROUP BY school_code", "answer": "Count different addresses of each school.\nAdditional table information: table: college_1"} +{"question": "SELECT T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Which kind of part has the least number of faults? List the part name.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT country FROM airport GROUP BY country HAVING COUNT(*) > 2", "answer": "which countries have more than 2 airports?\nAdditional table information: table: flight_company"} +{"question": "SELECT t1.payment_method FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY SUM(t3.order_quantity) NULLS FIRST LIMIT 1", "answer": "Tell me the payment method used by the customer who ordered the least amount of goods in total.\nAdditional table information: table: customers_and_addresses"} +{"question": "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'", "answer": "What are the distinct types of mills that are built by American or Canadian architects?\nAdditional table information: table: architecture"} +{"question": "SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the investor who have invested in the greatest number of entrepreneurs.\nAdditional table information: table: entrepreneur"} +{"question": "SELECT T2.Hardware_Model_name, T2.Company_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T1.Launch_year = 2002 OR T1.RAM_MiB > 32", "answer": "List the hardware model name and company name for all the phones that were launched in year 2002 or have RAM size greater than 32.\nAdditional table information: table: phone_1"} +{"question": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.firstname = 'Solveig' AND T2.title = 'A Bar In Amsterdam'", "answer": "Which vocal type did the musician with first name 'Solveig' played in the song with title 'A Bar in Amsterdam'?\nAdditional table information: table: music_2"} +{"question": "SELECT T1.campus, SUM(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T2.year >= 1998 AND T2.year <= 2002 GROUP BY T1.campus", "answer": "report the total number of degrees granted between 1998 and 2002.\nAdditional table information: table: csu_1"} +{"question": "SELECT order_id, COUNT(*) FROM Invoices GROUP BY order_id", "answer": "How many invoices correspond to each order id?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT name FROM captain ORDER BY age DESC", "answer": "Sort all captain names by their ages from old to young.\nAdditional table information: table: ship_1"} +{"question": "SELECT T2.lot_id, AVG(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id ORDER BY AVG(amount_of_transaction) NULLS FIRST", "answer": "Show the average amount of transactions for different lots, ordered by average amount of transactions.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id", "answer": "What are the different cities where people live?\nAdditional table information: table: student_assessment"} +{"question": "SELECT name FROM artist WHERE NOT artist_id IN (SELECT artist_id FROM exhibition)", "answer": "What are the names of artists that have not had any exhibitions?\nAdditional table information: table: theme_gallery"} +{"question": "SELECT COUNT(*), T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand", "answer": "Find the number of medications prescribed for each brand.\nAdditional table information: table: hospital_1"} +{"question": "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", "answer": "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.\nAdditional table information: table: activity_1"} +{"question": "SELECT COUNT(*) FROM Movie WHERE YEAR < 2000", "answer": "How many movies were made before 2000?\nAdditional table information: table: movie_1"} +{"question": "SELECT classroom, COUNT(DISTINCT grade) FROM list GROUP BY classroom", "answer": "For each classroom, report the classroom number and the number of grades using it.\nAdditional table information: table: student_1"} +{"question": "SELECT major, COUNT(*) FROM Student GROUP BY major", "answer": "Show all majors and corresponding number of students.\nAdditional table information: table: allergy_1"} +{"question": "SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE '%film%'", "answer": "Which location names contain the word 'film'?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT COUNT(*), building FROM classroom WHERE capacity > 50 GROUP BY building", "answer": "How many rooms in each building have a capacity of over 50?\nAdditional table information: table: college_2"} +{"question": "SELECT t1.product_name, t1.typical_buying_price, t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = 'yellow'", "answer": "Return the names and typical buying and selling prices for products that have 'yellow' as their color description.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT title FROM Movie WHERE director = 'Steven Spielberg'", "answer": "What are the names of all movies directed by Steven Spielberg?\nAdditional table information: table: movie_1"} +{"question": "SELECT subject_name FROM SUBJECTS", "answer": "List all the subject names.\nAdditional table information: table: e_learning"} +{"question": "SELECT DISTINCT address_type_code FROM customer_addresses", "answer": "What are the distinct address type codes for all customer addresses?\nAdditional table information: table: customers_campaigns_ecommerce"} +{"question": "SELECT T1.emp_fname FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History' EXCEPT SELECT T4.emp_fname FROM employee AS T4 JOIN CLASS AS T5 ON T4.emp_num = T5.prof_num", "answer": "What is the first names of the professors from the history department who do not teach a class.\nAdditional table information: table: college_1"} +{"question": "SELECT name, openning_year FROM cinema ORDER BY openning_year DESC", "answer": "Show all the cinema names and opening years in descending order of opening year.\nAdditional table information: table: cinema"} +{"question": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING COUNT(*) > 60", "answer": "What are the names of rooms whose reservation frequency exceeds 60 times?\nAdditional table information: table: inn_1"} +{"question": "SELECT Party, COUNT(*) FROM people GROUP BY Party", "answer": "Show different parties of people along with the number of people in each party.\nAdditional table information: table: debate"} +{"question": "SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = 'Fail'", "answer": "What are the completion dates of all the tests that have result 'Fail'?\nAdditional table information: table: e_learning"} +{"question": "SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50", "answer": "Which parties have hosts of age above 50? Give me the party locations.\nAdditional table information: table: party_host"} +{"question": "SELECT DISTINCT name FROM instructor ORDER BY name NULLS FIRST", "answer": "List in alphabetic order the names of all distinct instructors.\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(*) FROM region", "answer": "Count the number of regions.\nAdditional table information: table: party_people"} +{"question": "SELECT T2.Name, T1.Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID", "answer": "Show the names of members and names of colleges they go to.\nAdditional table information: table: decoration_competition"} +{"question": "SELECT COUNT(*) FROM tryout WHERE pPos = 'goalie'", "answer": "How many students whose are playing the role of goalie?\nAdditional table information: table: soccer_2"} +{"question": "SELECT COUNT(*) FROM institution WHERE NOT institution_id IN (SELECT institution_id FROM protein)", "answer": "How many institutions do not have an associated protein in our record?\nAdditional table information: table: protein_institute"} +{"question": "SELECT dorm_name FROM dorm WHERE gender = 'F'", "answer": "Find the name of dorms only for female (F gender).\nAdditional table information: table: dorm_1"} +{"question": "SELECT T2.apt_type_code, T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = 'Kyle'", "answer": "What apartment type codes and apartment numbers do the buildings managed by 'Kyle' have?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC NULLS FIRST LIMIT 1", "answer": "Of all the claims, what was the earliest date when any claim was made?\nAdditional table information: table: insurance_policies"} +{"question": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = 'keyboard'", "answer": "List the names of all the distinct customers who bought a keyboard.\nAdditional table information: table: department_store"} +{"question": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.order_date DESC LIMIT 1", "answer": "Who made the latest order?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id HAVING COUNT(*) >= 2", "answer": "What are the names of regions with two or more storms?\nAdditional table information: table: storm_record"} +{"question": "SELECT aid FROM Aircraft WHERE distance > 1000", "answer": "What are the ids of all aircrafts that can cover a distance of more than 1000?\nAdditional table information: table: flight_1"} +{"question": "SELECT COUNT(*), T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year", "answer": "What is the number of wins the team Boston Red Stockings got in the postseasons each year in history?\nAdditional table information: table: baseball_1"} +{"question": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING COUNT(*) > 4", "answer": "Find the policy types more than 4 customers use. Show their type code.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT T3.Name, T2.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID ORDER BY T2.Event_Attendance ASC NULLS FIRST", "answer": "Show the names of journalists and the names of the events they reported in ascending order\nAdditional table information: table: news_report"} +{"question": "SELECT name FROM station WHERE city = 'Palo Alto' EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING COUNT(*) > 100", "answer": "What are the names of stations that are located in Palo Alto city but have never been the ending point of trips more than 100 times?\nAdditional table information: table: bike_1"} +{"question": "SELECT roomName FROM Rooms WHERE bedType = 'King' OR bedType = 'Queen'", "answer": "What are the names of rooms that have either king or queen bed?\nAdditional table information: table: inn_1"} +{"question": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id, customers AS t3 GROUP BY t3.customer_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Return the names of products that have had complaints filed by the customer who has filed the fewest complaints.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT SUM(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE '%London%'", "answer": "What are the total number of domestic passengers at all London airports?\nAdditional table information: table: aircraft"} +{"question": "SELECT SUM(amount_piad), AVG(amount_piad) FROM claim_headers", "answer": "What are the total amount and average amount paid in claim headers?\nAdditional table information: table: insurance_and_eClaims"} +{"question": "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", "answer": "What is the first and last name of the student participating in the most activities?\nAdditional table information: table: activity_1"} +{"question": "SELECT T2.Store_Name FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T1.Status_Code = 'stop'", "answer": "Which workshop groups have bookings with status code 'stop'? Give me the names.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT AVG(bikes_available) FROM status WHERE NOT station_id IN (SELECT id FROM station WHERE city = 'Palo Alto')", "answer": "What is the average bike availability in stations that are not located in Palo Alto?\nAdditional table information: table: bike_1"} +{"question": "SELECT city FROM airports WHERE country = 'United States' GROUP BY city HAVING COUNT(*) > 3", "answer": "What is the number of cities in the United States with more than 3 airports?\nAdditional table information: table: flight_4"} +{"question": "SELECT AVG(Age) FROM STUDENT WHERE Sex = 'F'", "answer": "Find the average age of female students.\nAdditional table information: table: voter_2"} +{"question": "SELECT T3.product_name, COUNT(*) FROM orders AS T1, 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", "answer": "For each product, show its name and the number of times it was ordered.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT T1.Claim_id, COUNT(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id", "answer": "How many settlements does each claim correspond to? List the claim id and the number of settlements.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.project_id HAVING COUNT(*) > 2", "answer": "What are the task details, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which location has the most corresponding counties?\nAdditional table information: table: county_public_safety"} +{"question": "SELECT Comptroller, COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which people severed as comptroller most frequently? Give me the name of the person and the frequency count.\nAdditional table information: table: election"} +{"question": "SELECT school_name FROM school ORDER BY school_name NULLS FIRST", "answer": "Show all school names in alphabetical order.\nAdditional table information: table: school_finance"} +{"question": "SELECT DISTINCT classroom FROM list WHERE grade = 4", "answer": "Which classrooms are used by grade 4?\nAdditional table information: table: student_1"} +{"question": "SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code WHERE T4.dept_name = 'Accounting'", "answer": "How many students are enrolled in some classes that are taught by an accounting professor?\nAdditional table information: table: college_1"} +{"question": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC NULLS FIRST", "answer": "Return the different statuses of cities, ascending by frequency.\nAdditional table information: table: farm"} +{"question": "SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' EXCEPT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num", "answer": "What are the first names of all professors not teaching any classes?\nAdditional table information: table: college_1"} +{"question": "SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20", "answer": "Show the ids for all the students who participate in an activity and are under 20.\nAdditional table information: table: activity_1"} +{"question": "SELECT T1.fname, T1.lname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge')", "answer": "What are the first and last names of all students who are living in a dorm with a TV Lounge?\nAdditional table information: table: dorm_1"} +{"question": "SELECT COUNT(*) FROM STUDENT", "answer": "How many students are there in total?\nAdditional table information: table: voter_2"} +{"question": "SELECT T1.City_Town FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Store_Name = 'FJA Filming'", "answer": "Which city is the address of the store named 'FJA Filming' located in?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT host_city FROM hosting_city ORDER BY YEAR DESC LIMIT 1", "answer": "Find the city that hosted some events in the most recent year. What is the id of this city?\nAdditional table information: table: city_record"} +{"question": "SELECT T2.role_name, T2.role_description FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T1.employee_name = 'Ebba'", "answer": "Show the name and description of the role played by the employee named Ebba.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id ORDER BY T3.Number_Deaths DESC LIMIT 1", "answer": "Find the names of the regions which were affected by the storm that killed the greatest number of people.\nAdditional table information: table: storm_record"} +{"question": "SELECT Character, Duration FROM actor", "answer": "Return the characters and durations for each actor.\nAdditional table information: table: musical"} +{"question": "SELECT Name, Nationality FROM HOST ORDER BY Age DESC LIMIT 1", "answer": "What are the name and the nationality of the host of the highest age?\nAdditional table information: table: party_host"} +{"question": "SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid GROUP BY T1.aid ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the name of aircraft which fewest people have its certificate.\nAdditional table information: table: flight_1"} +{"question": "SELECT AVG(Age) FROM STUDENT WHERE Sex = 'F'", "answer": "What is the average age of female (sex is F) students?\nAdditional table information: table: voter_2"} +{"question": "SELECT cName FROM College WHERE enr < 13000 AND state = 'AZ' UNION SELECT cName FROM College WHERE enr > 15000 AND state = 'LA'", "answer": "Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment.\nAdditional table information: table: soccer_2"} +{"question": "SELECT DISTINCT channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Tillman Ernser'", "answer": "Find the contact channel code that was used by the customer named 'Tillman Ernser'.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall'", "answer": "Find the first name of students who are living in the Smith Hall.\nAdditional table information: table: dorm_1"} +{"question": "SELECT phone, room, building FROM Faculty WHERE Fname = 'Jerry' AND Lname = 'Prince'", "answer": "Show the phone, room, and building for the faculty named Jerry Prince.\nAdditional table information: table: activity_1"} +{"question": "SELECT COUNT(*) FROM STUDENT", "answer": "Find the number of students in total.\nAdditional table information: table: voter_2"} +{"question": "SELECT MAX(T1.stars), T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT MAX(YEAR) FROM Movie)", "answer": "What is highest rating for the most recent movie and when was it released?\nAdditional table information: table: movie_1"} +{"question": "SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80", "answer": "Show the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80.\nAdditional table information: table: workshop_paper"} +{"question": "SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = 'Mary' OR T1.name = 'Susan'", "answer": "Find the id of users who are followed by Mary or Susan.\nAdditional table information: table: twitter_1"} +{"question": "SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_from LIKE '2016%'", "answer": "Return the name and gender of the staff who was assigned in 2016.\nAdditional table information: table: department_store"} +{"question": "SELECT name, service FROM train ORDER BY TIME NULLS FIRST", "answer": "Show the name and service for all trains in order by time.\nAdditional table information: table: train_station"} +{"question": "SELECT DISTINCT POSITION FROM match_season WHERE College = 'UCLA' OR College = 'Duke'", "answer": "What are the different positions of players from UCLA or Duke colleges?\nAdditional table information: table: match_season"} +{"question": "SELECT Reign, Days_held FROM wrestler", "answer": "What are the reigns and days held of all wrestlers?\nAdditional table information: table: wrestler"} +{"question": "SELECT * FROM Albums WHERE YEAR = 2012", "answer": "return all columns of the albums created in the year of 2012.\nAdditional table information: table: music_2"} +{"question": "SELECT MIN(T1.duration), MIN(T2.rating), T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is NULLS FIRST", "answer": "What is the shortest and most poorly rated song for each genre, ordered alphabetically by genre?\nAdditional table information: table: music_1"} +{"question": "SELECT T2.name FROM wedding AS T1 JOIN people AS T2 ON T1.female_id = T2.people_id WHERE T1.year = 2016 AND T2.is_male = 'F' AND T2.country = 'Canada'", "answer": "Show the names for all females from Canada having a wedding in year 2016.\nAdditional table information: table: wedding"} +{"question": "SELECT document_status_code FROM Ref_Document_Status", "answer": "What document status codes do we have?\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT AVG(revenue), MAX(revenue), SUM(revenue) FROM manufacturers", "answer": "What are the average, maximum and total revenues of all companies?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT T1.name, T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance < T2.balance", "answer": "What are the names of customers who have a savings balance lower than their checking balance, and what is the total of their checking and savings balances?\nAdditional table information: table: small_bank_1"} +{"question": "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", "answer": "Tell me the first and last name of the student who has the most activities.\nAdditional table information: table: activity_1"} +{"question": "SELECT COUNT(*) FROM files WHERE duration LIKE '4:%'", "answer": "How many songs have 4 minute duration?\nAdditional table information: table: music_1"} +{"question": "SELECT T2.first_name, T2.last_name, T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which film actor (actress) starred the most films? List his or her first name, last name and actor id.\nAdditional table information: table: sakila_1"} +{"question": "SELECT DISTINCT TYPE FROM institution", "answer": "Show all the distinct institution types.\nAdditional table information: table: protein_institute"} +{"question": "SELECT DISTINCT artist_name FROM song WHERE languages = 'english' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8", "answer": "Find the names of the artists who have produced English songs but have never received rating higher than 8.\nAdditional table information: table: music_1"} +{"question": "SELECT Competition_type, Country FROM competition", "answer": "What are the types and countries of competitions?\nAdditional table information: table: sports_competition"} +{"question": "SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE DEPT_NAME = 'Accounting'", "answer": "How many professors are in the accounting dept?\nAdditional table information: table: college_1"} +{"question": "SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id = t2.campus WHERE t2.year = 1956 AND totalenrollment_ay > 400 AND FTE_AY > 200", "answer": "What campus had more than 400 total enrollment but more than 200 full time enrollment in year 1956?\nAdditional table information: table: csu_1"} +{"question": "SELECT AVG(bedroom_count) FROM Apartments", "answer": "Find the average number of bedrooms of all the apartments.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT T2.Name, T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'White'", "answer": "What are the names and scores of wines that are made of white color grapes?\nAdditional table information: table: wine_1"} +{"question": "SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = 'shared'", "answer": "How many different songs have shared vocals?\nAdditional table information: table: music_2"} +{"question": "SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1", "answer": "Find the id of the appointment with the most recent start date?\nAdditional table information: table: hospital_1"} +{"question": "SELECT T1.problem_description FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Christop'", "answer": "Give me a list of descriptions of the problems that are reported by the staff whose first name is Christop.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT t2.unit_of_measure, t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = 'chervil'", "answer": "What are the unit of measure and category code for the 'chervil' product?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code WHERE T1.document_name = 'How to read a book'", "answer": "Find the document type name of the document named 'How to read a book'.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'", "answer": "Which colleges do the tryout players whose name starts with letter D go to?\nAdditional table information: table: soccer_2"} +{"question": "SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC", "answer": "Order denominations in descending order of the count of schools with the denomination. Return each denomination with the count of schools.\nAdditional table information: table: school_player"} +{"question": "SELECT name FROM program WHERE origin <> 'Beijing'", "answer": "find the names of programs whose origin is not in Beijing.\nAdditional table information: table: program_share"} +{"question": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor <> 'Rachel Elnaugh'", "answer": "What are the names of entrepreneurs whose investor is not 'Rachel Elnaugh'?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_claimed = (SELECT MAX(amount_claimed) FROM claim_headers)", "answer": "Which customer made the largest amount of claim in a single claim? Return the customer details.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT trade_name, COUNT(*) FROM medicine GROUP BY trade_name", "answer": "find the number of medicines offered by each trade.\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT t1.customer_name, t2.order_date FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = 'Delivered'", "answer": "Find the customer name and date of the orders that have the status 'Delivered'.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT rid FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'United States') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States')", "answer": "Find the id of routes whose source and destination airports are in the United States.\nAdditional table information: table: flight_4"} +{"question": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id JOIN products AS t3 ON t2.product_id = t3.product_id ORDER BY t3.product_price NULLS FIRST LIMIT 1", "answer": "Find the last name of the staff member who processed the complaint of the cheapest product.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT Shop_Name, LOCATION FROM shop ORDER BY Shop_Name ASC NULLS FIRST", "answer": "What are the names and location of the shops in ascending alphabetical order of name.\nAdditional table information: table: device"} +{"question": "SELECT AVG(T1.stars), T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT MIN(YEAR) FROM Movie)", "answer": "For the oldest movie listed, what is its average rating and title?\nAdditional table information: table: movie_1"} +{"question": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING COUNT(*) > 4", "answer": "Find the policy type used by more than 4 customers.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.share_count > 100", "answer": "Show details of all investors if they make any transaction with share count greater than 100.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT cust_name FROM customer ORDER BY acc_bal NULLS FIRST", "answer": "What are the names of all customers, ordered by account balance?\nAdditional table information: table: loan_1"} +{"question": "SELECT document_type_name, document_type_description FROM Ref_document_types WHERE document_type_code = 'RV'", "answer": "Give me the name and description of the document type code RV.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "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", "answer": "What is the document type name and the document type description and creation date for all the documents?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT building_address, building_phone FROM Apartment_Buildings WHERE building_manager = 'Brenden'", "answer": "What are the address and phone number of the buildings managed by 'Brenden'?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT location_code, location_name FROM Ref_locations", "answer": "List all location codes and location names.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT Participant_ID, Participant_Type_Code, Participant_Details FROM Participants", "answer": "What are all the the participant ids, type code and details?\nAdditional table information: table: local_govt_in_alabama"} +{"question": "SELECT first_name, middle_name, last_name FROM Staff", "answer": "What are the first, middle, and last names of all staff?\nAdditional table information: table: driving_school"} +{"question": "SELECT DISTINCT label FROM Albums", "answer": "What are the different album labels listed?\nAdditional table information: table: music_2"} +{"question": "SELECT T1.Name, T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = 'film festival'", "answer": "What are the names and descriptions of the photos taken at the tourist attraction 'film festival'?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T2.Fname, T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the first and last name of the student who played the most sports?\nAdditional table information: table: game_1"} +{"question": "SELECT T1.title, T1.credits, T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING COUNT(*) > 1", "answer": "What is the title, credit value, and department name for courses with more than one prerequisite?\nAdditional table information: table: college_2"} +{"question": "SELECT Name FROM climber WHERE Country <> 'Switzerland'", "answer": "What are the names of climbers who are not from the country of Switzerland?\nAdditional table information: table: climbing"} +{"question": "SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed", "answer": "Show the ids of all employees who don't destroy any document.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_date < '2018-03-17 07:13:53'", "answer": "What is the total amount of products purchased before 2018-03-17 07:13:53?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT COUNT(*) FROM Faculty WHERE Sex = 'F' AND Rank = 'Professor'", "answer": "How many female Professors do we have?\nAdditional table information: table: activity_1"} +{"question": "SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars = 4", "answer": "What are the ids of all reviewers who did not give 4 stars?\nAdditional table information: table: movie_1"} +{"question": "SELECT T3.Name, T2.District FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID ORDER BY T2.Ranking NULLS FIRST", "answer": "Show the names of phones and the districts of markets they are on, in ascending order of the ranking of the market.\nAdditional table information: table: phone_market"} +{"question": "SELECT lastname FROM list WHERE classroom = 111", "answer": "What are the last names of students in room 111?\nAdditional table information: table: student_1"} +{"question": "SELECT name FROM Person ORDER BY age DESC", "answer": "What are the names of everybody sorted by age in descending order?\nAdditional table information: table: network_2"} +{"question": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_last_name = 'Bosco'", "answer": "Which problems are reported by the staff with last name 'Bosco'? Show the ids of the problems.\nAdditional table information: table: tracking_software_problems"} +{"question": "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", "answer": "Find the top 3 wineries with the greatest number of wines made of white color grapes.\nAdditional table information: table: wine_1"} +{"question": "SELECT T1.Fname, T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID = T2.FacID WHERE T2.DNO = 520", "answer": "Find the full names of faculties who are members of department with department number 520.\nAdditional table information: table: college_3"} +{"question": "SELECT MAX(Milliseconds), MIN(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Pop'", "answer": "Find the maximum and minimum millisecond lengths of pop tracks.\nAdditional table information: table: chinook_1"} +{"question": "SELECT billing_country, COUNT(*) FROM invoices GROUP BY billing_country ORDER BY COUNT(*) DESC LIMIT 5", "answer": "A list of the top 5 countries by number of invoices. List country name and number of invoices.\nAdditional table information: table: store_1"} +{"question": "SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = 'Appropriations' INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = 'Economic Matters'", "answer": "Which parties have delegates in both the 'Appropriations' committee and the 'Economic Matters' committee?\nAdditional table information: table: election"} +{"question": "SELECT AVG(Speed) FROM roller_coaster", "answer": "What is the average speed of roller coasters?\nAdditional table information: table: roller_coaster"} +{"question": "SELECT campus FROM campuses WHERE county = 'Los Angeles'", "answer": "List the campuses in Los Angeles county.\nAdditional table information: table: csu_1"} +{"question": "SELECT date_valid_from, date_valid_to FROM Customers_cards WHERE card_number = '4560596484842'", "answer": "Show the date valid from and the date valid to for the card with card number '4560596484842'.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25'", "answer": "What are the distinct details of invoices created before 1989-09-03 or after 2007-12-25?\nAdditional table information: table: tracking_orders"} +{"question": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC", "answer": "Please show the software platforms of devices in descending order of the count.\nAdditional table information: table: device"} +{"question": "SELECT COUNT(*), T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code", "answer": "What is the number of professors for different school?\nAdditional table information: table: college_1"} +{"question": "SELECT fname, lname FROM student WHERE city_code <> 'HKG' ORDER BY age NULLS FIRST", "answer": "What are the first and last names of all students who are not living in the city HKG and order the results by age?\nAdditional table information: table: dorm_1"} +{"question": "SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Indiana University'", "answer": "List the titles of the papers whose authors are from the institution 'Indiana University'.\nAdditional table information: table: icfp_1"} +{"question": "SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_piad = (SELECT MIN(amount_piad) FROM claim_headers)", "answer": "What is the name of the customer who has made the minimum amount of payment in one claim?\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT Publisher FROM publication ORDER BY Price DESC LIMIT 1", "answer": "List the publisher of the publication with the highest price.\nAdditional table information: table: book_2"} +{"question": "SELECT name FROM people WHERE height > 200 OR height < 190", "answer": "What are the names of people who have a height greater than 200 or less than 190?\nAdditional table information: table: candidate_poll"} +{"question": "SELECT catalog_level_name, catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10", "answer": "What are the name and level of catalog structure with level number between 5 and 10\nAdditional table information: table: product_catalog"} +{"question": "SELECT COUNT(*) FROM enzyme WHERE NOT id IN (SELECT enzyme_id FROM medicine_enzyme_interaction)", "answer": "What is the count of enzymes without any interactions?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID WHERE T3.Sales_in_Billion > 200", "answer": "Show the names of employees that work for companies with sales bigger than 200.\nAdditional table information: table: company_employee"} +{"question": "SELECT clublocation FROM club WHERE clubname = 'Tennis Club'", "answer": "Where us the club named 'Tennis Club' located?\nAdditional table information: table: club_1"} +{"question": "SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE '4:%' UNION SELECT song_name FROM song WHERE languages = 'english'", "answer": "What are the names of all songs that are approximately 4 minutes long or are in English?\nAdditional table information: table: music_1"} +{"question": "SELECT COUNT(*), T1.fault_log_entry_id FROM Fault_Log AS T1 JOIN Engineer_Visits AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "How many engineer visits are required at most for a single fault log? List the number and the log entry id.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid JOIN airlines AS T3 ON T1.alid = T3.alid WHERE T2.country = 'Italy' AND T3.name = 'American Airlines'", "answer": "What is the number of routes operated by the airline American Airlines whose destinations are in Italy?\nAdditional table information: table: flight_4"} +{"question": "SELECT Date_of_ceremony, RESULT FROM music_festival", "answer": "What are the dates of ceremony and results for each music festival?\nAdditional table information: table: music_4"} +{"question": "SELECT T1.first_name, T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id", "answer": "What are the first name and department name of all employees?\nAdditional table information: table: hr_1"} +{"question": "SELECT COUNT(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Billy Cobham'", "answer": "How many albums has Billy Cobam released?\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(*) FROM Draft_Copies WHERE document_id = 2", "answer": "How many draft copies does the document with id 2 have?\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1", "answer": "List the name of the shop with the latest open year.\nAdditional table information: table: device"} +{"question": "SELECT id FROM teaches WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT id FROM teaches WHERE semester = 'Spring' AND YEAR = 2010", "answer": "Find the id of instructors who taught a class in Fall 2009 but not in Spring 2010.\nAdditional table information: table: college_2"} +{"question": "SELECT MAX(Sales_billion), MIN(Sales_billion) FROM Companies WHERE Industry <> 'Banking'", "answer": "What are the maximum and minimum sales of the companies whose industries are not 'Banking'.\nAdditional table information: table: company_office"} +{"question": "SELECT campus FROM campuses WHERE county = 'Los Angeles'", "answer": "Report the name of all campuses in Los Angeles county.\nAdditional table information: table: csu_1"} +{"question": "SELECT DISTINCT Reign FROM wrestler WHERE LOCATION <> 'Tokyo , Japan'", "answer": "What are the distinct reigns of wrestlers whose location is not 'Tokyo,Japan' ?\nAdditional table information: table: wrestler"} +{"question": "SELECT SUM(city_population) FROM district ORDER BY city_area DESC LIMIT 3", "answer": "What is the total number of residents for the districts with the 3 largest areas?\nAdditional table information: table: store_product"} +{"question": "SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF'", "answer": "What are the document ids for the budget type code 'SF'?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT order_item_id FROM order_items WHERE product_id = 11", "answer": "Find the ids of all the order items whose product id is 11.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT dept_name FROM department ORDER BY budget NULLS FIRST LIMIT 1", "answer": "Give the name of the department with the lowest budget.\nAdditional table information: table: college_2"} +{"question": "SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'bangla' GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3", "answer": "What are the top 3 artists with the largest number of songs in the language Bangla?\nAdditional table information: table: music_1"} +{"question": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = 'catnip'", "answer": "What is the color description of the product with name 'catnip'?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT DISTINCT CLASS FROM race", "answer": "Return the different classes of races.\nAdditional table information: table: race_track"} +{"question": "SELECT MAX(Cows), MIN(Cows) FROM farm", "answer": "What are the maximum and minimum number of cows across all farms.\nAdditional table information: table: farm"} +{"question": "SELECT AVG(revenue), MAX(revenue), SUM(revenue) FROM manufacturers", "answer": "Return the average, maximum, and total revenues across all manufacturers.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT COUNT(*) FROM Customers", "answer": "Count the number of customers.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT name FROM Employee WHERE salary > (SELECT AVG(salary) FROM Employee)", "answer": "Show names for all employees with salary more than the average.\nAdditional table information: table: flight_1"} +{"question": "SELECT MAX(Silver), MIN(Silver) FROM club_rank", "answer": "What are the maximum and minimum number of silver medals for clubs.\nAdditional table information: table: sports_competition"} +{"question": "SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT MAX(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff')", "answer": "Return the id of the staff whose Staff Department Assignment was earlier than that of any Clerical Staff.\nAdditional table information: table: department_store"} +{"question": "SELECT job_title, max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000", "answer": "What are the job titles, and range of salaries for jobs with maximum salary between 12000 and 18000?\nAdditional table information: table: hr_1"} +{"question": "SELECT policy_type_code, COUNT(*) FROM policies GROUP BY policy_type_code", "answer": "For each policy type, return its type code and its count in the record.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT Writer FROM book GROUP BY Writer HAVING COUNT(*) > 1", "answer": "List the writers who have written more than one book.\nAdditional table information: table: book_2"} +{"question": "SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = 'Shanghai'", "answer": "Give me the temperature of Shanghai in January.\nAdditional table information: table: city_record"} +{"question": "SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2002 ORDER BY t3.degrees DESC LIMIT 1", "answer": "How many faculty lines are there in the university that conferred the most number of degrees in year 2002?\nAdditional table information: table: csu_1"} +{"question": "SELECT SUM(Spent) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID WHERE Student.Fname = 'Linda' AND Student.Lname = 'Smith'", "answer": "How long does student Linda Smith spend on the restaurant in total?\nAdditional table information: table: restaurant_1"} +{"question": "SELECT Name FROM member ORDER BY Name ASC NULLS FIRST", "answer": "List the names of members in ascending alphabetical order.\nAdditional table information: table: decoration_competition"} +{"question": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame'", "answer": "What are all the characteristic names of product 'sesame'?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT role_code FROM Employees GROUP BY role_code HAVING COUNT(*) >= 3", "answer": "What are the roles with three or more employees? Give me the role codes.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT head FROM department GROUP BY departmentID ORDER BY COUNT(departmentID) NULLS FIRST LIMIT 1", "answer": "What is the employee id of the head whose department has the least number of employees?\nAdditional table information: table: hospital_1"} +{"question": "SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000", "answer": "Please show the themes of competitions with host cities having populations larger than 1000.\nAdditional table information: table: farm"} +{"question": "SELECT publisher FROM book_club GROUP BY publisher ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the publisher that has published the most books.\nAdditional table information: table: culture_company"} +{"question": "SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' INTERSECT SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Loss'", "answer": "Find the names of the swimmers who have both 'win' and 'loss' results in the record.\nAdditional table information: table: swimming"} +{"question": "SELECT name FROM people WHERE NOT people_id IN (SELECT people_id FROM candidate)", "answer": "what are the names of people who did not participate in the candidate election.\nAdditional table information: table: candidate_poll"} +{"question": "SELECT County_name FROM county ORDER BY Population DESC LIMIT 1", "answer": "Show the name of the county with the biggest population.\nAdditional table information: table: election"} +{"question": "SELECT COUNT(*) FROM station WHERE city = 'Mountain View'", "answer": "How many stations are in Mountain View?\nAdditional table information: table: bike_1"} +{"question": "SELECT COUNT(*) FROM ARTIST WHERE NOT artistid IN (SELECT artistid FROM ALBUM)", "answer": "Cound the number of artists who have not released an album.\nAdditional table information: table: chinook_1"} +{"question": "SELECT COUNT(patient) FROM stay WHERE room = 112", "answer": "Count the number of patients who stayed in room 112.\nAdditional table information: table: hospital_1"} +{"question": "SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which allergy is the most common?\nAdditional table information: table: allergy_1"} +{"question": "SELECT Name FROM wrestler WHERE Days_held < 100", "answer": "What are the names of wrestlers days held less than 100?\nAdditional table information: table: wrestler"} +{"question": "SELECT crs_credit, crs_description FROM course WHERE crs_code = 'CIS-220'", "answer": "What is the description for the CIS-220 and how many credits does it have?\nAdditional table information: table: college_1"} +{"question": "SELECT complaint_status_code, COUNT(*) FROM complaints WHERE complaint_type_code = 'Product Failure' GROUP BY complaint_status_code", "answer": "Find the number of complaints with Product Failure type for each complaint status.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT member_name FROM member EXCEPT SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id", "answer": "What are the names of members who are not in charge of any events?\nAdditional table information: table: party_people"} +{"question": "SELECT DISTINCT product_size FROM Products", "answer": "Show all product sizes.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY AVG(salary) DESC LIMIT 1", "answer": "Which department has the highest average instructor salary?\nAdditional table information: table: college_2"} +{"question": "SELECT T1.dorm_name, T1.student_capacity FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid GROUP BY T2.dormid ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "What is the name and capacity of the dorm with the fewest amount of amenities?\nAdditional table information: table: dorm_1"} +{"question": "SELECT model_name FROM chip_model EXCEPT SELECT chip_model FROM phone WHERE Accreditation_type = 'Full'", "answer": "Find the names of the chip models that are not used by any phone with full accreditation type.\nAdditional table information: table: phone_1"} +{"question": "SELECT decor FROM Rooms WHERE roomName = 'Recluse and defiance'", "answer": "Return the decor of the room named 'Recluse and defiance'.\nAdditional table information: table: inn_1"} +{"question": "SELECT customer_name, customer_phone FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM mailshot_customers)", "answer": "Show the name and phone of the customer without any mailshot.\nAdditional table information: table: customers_campaigns_ecommerce"} +{"question": "SELECT SUM(T1.Money_Requested) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 1.85", "answer": "Give the total money requested by entrepreneurs who are taller than 1.85.\nAdditional table information: table: entrepreneur"} +{"question": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote INTERSECT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = '8741'", "answer": "Find the distinct last names of all the students who have president votes and whose advisor is 8741.\nAdditional table information: table: voter_2"} +{"question": "SELECT COUNT(*) FROM station", "answer": "How many train stations are there?\nAdditional table information: table: train_station"} +{"question": "SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = 'AC/DC'", "answer": "Find the title of all the albums of the artist 'AC/DC'.\nAdditional table information: table: chinook_1"} +{"question": "SELECT StuID FROM Student WHERE Sex = 'M'", "answer": "Show student ids for all male students.\nAdditional table information: table: allergy_1"} +{"question": "SELECT nationality, COUNT(*) FROM swimmer GROUP BY nationality HAVING COUNT(*) > 1", "answer": "List countries that have more than one swimmer.\nAdditional table information: table: swimming"} +{"question": "SELECT COUNT(*) FROM participants WHERE participant_type_code = 'Organizer'", "answer": "How many participants belong to the type 'Organizer'?\nAdditional table information: table: local_govt_in_alabama"} +{"question": "SELECT name, open_year FROM manufacturer WHERE num_of_shops > 10 OR Num_of_Factories < 10", "answer": "Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops.\nAdditional table information: table: manufacturer"} +{"question": "SELECT DISTINCT payment_type_code FROM payments", "answer": "What are all the distinct payment types?\nAdditional table information: table: products_for_hire"} +{"question": "SELECT T2.name, T2.open_year FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year = 2016 GROUP BY T2.branch_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name and open year for the branch with most number of memberships registered in 2016?\nAdditional table information: table: shop_membership"} +{"question": "SELECT dept_name FROM department ORDER BY dept_name NULLS FIRST", "answer": "What are the names of all departments in alphabetical order?\nAdditional table information: table: college_1"} +{"question": "SELECT Country FROM member GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common country across members.\nAdditional table information: table: decoration_competition"} +{"question": "SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = 'Forward' INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = 'Defender'", "answer": "Return the names of countries that have players that play the Forward position, as well as players who play the Defender position.\nAdditional table information: table: match_season"} +{"question": "SELECT SUM(budget) FROM department WHERE dept_name = 'Marketing' OR dept_name = 'Finance'", "answer": "What is the sum of budgets of the Marketing and Finance departments?\nAdditional table information: table: college_2"} +{"question": "SELECT T2.Name, COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID", "answer": "Show names of musicals and the number of actors who have appeared in the musicals.\nAdditional table information: table: musical"} +{"question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy", "answer": "What are the student ids of students who don't have any allergies?\nAdditional table information: table: allergy_1"} +{"question": "SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_number = 'Suite 634'", "answer": "Tell me the booking status code for the apartment with number 'Suite 634'.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid'", "answer": "What are the names of the states that have some college students playing in the positions of goalie and mid-field?\nAdditional table information: table: soccer_2"} +{"question": "SELECT T1.cmi_cross_ref_id, T1.source_system_code FROM CMI_Cross_References AS T1 JOIN Council_Tax AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id GROUP BY T1.cmi_cross_ref_id HAVING COUNT(*) >= 1", "answer": "What is the cmi cross reference id that is related to at least one council tax entry? List the cross reference id and source system code.\nAdditional table information: table: local_govt_mdm"} +{"question": "SELECT T1.first_name, T1.last_name, T1.other_details, T3.skill_description FROM Maintenance_Engineers AS T1 JOIN Engineer_Skills AS T2 ON T1.engineer_id = T2.engineer_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id", "answer": "List all every engineer's first name, last name, details and coresponding skill description.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT COUNT(*) FROM Documents_with_expenses", "answer": "Count the number of documents with expenses.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT product_category_description, unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs'", "answer": "Return the description and unit of measurement for products in the 'Herbs' category.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT Name FROM Products", "answer": "What are the names of all products?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT AVG(Horizontal_Bar_Points) FROM gymnast", "answer": "What is the average horizontal bar points for all gymnasts?\nAdditional table information: table: gymnast"} +{"question": "SELECT name FROM CLub WHERE NOT Club_ID IN (SELECT Club_ID FROM player)", "answer": "List the names of clubs that do not have any players.\nAdditional table information: table: sports_competition"} +{"question": "SELECT first_name, last_name FROM Teachers ORDER BY last_name NULLS FIRST", "answer": "Find the first names and last names of teachers in alphabetical order of last name.\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT COUNT(*) FROM university WHERE LOCATION LIKE '%NY%'", "answer": "Find how many school locations have the word 'NY'.\nAdditional table information: table: university_basketball"} +{"question": "SELECT T1.lat, T1.long, T1.city FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id ORDER BY T2.duration NULLS FIRST LIMIT 1", "answer": "What is the latitude, longitude, city of the station from which the shortest trip started?\nAdditional table information: table: bike_1"} +{"question": "SELECT name FROM Aircraft ORDER BY distance NULLS FIRST LIMIT 3", "answer": "Show the name of aircrafts with top three lowest distances.\nAdditional table information: table: flight_1"} +{"question": "SELECT name FROM Companies ORDER BY Market_Value_billion DESC", "answer": "List the names of companies in descending order of market value.\nAdditional table information: table: company_office"} +{"question": "SELECT zip_code FROM weather GROUP BY zip_code HAVING AVG(mean_visibility_miles) < 10", "answer": "For each zip code, select all those that have an average mean visiblity below 10.\nAdditional table information: table: bike_1"} +{"question": "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'", "answer": "Find the first names of the faculty members who participate in Canoeing and Kayaking.\nAdditional table information: table: activity_1"} +{"question": "SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.start_date = (SELECT MAX(start_date) FROM policies)", "answer": "Which customer is associated with the latest policy?\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT T2.Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name", "answer": "Show names of technicians and the number of machines they are assigned to repair.\nAdditional table information: table: machine_repair"} +{"question": "SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32", "answer": "Return names of songs in volumes that are by artists that are at least 32 years old.\nAdditional table information: table: music_4"} +{"question": "SELECT order_id FROM shipments WHERE shipment_date = (SELECT MAX(shipment_date) FROM shipments)", "answer": "Find the id of the order which is shipped most recently.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT COUNT(*) FROM customers GROUP BY customer_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Count the number of customers that have the customer type that is most common.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT T1.role_description, T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "For each staff id, what is the description of the role that is involved with the most number of projects?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2", "answer": "What are the names of all aircrafts that have won a match at least twice?\nAdditional table information: table: aircraft"} +{"question": "SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name, COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id", "answer": "Show id, first name and last name for all customers and the number of accounts.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT * FROM College ORDER BY enr NULLS FIRST", "answer": "List all information about college sorted by enrollment number in the ascending order.\nAdditional table information: table: soccer_2"} +{"question": "SELECT firstname FROM list WHERE classroom = 108", "answer": "Find the first names of students studying in room 108.\nAdditional table information: table: student_1"} +{"question": "SELECT COUNT(DISTINCT pPos) FROM tryout", "answer": "What are the different types of player positions?\nAdditional table information: table: soccer_2"} +{"question": "SELECT Status, COUNT(*) FROM roller_coaster GROUP BY Status", "answer": "Show the different statuses and the numbers of roller coasters for each status.\nAdditional table information: table: roller_coaster"} +{"question": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = 'hot'", "answer": "How many products have the characteristic named 'hot'?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT COUNT(*) FROM campuses", "answer": "What is the total number of campuses?\nAdditional table information: table: csu_1"} +{"question": "SELECT MAX(Number_cities), MIN(Number_cities) FROM market", "answer": "What are the maximum and minimum number of cities in all markets.\nAdditional table information: table: film_rank"} +{"question": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 3", "answer": "What are the names of the 3 departments with the most courses?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(DISTINCT services) FROM station", "answer": "How many different services are provided by all stations?\nAdditional table information: table: station_weather"} +{"question": "SELECT directed_by, COUNT(*) FROM film GROUP BY directed_by", "answer": "List all directors along with the number of films directed by each director.\nAdditional table information: table: cinema"} +{"question": "SELECT catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1", "answer": "Which catalog content has the highest height? Give me the catalog entry name.\nAdditional table information: table: product_catalog"} +{"question": "SELECT DISTINCT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.rating > 9", "answer": "What are the different names and countries of origins for all artists whose song ratings are above 9?\nAdditional table information: table: music_1"} +{"question": "SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM perpetrator)", "answer": "List the names of people that are not perpetrators.\nAdditional table information: table: perpetrator"} +{"question": "SELECT location_code FROM Ref_locations WHERE location_name = 'Canada'", "answer": "Show the location code of the country 'Canada'.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T1.emp_fname FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History' EXCEPT SELECT T4.emp_fname FROM employee AS T4 JOIN CLASS AS T5 ON T4.emp_num = T5.prof_num", "answer": "What are the first names of all history professors who do not teach?\nAdditional table information: table: college_1"} +{"question": "SELECT T2.product_name, SUM(T1.product_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name", "answer": "What are the different product names, and what is the sum of quantity ordered for each product?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT name, headquarter, revenue FROM manufacturers ORDER BY revenue DESC", "answer": "What are the names, headquarters and revenues for manufacturers, sorted by revenue descending?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT document_id FROM Documents WHERE document_status_code = 'done' AND document_type_code = 'Paper' INTERSECT SELECT document_id FROM Documents JOIN Ref_Shipping_Agents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = 'USPS'", "answer": "List document id of documents status is done and document type is Paper and the document is shipped by shipping agent named USPS.\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT country_id, COUNT(*) FROM locations GROUP BY country_id", "answer": "display the country ID and number of cities for each country.\nAdditional table information: table: hr_1"} +{"question": "SELECT Name FROM pilot WHERE Age >= 25", "answer": "what is the name of every pilot who is at least 25 years old?\nAdditional table information: table: aircraft"} +{"question": "SELECT COUNT(DISTINCT T2.id), COUNT(DISTINCT T3.id), T3.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_name = T2.dept_name JOIN instructor AS T3 ON T1.dept_name = T3.dept_name GROUP BY T3.dept_name", "answer": "Find the total number of students and total number of instructors for each department.\nAdditional table information: table: college_2"} +{"question": "SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country HAVING COUNT(*) >= 2", "answer": "What are the countries that have at least two perpetrators?\nAdditional table information: table: perpetrator"} +{"question": "SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Le Pop'", "answer": "What is the first and last name of artist who performed 'Le Pop'?\nAdditional table information: table: music_2"} +{"question": "SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'GELL' AND T1.lastname = 'TAMI'", "answer": "Find the last names of all the teachers that teach GELL TAMI.\nAdditional table information: table: student_1"} +{"question": "SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T1.Launch_year = 2002 ORDER BY T1.RAM_MiB DESC LIMIT 1", "answer": "List the name of the phone model launched in year 2002 and with the highest RAM size.\nAdditional table information: table: phone_1"} +{"question": "SELECT AVG(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T1.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211'", "answer": "What is the average gpa of the students enrolled in the course with code ACCT-211?\nAdditional table information: table: college_1"} +{"question": "SELECT AVG(total_passengers), MAX(total_passengers) FROM station WHERE LOCATION = 'London' OR LOCATION = 'Glasgow'", "answer": "What is the average and maximum number of total passengers for train stations in London or Glasgow?\nAdditional table information: table: train_station"} +{"question": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING SUM(access_count) > 10000", "answer": "Return the codes of the document types that do not have a total access count of over 10000.\nAdditional table information: table: document_management"} +{"question": "SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = 'San Jose State University' AND T2.year = 1996", "answer": "What is the campus fee of 'San Jose State University' in year 1996?\nAdditional table information: table: csu_1"} +{"question": "SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id GROUP BY t2.program_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name of the program that is broadcast most frequently.\nAdditional table information: table: program_share"} +{"question": "SELECT district_name FROM district WHERE city_area > 10 OR City_Population > 100000", "answer": "What are the names of all districts with a city area greater than 10 or have more than 100000 people living there?\nAdditional table information: table: store_product"} +{"question": "SELECT Country FROM mountain WHERE Height > 5000", "answer": "What are the countries of mountains with height bigger than 5000?\nAdditional table information: table: climbing"} +{"question": "SELECT gname FROM Video_games WHERE gtype = 'Collectible card game'", "answer": "Show all video games with type Collectible card game.\nAdditional table information: table: game_1"} +{"question": "SELECT first_name, last_name, salary FROM employees WHERE commission_pct = 'null'", "answer": "What are the full name (first and last name) and salary for all employees who does not have any value for commission?\nAdditional table information: table: hr_1"} +{"question": "SELECT SUM(share_count) FROM TRANSACTIONS", "answer": "What is the total share of transactions?\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT * FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code", "answer": "What is all the product data, as well as each product's manufacturer?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1", "answer": "List the names of departments where some physicians are primarily affiliated with.\nAdditional table information: table: hospital_1"} +{"question": "SELECT DISTINCT T1.fname, T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = 'Milk' OR T2.Allergy = 'Cat'", "answer": "What are the distinct first names and cities of the students who have allergy either to milk or to cat?\nAdditional table information: table: allergy_1"} +{"question": "SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore'", "answer": "Find the average age of the members in the club 'Bootup Baltimore'.\nAdditional table information: table: club_1"} +{"question": "SELECT T1.name, T1.age, T1.job FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice' AND T2.year = (SELECT MAX(YEAR) FROM PersonFriend WHERE friend = 'Alice')", "answer": "Find the name, age, and job title of persons who are friends with Alice for the longest years.\nAdditional table information: table: network_2"} +{"question": "SELECT t2.product_details FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most frequently ordered product? Tell me the detail of the product\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008", "answer": "Show the locations shared by shops with open year later than 2012 and shops with open year before 2008.\nAdditional table information: table: device"} +{"question": "SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = 'USA' GROUP BY billing_state", "answer": "How many invoices were billed from each state?\nAdditional table information: table: store_1"} +{"question": "SELECT SUM(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name <> 'Brown'", "answer": "Find the total savings balance of all accounts except the account with name \u2018Brown\u2019.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT COUNT(*) FROM perpetrator", "answer": "How many perpetrators are there?\nAdditional table information: table: perpetrator"} +{"question": "SELECT COUNT(*) FROM Reviewer", "answer": "How many reviewers are there?\nAdditional table information: table: movie_1"} +{"question": "SELECT COUNT(*) FROM ARTIST WHERE NOT artistid IN (SELECT artistid FROM ALBUM)", "answer": "How many artists do not have any album?\nAdditional table information: table: chinook_1"} +{"question": "SELECT AVG(acc_bal), acc_type FROM customer WHERE credit_score < 50 GROUP BY acc_type", "answer": "What is the average account balance of customers with credit score below 50 for the different account types?\nAdditional table information: table: loan_1"} +{"question": "SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING COUNT(*) > 3", "answer": "Find the list of attribute data types possessed by more than 3 attribute definitions.\nAdditional table information: table: product_catalog"} +{"question": "SELECT budget_type_code, budget_type_description FROM Ref_budget_codes", "answer": "List all budget type codes and descriptions.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT COUNT(*) FROM Allergy_type WHERE allergytype = 'animal'", "answer": "How many animal type allergies exist?\nAdditional table information: table: allergy_1"} +{"question": "SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1", "answer": "Tell me the name of the most pricy product.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT Official_Name, Status FROM city ORDER BY Population DESC LIMIT 1", "answer": "What is the official name and status of the city with the most residents?\nAdditional table information: table: farm"} +{"question": "SELECT AVG(rating), MAX(rating) FROM review", "answer": "Find the average and maximum rating of all reviews.\nAdditional table information: table: epinions_1"} +{"question": "SELECT city_code, COUNT(*) FROM Student GROUP BY city_code", "answer": "Show all cities and corresponding number of students.\nAdditional table information: table: allergy_1"} +{"question": "SELECT COUNT(*), rank FROM captain WHERE age < 50 GROUP BY rank", "answer": "How many captains with younger than 50 are in each rank?\nAdditional table information: table: ship_1"} +{"question": "SELECT COUNT(DISTINCT participant_id) FROM participants_in_Events", "answer": "What are all the distinct participant ids who attended any events?\nAdditional table information: table: local_govt_in_alabama"} +{"question": "SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID", "answer": "What are the names of all instructors who have taught a course, as well as the corresponding course id?\nAdditional table information: table: college_2"} +{"question": "SELECT title FROM course WHERE course_id IN (SELECT T1.course_id FROM prereq AS T1 JOIN course AS T2 ON T1.prereq_id = T2.course_id WHERE T2.title = 'Differential Geometry')", "answer": "Find the title of course whose prerequisite is course Differential Geometry.\nAdditional table information: table: college_2"} +{"question": "SELECT T2.building, T2.room_number, T2.semester, T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = 'Psychology' ORDER BY T1.title NULLS FIRST", "answer": "What are the building, room number, semester and year of courses in the Psychology department, sorted using course title?\nAdditional table information: table: college_2"} +{"question": "SELECT Carrier FROM device ORDER BY Carrier ASC NULLS FIRST", "answer": "List the carriers of devices in ascending alphabetical order.\nAdditional table information: table: device"} +{"question": "SELECT MAX(T1.duration), MAX(T2.resolution), T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages NULLS FIRST", "answer": "What are the maximum duration and resolution of songs grouped and ordered by languages?\nAdditional table information: table: music_1"} +{"question": "SELECT DISTINCT main_industry FROM company", "answer": "What are the different main industries for all companies?\nAdditional table information: table: gas_company"} +{"question": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which policy type has the most records in the database?\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which allergy has most number of students affected?\nAdditional table information: table: allergy_1"} +{"question": "SELECT T1.id, T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id WHERE T2.interaction_type = 'activitor' GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the id and name of the enzyme with most number of medicines that can interact as 'activator'?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Indiana University'", "answer": "What are the papers published under the institution 'Indiana University'?\nAdditional table information: table: icfp_1"} +{"question": "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", "answer": "Find the county where produces the most number of wines with score higher than 90.\nAdditional table information: table: wine_1"} +{"question": "SELECT AVG(active_to_date - active_from_date) FROM customer_contact_channels", "answer": "Compute the average active time span of contact channels.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the title and id of the film that has the greatest number of copies in inventory?\nAdditional table information: table: sakila_1"} +{"question": "SELECT COUNT(*) FROM (SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 3)", "answer": "What is the count of cities with more than 3 airports?\nAdditional table information: table: flight_4"} +{"question": "SELECT DISTINCT fault_status FROM Fault_Log_Parts", "answer": "How many fault status codes are recorded in the fault log parts table?\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 2 ORDER BY COUNT(*) NULLS FIRST", "answer": "What are the cities that have more than 2 airports sorted by number of airports?\nAdditional table information: table: flight_4"} +{"question": "SELECT T1.driverid, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds DESC LIMIT 1", "answer": "What is the id and family name of the driver who has the longest laptime?\nAdditional table information: table: formula_1"} +{"question": "SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = 'Human Resource' OR T2.role_name = 'Manager'", "answer": "What are the employee ids of the employees whose role name is 'Human Resource' or 'Manager'?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT first_name, last_name, salary FROM employees WHERE first_name LIKE '%m'", "answer": "Display the first and last name, and salary for those employees whose first name is ending with the letter m.\nAdditional table information: table: hr_1"} +{"question": "SELECT zip_code FROM weather GROUP BY zip_code HAVING AVG(mean_humidity) < 70 INTERSECT SELECT zip_code FROM trip GROUP BY zip_code HAVING COUNT(*) >= 100", "answer": "What are the zip codes that have an average mean humidity below 70 and had at least 100 trips come through there?\nAdditional table information: table: bike_1"} +{"question": "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", "answer": "Find the number of scientists involved for the projects that require more than 300 hours.\nAdditional table information: table: scientist_1"} +{"question": "SELECT T1.title, T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T2.inventory_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the film title and inventory id of the item in the inventory which was rented most frequently?\nAdditional table information: table: sakila_1"} +{"question": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "With which kind of payment method were the least number of payments processed?\nAdditional table information: table: insurance_policies"} +{"question": "SELECT COUNT(DISTINCT Name) FROM PHOTOS", "answer": "Count the number of distinct names associated with the photos.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T1.date, T2.player FROM game AS T1 JOIN injury_accident AS T2 ON T1.id = T2.game_id ORDER BY T1.season DESC", "answer": "For each injury accident, find the date of the game and the name of the injured player in the game, and sort the results in descending order of game season.\nAdditional table information: table: game_injury"} +{"question": "SELECT COUNT(*) FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.city = 'Lake Geovannyton'", "answer": "Find the number of customers who live in the city called Lake Geovannyton.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T1.party_name, T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id", "answer": "Show all party names and their region names.\nAdditional table information: table: party_people"} +{"question": "SELECT first_name FROM actor GROUP BY first_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most popular first name of the actors?\nAdditional table information: table: sakila_1"} +{"question": "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 NULLS FIRST", "answer": "show the name of all bridges that was designed by american archtect, and sort the result by the bridge feet length.\nAdditional table information: table: architecture"} +{"question": "SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student", "answer": "Show ids for the faculty members who don't advise any student.\nAdditional table information: table: activity_1"} +{"question": "SELECT COUNT(*), T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id", "answer": "How many tasks does each project have? List the task count and the project detail.\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT COUNT(*), T1.dormid FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid WHERE T1.student_capacity > 100 GROUP BY T1.dormid", "answer": "For each dorm, how many amenities does it have?\nAdditional table information: table: dorm_1"} +{"question": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'International Finance')", "answer": "Give the title of the prerequisite to the course International Finance.\nAdditional table information: table: college_2"} +{"question": "SELECT T2.first_name, T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING COUNT(*) > 30", "answer": "What are the full names of actors who had roles in more than 30 films?\nAdditional table information: table: sakila_1"} +{"question": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Heathrow' INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Gatwick'", "answer": "What are the names of all aircrafts that are associated with both London Heathrow and Gatwick airports?\nAdditional table information: table: aircraft"} +{"question": "SELECT employee_id, job_id FROM employees WHERE salary < (SELECT MIN(salary) FROM employees WHERE job_id = 'MK_MAN')", "answer": "What are the employee ids and job ids for employees who make less than the lowest earning employee with title MK_MAN?\nAdditional table information: table: hr_1"} +{"question": "SELECT minister FROM party ORDER BY left_office DESC LIMIT 1", "answer": "Which minister left office the latest?\nAdditional table information: table: party_people"} +{"question": "SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code = 'ORG'", "answer": "What is the description for the budget type with code ORG?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which countries has the most number of airlines whose active status is 'Y'?\nAdditional table information: table: flight_4"} +{"question": "SELECT address FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards'", "answer": "What is Nancy Edwards's address?\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(DISTINCT SOURCE) FROM injury_accident", "answer": "How many different kinds of information sources are there for injury accidents?\nAdditional table information: table: game_injury"} +{"question": "SELECT DISTINCT Publisher FROM publication WHERE Price > 5000000", "answer": "What are the distinct publishers of publications with price higher than 5000000?\nAdditional table information: table: book_2"} +{"question": "SELECT COUNT(*) FROM Aircraft", "answer": "How many aircrafts do we have?\nAdditional table information: table: flight_1"} +{"question": "SELECT home_city FROM driver WHERE age > 40 GROUP BY home_city HAVING COUNT(*) >= 2", "answer": "Show home city where at least two drivers older than 40 are from.\nAdditional table information: table: school_bus"} +{"question": "SELECT Official_native_language FROM country WHERE Official_native_language LIKE '%English%'", "answer": "What are the official native languages that contain the string 'English'.\nAdditional table information: table: match_season"} +{"question": "SELECT event_id FROM EVENTS EXCEPT SELECT T1.event_id FROM Participants_in_Events AS T1 JOIN Participants AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE Participant_Details = 'Kenyatta Kuhn'", "answer": "Which events id does not have any participant with detail 'Kenyatta Kuhn'?\nAdditional table information: table: local_govt_in_alabama"} +{"question": "SELECT Headquarters FROM company GROUP BY Headquarters HAVING COUNT(*) >= 2", "answer": "Show the headquarters that have at least two companies.\nAdditional table information: table: company_employee"} +{"question": "SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major = 600", "answer": "Which student's age is older than 18 and is majoring in 600? List each student's first and last name.\nAdditional table information: table: restaurant_1"} +{"question": "SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the manager name with most number of gas stations opened after 2000.\nAdditional table information: table: gas_company"} +{"question": "SELECT product_category_code, typical_buying_price FROM products WHERE product_name = 'cumin'", "answer": "Return the category code and typical price of 'cumin'.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'Spanish'", "answer": "Find the the date of enrollment of the 'Spanish' course.\nAdditional table information: table: e_learning"} +{"question": "SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'MARROTTE' AND T2.lastname = 'KIRK'", "answer": "Which are the first and last names of the students taught by MARROTTE KIRK?\nAdditional table information: table: student_1"} +{"question": "SELECT headquarter FROM manufacturers WHERE founder = 'James'", "answer": "What is the headquarter of the company whose founder is James?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT Destruction_Authorised_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID", "answer": "What are the id of each employee and the number of document destruction authorised by that employee?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211'", "answer": "What are the total number of students enrolled in ACCT-211?\nAdditional table information: table: college_1"} +{"question": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code = 'PIT'", "answer": "Find the distinct first names of all the students who have vice president votes and whose city code is not PIT.\nAdditional table information: table: voter_2"} +{"question": "SELECT price_range FROM HOTELS", "answer": "Tell me the price ranges for all the hotels.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT Fname FROM STUDENT WHERE Age > 22", "answer": "Find the first names of students with age above 22.\nAdditional table information: table: voter_2"} +{"question": "SELECT T4.name FROM wedding AS T1 JOIN people AS T2 ON T1.male_id = T2.people_id JOIN people AS T3 ON T1.female_id = T3.people_id JOIN church AS T4 ON T4.church_id = T1.church_id WHERE T2.age > 30 OR T3.age > 30", "answer": "Show the church names for the weddings of all people older than 30.\nAdditional table information: table: wedding"} +{"question": "SELECT COUNT(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan'", "answer": "How many friends does Dan have?\nAdditional table information: table: network_2"} +{"question": "SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1", "answer": "What are all the different first names of the drivers who are in position as standing and won?\nAdditional table information: table: formula_1"} +{"question": "SELECT T1.name_first, T1.name_last FROM player AS T1, player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first, T1.name_last FROM player AS T1, player_award AS T2 WHERE T2.year = 1961", "answer": "Find the players' first name and last name who won award both in 1960 and in 1961.\nAdditional table information: table: baseball_1"} +{"question": "SELECT city FROM airports WHERE country = 'United States' GROUP BY city HAVING COUNT(*) > 3", "answer": "Return the cities with more than 3 airports in the United States.\nAdditional table information: table: flight_4"} +{"question": "SELECT t1.title FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID ORDER BY high_estimate DESC LIMIT 1", "answer": "Return the title of the film with the highest high estimate?\nAdditional table information: table: film_rank"} +{"question": "SELECT Name FROM Artwork WHERE NOT Artwork_ID IN (SELECT Artwork_ID FROM nomination)", "answer": "List the name of artworks that are not nominated.\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT DISTINCT T1.driverid, T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds > 100000", "answer": "Find all the distinct id and nationality of drivers who have had laptime more than 100000 milliseconds?\nAdditional table information: table: formula_1"} +{"question": "SELECT COUNT(*) FROM web_client_accelerator WHERE NOT id IN (SELECT accelerator_id FROM accelerator_compatible_browser)", "answer": "How many accelerators are not compatible with the browsers listed ?\nAdditional table information: table: browser_web"} +{"question": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > 3000", "answer": "Find the the name of the customers who have a loan with amount more than 3000.\nAdditional table information: table: loan_1"} +{"question": "SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID", "answer": "What are the names of all the physicians who took appointments.\nAdditional table information: table: hospital_1"} +{"question": "SELECT COUNT(*) FROM DEPARTMENT WHERE Division = 'AS'", "answer": "What is the number of departments in Division 'AS'?\nAdditional table information: table: college_3"} +{"question": "SELECT Venue FROM debate ORDER BY Num_of_Audience ASC NULLS FIRST", "answer": "List the venues of debates in ascending order of the number of audience.\nAdditional table information: table: debate"} +{"question": "SELECT DISTINCT TYPE FROM vocals", "answer": "Find all the vocal types.\nAdditional table information: table: music_2"} +{"question": "SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE t2.Company_name = 'Nokia Corporation' AND T1.Type <> 'Text'", "answer": "List the hardware model name for the phons that were produced by 'Nokia Corporation' but whose screen mode type is not Text.\nAdditional table information: table: phone_1"} +{"question": "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", "answer": "Give me a list of cities whose temperature in Feb is higher than that in Jun or cities that were once host cities?\nAdditional table information: table: city_record"} +{"question": "SELECT Name FROM wrestler WHERE Days_held < 100", "answer": "Return the names of wrestlers with fewer than 100 days held.\nAdditional table information: table: wrestler"} +{"question": "SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.Fname = 'David' AND T2.Lname = 'Shieber'", "answer": "What is the total number of hours per work and number of games played by David Shieber?\nAdditional table information: table: game_1"} +{"question": "SELECT Title FROM book WHERE NOT Book_ID IN (SELECT Book_ID FROM publication)", "answer": "List the titles of books that are not published.\nAdditional table information: table: book_2"} +{"question": "SELECT T2.invoice_number, T2.invoice_date FROM Financial_transactions AS T1 JOIN Invoices AS T2 ON T1.invoice_number = T2.invoice_number GROUP BY T1.invoice_number ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the invoice number and invoice date for the invoice with most number of transactions?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT T1.driverid, T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid WHERE T3.year > 2010 GROUP BY T1.driverid ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the id and last name of the driver who participated in the most races after 2010?\nAdditional table information: table: formula_1"} +{"question": "SELECT roomName, bedType FROM Rooms WHERE decor = 'traditional'", "answer": "What are the bed type and name of all the rooms with traditional decor?\nAdditional table information: table: inn_1"} +{"question": "SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING SUM(hoursperweek) > 10", "answer": "What are the student IDs for everybody who worked for more than 10 hours per week on all sports?\nAdditional table information: table: game_1"} +{"question": "SELECT T1.Name, T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID ORDER BY T2.Height DESC LIMIT 1", "answer": "Show the name and population of the country that has the highest roller coaster.\nAdditional table information: table: roller_coaster"} +{"question": "SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING COUNT(*) > 3", "answer": "Which complaint status has more than 3 records on file?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT DISTINCT publisher FROM book_club", "answer": "Show all distinct publishers for books.\nAdditional table information: table: culture_company"} +{"question": "SELECT COUNT(DISTINCT name) FROM PersonFriend WHERE NOT friend IN (SELECT name FROM person WHERE city = 'Austin')", "answer": "What is the total number of people who has no friend living in the city of Austin.\nAdditional table information: table: network_2"} +{"question": "SELECT Party FROM party WHERE NOT Party_ID IN (SELECT Party FROM election)", "answer": "What are the names of parties that do not have delegates in election?\nAdditional table information: table: election"} +{"question": "SELECT COUNT(*) FROM Faculty WHERE Rank = 'Professor' AND building = 'NEB'", "answer": "How many Professors are in building NEB?\nAdditional table information: table: activity_1"} +{"question": "SELECT first_name, last_name FROM employees ORDER BY hire_date ASC NULLS FIRST LIMIT 10", "answer": "What are the first and last names of the top 10 longest-serving employees?\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(*) FROM cinema", "answer": "Count the number of cinemas.\nAdditional table information: table: cinema"} +{"question": "SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie')", "answer": "What is the count of states with college students playing in the mid position but not as goalies?\nAdditional table information: table: soccer_2"} +{"question": "SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = 'Uganda'", "answer": "What are the times used by climbers who climbed mountains in the country of Uganda?\nAdditional table information: table: climbing"} +{"question": "SELECT TYPE, COUNT(*) FROM ship GROUP BY TYPE", "answer": "Show different types of ships and the number of ships of each type.\nAdditional table information: table: ship_mission"} +{"question": "SELECT Festival_Name FROM festival_detail ORDER BY YEAR DESC LIMIT 3", "answer": "Show the names of the three most recent festivals.\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT AVG(distance), AVG(price) FROM Flight WHERE origin = 'Los Angeles'", "answer": "What is the average distance and average price for flights from Los Angeles.\nAdditional table information: table: flight_1"} +{"question": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Country = 'China' OR T2.Country = 'Japan'", "answer": "What are the names of perpetrators in country 'China' or 'Japan'?\nAdditional table information: table: perpetrator"} +{"question": "SELECT COUNT(DISTINCT affiliation) FROM university", "answer": "Count the number of different affiliation types.\nAdditional table information: table: university_basketball"} +{"question": "SELECT apt_number FROM Apartments WHERE apt_type_code = 'Flat'", "answer": "Return the apartment numbers of the apartments with type code 'Flat'.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT T1.Aircraft, COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft", "answer": "List the names of aircrafts and the number of times it won matches.\nAdditional table information: table: aircraft"} +{"question": "SELECT T2.card_type_code, COUNT(*) FROM Financial_transactions AS T1 JOIN Customers_cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_code", "answer": "Show the card type codes and the number of transactions.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000", "answer": "Show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000.\nAdditional table information: table: ship_mission"} +{"question": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' AND salary > 80000", "answer": "What are the names of the instructors in the Comp. Sci. department who earn more than 80000?\nAdditional table information: table: college_2"} +{"question": "SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id ORDER BY T2.rating DESC LIMIT 1", "answer": "Find the name of the user who gave the highest rating.\nAdditional table information: table: epinions_1"} +{"question": "SELECT COUNT(DISTINCT name) FROM PersonFriend WHERE NOT friend IN (SELECT name FROM person WHERE city = 'Austin')", "answer": "What is the total number of people who have no friends living in Austin?\nAdditional table information: table: network_2"} +{"question": "SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName", "answer": "What are the different states that have students trying out?\nAdditional table information: table: soccer_2"} +{"question": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall'", "answer": "What are the names of the amenities that Smith Hall has?\nAdditional table information: table: dorm_1"} +{"question": "SELECT MAX(share_count) FROM TRANSACTIONS WHERE amount_of_transaction < 10000", "answer": "Show the maximum share count of transactions where the amount is smaller than 10000\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT COUNT(DISTINCT gtype) FROM Video_games", "answer": "How many video game types exist?\nAdditional table information: table: game_1"} +{"question": "SELECT AVG(T1.age), T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name", "answer": "What is the average age for each dorm and what are the names of each dorm?\nAdditional table information: table: dorm_1"} +{"question": "SELECT AVG(HS), MAX(HS), MIN(HS) FROM Player", "answer": "What is the average, maximum, and minimum for the number of hours spent training?\nAdditional table information: table: soccer_2"} +{"question": "SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = 'lead'", "answer": "How many songs have a lead vocal?\nAdditional table information: table: music_2"} +{"question": "SELECT T1.Name FROM Tourist_Attractions AS T1, VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Alison' EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1, VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Rosalind'", "answer": "What are the names of tourist attraction that Alison visited but Rosalind did not visit?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32", "answer": "What are the songs in volumes associated with the artist aged 32 or older?\nAdditional table information: table: music_4"} +{"question": "SELECT MIN(Crime_rate), MAX(Crime_rate) FROM county_public_safety", "answer": "What are the minimum and maximum crime rate of counties?\nAdditional table information: table: county_public_safety"} +{"question": "SELECT SUM(Amount_Claimed) FROM Claims", "answer": "What is total amount claimed summed across all the claims?\nAdditional table information: table: insurance_policies"} +{"question": "SELECT COUNT(*), T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name", "answer": "How many tracks are in each genre?\nAdditional table information: table: store_1"} +{"question": "SELECT name FROM student WHERE dept_name = 'History' ORDER BY tot_cred DESC LIMIT 1", "answer": "What is the name of the student who has the highest total credits in the History department.\nAdditional table information: table: college_2"} +{"question": "SELECT customer_id, COUNT(*) FROM Customers_cards GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the id of the customer who has the most cards, as well as the number of cards.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the track that has had the greatest number of races?\nAdditional table information: table: race_track"} +{"question": "SELECT COUNT(*) FROM ref_colors", "answer": "How many colors are there?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT COUNT(*), gender FROM Person WHERE age < 40 GROUP BY gender", "answer": "Find the number of people who is under 40 for each gender.\nAdditional table information: table: network_2"} +{"question": "SELECT T2.employee_name, T3.employee_name FROM Documents_to_be_destroyed AS T1 JOIN Employees AS T2 ON T1.Destruction_Authorised_by_Employee_ID = T2.employee_id JOIN Employees AS T3 ON T1.Destroyed_by_Employee_ID = T3.employee_id", "answer": "List the names of the employees who authorized the destruction of documents and the employees who destroyed the corresponding documents.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT name, email FROM user_profiles WHERE followers > 1000", "answer": "Find the name and email of the users who have more than 1000 followers.\nAdditional table information: table: twitter_1"} +{"question": "SELECT campus FROM campuses WHERE YEAR >= 1935 AND YEAR <= 1939", "answer": "Which campus was opened between 1935 and 1939?\nAdditional table information: table: csu_1"} +{"question": "SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown HAVING COUNT(*) >= 2", "answer": "What are the hometowns that are shared by at least two gymnasts?\nAdditional table information: table: gymnast"} +{"question": "SELECT COUNT(*) FROM COURSE WHERE Credits > 2", "answer": "How many courses have more than 2 credits?\nAdditional table information: table: college_3"} +{"question": "SELECT T2.name, T2.location FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id HAVING COUNT(*) = 1", "answer": "What are the names and locations of tracks that have had exactly 1 race?\nAdditional table information: table: race_track"} +{"question": "SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton'", "answer": "Count the number of classrooms in Lamberton.\nAdditional table information: table: college_2"} +{"question": "SELECT Author FROM submission ORDER BY Scores ASC NULLS FIRST", "answer": "List the authors of submissions in ascending order of scores.\nAdditional table information: table: workshop_paper"} +{"question": "SELECT Industry, COUNT(*) FROM Companies GROUP BY Industry", "answer": "Whah are the name of each industry and the number of companies in that industry?\nAdditional table information: table: company_office"} +{"question": "SELECT AVG(T2.gradepoint) FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.LName = 'Smith'", "answer": "Find the average grade point of student whose last name is Smith.\nAdditional table information: table: college_3"} +{"question": "SELECT * FROM basketball_match", "answer": "What is all the information about the basketball match?\nAdditional table information: table: university_basketball"} +{"question": "SELECT name, salary FROM Employee WHERE eid = 242518965", "answer": "What is the name and salary of the employee with the id 242518965?\nAdditional table information: table: flight_1"} +{"question": "SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2", "answer": "What is the team with at least 2 technicians?\nAdditional table information: table: machine_repair"} +{"question": "SELECT clubdesc FROM club WHERE clubname = 'Tennis Club'", "answer": "Find the description of the club called 'Tennis Club'.\nAdditional table information: table: club_1"} +{"question": "SELECT T1.name FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = 'Sigma' OR T1.brand = 'Olympus'", "answer": "What are the names of photos taken with the lens brand 'Sigma' or 'Olympus'?\nAdditional table information: table: mountain_photos"} +{"question": "SELECT name FROM PersonFriend GROUP BY name HAVING COUNT(*) = 1", "answer": "Find the person who has exactly one friend.\nAdditional table information: table: network_2"} +{"question": "SELECT MAX(YEAR) FROM perpetrator", "answer": "In which year did the most recent crime happen?\nAdditional table information: table: perpetrator"} +{"question": "SELECT AVG(no_of_customers) FROM bank WHERE state = 'Utah'", "answer": "Find the average number of customers in all banks of Utah state.\nAdditional table information: table: loan_1"} +{"question": "SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Which customer status code has least number of customers?\nAdditional table information: table: driving_school"} +{"question": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING COUNT(*) > 1", "answer": "What are the names of customers who have taken out more than one loan?\nAdditional table information: table: loan_1"} +{"question": "SELECT name, year_join FROM artist WHERE country <> 'United States'", "answer": "Show all artist names and the year joined who are not from United States.\nAdditional table information: table: theme_gallery"} +{"question": "SELECT * FROM job_history AS T1 JOIN employees AS T2 ON T1.employee_id = T2.employee_id WHERE T2.salary >= 12000", "answer": "Can you return all detailed info of jobs which was done by any of the employees who is presently earning a salary on and above 12000?\nAdditional table information: table: hr_1"} +{"question": "SELECT COUNT(*) FROM race", "answer": "Count the number of races.\nAdditional table information: table: race_track"} +{"question": "SELECT open_date FROM church GROUP BY open_date HAVING COUNT(*) >= 2", "answer": "Show the opening year in whcih at least two churches opened.\nAdditional table information: table: wedding"} +{"question": "SELECT dorm_name FROM dorm WHERE NOT dormid IN (SELECT dormid FROM has_amenity)", "answer": "Find the name of dorms that do not have any amenity\nAdditional table information: table: dorm_1"} +{"question": "SELECT T1.title FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING COUNT(*) = 2", "answer": "Find the title of courses that have two prerequisites?\nAdditional table information: table: college_2"} +{"question": "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", "answer": "Which cities have lower temperature in March than in Dec and have never served as host cities?\nAdditional table information: table: city_record"} +{"question": "SELECT COUNT(DISTINCT city) FROM EMPLOYEE", "answer": "Find the number of different cities that employees live in.\nAdditional table information: table: chinook_1"} +{"question": "SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID ORDER BY T2.quality_rank NULLS FIRST", "answer": "Show names of technicians in ascending order of quality rank of the machine they are assigned.\nAdditional table information: table: machine_repair"} +{"question": "SELECT COUNT(*) FROM customers", "answer": "How many customers are there?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT COUNT(*) FROM entrepreneur", "answer": "Count the number of entrepreneurs.\nAdditional table information: table: entrepreneur"} +{"question": "SELECT T2.customer_last_name, T1.customer_id, T2.phone_number FROM Orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the customer last name, id and phone number with most number of orders?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT T2.Name, T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID", "answer": "For each journal_committee, find the editor name and the journal theme.\nAdditional table information: table: journal_committee"} +{"question": "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", "answer": "List the states which have between 2 to 4 staffs living there.\nAdditional table information: table: driving_school"} +{"question": "SELECT T2.first_name, T2.last_name, T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the full name and id of the actor or actress who starred in the greatest number of films.\nAdditional table information: table: sakila_1"} +{"question": "SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.city = 'new york city'", "answer": "What are the names of all friends who are from New York?\nAdditional table information: table: network_2"} +{"question": "SELECT name FROM instructor WHERE salary > (SELECT MAX(salary) FROM instructor WHERE dept_name = 'Biology')", "answer": "What are the names of all instructors with a higher salary than any of the instructors in the Biology department?\nAdditional table information: table: college_2"} +{"question": "SELECT product_type_code, MAX(product_price), MIN(product_price) FROM products GROUP BY product_type_code", "answer": "What are the maximum and minimum product prices for each product type?\nAdditional table information: table: department_store"} +{"question": "SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = 'Maryland' OR T2.College = 'Duke'", "answer": "What are the official languages of the countries of players from Maryland or Duke college?\nAdditional table information: table: match_season"} +{"question": "SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100", "answer": "Give me the descriptions of the service types that cost more than 100.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the sport with the most scholarship students?\nAdditional table information: table: game_1"} +{"question": "SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = 'Appropriations' INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = 'Economic Matters'", "answer": "What are the names of parties that have both delegates on 'Appropriations' committee and\nAdditional table information: table: election"} +{"question": "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'", "answer": "Find the details of all the distinct customers who have orders with status 'On Road'.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT f_id FROM song WHERE resolution > (SELECT AVG(resolution) FROM song WHERE genre_is = 'modern')", "answer": "What is ids of the songs whose resolution is higher than the average resolution of songs in modern genre?\nAdditional table information: table: music_1"} +{"question": "SELECT COUNT(*) FROM ROLES", "answer": "How many roles are there?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT SUM(Num_of_Audience) FROM festival_detail", "answer": "What are the total number of the audiences who visited any of the festivals?\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT COUNT(*) FROM artist", "answer": "How many artists do we have?\nAdditional table information: table: theme_gallery"} +{"question": "SELECT Name FROM technician WHERE NOT technician_id IN (SELECT technician_id FROM repair_assignment)", "answer": "List the names of technicians who have not been assigned to repair machines.\nAdditional table information: table: machine_repair"} +{"question": "SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student", "answer": "What are the ids of the faculty members who do not advise any student.\nAdditional table information: table: activity_1"} +{"question": "SELECT T1.name, T1.date, T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id", "answer": "What are the names and dates of races, and the names of the tracks where they are held?\nAdditional table information: table: race_track"} +{"question": "SELECT firstname FROM teachers WHERE classroom = 110", "answer": "Find the first names of all the teachers that teach in classroom 110.\nAdditional table information: table: student_1"} +{"question": "SELECT T2.balance, T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T1.name = 'Brown'", "answer": "Find the checking balance and saving balance in the Brown\u2019s account.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING MIN(bikes_available) < 7", "answer": "What are the ids of stations that have latitude above 37.4 and never had bike availability below 7?\nAdditional table information: table: bike_1"} +{"question": "SELECT name, origin, OWNER FROM program", "answer": "What are the name, origin and owner of each program?\nAdditional table information: table: program_share"} +{"question": "SELECT T2.allergytype, COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype", "answer": "How many students are affected by each allergy type?\nAdditional table information: table: allergy_1"} +{"question": "SELECT CName FROM COURSE WHERE Credits = 3 UNION SELECT CName FROM COURSE WHERE Credits = 1 AND Hours = 4", "answer": "What are the names of courses that give either 3 credits, or 1 credit and 4 hours?\nAdditional table information: table: college_3"} +{"question": "SELECT order_id FROM shipments WHERE shipment_date > '2000-01-01'", "answer": "Find the ids of orders which are shipped after 2000-01-01.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_status = 'Cancelled'", "answer": "What is the total number of products that are in orders with status 'Cancelled'?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT AVG(Price), manufacturer FROM Products GROUP BY manufacturer", "answer": "Select the average price of each manufacturer's products, showing only the manufacturer's code.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T2.bathroom_count > 2", "answer": "Which buildings have apartments that have more than two bathrooms? Give me the addresses of the buildings.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT lname FROM authors WHERE fname = 'Amal'", "answer": "Find the last name of the author with first name 'Amal'.\nAdditional table information: table: icfp_1"} +{"question": "SELECT AVG(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'", "answer": "What is the average number of hours spent practicing for students who got rejected?\nAdditional table information: table: soccer_2"} +{"question": "SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count >= 100 OR amount_of_transaction >= 100", "answer": "What are the dates of transactions with at least 100 share count or amount bigger than 100?\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT AVG(age), job FROM Person GROUP BY job", "answer": "How old is the average person for each job?\nAdditional table information: table: network_2"} +{"question": "SELECT first_name, last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000", "answer": "What are the first and last names of all customers with between 1000 and 3000 dollars outstanding?\nAdditional table information: table: driving_school"} +{"question": "SELECT DISTINCT T1.customer_first_name, T1.customer_last_name, T1.phone_number FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id", "answer": "What are the distinct first names, last names, and phone numbers for customers with accounts?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE lastname = 'Heilo' GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which vocal type has the band mate with last name 'Heilo' played the most?\nAdditional table information: table: music_2"} +{"question": "SELECT f_id FROM files WHERE formats = 'mp4' INTERSECT SELECT f_id FROM song WHERE resolution < 1000", "answer": "What is the id of the files that are available in the format of mp4 and a resolution smaller than 1000?\nAdditional table information: table: music_1"} +{"question": "SELECT Speed FROM roller_coaster ORDER BY LENGTH DESC LIMIT 1", "answer": "What are the speeds of the longest roller coaster?\nAdditional table information: table: roller_coaster"} +{"question": "SELECT COUNT(*) FROM employee", "answer": "Find the total number of employees.\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(*) FROM browser WHERE market_share >= 5", "answer": "How many main stream browsers whose market share is at least 5 exist?\nAdditional table information: table: browser_web"} +{"question": "SELECT T1.staff_id, T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = 'Department Manager'", "answer": "Return the staff ids and genders for any staff with the title Department Manager.\nAdditional table information: table: department_store"} +{"question": "SELECT T1.Allergy, T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = 'Lisa' ORDER BY T1.Allergy NULLS FIRST", "answer": "What are the allergies and their types that the student with first name Lisa has? And order the result by name of allergies.\nAdditional table information: table: allergy_1"} +{"question": "SELECT * FROM Albums WHERE YEAR = 2010", "answer": "What information is there on albums from 2010?\nAdditional table information: table: music_2"} +{"question": "SELECT DISTINCT YEAR FROM competition WHERE Competition_type <> 'Tournament'", "answer": "What are the different years for all competitions that are not of type equal to tournament?\nAdditional table information: table: sports_competition"} +{"question": "SELECT address_line_1, address_line_2 FROM customers WHERE email_address = 'vbogisich@example.org'", "answer": "What are lines 1 and 2 of the addressed of the customer with the email 'vbogisich@example.org'?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3", "answer": "What are the different ranges of the 3 mountains with the highest prominence?\nAdditional table information: table: climbing"} +{"question": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC", "answer": "What are the different software platforms for devices, ordered by frequency descending?\nAdditional table information: table: device"} +{"question": "SELECT Name FROM editor ORDER BY Age ASC NULLS FIRST", "answer": "List the names of editors in ascending order of age.\nAdditional table information: table: journal_committee"} +{"question": "SELECT MIN(Vote_Percent), MAX(Vote_Percent) FROM election", "answer": "What are the minimum and maximum vote percents of elections?\nAdditional table information: table: election_representative"} +{"question": "SELECT DISTINCT District_name FROM district ORDER BY city_area DESC", "answer": "What are the different district names in order of descending city area?\nAdditional table information: table: store_product"} +{"question": "SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.firstname = 'Marianne'", "answer": "What are the names of all songs produced by the artist with the first name 'Marianne'?\nAdditional table information: table: music_2"} +{"question": "SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_piad = (SELECT MIN(amount_piad) FROM claim_headers)", "answer": "Which customer made the smallest amount of claim in one claim? Return the customer details.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "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", "answer": "Which order deals with the most items? Return the order id.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT amount FROM payment ORDER BY amount DESC LIMIT 1", "answer": "Return the amount of the largest payment.\nAdditional table information: table: sakila_1"} +{"question": "SELECT DISTINCT (UnitPrice) FROM TRACK", "answer": "Find the distinct unit prices for tracks.\nAdditional table information: table: chinook_1"} +{"question": "SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 3 AND T2.firstname <> 'COVIN' AND T2.lastname <> 'JEROME'", "answer": "Find the last names of the students in third grade that are not taught by COVIN JEROME.\nAdditional table information: table: student_1"} +{"question": "SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T2.dormid FROM dorm AS T3 JOIN has_amenity AS T4 ON T3.dormid = T4.dormid JOIN dorm_amenity AS T5 ON T4.amenid = T5.amenid GROUP BY T3.dormid ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "Find the first name of students who are living in the dorm that has most number of amenities.\nAdditional table information: table: dorm_1"} +{"question": "SELECT Name FROM scientists WHERE NOT ssn IN (SELECT scientist FROM AssignedTo)", "answer": "What are the names of scientists who have not been assigned a project?\nAdditional table information: table: scientist_1"} +{"question": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2", "answer": "What are the booking start and end dates of the apartments with more than 2 bedrooms?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT t1.color_code, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = 'chervil'", "answer": "What is the color code and description of the product named 'chervil'?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT T1.Total_Points FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age ASC NULLS FIRST LIMIT 1", "answer": "Return the total points of the gymnast with the lowest age.\nAdditional table information: table: gymnast"} +{"question": "SELECT card_type_code, COUNT(*) FROM Customers_cards GROUP BY card_type_code", "answer": "What are the different card types, and how many cards are there of each?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT T1.emp_lname, T1.emp_hiredate FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num WHERE T2.prof_office = 'DRE 102'", "answer": "Find the last name and hire date of the professor who is in office DRE 102.\nAdditional table information: table: college_1"} +{"question": "SELECT T2.Fname, T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID WHERE T1.CName = 'COMPUTER LITERACY'", "answer": "Find the first name and last name of the instructor of course that has course name\nAdditional table information: table: college_3"} +{"question": "SELECT AVG(length_feet) FROM bridge", "answer": "What is the average length in feet of the bridges?\nAdditional table information: table: architecture"} +{"question": "SELECT Name FROM wrestler ORDER BY Days_held DESC", "answer": "List the names of wrestlers in descending order of days held.\nAdditional table information: table: wrestler"} +{"question": "SELECT COUNT(*) FROM premises", "answer": "How many premises are there?\nAdditional table information: table: customers_campaigns_ecommerce"} +{"question": "SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID", "answer": "Find the names of all instructors who have taught some course and the course_id.\nAdditional table information: table: college_2"} +{"question": "SELECT T2.account_name, T1.account_id, COUNT(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id", "answer": "Return the names and ids of each account, as well as the number of transactions.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT DISTINCT Theme FROM journal", "answer": "Show the distinct themes of journals.\nAdditional table information: table: journal_committee"} +{"question": "SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name = 'China'", "answer": "Find the marketing region description of China?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id WHERE Circulation_History.document_id = 1", "answer": "List all employees in the circulation history of the document with id 1. List the employee's name.\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' EXCEPT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num", "answer": "What are the first names of the professors who do not teach a class.\nAdditional table information: table: college_1"} +{"question": "SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1", "answer": "Find the id of the order made most recently.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Elsa'", "answer": "Where does the staff member with the first name Elsa live?\nAdditional table information: table: sakila_1"} +{"question": "SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the investor that has invested in the most number of entrepreneurs?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT name FROM Person WHERE age = (SELECT MAX(age) FROM person)", "answer": "Who is the oldest person?\nAdditional table information: table: network_2"} +{"question": "SELECT customer_name FROM customers WHERE customer_name LIKE '%Alex%'", "answer": "Find the name of all customers whose name contains 'Alex'.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the transaction type code that occurs the most frequently.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT director FROM Movie GROUP BY director HAVING COUNT(*) = 1", "answer": "What are the names of all directors who made one movie?\nAdditional table information: table: movie_1"} +{"question": "SELECT course_name FROM courses ORDER BY course_name NULLS FIRST", "answer": "What are the names of the courses in alphabetical order?\nAdditional table information: table: student_assessment"} +{"question": "SELECT T1.rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank", "answer": "Show all the faculty ranks and the number of students advised by each rank.\nAdditional table information: table: activity_1"} +{"question": "SELECT t2.All_Games, t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'Clemson'", "answer": "What are the all games score and location of the school called Clemson?\nAdditional table information: table: university_basketball"} +{"question": "SELECT payment_date FROM payment ORDER BY payment_date ASC NULLS FIRST LIMIT 1", "answer": "When did the first payment happen?\nAdditional table information: table: sakila_1"} +{"question": "SELECT f_id FROM song WHERE resolution > (SELECT AVG(resolution) FROM song WHERE genre_is = 'modern')", "answer": "What are the ids of all songs that have higher resolution of the average resolution in the modern genre?\nAdditional table information: table: music_1"} +{"question": "SELECT name FROM Aircraft ORDER BY distance NULLS FIRST LIMIT 3", "answer": "What are the aircrafts with top 3 shortest lengthes? List their names.\nAdditional table information: table: flight_1"} +{"question": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'female'", "answer": "Find the female friends of Alice.\nAdditional table information: table: network_2"} +{"question": "SELECT CName FROM COURSE WHERE Credits = 1", "answer": "What are the names of courses with 1 credit?\nAdditional table information: table: college_3"} +{"question": "SELECT MAX(Age) FROM STUDENT", "answer": "What is the oldest age among the students?\nAdditional table information: table: voter_2"} +{"question": "SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Psychiatry'", "answer": "Find the name of physicians who are affiliated with both Surgery and Psychiatry departments.\nAdditional table information: table: hospital_1"} +{"question": "SELECT main_industry, COUNT(*) FROM company GROUP BY main_industry ORDER BY SUM(market_value) DESC LIMIT 1", "answer": "List the main industry with highest total market value and its number of companies.\nAdditional table information: table: gas_company"} +{"question": "SELECT COUNT(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Dayana Robel'", "answer": "How many policies are listed for the customer named 'Dayana Robel'?\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT T2.balance, T3.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid", "answer": "Find the name, checking balance and saving balance of all accounts in the bank.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT T1.theme, T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.ticket_price > (SELECT AVG(ticket_price) FROM exhibition)", "answer": "Return the names of artists and the themes of their exhibitions that had a ticket price higher than average.\nAdditional table information: table: theme_gallery"} +{"question": "SELECT T1.name FROM nurse AS T1 JOIN appointment AS T2 ON T1.employeeid = T2.prepnurse GROUP BY T1.employeeid ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the nurse has the most appointments?\nAdditional table information: table: hospital_1"} +{"question": "SELECT COUNT(*), city FROM employees WHERE title = 'IT Staff' GROUP BY city", "answer": "How many employees who are IT staff are from each city?\nAdditional table information: table: store_1"} +{"question": "SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = 'San Francisco State University' AND T2.year = 1996", "answer": "What is the campus fee of 'San Francisco State University' in year 1996?\nAdditional table information: table: csu_1"} +{"question": "SELECT COUNT(*) FROM storm WHERE Number_Deaths > 0", "answer": "Count the number of storms in which at least 1 person died.\nAdditional table information: table: storm_record"} +{"question": "SELECT Player_name, residence FROM player WHERE Occupation <> 'Researcher'", "answer": "List the name and residence for players whose occupation is not 'Researcher'.\nAdditional table information: table: riding_club"} +{"question": "SELECT SUM(Amount_Settled) FROM Settlements", "answer": "Compute the total amount of settlement across all the settlements.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = 'Sales Person' EXCEPT SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = 'Clerical Staff'", "answer": "What are the names and genders of staff who have held the title Sales Person, but never Clerical Staff?\nAdditional table information: table: department_store"} +{"question": "SELECT COUNT(*), role_code FROM users GROUP BY role_code", "answer": "What are the different role codes for users, and how many users have each?\nAdditional table information: table: document_management"} +{"question": "SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = 'walk'", "answer": "What are the details of the shops that can be accessed by walk?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE '%film%'", "answer": "Find all the locations whose names contain the word 'film'.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT COUNT(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population > 20000)", "answer": "How many cities are in counties that have populations of over 20000?\nAdditional table information: table: county_public_safety"} +{"question": "SELECT FirstName, LastName FROM CUSTOMER WHERE Email = 'luisg@embraer.com.br'", "answer": "What is the first name and last name of the customer that has email 'luisg@embraer.com.br'?\nAdditional table information: table: chinook_1"} +{"question": "SELECT T2.name, T2.position FROM department AS T1 JOIN physician AS T2 ON T1.head = T2.EmployeeID GROUP BY departmentID ORDER BY COUNT(departmentID) NULLS FIRST LIMIT 1", "answer": "Find the name and position of the head of the department with the least employees.\nAdditional table information: table: hospital_1"} +{"question": "SELECT name_first, name_last FROM player WHERE weight > 220 OR height < 75", "answer": "What are the first name and last name of the players who have weight above 220 or height below 75?\nAdditional table information: table: baseball_1"} +{"question": "SELECT SUM(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010", "answer": "What is the total salary expenses of team Boston Red Stockings in 2010?\nAdditional table information: table: baseball_1"} +{"question": "SELECT truck_details FROM trucks ORDER BY truck_licence_number NULLS FIRST", "answer": "Show the details of all trucks in the order of their license number.\nAdditional table information: table: customer_deliveries"} +{"question": "SELECT AVG(distance), AVG(price) FROM Flight WHERE origin = 'Los Angeles'", "answer": "What is the average distance and price for all flights from LA?\nAdditional table information: table: flight_1"} +{"question": "SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.preferred_foot = 'left' AND T2.overall_rating >= 85 AND T2.overall_rating <= 90", "answer": "List the names of all left-footed players who have overall rating between 85 and 90.\nAdditional table information: table: soccer_1"} +{"question": "SELECT COUNT(*) FROM Rating WHERE stars > 3", "answer": "How many movie ratings have more than 3 stars?\nAdditional table information: table: movie_1"} +{"question": "SELECT SUM(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T1.state = 'New York'", "answer": "What is the total amount of money loaned by banks in New York state?\nAdditional table information: table: loan_1"} +{"question": "SELECT AVG(price) FROM Flight WHERE origin = 'Los Angeles' AND destination = 'Honolulu'", "answer": "What is the average price for flights from LA to Honolulu?\nAdditional table information: table: flight_1"} +{"question": "SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_claimed = (SELECT MAX(amount_claimed) FROM claim_headers)", "answer": "What is the name of the customer who has made the largest amount of claim in a single claim?\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT Name FROM GENRE", "answer": "What are the names of different music genres?\nAdditional table information: table: chinook_1"} +{"question": "SELECT Name, Nationality FROM HOST ORDER BY Age DESC LIMIT 1", "answer": "Show the name and the nationality of the oldest host.\nAdditional table information: table: party_host"} +{"question": "SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = 'Brazil'", "answer": "What are the different first names for customers from Brazil who have also had an invoice?\nAdditional table information: table: chinook_1"} +{"question": "SELECT SUM(acc_bal), state FROM customer WHERE credit_score > 100 GROUP BY state", "answer": "For each state, find the total account balance of customers whose credit score is above 100.\nAdditional table information: table: loan_1"} +{"question": "SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id JOIN products AS T3 ON T2.product_id = T3.product_id GROUP BY T3.product_id HAVING COUNT(DISTINCT T1.customer_id) >= 2", "answer": "Find the names of products that were bought by at least two distinct customers.\nAdditional table information: table: department_store"} +{"question": "SELECT product_description FROM products WHERE product_name = 'Chocolate'", "answer": "What is the description of the product named 'Chocolate'?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id GROUP BY T2.member_in_charge_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of member in charge of greatest number of events?\nAdditional table information: table: party_people"} +{"question": "SELECT Fname, Lname FROM Student WHERE Major = 600", "answer": "List all students' first names and last names who majored in 600.\nAdditional table information: table: restaurant_1"} +{"question": "SELECT Delegate FROM election WHERE District = 1", "answer": "Show the delegate from district 1 in election.\nAdditional table information: table: election"} +{"question": "SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses", "answer": "What are the ids of documents which don't have expense budgets?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT region_name FROM region WHERE region_name <> 'Denmark'", "answer": "Show names for all regions except for Denmark.\nAdditional table information: table: storm_record"} +{"question": "SELECT COUNT(DISTINCT complaint_type_code) FROM complaints", "answer": "How many distinct complaint type codes are there in the database?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT document_name FROM documents EXCEPT SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code JOIN document_sections_images AS t3 ON t2.section_id = t3.section_id", "answer": "What are the names of documents that do not have any images?\nAdditional table information: table: document_management"} +{"question": "SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = 'San Francisco State University' AND T2.year = 1996", "answer": "What is the campus fee for San Francisco State University in 1996?\nAdditional table information: table: csu_1"} +{"question": "SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = 'Taizhou ( Zhejiang )'", "answer": "IN which year did city 'Taizhou ( Zhejiang )' serve as a host city?\nAdditional table information: table: city_record"} +{"question": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = 'back'", "answer": "Find the name of songs that does not have a back vocal.\nAdditional table information: table: music_2"} +{"question": "SELECT title FROM course ORDER BY title NULLS FIRST, credits NULLS FIRST", "answer": "Given the titles of all courses, in order of titles and credits.\nAdditional table information: table: college_2"} +{"question": "SELECT order_id FROM shipments WHERE shipment_tracking_number = '3452'", "answer": "Find the id of the order whose shipment tracking number is '3452'.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT COUNT(*) FROM Flight", "answer": "What is the number of flights?\nAdditional table information: table: flight_1"} +{"question": "SELECT T2.first_name, T2.last_name, COUNT(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY COUNT(T1.reports_to) DESC LIMIT 1", "answer": "Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee.\nAdditional table information: table: store_1"} +{"question": "SELECT MAX(Milliseconds), MIN(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Pop'", "answer": "What are the duration of the longest and shortest pop tracks in milliseconds?\nAdditional table information: table: chinook_1"} +{"question": "SELECT lname FROM authors WHERE fname = 'Amal'", "answer": "Which authors have first name 'Amal'? List their last names.\nAdditional table information: table: icfp_1"} +{"question": "SELECT country, COUNT(*) FROM stadium GROUP BY country", "answer": "How many stadiums does each country have?\nAdditional table information: table: swimming"} +{"question": "SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t3.district_name = 'Khanewal District'", "answer": "Find the names of all stores in Khanewal District.\nAdditional table information: table: store_product"} +{"question": "SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the code of the document type that is most common.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT average_attendance FROM stadium WHERE capacity_percentage > 100", "answer": "What is the average attendance of stadiums with capacity percentage higher than 100%?\nAdditional table information: table: game_injury"} +{"question": "SELECT name FROM people ORDER BY date_of_birth NULLS FIRST", "answer": "What are the names of all people, ordered by their date of birth?\nAdditional table information: table: candidate_poll"} +{"question": "SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T2.amenid = T1.amenid JOIN dorm AS T3 ON T2.dormid = T3.dormid WHERE T3.dorm_name = 'Anonymous Donor Hall' ORDER BY T1.amenity_name NULLS FIRST", "answer": "What are the amenities in alphabetical order that Anonymous Donor Hall has?\nAdditional table information: table: dorm_1"} +{"question": "SELECT name, origin, OWNER FROM program", "answer": "List the name, origin and owner of each program.\nAdditional table information: table: program_share"} +{"question": "SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2004 AND T2.campus = 'San Francisco State University'", "answer": "How many faculty lines are there at San Francisco State University in 2004?\nAdditional table information: table: csu_1"} +{"question": "SELECT COUNT(*) FROM head WHERE age > 56", "answer": "How many heads of the departments are older than 56 ?\nAdditional table information: table: department_management"} +{"question": "SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3", "answer": "what are the top 3 highest support rates?\nAdditional table information: table: candidate_poll"} +{"question": "SELECT customer_status_code, cell_mobile_phone_number, email_address FROM Customers WHERE first_name = 'Marina' OR last_name = 'Kohler'", "answer": "What is the status code, mobile phone number and email address of customer with last name as Kohler or first name as Marina?\nAdditional table information: table: driving_school"} +{"question": "SELECT MAX(date_moved_in) FROM Residents", "answer": "When is the last day any resident moved in?\nAdditional table information: table: local_govt_and_lot"} +{"question": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles'", "answer": "Find the state of the college which player Charles is attending.\nAdditional table information: table: soccer_2"} +{"question": "SELECT COUNT(*) FROM technician", "answer": "How many technicians are there?\nAdditional table information: table: machine_repair"} +{"question": "SELECT COUNT(*) FROM Accounts", "answer": "Count the number of accounts.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT DISTINCT classroom FROM list WHERE grade = 4", "answer": "Find the classrooms in which grade 4 is studying.\nAdditional table information: table: student_1"} +{"question": "SELECT start_station_name, start_station_id FROM trip WHERE start_date LIKE '8/%' GROUP BY start_station_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the start station's name and id for the one that had the most start trips in August?\nAdditional table information: table: bike_1"} +{"question": "SELECT city, GDP FROM city ORDER BY GDP NULLS FIRST LIMIT 1", "answer": "Which city has the lowest GDP? Please list the city name and its GDP.\nAdditional table information: table: city_record"} +{"question": "SELECT document_type_code FROM Ref_document_types WHERE document_type_name = 'Paper'", "answer": "What is the document type code for document type 'Paper'?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT destination, COUNT(*) FROM Flight GROUP BY destination", "answer": "Show all destinations and the number of flights to each destination.\nAdditional table information: table: flight_1"} +{"question": "SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay = T3.StayID WHERE T3.room = 111", "answer": "Find the names of all patients who have an undergoing treatment and are staying in room 111.\nAdditional table information: table: hospital_1"} +{"question": "SELECT home_city FROM driver EXCEPT SELECT home_city FROM driver WHERE age > 40", "answer": "Show all home cities except for those having a driver older than 40.\nAdditional table information: table: school_bus"} +{"question": "SELECT Name FROM ship WHERE Nationality = 'United States' OR Nationality = 'United Kingdom'", "answer": "Show the name of ships whose nationality is either United States or United Kingdom.\nAdditional table information: table: ship_mission"} +{"question": "SELECT AVG(num_of_staff), AVG(score) FROM shop", "answer": "What are the average score and average staff number of all shops?\nAdditional table information: table: coffee_shop"} +{"question": "SELECT title FROM Movie WHERE director = 'James Cameron' OR YEAR < 1980", "answer": "What are names of the movies that are either made before 1980 or directed by James Cameron?\nAdditional table information: table: movie_1"} +{"question": "SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000", "answer": "Show all director names who have a movie in the year 1999 or 2000.\nAdditional table information: table: culture_company"} +{"question": "SELECT COUNT(*) FROM Student", "answer": "How many students are there?\nAdditional table information: table: allergy_1"} +{"question": "SELECT Investor_details FROM INVESTORS", "answer": "Show all investor details.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT name FROM pilot WHERE NOT pilot_id IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia')", "answer": "What are the names of the pilots that have not won any matches in Australia?\nAdditional table information: table: aircraft"} +{"question": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall' ORDER BY T3.amenity_name NULLS FIRST", "answer": "Find the name of amenities Smith Hall dorm have. ordered the results by amenity names.\nAdditional table information: table: dorm_1"} +{"question": "SELECT actual_order_id FROM actual_orders WHERE order_status_code = 'Success'", "answer": "Find the ids of orders whose status is 'Success'.\nAdditional table information: table: customer_deliveries"} +{"question": "SELECT date, mean_temperature_f, mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3", "answer": "What is the date, average temperature and mean humidity for the days with the 3 largest maximum gust speeds?\nAdditional table information: table: bike_1"} +{"question": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1", "answer": "Find the names of the courses that have just one student enrollment.\nAdditional table information: table: e_learning"} +{"question": "SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T2.staff_id HAVING COUNT(*) > 1", "answer": "What are the names of staff who have been assigned multiple jobs?\nAdditional table information: table: department_store"} +{"question": "SELECT name, job FROM Person ORDER BY name NULLS FIRST", "answer": "What are the names and job titles of every person ordered alphabetically by name?\nAdditional table information: table: network_2"} +{"question": "SELECT COUNT(*) FROM enzyme WHERE NOT id IN (SELECT enzyme_id FROM medicine_enzyme_interaction)", "answer": "How many enzymes do not have any interactions?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = 'Rock' OR T1.name = 'Jazz'", "answer": "List the name of tracks belongs to genre Rock or genre Jazz.\nAdditional table information: table: store_1"} +{"question": "SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn", "answer": "What are names of patients who made an appointment?\nAdditional table information: table: hospital_1"} +{"question": "SELECT COUNT(*) FROM club WHERE clublocation = 'HHH'", "answer": "How many clubs are located at 'HHH'?\nAdditional table information: table: club_1"} +{"question": "SELECT T2.title, T1.stars, T2.director, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T2.director", "answer": "For each director, what is the title and score of their most poorly rated movie?\nAdditional table information: table: movie_1"} +{"question": "SELECT T1.name, T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id", "answer": "What are the names and types of the companies that have ever operated a flight?\nAdditional table information: table: flight_company"} +{"question": "SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2", "answer": "List the locations that are shared by more than two wrestlers.\nAdditional table information: table: wrestler"} +{"question": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_Senator_VOTE", "answer": "What are the distinct first names of the students who have class president votes?\nAdditional table information: table: voter_2"} +{"question": "SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1", "answer": "What are the categories of music festivals for which there have been more than 1 music festival?\nAdditional table information: table: music_4"} +{"question": "SELECT job_title, AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id GROUP BY T2.job_title", "answer": "display job title and average salary of employees.\nAdditional table information: table: hr_1"} +{"question": "SELECT name, city, country FROM airports ORDER BY elevation NULLS FIRST LIMIT 1", "answer": "What is the name, city, and country of the airport with the lowest altitude?\nAdditional table information: table: flight_4"} +{"question": "SELECT COUNT(*) FROM products", "answer": "Count the number of products.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT document_type_description FROM Ref_Document_Types WHERE document_type_code = 'Paper'", "answer": "What is the description of document type 'Paper'?\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = 'Balls to the Wall'", "answer": "What is the name of all tracks in the album named Balls to the Wall?\nAdditional table information: table: store_1"} +{"question": "SELECT Stories FROM buildings ORDER BY Height DESC LIMIT 1", "answer": "What is the stories of highest building?\nAdditional table information: table: company_office"} +{"question": "SELECT Ref_Document_Status.document_status_description FROM Ref_Document_Status JOIN Documents ON Documents.document_status_code = Ref_Document_Status.document_status_code WHERE Documents.document_id = 1", "answer": "What is the document status description of the document with id 1?\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT COUNT(*) FROM club WHERE clublocation = 'HHH'", "answer": "Count the number of clubs located at 'HHH'.\nAdditional table information: table: club_1"} +{"question": "SELECT document_id, COUNT(DISTINCT employee_id) FROM Circulation_History GROUP BY document_id", "answer": "For each document, list the number of employees who have showed up in the circulation history of that document. List the document ids and number of employees.\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT DISTINCT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000", "answer": "List the forename and surname of all distinct drivers who once had laptime less than 93000 milliseconds?\nAdditional table information: table: formula_1"} +{"question": "SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = 'Spain' AND T1.year > 2017", "answer": "What are the names of the races held after 2017 in Spain?\nAdditional table information: table: formula_1"} +{"question": "SELECT dept_name, building FROM department WHERE budget > (SELECT AVG(budget) FROM department)", "answer": "Give the name and building of the departments with greater than average budget.\nAdditional table information: table: college_2"} +{"question": "SELECT Park FROM roller_coaster ORDER BY Speed DESC LIMIT 1", "answer": "Show the park of the roller coaster with the highest speed.\nAdditional table information: table: roller_coaster"} +{"question": "SELECT COUNT(*) FROM Songs", "answer": "Count the number of songs.\nAdditional table information: table: music_2"} +{"question": "SELECT T1.Festival_ID, T3.Festival_Name, COUNT(*) FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID GROUP BY T1.Festival_ID", "answer": "Show the id, name of each festival and the number of artworks it has nominated.\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT major, AVG(age), MIN(age), MAX(age) FROM Student GROUP BY major", "answer": "Show the average, minimum, and maximum age for different majors.\nAdditional table information: table: game_1"} +{"question": "SELECT COUNT(*) FROM exhibition WHERE YEAR >= 2005", "answer": "How many exhibition are there in year 2005 or after?\nAdditional table information: table: theme_gallery"} +{"question": "SELECT cust_name, acc_type, acc_bal FROM customer ORDER BY credit_score DESC LIMIT 1", "answer": "What is the name, account type, and account balance corresponding to the customer with the highest credit score?\nAdditional table information: table: loan_1"} +{"question": "SELECT job_id FROM employees GROUP BY job_id HAVING AVG(salary) > 8000", "answer": "What are the job ids corresponding to jobs with average salary above 8000?\nAdditional table information: table: hr_1"} +{"question": "SELECT document_name FROM documents WHERE document_name LIKE '%CV%'", "answer": "What are the names of documents that contain the substring 'CV'?\nAdditional table information: table: document_management"} +{"question": "SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING COUNT(*) >= 2", "answer": "Which faculty members advise two ore more students? Give me their faculty ids.\nAdditional table information: table: activity_1"} +{"question": "SELECT COUNT(*) FROM ref_colors", "answer": "Count the number of colors.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT Team FROM player ORDER BY Age DESC LIMIT 5", "answer": "What are the teams that have the 5 oldest players?\nAdditional table information: table: school_player"} +{"question": "SELECT fname, lname, address FROM employee ORDER BY Bdate NULLS FIRST", "answer": "list the first and last names, and the addresses of all employees in the ascending order of their birth date.\nAdditional table information: table: company_1"} +{"question": "SELECT COUNT(*) FROM addresses WHERE state_province_county = 'Colorado'", "answer": "Count the number of cities in the state of Colorado.\nAdditional table information: table: e_government"} +{"question": "SELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3", "answer": "What are names for top three branches with most number of membership?\nAdditional table information: table: shop_membership"} +{"question": "SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id = T2.course_id JOIN student AS T3 ON T2.id = T3.id WHERE T1.dept_name = 'Statistics'", "answer": "Find the name of students who took some course offered by Statistics department.\nAdditional table information: table: college_2"} +{"question": "SELECT T3.Name, T2.Date, T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID", "answer": "Show the names of people, and dates and venues of debates they are on the affirmative side.\nAdditional table information: table: debate"} +{"question": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1", "answer": "What is the name of the shop that has the greatest quantity of devices in stock?\nAdditional table information: table: device"} +{"question": "SELECT T2.lot_details FROM INVESTORS AS T1 JOIN LOTS AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = 'l'", "answer": "Return the lot details of lots that belong to investors with details 'l'?\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100", "answer": "Find the names of bank branches that have provided a loan to any customer whose credit score is below 100.\nAdditional table information: table: loan_1"} +{"question": "SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 2 ORDER BY COUNT(*) NULLS FIRST", "answer": "List the cities which have more than 2 airports sorted by the number of airports.\nAdditional table information: table: flight_4"} +{"question": "SELECT COUNT(*) FROM All_documents WHERE document_type_code = 'CV' OR document_type_code = 'BK'", "answer": "Show the number of documents with document type code CV or BK.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T2.Author, COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author", "answer": "How many workshops did each author submit to? Return the author name and the number of workshops.\nAdditional table information: table: workshop_paper"} +{"question": "SELECT t2.team_name, t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t1.founded NULLS FIRST LIMIT 1", "answer": "What is the team name and acc regular season score of the school that was founded for the longest time?\nAdditional table information: table: university_basketball"} +{"question": "SELECT flno FROM Flight WHERE distance > 2000", "answer": "What are the numbers of all flights that can cover a distance of more than 2000?\nAdditional table information: table: flight_1"} +{"question": "SELECT MAX(Silver), MIN(Silver) FROM club_rank", "answer": "What are the maximum and minimum number of silver medals for all the clubs?\nAdditional table information: table: sports_competition"} +{"question": "SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2002 AND T2.campus = 'Long Beach State University'", "answer": "What is the number of faculty lines in campus 'Long Beach State University' in 2002?\nAdditional table information: table: csu_1"} +{"question": "SELECT document_id, receipt_date FROM Documents", "answer": "List all document ids and receipt dates of documents.\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT lname FROM authors ORDER BY lname NULLS FIRST", "answer": "Retrieve all the last names of authors in alphabetical order.\nAdditional table information: table: icfp_1"} +{"question": "SELECT COUNT(*), classroom FROM list GROUP BY classroom", "answer": "How many students does one classroom have?\nAdditional table information: table: student_1"} +{"question": "SELECT emp_fname, emp_lname FROM employee ORDER BY emp_dob NULLS FIRST LIMIT 1", "answer": "What is the first and last name of the oldest employee?\nAdditional table information: table: college_1"} +{"question": "SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T3.number_deaths >= 10", "answer": "Return the names of the regions affected by storms that had a death count of at least 10.\nAdditional table information: table: storm_record"} +{"question": "SELECT COUNT(*) FROM ship", "answer": "Count the number of ships.\nAdditional table information: table: ship_1"} +{"question": "SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton' AND capacity < 50", "answer": "Count the number of rooms in Lamberton with capacity lower than 50.\nAdditional table information: table: college_2"} +{"question": "SELECT student_id FROM students WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance)", "answer": "List the id of students who never attends courses?\nAdditional table information: table: student_assessment"} +{"question": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T2.balance > T3.balance", "answer": "What are the names of customers with a higher checking balance than savings balance?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT COUNT(*) FROM services", "answer": "How many services are there?\nAdditional table information: table: e_government"} +{"question": "SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2000 AND T2.city = 'Atlanta'", "answer": "How many games were played in city Atlanta in 2000?\nAdditional table information: table: baseball_1"} +{"question": "SELECT DISTINCT song_name FROM song WHERE resolution > (SELECT MIN(resolution) FROM song WHERE languages = 'english')", "answer": "Find the distinct names of all songs that have a higher resolution than some songs in English.\nAdditional table information: table: music_1"} +{"question": "SELECT roomName, decor FROM Rooms WHERE bedtype = 'King' ORDER BY basePrice NULLS FIRST", "answer": "What are the names and decor of rooms with a king bed? Sort them by their price\nAdditional table information: table: inn_1"} +{"question": "SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id GROUP BY T2.member_in_charge_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the name of the member who is in charge of the most events.\nAdditional table information: table: party_people"} +{"question": "SELECT Major, COUNT(*) FROM Student GROUP BY Major ORDER BY COUNT(Major) ASC NULLS FIRST LIMIT 1", "answer": "Which major has least number of students? List the major and the number of students.\nAdditional table information: table: restaurant_1"} +{"question": "SELECT name FROM person EXCEPT SELECT name FROM PersonFriend", "answer": "Who is the person that has no friend?\nAdditional table information: table: network_2"} +{"question": "SELECT city FROM city WHERE regional_population > 10000000 UNION SELECT city FROM city WHERE regional_population < 5000000", "answer": "Which cities have regional population above 8000000 or below 5000000?\nAdditional table information: table: city_record"} +{"question": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the city with the most number of stores.\nAdditional table information: table: store_product"} +{"question": "SELECT Name FROM company WHERE Industry = 'Banking' OR Industry = 'Retailing'", "answer": "Show the names of companies in the banking or retailing industry?\nAdditional table information: table: company_employee"} +{"question": "SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name and age of the pilot younger than 30 who has won the most number of times?\nAdditional table information: table: aircraft"} +{"question": "SELECT COUNT(*), T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director", "answer": "For each director, how many reviews have they received?\nAdditional table information: table: movie_1"} +{"question": "SELECT Product_Name, Product_Type_Code FROM Products", "answer": "What are the names and type codes of products?\nAdditional table information: table: solvency_ii"} +{"question": "SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928", "answer": "Show names of ships involved in a mission launched after 1928.\nAdditional table information: table: ship_mission"} +{"question": "SELECT name FROM procedures WHERE cost < 5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen'", "answer": "Find the names of all procedures such that the cost is less than 5000 and physician John Wen was trained in.\nAdditional table information: table: hospital_1"} +{"question": "SELECT SUM(revenue) FROM manufacturers WHERE headquarter = 'Austin'", "answer": "Find the total revenue created by the companies whose headquarter is located at Austin.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id GROUP BY t2.program_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which program is broadcast most frequently? Give me the program name.\nAdditional table information: table: program_share"} +{"question": "SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = 'San Francisco State University' AND t2.year = 2001", "answer": "What are the degrees conferred in 'San Francisco State University' in 2001.\nAdditional table information: table: csu_1"} +{"question": "SELECT DISTINCT T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T2.velocity < 200", "answer": "What are the distinct types of the companies that have operated any flights with velocity less than 200?\nAdditional table information: table: flight_company"} +{"question": "SELECT MAX(Transit_Passengers), MIN(Transit_Passengers) FROM airport", "answer": "What are the maximum and minimum number of transit passengers of all aiports.\nAdditional table information: table: aircraft"} +{"question": "SELECT * FROM products WHERE price BETWEEN 60 AND 120", "answer": "What is all the information of all the products that have a price between 60 and 120?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT color_description FROM ref_colors", "answer": "What are the descriptions for each color?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500", "answer": "Show the status shared by cities with population bigger than 1500 and smaller than 500.\nAdditional table information: table: farm"} +{"question": "SELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner'", "answer": "What are the ranks of captains that are both in the Cutter and Armed schooner classes?\nAdditional table information: table: ship_1"} +{"question": "SELECT name FROM procedures WHERE cost > 1000 UNION SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen'", "answer": "Find all procedures which cost more than 1000 or which physician John Wen was trained in.\nAdditional table information: table: hospital_1"} +{"question": "SELECT name, CLASS, date FROM race", "answer": "Show name, class, and date for all races.\nAdditional table information: table: race_track"} +{"question": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.distance > 5000 GROUP BY T1.eid ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the salary and name of the employee who has the most number of certificates on aircrafts with distance more than 5000?\nAdditional table information: table: flight_1"} +{"question": "SELECT phone_number, email_address FROM Customers WHERE amount_outstanding > 2000", "answer": "List phone number and email address of customer with more than 2000 outstanding balance.\nAdditional table information: table: driving_school"} +{"question": "SELECT enrollment, primary_conference FROM university ORDER BY founded NULLS FIRST LIMIT 1", "answer": "What are the enrollment and primary conference for the university which was founded the earliest?\nAdditional table information: table: university_basketball"} +{"question": "SELECT T2.lot_id, AVG(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id", "answer": "Show the average amount of transactions for different lots.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT COUNT(DISTINCT scientist) FROM assignedto", "answer": "How many different scientists are assigned to any project?\nAdditional table information: table: scientist_1"} +{"question": "SELECT name FROM ship ORDER BY built_year NULLS FIRST, CLASS NULLS FIRST", "answer": "What are the names of ships, ordered by year they were built and their class?\nAdditional table information: table: ship_1"} +{"question": "SELECT clublocation FROM club WHERE clubname = 'Hopkins Student Enterprises'", "answer": "Tell me the location of the club 'Hopkins Student Enterprises'.\nAdditional table information: table: club_1"} +{"question": "SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn", "answer": "What are the names of scientists who are assigned to any project?\nAdditional table information: table: scientist_1"} +{"question": "SELECT SUM(enrollment), affiliation FROM university GROUP BY affiliation", "answer": "Find the total student enrollment for different affiliation type schools.\nAdditional table information: table: university_basketball"} +{"question": "SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.crs_description LIKE '%Statistics%'", "answer": "What is the name of the department that offers a course that has a description including the word 'Statistics'?\nAdditional table information: table: college_1"} +{"question": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = 'Rock' OR T1.name = 'Jazz'", "answer": "What are the names of the tracks that are Rock or Jazz songs?\nAdditional table information: table: store_1"} +{"question": "SELECT T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Height DESC LIMIT 1", "answer": "Show the company of the tallest entrepreneur.\nAdditional table information: table: entrepreneur"} +{"question": "SELECT sales_details FROM sales UNION SELECT purchase_details FROM purchases", "answer": "What are the details of all sales and purchases?\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT DISTINCT T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800", "answer": "List the file size and format for all songs that have resolution lower than 800.\nAdditional table information: table: music_1"} +{"question": "SELECT T3.dept_name FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T1.dept_code = T3.dept_code GROUP BY T1.dept_code ORDER BY SUM(T1.crs_credit) DESC LIMIT 1", "answer": "Which department offers the most credits all together?\nAdditional table information: table: college_1"} +{"question": "SELECT T1.first_name, T1.last_name, T1.employee_id, T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id", "answer": "display the full name (first and last name ) of employee with ID and name of the country presently where (s)he is working.\nAdditional table information: table: hr_1"} +{"question": "SELECT DISTINCT directed_by FROM film", "answer": "Show all directors.\nAdditional table information: table: cinema"} +{"question": "SELECT id, duration FROM trip ORDER BY duration DESC LIMIT 3", "answer": "What are the ids of the trips that lasted the longest and how long did they last?\nAdditional table information: table: bike_1"} +{"question": "SELECT POSITION, COUNT(*) FROM match_season GROUP BY POSITION", "answer": "How many players played each position?\nAdditional table information: table: match_season"} +{"question": "SELECT interaction_type, COUNT(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the most common types of interactions between enzymes and medicine, and how many types are there?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT COUNT(*) FROM party", "answer": "Count the number of parties.\nAdditional table information: table: party_host"} +{"question": "SELECT title FROM course ORDER BY title NULLS FIRST, credits NULLS FIRST", "answer": "List the names of all courses ordered by their titles and credits.\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(*) FROM Products", "answer": "How many products are there?\nAdditional table information: table: solvency_ii"} +{"question": "SELECT Draft_Pick_Number, Draft_Class FROM match_season WHERE POSITION = 'Defender'", "answer": "What are the draft pick numbers and draft classes for players who play the Defender position?\nAdditional table information: table: match_season"} +{"question": "SELECT AVG(product_price), product_category_code FROM products GROUP BY product_category_code", "answer": "What is the average price of the products for each category?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT SUM(budget) FROM department WHERE dept_name = 'Marketing' OR dept_name = 'Finance'", "answer": "Find the total budgets of the Marketing or Finance department.\nAdditional table information: table: college_2"} +{"question": "SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes DESC", "answer": "What are the names of representatives in descending order of votes?\nAdditional table information: table: election_representative"} +{"question": "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'", "answer": "Find the first names of the faculty members who are playing Canoeing or Kayaking.\nAdditional table information: table: activity_1"} +{"question": "SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common result of the music festival?\nAdditional table information: table: music_4"} +{"question": "SELECT name, MAX(revenue), Headquarter FROM manufacturers GROUP BY Headquarter", "answer": "What are the names and revenues of the companies with the highest revenues in each headquarter city?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT COUNT(*) FROM College WHERE enr > 15000", "answer": "How many colleges has more than 15000 students?\nAdditional table information: table: soccer_2"} +{"question": "SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = '254 Ottilie Junction' OR T2.How_to_Get_There = 'bus'", "answer": "What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC", "answer": "Please show different denominations and the corresponding number of schools in descending order.\nAdditional table information: table: school_player"} +{"question": "SELECT AVG(product_price) FROM products WHERE product_type_code = 'Clothes'", "answer": "What is the average price of clothes?\nAdditional table information: table: department_store"} +{"question": "SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of teh studio that created the most films?\nAdditional table information: table: film_rank"} +{"question": "SELECT T1.name, T1.max_speed FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the storm name and max speed which affected the greatest number of regions?\nAdditional table information: table: storm_record"} +{"question": "SELECT name FROM program EXCEPT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Morning'", "answer": "Find the names of programs that are never broadcasted in the morning.\nAdditional table information: table: program_share"} +{"question": "SELECT city, state FROM bank WHERE bname = 'morningside'", "answer": "What city and state is the bank with the name morningside in?\nAdditional table information: table: loan_1"} +{"question": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id", "answer": "Find the names of customers who never placed an order.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT COUNT(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'", "answer": "Find the number of different airports which are the destinations of the American Airlines.\nAdditional table information: table: flight_4"} +{"question": "SELECT Addresses.address_details FROM Addresses JOIN Documents_Mailed ON Documents_Mailed.mailed_to_address_id = Addresses.address_id WHERE document_id = 4", "answer": "What address was the document with id 4 mailed to?\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT T1.event_id, T1.event_details FROM EVENTS AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID = T2.Event_ID GROUP BY T1.Event_ID HAVING COUNT(*) > 1", "answer": "What are the ids and details of events that have more than one participants?\nAdditional table information: table: local_govt_in_alabama"} +{"question": "SELECT Title FROM book WHERE Writer <> 'Elaine Lee'", "answer": "What are the titles of the books whose writer is not 'Elaine Lee'?\nAdditional table information: table: book_2"} +{"question": "SELECT T4.crs_description, T4.crs_credit FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num JOIN course AS T4 ON T4.crs_code = T1.crs_code WHERE T3.stu_lname = 'Smithson'", "answer": "How many credits is the course that the student with the last name Smithson took, and what is its description?\nAdditional table information: table: college_1"} +{"question": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010", "answer": "What are the ids of courses offered in Fall of 2009 but not in Spring of 2010?\nAdditional table information: table: college_2"} +{"question": "SELECT DISTINCT grade FROM list WHERE classroom = 105", "answer": "Find the grade studying in room 105.\nAdditional table information: table: student_1"} +{"question": "SELECT T1.course_name FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_Id GROUP BY T1.course_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the course with the most registered students?\nAdditional table information: table: student_assessment"} +{"question": "SELECT T1.Actual_Delivery_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID WHERE T2.Order_Quantity = 1", "answer": "What are the actual delivery dates of orders with quantity 1?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT Grape, Appelation FROM WINE", "answer": "What are the grapes and appelations of each wine?\nAdditional table information: table: wine_1"} +{"question": "SELECT name, seating FROM track WHERE year_opened > 2000 ORDER BY seating NULLS FIRST", "answer": "Show names and seatings, ordered by seating for all tracks opened after 2000.\nAdditional table information: table: race_track"} +{"question": "SELECT name, flag FROM ship WHERE NOT ship_id IN (SELECT ship_id FROM captain WHERE rank = 'Midshipman')", "answer": "Find the name and flag of ships that are not steered by any captain with Midshipman rank.\nAdditional table information: table: ship_1"} +{"question": "SELECT DISTINCT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = 'Spain' AND T1.year > 2000", "answer": "What are the names of all races held after 2000 in Spain?\nAdditional table information: table: formula_1"} +{"question": "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'", "answer": "What are the distinct ids of products ordered between 1975-01-01 and 1976-01-01??\nAdditional table information: table: tracking_orders"} +{"question": "SELECT T2.Name, T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID", "answer": "Show the names of editors and the theme of journals for which they serve on committees.\nAdditional table information: table: journal_committee"} +{"question": "SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total < 315", "answer": "What are the heights of body builders with total score smaller than 315?\nAdditional table information: table: body_builder"} +{"question": "SELECT T1.WiFi, T3.Type FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T2.Hardware_Model_name = 'LG-P760'", "answer": "What are the wifi and screen mode type of the hardware model named 'LG-P760'?\nAdditional table information: table: phone_1"} +{"question": "SELECT name, headquarter, revenue FROM manufacturers ORDER BY revenue DESC", "answer": "Find the name, headquarter and revenue of all manufacturers sorted by their revenue in the descending order.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT crs_credit, crs_description FROM course WHERE crs_code = 'QM-261'", "answer": "What is the course description and number of credits for QM-261?\nAdditional table information: table: college_1"} +{"question": "SELECT MAX(OMIM) FROM enzyme", "answer": "What is the maximum OMIM value in the database?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT document_type_code, COUNT(*) FROM Documents GROUP BY document_type_code", "answer": "How many documents are there of each type?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the name of track with most number of races.\nAdditional table information: table: race_track"} +{"question": "SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' INTERSECT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room'", "answer": "What is the name of the dorm with both a TV Lounge and Study Room listed as amenities?\nAdditional table information: table: dorm_1"} +{"question": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING COUNT(*) <= 3", "answer": "What are the countries for appelations with at most 3 wines?\nAdditional table information: table: wine_1"} +{"question": "SELECT Occupation FROM player GROUP BY Occupation ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Please show the most common occupation of players.\nAdditional table information: table: riding_club"} +{"question": "SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the manager with the most gas stations that opened after 2000?\nAdditional table information: table: gas_company"} +{"question": "SELECT employee_id, MAX(end_date) FROM job_history GROUP BY employee_id", "answer": "display the employee ID for each employee and the date on which he ended his previous job.\nAdditional table information: table: hr_1"} +{"question": "SELECT COUNT(*) FROM branch WHERE membership_amount > (SELECT AVG(membership_amount) FROM branch)", "answer": "What is the number of branches that have more than the average number of memberships?\nAdditional table information: table: shop_membership"} +{"question": "SELECT COUNT(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54'", "answer": "How many project staff worked as leaders or started working before '1989-04-24 23:51:54'?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT SUM(maxOccupancy) FROM Rooms WHERE decor = 'modern'", "answer": "What is the total number of people who could stay in the modern rooms in this inn?\nAdditional table information: table: inn_1"} +{"question": "SELECT T2.address, T1.email FROM customer AS T1 JOIN address AS T2 ON T2.address_id = T1.address_id WHERE T1.first_name = 'LINDA'", "answer": "Where does the customer with the first name Linda live? And what is her email?\nAdditional table information: table: sakila_1"} +{"question": "SELECT Pilot_name FROM pilot WHERE NOT Pilot_ID IN (SELECT Pilot_ID FROM pilot_record)", "answer": "List the names of pilots that do not have any record.\nAdditional table information: table: pilot_record"} +{"question": "SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.age < 20", "answer": "What is the total number of hours per week and number of games played by students under 20?\nAdditional table information: table: game_1"} +{"question": "SELECT Team FROM player ORDER BY Team ASC NULLS FIRST", "answer": "Find the team of each player and sort them in ascending alphabetical order.\nAdditional table information: table: school_player"} +{"question": "SELECT COUNT(*) FROM Apartments WHERE NOT apt_id IN (SELECT apt_id FROM Apartment_Facilities)", "answer": "Find the number of apartments that have no facility.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT document_type_code FROM documents WHERE document_name = 'David CV'", "answer": "Return the type code of the document named 'David CV'.\nAdditional table information: table: document_management"} +{"question": "SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy'", "answer": "What is the number of routes whose destinations are Italian airports?\nAdditional table information: table: flight_4"} +{"question": "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'", "answer": "What is the venue of the competition '1994 FIFA World Cup qualification' hosted by 'Nanjing ( Jiangsu )'?\nAdditional table information: table: city_record"} +{"question": "SELECT T4.crs_description, T4.crs_credit FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num JOIN course AS T4 ON T4.crs_code = T1.crs_code WHERE T3.stu_lname = 'Smithson'", "answer": "What are the description and credit of the course which the student whose last name is Smithson took?\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(*) FROM budget WHERE budgeted > 3000 AND YEAR <= 2001", "answer": "How many budgets are above 3000 in year 2001 or before?\nAdditional table information: table: school_finance"} +{"question": "SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students", "answer": "Find the common login name of course authors and students.\nAdditional table information: table: e_learning"} +{"question": "SELECT RESULT, COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC", "answer": "Please show the results of music festivals and the number of music festivals that have had each, ordered by this count.\nAdditional table information: table: music_4"} +{"question": "SELECT Name FROM ship WHERE Nationality <> 'United States'", "answer": "List the name of ships whose nationality is not 'United States'.\nAdditional table information: table: ship_mission"} +{"question": "SELECT COUNT(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = 'F' AND T1.allergy = 'Milk' OR T1.allergy = 'Eggs'", "answer": "How many students who are female are allergic to milk or eggs?\nAdditional table information: table: allergy_1"} +{"question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games", "answer": "What are the ids of all students who are not video game players?\nAdditional table information: table: game_1"} +{"question": "SELECT COUNT(*) FROM Student_Tests_Taken WHERE test_result = 'Fail'", "answer": "Count the number of tests with 'Fail' result.\nAdditional table information: table: e_learning"} +{"question": "SELECT name FROM member WHERE address = 'Harford' OR address = 'Waterbury'", "answer": "Give me the names of members whose address is in Harford or Waterbury.\nAdditional table information: table: coffee_shop"} +{"question": "SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code", "answer": "List the description of the outcomes for all projects.\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT Police_force FROM county_public_safety WHERE LOCATION = 'East' INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = 'West'", "answer": "Show the police force shared by counties with location on the east and west.\nAdditional table information: table: county_public_safety"} +{"question": "SELECT COUNT(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id WHERE T1.founded > 1880 OR T1.type = 'Private'", "answer": "How many proteins are associated with an institution founded after 1880 or an institution with type 'Private'?\nAdditional table information: table: protein_institute"} +{"question": "SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts", "answer": "Show customer ids who don't have an account.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT COUNT(*) FROM Ref_locations", "answer": "How many locations are listed in the database?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT DISTINCT T2.Hardware_Model_name, T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.used_kb BETWEEN 10 AND 15", "answer": "List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15.\nAdditional table information: table: phone_1"} +{"question": "SELECT COUNT(*) FROM catalog_contents", "answer": "How many products are there in the records?\nAdditional table information: table: product_catalog"} +{"question": "SELECT T1.role_description, T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the role description and the id of the project staff involved in most number of project outcomes?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT customer_id, customer_first_name, customer_last_name, customer_phone FROM Customers", "answer": "What are the ids, full names, and phones of each customer?\nAdditional table information: table: customers_card_transactions"} +{"question": "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'", "answer": "Find the name of the scientist who worked on both a project named 'Matter of Time' and a project named 'A Puzzling Parallax'.\nAdditional table information: table: scientist_1"} +{"question": "SELECT name, damage_millions_USD FROM storm ORDER BY max_speed DESC", "answer": "What are the names and damage in millions for storms, ordered by their max speeds descending?\nAdditional table information: table: storm_record"} +{"question": "SELECT COUNT(DISTINCT T1.name), T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.Headquarter", "answer": "How many different products are produced in each headquarter city?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code GROUP BY t1.document_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the name of the document that has the most sections.\nAdditional table information: table: document_management"} +{"question": "SELECT COUNT(*) FROM artist WHERE age > 46 AND year_join > 1990", "answer": "Count the number of artists who are older than 46 and joined after 1990.\nAdditional table information: table: theme_gallery"} +{"question": "SELECT COUNT(*) FROM Addresses WHERE state_province_county = 'Georgia'", "answer": "How many employees live in Georgia?\nAdditional table information: table: driving_school"} +{"question": "SELECT COUNT(*) FROM instruments WHERE instrument = 'drums'", "answer": "How many songs use drums as an instrument?\nAdditional table information: table: music_2"} +{"question": "SELECT organization_id FROM organizations EXCEPT SELECT parent_organization_id FROM organizations", "answer": "Which organizations are not a parent organization of others? List the organization id.\nAdditional table information: table: local_govt_and_lot"} +{"question": "SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration > (SELECT MIN(duration) FROM pitstops WHERE raceid = 841)", "answer": "What are the different ids and stop durations of all the drivers whose stop lasted longer than the driver in the race with the id 841?\nAdditional table information: table: formula_1"} +{"question": "SELECT DISTINCT LOCATION FROM cinema", "answer": "Find the distinct locations that has a cinema.\nAdditional table information: table: cinema"} +{"question": "SELECT COUNT(*) FROM Apartment_Bookings", "answer": "Count the total number of apartment bookings.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT id FROM instructor EXCEPT SELECT id FROM teaches", "answer": "What are the ids of instructors who didnt' teach?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(*) FROM Faculty WHERE Rank = 'Professor' AND building = 'NEB'", "answer": "Count the number of Professors who have office in building NEB.\nAdditional table information: table: activity_1"} +{"question": "SELECT T2.party_name, COUNT(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id", "answer": "How many members are in each party?\nAdditional table information: table: party_people"} +{"question": "SELECT MAX(years_working), MIN(years_working), AVG(years_working) FROM school_bus", "answer": "What is the maximum, minimum and average years spent working on a school bus?\nAdditional table information: table: school_bus"} +{"question": "SELECT document_type_code, document_type_name FROM Ref_document_types", "answer": "What are all the document type codes and document type names?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = 'white' OR t3.characteristic_name = 'hot'", "answer": "How many products have their color described as 'white' or have a characteristic with the name 'hot'?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT T1.Title, T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID", "answer": "Please show the titles of films and the types of market estimations.\nAdditional table information: table: film_rank"} +{"question": "SELECT Winery FROM WINE GROUP BY Winery HAVING COUNT(*) >= 4", "answer": "Which wineries produce at least four wines?\nAdditional table information: table: wine_1"} +{"question": "SELECT T1.Museum_Details, T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID", "answer": "What are the details and opening hours of the museums?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT employee_id, first_name, last_name, salary FROM employees WHERE salary > (SELECT AVG(salary) FROM employees) AND department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%J%')", "answer": "display the employee number, name( first name and last name ), and salary for all employees who earn more than the average salary and who work in a department with any employee with a 'J' in their first name.\nAdditional table information: table: hr_1"} +{"question": "SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000", "answer": "What are the locations that have both tracks with more than 90000 seats, and tracks with fewer than 70000 seats?\nAdditional table information: table: race_track"} +{"question": "SELECT name FROM PersonFriend GROUP BY name HAVING COUNT(*) = 1", "answer": "What are the names of everybody who has exactly one friend?\nAdditional table information: table: network_2"} +{"question": "SELECT Name FROM manager ORDER BY LEVEL ASC NULLS FIRST", "answer": "What are the names of managers in ascending order of level?\nAdditional table information: table: railway"} +{"question": "SELECT T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id JOIN medicine AS T3 ON T2.medicine_id = T3.id WHERE T3.name = 'Amisulpride' AND T2.interaction_type = 'inhibitor'", "answer": "What are the names of enzymes in the medicine named 'Amisulpride' that can serve as an 'inhibitor'?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Badlands'", "answer": "How many instruments does the song 'Badlands' use?\nAdditional table information: table: music_2"} +{"question": "SELECT name, furniture_id FROM furniture ORDER BY market_rate DESC LIMIT 1", "answer": "Return the name and id of the furniture with the highest market rate.\nAdditional table information: table: manufacturer"} +{"question": "SELECT COUNT(DISTINCT allergytype) FROM Allergy_type", "answer": "How many distinct allergies are there?\nAdditional table information: table: allergy_1"} +{"question": "SELECT district_name FROM district WHERE city_area > 10 OR City_Population > 100000", "answer": "Find the name all districts with city area greater than 10 or population larger than 100000\nAdditional table information: table: store_product"} +{"question": "SELECT T1.Name, T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING COUNT(*) >= 2", "answer": "Which tourist attractions are visited at least twice? Give me their names and ids.\nAdditional table information: table: cre_Theme_park"} +{"question": "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'", "answer": "Find the ids of the students who participate in Canoeing and Kayaking.\nAdditional table information: table: activity_1"} +{"question": "SELECT COUNT(*), crs_code FROM CLASS GROUP BY crs_code", "answer": "How many sections does each course has?\nAdditional table information: table: college_1"} +{"question": "SELECT T1.detention_type_code, T2.detention_type_description FROM Detention AS T1 JOIN Ref_Detention_Type AS T2 ON T1.detention_type_code = T2.detention_type_code GROUP BY T1.detention_type_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What are the code and description of the least frequent detention type ?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT Fname FROM Student WHERE Major = 600", "answer": "Show first name for all students with major 600.\nAdditional table information: table: game_1"} +{"question": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING COUNT(*) >= 2", "answer": "Show names for all aircraft with at least two flights.\nAdditional table information: table: flight_1"} +{"question": "SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the type of the organization with the most research staff?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT roomName, basePrice FROM Rooms ORDER BY basePrice ASC NULLS FIRST LIMIT 1", "answer": "What are the room name and base price of the room with the lowest base price?\nAdditional table information: table: inn_1"} +{"question": "SELECT DISTINCT T1.customer_first_name, T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id", "answer": "Show distinct first and last names for all customers with an account.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT brand, name FROM camera_lens ORDER BY max_aperture DESC", "answer": "Find the brand and name for each camera lens, and sort in descending order of maximum aperture.\nAdditional table information: table: mountain_photos"} +{"question": "SELECT Name FROM WINE WHERE YEAR = '2008'", "answer": "What are the names of all wines produced in 2008?\nAdditional table information: table: wine_1"} +{"question": "SELECT COUNT(*), T1.blockfloor FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockfloor", "answer": "How many rooms does each block floor have?\nAdditional table information: table: hospital_1"} +{"question": "SELECT song_name FROM song WHERE rating < (SELECT MAX(rating) FROM song WHERE genre_is = 'blues')", "answer": "What are the names of all songs that have a lower rating than some song of blues genre?\nAdditional table information: table: music_1"} +{"question": "SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500", "answer": "Which statuses correspond to both cities that have a population over 1500 and cities that have a population lower than 500?\nAdditional table information: table: farm"} +{"question": "SELECT card_type_code, COUNT(DISTINCT customer_id) FROM Customers_cards GROUP BY card_type_code", "answer": "What are the different card type codes, and how many different customers hold each type?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT country FROM airlines GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the country with the most number of home airlines?\nAdditional table information: table: flight_4"} +{"question": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common apartment type code.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT Starting_Year FROM technician WHERE Team = 'CLE' INTERSECT SELECT Starting_Year FROM technician WHERE Team = 'CWS'", "answer": "Show the starting years shared by technicians from team 'CLE' and 'CWS'.\nAdditional table information: table: machine_repair"} +{"question": "SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y'", "answer": "Show last names for all student who are on scholarship.\nAdditional table information: table: game_1"} +{"question": "SELECT Party FROM representative WHERE State = 'New York' INTERSECT SELECT Party FROM representative WHERE State = 'Pennsylvania'", "answer": "Show the parties that have both representatives in New York state and representatives in Pennsylvania state.\nAdditional table information: table: election_representative"} +{"question": "SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code", "answer": "How many bookings does each booking status have? List the booking status code and the number of corresponding bookings.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT AVG(T1.age) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.student_capacity = (SELECT MAX(student_capacity) FROM dorm)", "answer": "Find the average age of students who are living in the dorm with the largest capacity.\nAdditional table information: table: dorm_1"} +{"question": "SELECT email, phone FROM customers WHERE first_name = 'Astrid' AND last_name = 'Gruber'", "answer": "What is Astrid Gruber's email and phone number?\nAdditional table information: table: store_1"} +{"question": "SELECT Adults FROM Reservations WHERE CheckIn = '2010-10-23' AND FirstName = 'CONRAD' AND LastName = 'SELBIG'", "answer": "How many adults stay in the room CONRAD SELBIG checked in on Oct 23, 2010?\nAdditional table information: table: inn_1"} +{"question": "SELECT T2.name, T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'History'", "answer": "Find the name and salary of the instructors who are advisors of any student from History department?\nAdditional table information: table: college_2"} +{"question": "SELECT T2.pName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = (SELECT cName FROM college ORDER BY enr DESC LIMIT 1)", "answer": "What are the names of all tryout participants who are from the largest college?\nAdditional table information: table: soccer_2"} +{"question": "SELECT DISTINCT customer_details FROM Customers", "answer": "What are all the distinct details of the customers?\nAdditional table information: table: insurance_policies"} +{"question": "SELECT kids FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY'", "answer": "Find the number of kids staying in the rooms reserved by a person called ROY SWEAZ.\nAdditional table information: table: inn_1"} +{"question": "SELECT RESULT, COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC", "answer": "How many music festivals have had each kind of result, ordered descending by count?\nAdditional table information: table: music_4"} +{"question": "SELECT T1.source_system_code, T1.master_customer_id, T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Parking_Fines AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id", "answer": "Wat is the tax source system code and master customer id of the taxes related to each parking fine id?\nAdditional table information: table: local_govt_mdm"} +{"question": "SELECT COUNT(*) FROM party", "answer": "How many parties are there?\nAdditional table information: table: party_host"} +{"question": "SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in", "answer": "Which faculty do not participate in any activity? Find their faculty ids.\nAdditional table information: table: activity_1"} +{"question": "SELECT T1.State_County FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Marketing_Region_Code = 'CA'", "answer": "What are the states or counties of the address of the stores with marketing region code 'CA'?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT document_id FROM Documents WHERE document_status_code = 'done' AND document_type_code = 'Paper' EXCEPT SELECT document_id FROM Documents JOIN Ref_Shipping_Agents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = 'USPS'", "answer": "List the document ids of documents with the status done and type Paper, which not shipped by the shipping agent named USPS.\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Accounts)", "answer": "How many customers do not have an account?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT AVG(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.Sex = 'F' AND T2.Election_Cycle = 'Spring'", "answer": "What is the average age of the female students with secretary votes in the spring election cycle?\nAdditional table information: table: voter_2"} +{"question": "SELECT department_id, SUM(salary) FROM employees GROUP BY department_id HAVING COUNT(*) >= 2", "answer": "What are total salaries and department id for each department that has more than 2 employees?\nAdditional table information: table: hr_1"} +{"question": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Zach' AND T1.gender = 'female'", "answer": "Find the names of females who are friends with Zach\nAdditional table information: table: network_2"} +{"question": "SELECT Name FROM wrestler ORDER BY Days_held ASC NULLS FIRST LIMIT 1", "answer": "Return the name of the wrestler who had the lowest number of days held.\nAdditional table information: table: wrestler"} +{"question": "SELECT T2.pName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = (SELECT cName FROM college ORDER BY enr DESC LIMIT 1)", "answer": "Find the name of the tryout players who are from the college with largest size.\nAdditional table information: table: soccer_2"} +{"question": "SELECT DISTINCT form_type_code FROM forms", "answer": "List all the types of forms.\nAdditional table information: table: e_government"} +{"question": "SELECT country FROM airlines WHERE name LIKE 'Orbit%'", "answer": "What are the countries of all airlines whose names start with Orbit?\nAdditional table information: table: flight_4"} +{"question": "SELECT AVG(T1.lat), AVG(T1.long) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id", "answer": "What is the average latitude and longitude of all starting stations for the trips?\nAdditional table information: table: bike_1"} +{"question": "SELECT COUNT(*), city_code FROM student GROUP BY city_code HAVING COUNT(*) > 1", "answer": "Find the number of students for the cities where have more than one student.\nAdditional table information: table: dorm_1"} +{"question": "SELECT MAX(T2.gradepoint), MIN(T2.gradepoint) FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.city_code = 'NYC'", "answer": "What is the maximum and minimum grade point of students who live in NYC?\nAdditional table information: table: college_3"} +{"question": "SELECT COUNT(*) FROM customers", "answer": "Return the total number of distinct customers.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT name FROM artist EXCEPT SELECT T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.year = 2004", "answer": "What are the names of artists who did not have an exhibition in 2004?\nAdditional table information: table: theme_gallery"} +{"question": "SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff", "answer": "What are the last names that are used by customers and staff?\nAdditional table information: table: driving_school"} +{"question": "SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1", "answer": "Return the phone number of the customer who filed the complaint that was raised most recently.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20", "answer": "Show the hometowns shared by people older than 23 and younger than 20.\nAdditional table information: table: gymnast"} +{"question": "SELECT COUNT(*), AVG(age), city_code FROM student WHERE sex = 'M' GROUP BY city_code", "answer": "What is the average age and how many male students are there in each city?\nAdditional table information: table: dorm_1"} +{"question": "SELECT name FROM products WHERE price <= 200", "answer": "Select the name of the products with a price less than or equal to $200.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT DPhone FROM DEPARTMENT WHERE Room = 268", "answer": "Give the phones for departments in room 268.\nAdditional table information: table: college_3"} +{"question": "SELECT AVG(budget_million), MAX(budget_million), MIN(budget_million) FROM movie WHERE YEAR < 2000", "answer": "What is the average, maximum, and minimum budget for all movies before 2000.\nAdditional table information: table: culture_company"} +{"question": "SELECT COUNT(*) FROM ROLES", "answer": "Count the total number of roles listed.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Tennis Club'", "answer": "How many members does the club 'Tennis Club' has?\nAdditional table information: table: club_1"} +{"question": "SELECT customer_first_name, customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name, T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id", "answer": "Show the first names and last names of customers without any account.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT preferred_foot, AVG(overall_rating) FROM Player_Attributes GROUP BY preferred_foot", "answer": "What is the average rating for right-footed players and left-footed players?\nAdditional table information: table: soccer_1"} +{"question": "SELECT COUNT(*), sex FROM people WHERE weight > 85 GROUP BY sex", "answer": "how many people are there whose weight is higher than 85 for each gender?\nAdditional table information: table: candidate_poll"} +{"question": "SELECT region_code, region_name FROM region ORDER BY region_code NULLS FIRST", "answer": "Show all region code and region name sorted by the codes.\nAdditional table information: table: storm_record"} +{"question": "SELECT COUNT(*), AVG(age), city_code FROM student WHERE sex = 'M' GROUP BY city_code", "answer": "Find the average age and number of male students (with sex M) from each city.\nAdditional table information: table: dorm_1"} +{"question": "SELECT T2.title, MAX(T1.price) FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id", "answer": "Give me the title and highest price for each film.\nAdditional table information: table: cinema"} +{"question": "SELECT Name FROM actor WHERE Age <> 20", "answer": "List the name of actors whose age is not 20.\nAdditional table information: table: musical"} +{"question": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) >= 2", "answer": "Show all the locations with at least two cinemas with capacity above 300.\nAdditional table information: table: cinema"} +{"question": "SELECT Publication_Date FROM publication ORDER BY Price ASC NULLS FIRST LIMIT 3", "answer": "List the publication dates of publications with 3 lowest prices.\nAdditional table information: table: book_2"} +{"question": "SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY COUNT(*) NULLS FIRST LIMIT 5", "answer": "Return the first names of the 5 staff members who have handled the most complaints.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT T2.name, COUNT(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id", "answer": "Show all artist names and the number of exhibitions for each artist.\nAdditional table information: table: theme_gallery"} +{"question": "SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1", "answer": "What is all the information on the airport with the largest number of international passengers?\nAdditional table information: table: aircraft"} +{"question": "SELECT COUNT(*) FROM services", "answer": "How many services are there?\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = 'Uganda'", "answer": "Show the times used by climbers to climb mountains in Country Uganda.\nAdditional table information: table: climbing"} +{"question": "SELECT T1.coupon_amount FROM Discount_Coupons AS T1 JOIN customers AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.good_or_bad_customer = 'good' INTERSECT SELECT T1.coupon_amount FROM Discount_Coupons AS T1 JOIN customers AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.good_or_bad_customer = 'bad'", "answer": "What are the coupon amount of the coupons owned by both good and bad customers?\nAdditional table information: table: products_for_hire"} +{"question": "SELECT T1.campus, SUM(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T1.county = 'Orange' AND T2.year >= 2000 GROUP BY T1.campus", "answer": "What is the total number of degrees granted after 2000 for each Orange county campus?\nAdditional table information: table: csu_1"} +{"question": "SELECT DPhone FROM DEPARTMENT WHERE Room = 268", "answer": "What are the phones of departments in Room 268?\nAdditional table information: table: college_3"} +{"question": "SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000", "answer": "What are the years of opening for tracks with seating between 4000 and 5000?\nAdditional table information: table: race_track"} +{"question": "SELECT COUNT(DISTINCT T1.injury) FROM injury_accident AS T1 JOIN game AS T2 ON T1.game_id = T2.id WHERE T2.season > 2010", "answer": "How many distinct kinds of injuries happened after season 2010?\nAdditional table information: table: game_injury"} +{"question": "SELECT cell_mobile_number, email_address FROM STUDENTS", "answer": "Return the cell phone number and email address for all students.\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT Height, Weight FROM people ORDER BY Height DESC", "answer": "List the height and weight of people in descending order of height.\nAdditional table information: table: body_builder"} +{"question": "SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 INTERSECT SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top < 2", "answer": "Show the famous titles of the artists with both volumes that lasted more than 2 weeks on top and volumes that lasted less than 2 weeks on top.\nAdditional table information: table: music_4"} +{"question": "SELECT id, color, name FROM photos", "answer": "List the id, color scheme, and name for all the photos.\nAdditional table information: table: mountain_photos"} +{"question": "SELECT product FROM product WHERE product <> (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "Find the name of the products that are not using the most frequently-used max page size.\nAdditional table information: table: store_product"} +{"question": "SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the artist, for each language, that has the most songs with a higher resolution than 500?\nAdditional table information: table: music_1"} +{"question": "SELECT COUNT(*) FROM region", "answer": "How many regions do we have?\nAdditional table information: table: storm_record"} +{"question": "SELECT DISTINCT T1.state, T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'", "answer": "How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges?\nAdditional table information: table: soccer_2"} +{"question": "SELECT name FROM club ORDER BY name DESC", "answer": "List all club names in descending alphabetical order.\nAdditional table information: table: sports_competition"} +{"question": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'laurel'", "answer": "How many characteristics does the product named 'laurel' have?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'University of Pennsylvania'", "answer": "How many papers are written by authors from the institution 'University of Pennsylvania'?\nAdditional table information: table: icfp_1"} +{"question": "SELECT COUNT(*) FROM Invoices", "answer": "Count the number of invoices.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT AVG(no_of_customers) FROM bank", "answer": "What is the average number of bank customers?\nAdditional table information: table: loan_1"} +{"question": "SELECT Name FROM roller_coaster ORDER BY LENGTH ASC NULLS FIRST", "answer": "List the names of roller coasters by ascending order of length.\nAdditional table information: table: roller_coaster"} +{"question": "SELECT Operating_system, COUNT(*) FROM web_client_accelerator GROUP BY Operating_system", "answer": "Find the number of web accelerators used for each Operating system.\nAdditional table information: table: browser_web"} +{"question": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) > 1", "answer": "Find the locations that have more than one movie theater with capacity above 300.\nAdditional table information: table: cinema"} +{"question": "SELECT * FROM employees WHERE hire_date > '1987-09-07'", "answer": "display those employees who joined after 7th September, 1987.\nAdditional table information: table: hr_1"} +{"question": "SELECT T1.name, T3.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T2.PrimaryAffiliation = 1", "answer": "Find the names of all physicians and their primary affiliated departments' names.\nAdditional table information: table: hospital_1"} +{"question": "SELECT document_name FROM documents WHERE document_name LIKE '%CV%'", "answer": "List all the document names which contains 'CV'.\nAdditional table information: table: document_management"} +{"question": "SELECT COUNT(*) FROM artist WHERE country = 'Bangladesh'", "answer": "How many Bangladeshi artists are listed?\nAdditional table information: table: music_1"} +{"question": "SELECT name FROM procedures WHERE cost > 1000 EXCEPT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen'", "answer": "Among the procedures that cost more than 1000, which were not specialized in by physician John Wen?\nAdditional table information: table: hospital_1"} +{"question": "SELECT building_address, building_phone FROM Apartment_Buildings WHERE building_manager = 'Brenden'", "answer": "Show the addresses and phones of all the buildings managed by 'Brenden'.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT name, price FROM Products ORDER BY price ASC NULLS FIRST LIMIT 1", "answer": "What is the name and price of the cheapest product?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT COUNT(*) FROM products WHERE NOT product_id IN (SELECT product_id FROM Order_items)", "answer": "How many products were not included in any order?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT name, salary FROM instructor WHERE salary < (SELECT AVG(salary) FROM instructor WHERE dept_name = 'Physics')", "answer": "Find the name and salary of instructors whose salary is below the average salary of the instructors in the Physics department.\nAdditional table information: table: college_2"} +{"question": "SELECT campus FROM campuses WHERE LOCATION = 'Chico'", "answer": "What are the names of all campuses located at Chico?\nAdditional table information: table: csu_1"} +{"question": "SELECT T1.text_of_notes FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.last_name = 'Schuster'", "answer": "Find the texts of assessment notes for teachers with last name 'Schuster'.\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT shop_id, address FROM shop WHERE score < (SELECT AVG(score) FROM shop)", "answer": "Find the id and address of the shops whose score is below the average score.\nAdditional table information: table: coffee_shop"} +{"question": "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", "answer": "Find the name of the activity that has the largest number of student participants.\nAdditional table information: table: activity_1"} +{"question": "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'", "answer": "Which students participate in both Canoeing and Kayaking as their activities? Tell me their student ids.\nAdditional table information: table: activity_1"} +{"question": "SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC NULLS FIRST", "answer": "What details are there on the research staff? List the result in ascending alphabetical order.\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT DISTINCT LOCATION FROM station WHERE number_of_platforms >= 15 AND total_passengers > 25", "answer": "Show all locations that have train stations with at least 15 platforms and train stations with more than 25 total passengers.\nAdditional table information: table: train_station"} +{"question": "SELECT Author, College FROM submission", "answer": "What are the authors of submissions and their colleges?\nAdditional table information: table: workshop_paper"} +{"question": "SELECT T1.Char_cells, T1.Pixels, T1.Hardware_colours FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T2.Hardware_Model_name = 'LG-P760'", "answer": "Find the Char cells, Pixels and Hardware colours for the screen of the phone whose hardware model name is 'LG-P760'.\nAdditional table information: table: phone_1"} +{"question": "SELECT T1.course_name, COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name", "answer": "What is the name of each course and the corresponding number of student enrollment?\nAdditional table information: table: e_learning"} +{"question": "SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC", "answer": "display all the information for all employees who have the letters D or S in their first name and also arrange the result in descending order by salary.\nAdditional table information: table: hr_1"} +{"question": "SELECT city_code, COUNT(*) FROM Student GROUP BY city_code", "answer": "How many students live in each city?\nAdditional table information: table: allergy_1"} +{"question": "SELECT city FROM city ORDER BY regional_population DESC LIMIT 3", "answer": "What are the three largest cities in terms of regional population?\nAdditional table information: table: city_record"} +{"question": "SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE T1.title = 'A Kiss Before You Go: Live in Hamburg'", "answer": "What are the song titles on the album 'A Kiss Before You Go: Live in Hamburg'?\nAdditional table information: table: music_2"} +{"question": "SELECT head_id, name FROM head WHERE name LIKE '%Ha%'", "answer": "Which head's name has the substring 'Ha'? List the id and name.\nAdditional table information: table: department_management"} +{"question": "SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 23", "answer": "What are the issue dates of volumes associated with the artist aged 23 or younger?\nAdditional table information: table: music_4"} +{"question": "SELECT subject_name FROM SUBJECTS", "answer": "What are the names of all the subjects.\nAdditional table information: table: e_learning"} +{"question": "SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = 'cumin'", "answer": "Give the unit of measure for the product with the name 'cumin'.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT AVG(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "answer": "What is the average age of all gymnasts?\nAdditional table information: table: gymnast"} +{"question": "SELECT AVG(T1.price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name", "answer": "What are the average prices of products for each manufacturer?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211'", "answer": "What is the first name of each student enrolled in class ACCT-211?\nAdditional table information: table: college_1"} +{"question": "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'", "answer": "In which country and state does Janessa Sawayn live?\nAdditional table information: table: driving_school"} +{"question": "SELECT SUM(access_count) FROM documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the total access count of all documents in the most popular document type.\nAdditional table information: table: document_management"} +{"question": "SELECT city_code FROM student GROUP BY city_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the code of the city with the most students?\nAdditional table information: table: dorm_1"} +{"question": "SELECT DISTINCT name FROM medication ORDER BY name NULLS FIRST", "answer": "What is the alphabetically ordered list of all distinct medications?\nAdditional table information: table: hospital_1"} +{"question": "SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which range contains the most mountains?\nAdditional table information: table: climbing"} +{"question": "SELECT title, directed_by FROM film WHERE NOT film_id IN (SELECT film_id FROM schedule)", "answer": "What are the title and director of the films without any schedule?\nAdditional table information: table: cinema"} +{"question": "SELECT Famous_Title FROM artist WHERE Artist = 'Triumfall'", "answer": "Return the famous titles of the artist called 'Triumfall'.\nAdditional table information: table: music_4"} +{"question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'TARRING' AND T2.lastname = 'LEIA'", "answer": "How many students are taught by teacher TARRING LEIA?\nAdditional table information: table: student_1"} +{"question": "SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed", "answer": "Show the ids of all employees who have either destroyed a document or made an authorization to do this.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT COUNT(*) FROM train", "answer": "Show the number of trains\nAdditional table information: table: train_station"} +{"question": "SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = 'Pass'", "answer": "Find the dates of the tests taken with result 'Pass'.\nAdditional table information: table: e_learning"} +{"question": "SELECT T2.emp_fname, T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code", "answer": "Find the first names of all instructors who have taught some course and the course description.\nAdditional table information: table: college_1"} +{"question": "SELECT name FROM user_profiles WHERE email LIKE '%superstar%' OR email LIKE '%edu%'", "answer": "Find the names of users whose emails contain \u2018superstar\u2019 or \u2018edu\u2019.\nAdditional table information: table: twitter_1"} +{"question": "SELECT T1.account_id, T1.date_account_opened, T1.account_name, T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan'", "answer": "What are the ids, names, dates of opening, and other details for accounts corresponding to the customer with the first name 'Meaghan'?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2", "answer": "List the names of studios that have at least two films.\nAdditional table information: table: film_rank"} +{"question": "SELECT fname, age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = 'Football' INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = 'Lacrosse')", "answer": "Find the first name and age of the students who are playing both Football and Lacrosse.\nAdditional table information: table: game_1"} +{"question": "SELECT patient FROM stay WHERE room = 111 ORDER BY staystart DESC LIMIT 1", "answer": "Find the patient who most recently stayed in room 111.\nAdditional table information: table: hospital_1"} +{"question": "SELECT COUNT(*), t1.network_name, t1.services FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id GROUP BY t2.station_id", "answer": "Find the number of trains for each station, as well as the station network name and services.\nAdditional table information: table: station_weather"} +{"question": "SELECT T1.name, COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 5", "answer": "List the top 5 genres by number of tracks. List genres name and total tracks.\nAdditional table information: table: store_1"} +{"question": "SELECT Name FROM journalist WHERE NOT journalist_ID IN (SELECT journalist_ID FROM news_report)", "answer": "List the names of journalists who have not reported any event.\nAdditional table information: table: news_report"} +{"question": "SELECT T2.premises_type, T1.address_type_code FROM customer_addresses AS T1 JOIN premises AS T2 ON T1.premise_id = T2.premise_id", "answer": "Show the premise type and address type code for all customer addresses.\nAdditional table information: table: customers_campaigns_ecommerce"} +{"question": "SELECT T1.Service_Type_Description, T2.Service_Type_Code, COUNT(*) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T2.Service_Type_Code", "answer": "What is the description, code and the corresponding count of each service type?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT COUNT(DISTINCT ID) FROM teaches WHERE semester = 'Spring' AND YEAR = 2010", "answer": "Find the total number of instructors who teach a course in the Spring 2010 semester.\nAdditional table information: table: college_2"} +{"question": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3", "answer": "What are the names of the reviewers who have rated a movie more than 3 stars before?\nAdditional table information: table: movie_1"} +{"question": "SELECT MIN(snatch) FROM body_builder", "answer": "What is the minimum snatch score?\nAdditional table information: table: body_builder"} +{"question": "SELECT building FROM Faculty WHERE rank = 'Professor' GROUP BY building HAVING COUNT(*) >= 10", "answer": "In which buildings are there at least ten professors?\nAdditional table information: table: activity_1"} +{"question": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the last name of the musician who was in the most songs?\nAdditional table information: table: music_2"} +{"question": "SELECT AVG(transaction_amount), MIN(transaction_amount), MAX(transaction_amount), SUM(transaction_amount) FROM Financial_transactions", "answer": "What is the average, minimum, maximum, and total transaction amount?\nAdditional table information: table: customers_and_invoices"} +{"question": "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", "answer": "What is the name of the activity with the most students?\nAdditional table information: table: activity_1"} +{"question": "SELECT name, built_year FROM mill WHERE TYPE = 'Grondzeiler'", "answer": "What are the names and year of construction for the mills of 'Grondzeiler' type?\nAdditional table information: table: architecture"} +{"question": "SELECT TYPE, COUNT(*) FROM ship GROUP BY TYPE", "answer": "For each type, how many ships are there?\nAdditional table information: table: ship_mission"} +{"question": "SELECT StuID, COUNT(*), SUM(gamesplayed) FROM Sportsinfo GROUP BY StuID", "answer": "Show all student IDs with the number of sports and total number of games played\nAdditional table information: table: game_1"} +{"question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in", "answer": "What are the ids of the students who are not involved in any activity\nAdditional table information: table: activity_1"} +{"question": "SELECT Nationality, COUNT(*) FROM HOST GROUP BY Nationality", "answer": "How many hosts does each nationality have? List the nationality and the count.\nAdditional table information: table: party_host"} +{"question": "SELECT name FROM manufacturers WHERE revenue BETWEEN 100 AND 150", "answer": "What are the names of companies with revenue between 100 and 150?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT name FROM products WHERE price <= 200", "answer": "What are the names of products with price at most 200?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT name FROM instructor ORDER BY salary DESC LIMIT 1", "answer": "Who is the instructor with the highest salary?\nAdditional table information: table: college_2"} +{"question": "SELECT first_name, middle_name, last_name FROM Staff", "answer": "List the first name middle name and last name of all staff.\nAdditional table information: table: driving_school"} +{"question": "SELECT COUNT(DISTINCT customer_id) FROM Accounts", "answer": "How many customers have an account?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT COUNT(*) FROM Student WHERE city_code = 'HKG' OR city_code = 'CHI'", "answer": "Give the number of students living in either HKG or CHI.\nAdditional table information: table: allergy_1"} +{"question": "SELECT AVG(T1.salary), COUNT(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name = T2.dept_name ORDER BY T2.budget DESC LIMIT 1", "answer": "How many instructors are in the department with the highest budget, and what is their average salary?\nAdditional table information: table: college_2"} +{"question": "SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'Red'", "answer": "What are the names of wines made from red grapes?\nAdditional table information: table: wine_1"} +{"question": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Gatwick'", "answer": "Please show the names of aircrafts associated with airport with name 'London Gatwick'.\nAdditional table information: table: aircraft"} +{"question": "SELECT customer_phone FROM available_policies WHERE policy_type_code = (SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "What are all the customer phone numbers under the most popular policy type?\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT MAX(T2.resolution), MIN(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE '3:%'", "answer": "What is the maximum and minimum resolution of all songs that are approximately 3 minutes long?\nAdditional table information: table: music_1"} +{"question": "SELECT T1.driverid, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds DESC LIMIT 1", "answer": "What is the id and last name of the driver with the longest laptime?\nAdditional table information: table: formula_1"} +{"question": "SELECT billing_country, SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8", "answer": "What are the names of the top 8 countries by total invoice size and what are those sizes?\nAdditional table information: table: store_1"} +{"question": "SELECT customer_name, customer_phone FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM customer_address_history)", "answer": "Show names and phones of customers who do not have address information.\nAdditional table information: table: customers_and_products_contacts"} +{"question": "SELECT COUNT(DISTINCT card_type_code) FROM Customers_Cards", "answer": "How many different card types are there?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT Starting_Year FROM technician WHERE Team = 'CLE' INTERSECT SELECT Starting_Year FROM technician WHERE Team = 'CWS'", "answer": "What are the starting years shared by the technicians from the team 'CLE' or 'CWS'?\nAdditional table information: table: machine_repair"} +{"question": "SELECT Name FROM HOST WHERE NOT Host_ID IN (SELECT Host_ID FROM party_host)", "answer": "What are the names of hosts who did not host any party in our record?\nAdditional table information: table: party_host"} +{"question": "SELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id = T2.address_id WHERE T2.customer_id = 10", "answer": "Return the address of customer 10.\nAdditional table information: table: department_store"} +{"question": "SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name of the department that has the biggest number of students minored in?\nAdditional table information: table: college_3"} +{"question": "SELECT fname, lname FROM Student WHERE NOT StuID IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food')", "answer": "List the first and last name of the students who do not have any food type allergy.\nAdditional table information: table: allergy_1"} +{"question": "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", "answer": "Which customer made the most orders? Find the customer name.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT t1.product_id, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code JOIN product_characteristics AS t3 ON t1.product_id = t3.product_id GROUP BY t1.product_id HAVING COUNT(*) >= 2", "answer": "Find the id and color description of the products with at least 2 characteristics.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT name FROM circuits WHERE country = 'UK' OR country = 'Malaysia'", "answer": "What are the names of circuits that belong to UK or Malaysia?\nAdditional table information: table: formula_1"} +{"question": "SELECT COUNT(*) FROM products WHERE product_category_code = 'Seeds'", "answer": "How many products are there under the category 'Seeds'?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT MIN(salary), department_id FROM employees GROUP BY department_id", "answer": "What is the minimum salary in each department?\nAdditional table information: table: hr_1"} +{"question": "SELECT Country_name, Capital FROM country", "answer": "Show the country name and capital of all countries.\nAdditional table information: table: match_season"} +{"question": "SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC", "answer": "What are the total points of gymnasts, ordered by their floor exercise points descending?\nAdditional table information: table: gymnast"} +{"question": "SELECT date_joined_staff FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "answer": "When did the staff member named Janessa Sawayn join the company?\nAdditional table information: table: driving_school"} +{"question": "SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20", "answer": "What are the dates when customers with ids between 10 and 20 became customers?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T1.driverid, T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE POSITION = '1' GROUP BY T1.driverid HAVING COUNT(*) >= 2", "answer": "What is the id, forname and surname of the driver who had the first position in terms of laptime at least twice?\nAdditional table information: table: formula_1"} +{"question": "SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1", "answer": "What is the name of the district with the most residents?\nAdditional table information: table: store_product"} +{"question": "SELECT DISTINCT T1.name, T1.position FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand = 'X'", "answer": "Which physicians prescribe a medication of brand X? Tell me the name and position of those physicians.\nAdditional table information: table: hospital_1"} +{"question": "SELECT Name FROM manager ORDER BY Age DESC LIMIT 1", "answer": "What is the name of the oldest manager?\nAdditional table information: table: railway"} +{"question": "SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = 'Professor'", "answer": "Show the ids of students whose advisors are professors.\nAdditional table information: table: activity_1"} +{"question": "SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION <> 'East'", "answer": "What are the different police forces of counties that are not located in the East?\nAdditional table information: table: county_public_safety"} +{"question": "SELECT gender, COUNT(*) FROM Customers GROUP BY gender", "answer": "How many customers are there of each gender?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT T1.cmi_details FROM Customer_Master_Index AS T1 JOIN CMI_Cross_References AS T2 ON T1.master_customer_id = T2.master_customer_id WHERE T2.source_system_code = 'Tax'", "answer": "what are the details of the cmi masters that have the cross reference code 'Tax'?\nAdditional table information: table: local_govt_mdm"} +{"question": "SELECT name FROM driver WHERE home_city = 'Hartford' AND age < 40", "answer": "List names for drivers from Hartford city and younger than 40.\nAdditional table information: table: school_bus"} +{"question": "SELECT RoomId, roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1", "answer": "Which room has the highest base price?\nAdditional table information: table: inn_1"} +{"question": "SELECT COUNT(*) FROM building WHERE height_feet > (SELECT AVG(height_feet) FROM building) OR floors > (SELECT AVG(floors) FROM building)", "answer": "Show the number of buildings with a height above the average or a number of floors above the average.\nAdditional table information: table: protein_institute"} +{"question": "SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1", "answer": "What is the entry name of the most expensive catalog (in USD)?\nAdditional table information: table: product_catalog"} +{"question": "SELECT MAX(Sales_billion), MIN(Sales_billion) FROM Companies WHERE Industry <> 'Banking'", "answer": "Find the maximum and minimum sales of the companies that are not in the 'Banking' industry.\nAdditional table information: table: company_office"} +{"question": "SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 AND T2.points > 20", "answer": "What are the first names of the different drivers who won in position 1 as driver standing and had more than 20 points?\nAdditional table information: table: formula_1"} +{"question": "SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC NULLS FIRST LIMIT 1", "answer": "Tell me the the date when the first claim was made.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) <= 20", "answer": "What are the last names of employees who serve at most 20 customers?\nAdditional table information: table: chinook_1"} +{"question": "SELECT COUNT(*) FROM products WHERE price >= 180", "answer": "How many products have prices of at least 180?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT name, nationality, id FROM architect WHERE gender = 'male' ORDER BY name NULLS FIRST", "answer": "List the name, nationality and id of all male architects ordered by their names lexicographically.\nAdditional table information: table: architecture"} +{"question": "SELECT COUNT(*) FROM track", "answer": "Count the number of tracks.\nAdditional table information: table: race_track"} +{"question": "SELECT COUNT(*) FROM Rooms", "answer": "How many rooms are there?\nAdditional table information: table: inn_1"} +{"question": "SELECT TYPE, COUNT(*) FROM operate_company GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common company type, and how many are there?\nAdditional table information: table: flight_company"} +{"question": "SELECT COUNT(*) FROM employees AS T1 JOIN customers AS T2 ON T2.support_rep_id = T1.id WHERE T1.first_name = 'Steve' AND T1.last_name = 'Johnson'", "answer": "How many customers does Steve Johnson support?\nAdditional table information: table: store_1"} +{"question": "SELECT LOCATION FROM school ORDER BY Founded DESC", "answer": "List the locations of schools in descending order of founded year.\nAdditional table information: table: school_player"} +{"question": "SELECT StuID, COUNT(*), SUM(gamesplayed) FROM Sportsinfo GROUP BY StuID", "answer": "What are the ids of all students along with how many sports and games did they play?\nAdditional table information: table: game_1"} +{"question": "SELECT job_id, hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05'", "answer": "Find job id and date of hire for those employees who was hired between November 5th, 2007 and July 5th, 2009.\nAdditional table information: table: hr_1"} +{"question": "SELECT Weight FROM people ORDER BY Height ASC NULLS FIRST LIMIT 1", "answer": "What is the weight of the shortest person?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT COUNT(*) FROM Person WHERE age > 30 AND job = 'engineer'", "answer": "HOw many engineers are older than 30?\nAdditional table information: table: network_2"} +{"question": "SELECT Author FROM submission WHERE College = 'Florida' OR College = 'Temple'", "answer": "Show the names of authors from college 'Florida' or 'Temple'\nAdditional table information: table: workshop_paper"} +{"question": "SELECT T1.Claim_id, COUNT(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id", "answer": "Find the number of settlements each claim corresponds to. Show the number together with the claim id.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT member_name FROM member EXCEPT SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id", "answer": "Show all member names who are not in charge of any event.\nAdditional table information: table: party_people"} +{"question": "SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus'", "answer": "Which tourist attractions can we get to by bus? Tell me the names of the attractions.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT COUNT(*), constructorid FROM constructorStandings GROUP BY constructorid", "answer": "What are the numbers of races for each constructor id?\nAdditional table information: table: formula_1"} +{"question": "SELECT MAX(capacity), AVG(capacity), building FROM classroom GROUP BY building", "answer": "What are the greatest and average capacity for rooms in each building?\nAdditional table information: table: college_2"} +{"question": "SELECT Name FROM technician WHERE Team <> 'NYY'", "answer": "What is the name of the technician whose team is not 'NYY'?\nAdditional table information: table: machine_repair"} +{"question": "SELECT T2.guest_first_name, T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T1.booking_status_code = 'Confirmed'", "answer": "Show the first names and last names of all the guests that have apartment bookings with status code 'Confirmed'.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "What country is the artist who made the fewest songs from?\nAdditional table information: table: music_1"} +{"question": "SELECT Carrier FROM device WHERE Software_Platform <> 'Android'", "answer": "Return the device carriers that do not have Android as their software platform.\nAdditional table information: table: device"} +{"question": "SELECT AVG(access_count) FROM documents GROUP BY document_structure_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What is the average access count of documents that have the least common structure?\nAdditional table information: table: document_management"} +{"question": "SELECT BirthDate FROM EMPLOYEE WHERE City = 'Edmonton'", "answer": "Find the birth dates corresponding to employees who live in the city of Edmonton.\nAdditional table information: table: chinook_1"} +{"question": "SELECT DISTINCT T1.name, T1.position FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand = 'X'", "answer": "Find the name and position of physicians who prescribe some medication whose brand is X?\nAdditional table information: table: hospital_1"} +{"question": "SELECT Date_Claim_Made, Date_Claim_Settled FROM Settlements", "answer": "What are the claim dates and settlement dates of all the settlements?\nAdditional table information: table: insurance_policies"} +{"question": "SELECT rID FROM Reviewer WHERE name = 'Daniel Lewis'", "answer": "What is the id of the reviewer named Daniel Lewis?\nAdditional table information: table: movie_1"} +{"question": "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", "answer": "On what day was the order with invoice number 10 placed?\nAdditional table information: table: tracking_orders"} +{"question": "SELECT COUNT(DISTINCT city) FROM station", "answer": "What is the number of distinct cities the stations are located at?\nAdditional table information: table: bike_1"} +{"question": "SELECT T1.property_id, COUNT(*) FROM properties AS T1 JOIN residents AS T2 ON T1.property_id = T2.property_id GROUP BY T1.property_id", "answer": "How many residents does each property have? List property id and resident count.\nAdditional table information: table: local_govt_and_lot"} +{"question": "SELECT flno, origin, destination FROM Flight ORDER BY origin NULLS FIRST", "answer": "What is the flight number, origin, and destination for all flights in alphabetical order by departure cities?\nAdditional table information: table: flight_1"} +{"question": "SELECT T2.customer_first_name, T2.customer_last_name, T2.customer_phone FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_number = '4560596484842'", "answer": "Return the full name and phone of the customer who has card number 4560596484842.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT Name FROM city ORDER BY White DESC LIMIT 5", "answer": "List the names of the city with the top 5 white percentages.\nAdditional table information: table: county_public_safety"} +{"question": "SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' INTERSECT SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Night'", "answer": "Which channels broadcast both in the morning and at night? Give me the channel names.\nAdditional table information: table: program_share"} +{"question": "SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration < (SELECT MAX(duration) FROM pitstops WHERE raceid = 841)", "answer": "What is the id and stop number for each driver that has a shorter pit stop than the driver in the race with id 841?\nAdditional table information: table: formula_1"} +{"question": "SELECT DISTINCT city FROM addresses", "answer": "Retrieve the list of all cities.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the most frequent result across all musicals.\nAdditional table information: table: musical"} +{"question": "SELECT creation FROM department GROUP BY creation ORDER BY COUNT(*) DESC LIMIT 1", "answer": "In which year were most departments established?\nAdditional table information: table: department_management"} +{"question": "SELECT T1.product_name, T2.color_description, T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code = T2.color_code WHERE product_category_code = 'Herbs'", "answer": "What are the names, color descriptions, and product descriptions for products in the 'Herbs' category?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT premises_type, COUNT(*) FROM premises GROUP BY premises_type", "answer": "Show each premise type and the number of premises in that type.\nAdditional table information: table: customers_campaigns_ecommerce"} +{"question": "SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = 'advanced database'", "answer": "Find the login name of the course author that teaches the course with name 'advanced database'.\nAdditional table information: table: e_learning"} +{"question": "SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the policy type the most customers choose.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE '%gmail.com%'", "answer": "How many customers have email that contains 'gmail.com'?\nAdditional table information: table: chinook_1"} +{"question": "SELECT COUNT(*) FROM film WHERE title LIKE '%Dummy%'", "answer": "Count the number of films whose title contains the word 'Dummy'.\nAdditional table information: table: cinema"} +{"question": "SELECT T1.Order_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID JOIN Products AS T3 ON T2.Product_ID = T3.Product_ID WHERE T3.Product_price > 1000", "answer": "What are the order dates of orders with price higher than 1000?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "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", "answer": "What are the first and last name of the faculty who has the most students?\nAdditional table information: table: activity_1"} +{"question": "SELECT class_code FROM CLASS WHERE class_room = 'KLR209'", "answer": "What are the codes of all the courses that are located in room KLR209?\nAdditional table information: table: college_1"} +{"question": "SELECT T1.name FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING COUNT(*) > 1", "answer": "Find the names of users who have more than one tweet.\nAdditional table information: table: twitter_1"} +{"question": "SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = 'Human Resource' OR T2.role_name = 'Manager'", "answer": "Show the employee ids for all employees with role name 'Human Resource' or 'Manager'.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT name, LOCATION FROM enzyme", "answer": "List the names and the locations that the enzymes can make an effect.\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2", "answer": "Show the name of the party that has at least two records.\nAdditional table information: table: election"} +{"question": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'Mobile Computing')", "answer": "What is the course title of the prerequisite of course Mobile Computing?\nAdditional table information: table: college_2"} +{"question": "SELECT T1.staff_id, T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = 'Department Manager'", "answer": "What are the staff ids and genders of all staffs whose job title is Department Manager?\nAdditional table information: table: department_store"} +{"question": "SELECT COUNT(*) FROM products WHERE NOT product_id IN (SELECT product_id FROM Order_items)", "answer": "Count the number of products that were never ordered.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY AVG(room_count) DESC LIMIT 3", "answer": "What are the top three apartment types in terms of the average room count? Give me the\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees)", "answer": "How many universities have a campus fee greater than the average?\nAdditional table information: table: csu_1"} +{"question": "SELECT Name FROM editor ORDER BY Age ASC NULLS FIRST LIMIT 1", "answer": "What is the name of the youngest editor?\nAdditional table information: table: journal_committee"} +{"question": "SELECT DISTINCT T1.state, T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'", "answer": "What is the state and enrollment of the colleges where have any students who got accepted in the tryout decision.\nAdditional table information: table: soccer_2"} +{"question": "SELECT f_id FROM files WHERE formats = 'mp4' UNION SELECT f_id FROM song WHERE resolution > 720", "answer": "What are the ids of songs that are available in either mp4 format or have resolution above 720?\nAdditional table information: table: music_1"} +{"question": "SELECT T2.allergytype, COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype", "answer": "Show all allergy type with number of students affected.\nAdditional table information: table: allergy_1"} +{"question": "SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id GROUP BY T2.country_id HAVING COUNT(*) >= 3", "answer": "Which countries have at least 3 cities?\nAdditional table information: table: sakila_1"} +{"question": "SELECT main_industry, SUM(market_value) FROM company GROUP BY main_industry", "answer": "Show all main industry and total market value in each industry.\nAdditional table information: table: gas_company"} +{"question": "SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which status code is the most common of all the bookings?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T2.decor ORDER BY COUNT(T2.decor) ASC NULLS FIRST LIMIT 1", "answer": "What is the least popular kind of decor?\nAdditional table information: table: inn_1"} +{"question": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID", "answer": "Return the names of entrepreneurs.\nAdditional table information: table: entrepreneur"} +{"question": "SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count > 100 OR amount_of_transaction > 1000", "answer": "Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT department_id, AVG(salary) FROM employees WHERE commission_pct <> 'null' GROUP BY department_id", "answer": "What is the average salary of employees who have a commission percentage that is not null?\nAdditional table information: table: hr_1"} +{"question": "SELECT name, LOCATION, year_opened FROM track WHERE seating > (SELECT AVG(seating) FROM track)", "answer": "What are the names, locations, and years of opening for tracks with seating higher than average?\nAdditional table information: table: race_track"} +{"question": "SELECT T2.dept_name, T2.dept_address FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name and address of the department with the most students?\nAdditional table information: table: college_1"} +{"question": "SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = 'Matthias' AND t1.lname = 'Blume'", "answer": "Which institution is the author 'Matthias Blume' belong to? Give me the name of the institution.\nAdditional table information: table: icfp_1"} +{"question": "SELECT lname, age FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Milk' INTERSECT SELECT StuID FROM Has_allergy WHERE Allergy = 'Cat')", "answer": "Find the last name and age of the student who has allergy to both milk and cat.\nAdditional table information: table: allergy_1"} +{"question": "SELECT COUNT(*) FROM climber", "answer": "How many climbers are there?\nAdditional table information: table: climbing"} +{"question": "SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = 'San Francisco State University' AND t1.year = 2000", "answer": "In the year 2000, what is the campus fee for San Francisco State University?\nAdditional table information: table: csu_1"} +{"question": "SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70", "answer": "What are all the different zip codes that have a maximum dew point that was always below 70?\nAdditional table information: table: bike_1"} +{"question": "SELECT DISTINCT city FROM branch WHERE membership_amount >= 100", "answer": "Show all distinct city where branches with at least 100 memberships are located.\nAdditional table information: table: shop_membership"} +{"question": "SELECT COUNT(*) FROM Movie WHERE YEAR < 2000", "answer": "How many movies were made before 2000?\nAdditional table information: table: movie_1"} +{"question": "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", "answer": "What is the name and hours for the project which has the most scientists assigned to it?\nAdditional table information: table: scientist_1"} +{"question": "SELECT COUNT(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005", "answer": "What is the total number of gas stations that opened between 2000 and 2005?\nAdditional table information: table: gas_company"} +{"question": "SELECT DISTINCT Nominee FROM musical WHERE Award <> 'Tony Award'", "answer": "Return the different nominees of musicals that have an award that is not the Tony Award.\nAdditional table information: table: musical"} +{"question": "SELECT T2.Name FROM debate_people AS T1 JOIN people AS T2 ON T1.Negative = T2.People_ID GROUP BY T2.Name HAVING COUNT(*) >= 2", "answer": "Show the names of people who have been on the negative side of debates at least twice.\nAdditional table information: table: debate"} +{"question": "SELECT DISTINCT T2.thing_id, T2.Type_of_Thing_Code FROM Timed_Status_of_Things AS T1 JOIN Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.Status_of_Thing_Code = 'Close' OR T1.Date_and_Date < '2017-06-19 02:59:21'", "answer": "What are the distinct id and type of the thing that has the status 'Close' or has a status record before the date '2017-06-19 02:59:21'\nAdditional table information: table: local_govt_and_lot"} +{"question": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which payment method is used the most often?\nAdditional table information: table: insurance_policies"} +{"question": "SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1", "answer": "What is the name of the highest mountain?\nAdditional table information: table: climbing"} +{"question": "SELECT gtype FROM Video_games WHERE gname = 'Call of Destiny'", "answer": "What type of game is Call of Destiny?\nAdditional table information: table: game_1"} +{"question": "SELECT SUM(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010", "answer": "What is the total home game attendance of team Boston Red Stockings from 2000 to 2010?\nAdditional table information: table: baseball_1"} +{"question": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID HAVING COUNT(*) >= 3", "answer": "What are the names of all reviewers that have rated 3 or more movies?\nAdditional table information: table: movie_1"} +{"question": "SELECT DISTINCT staff_first_name, staff_last_name FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T2.problem_id = 1", "answer": "Which staff members are assigned to the problem with id 1? Give me their first and last names.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1", "answer": "What is the starting year for the oldest technician?\nAdditional table information: table: machine_repair"} +{"question": "SELECT T1.Store_Phone, T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T2.Product_Name = 'film'", "answer": "What are the names of workshop groups in which services with product name 'film' are performed?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Badlands' AND T1.StagePosition = 'back'", "answer": "Who is performing in the back stage position for the song 'Badlands'? Show the first name and the last name.\nAdditional table information: table: music_2"} +{"question": "SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code = t3.color_code WHERE t3.color_description = 'white' AND t2.unit_of_measure <> 'Handful'", "answer": "Find the product names that are colored 'white' but do not have unit of measurement 'Handful'.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT COUNT(*) FROM Visitors WHERE NOT Tourist_ID IN (SELECT Tourist_ID FROM Visits)", "answer": "How many tourists did not make any visit?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which poll resource provided the most number of candidate information?\nAdditional table information: table: candidate_poll"} +{"question": "SELECT problem_id FROM problems WHERE date_problem_reported > '1978-06-26'", "answer": "Find the ids of the problems reported after 1978-06-26.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT donator_name FROM endowment EXCEPT SELECT donator_name FROM endowment WHERE amount < 9", "answer": "Show the names of all the donors except those whose donation amount less than 9.\nAdditional table information: table: school_finance"} +{"question": "SELECT T1.forename, T1.surname, T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING COUNT(*) > 8 UNION SELECT T1.forename, T1.surname, T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING COUNT(*) > 5", "answer": "What are the drivers' first, last names and id who had more than 8 pit stops or participated in more than 5 race results?\nAdditional table information: table: formula_1"} +{"question": "SELECT AVG(price) FROM wine WHERE NOT Appelation IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma')", "answer": "What is the average price for wines not produced in Sonoma county?\nAdditional table information: table: wine_1"} +{"question": "SELECT booking_start_date, booking_end_date FROM Apartment_Bookings", "answer": "Show the start dates and end dates of all the apartment bookings.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT COUNT(*) FROM program", "answer": "how many programs are there?\nAdditional table information: table: program_share"} +{"question": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'male' AND T1.job = 'doctor'", "answer": "Who are the friends of Alice that are doctors?\nAdditional table information: table: network_2"} +{"question": "SELECT Candidate_ID FROM candidate ORDER BY oppose_rate NULLS FIRST LIMIT 1", "answer": "Find the id of the candidate who got the lowest oppose rate.\nAdditional table information: table: candidate_poll"} +{"question": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Aaron' AND t1.lname = 'Turon'", "answer": "Find all the papers published by 'Aaron Turon'.\nAdditional table information: table: icfp_1"} +{"question": "SELECT Hardware_Model_name, Company_name FROM phone WHERE Accreditation_type LIKE 'Full'", "answer": "Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name.\nAdditional table information: table: phone_1"} +{"question": "SELECT POSITION, AVG(Points) FROM player GROUP BY POSITION", "answer": "List the position of players and the average number of points of players of each position.\nAdditional table information: table: sports_competition"} +{"question": "SELECT languages FROM song GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the language used most often in the songs?\nAdditional table information: table: music_1"} +{"question": "SELECT COUNT(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' AND T1.sex = 'F'", "answer": "How many female students live in Smith Hall?\nAdditional table information: table: dorm_1"} +{"question": "SELECT T1.customer_name, T1.customer_phone, T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the name, phone number and email address of the customer who made the largest number of orders?\nAdditional table information: table: department_store"} +{"question": "SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID", "answer": "Which physicians have never taken any appointment? Find their names.\nAdditional table information: table: hospital_1"} +{"question": "SELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000", "answer": "Show the investors shared by entrepreneurs that requested more than 140000 and entrepreneurs that requested less than 120000.\nAdditional table information: table: entrepreneur"} +{"question": "SELECT AVG(HS), MAX(HS), MIN(HS) FROM Player", "answer": "Find the max, average and min training hours of all players.\nAdditional table information: table: soccer_2"} +{"question": "SELECT AVG(lat), AVG(long) FROM station WHERE city = 'San Jose'", "answer": "What is the average latitude and longitude of stations located in San Jose city?\nAdditional table information: table: bike_1"} +{"question": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height ASC NULLS FIRST", "answer": "List the names of gymnasts in ascending order by their heights.\nAdditional table information: table: gymnast"} +{"question": "SELECT minister, party_name FROM party ORDER BY took_office DESC", "answer": "Show all ministers and parties they belong to in descending order of the time they took office.\nAdditional table information: table: party_people"} +{"question": "SELECT COUNT(*) FROM student", "answer": "Count the total number of students.\nAdditional table information: table: club_1"} +{"question": "SELECT T2.name, COUNT(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year > 2015 GROUP BY T2.branch_id", "answer": "For each branch id, what are the names of the branches that were registered after 2015?\nAdditional table information: table: shop_membership"} +{"question": "SELECT name FROM driver ORDER BY age DESC", "answer": "Show the name of drivers in descending order of age.\nAdditional table information: table: school_bus"} +{"question": "SELECT COUNT(*) FROM school", "answer": "Count the number of schools.\nAdditional table information: table: school_finance"} +{"question": "SELECT COUNT(*), T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name", "answer": "Find the number of scientists involved for each project name.\nAdditional table information: table: scientist_1"} +{"question": "SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1", "answer": "List the name of the county with the largest population.\nAdditional table information: table: county_public_safety"} +{"question": "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", "answer": "Find the id of the customer who made the most orders.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT school, nickname FROM university ORDER BY founded NULLS FIRST", "answer": "What are the different schools and their nicknames, ordered by their founding years?\nAdditional table information: table: university_basketball"} +{"question": "SELECT Fname FROM FACULTY WHERE Rank = 'Professor' ORDER BY Fname NULLS FIRST", "answer": "What are the first names for all faculty professors, ordered by first name?\nAdditional table information: table: college_3"} +{"question": "SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.attribute_value = (SELECT attribute_value FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_value ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "What are the entry names of catalog with the attribute possessed by most entries.\nAdditional table information: table: product_catalog"} +{"question": "SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which film has the most copies in the inventory? List both title and id.\nAdditional table information: table: sakila_1"} +{"question": "SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.city = 'new york city'", "answer": "Who has a friend that is from new york city?\nAdditional table information: table: network_2"} +{"question": "SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50", "answer": "Show the locations of parties with hosts older than 50.\nAdditional table information: table: party_host"} +{"question": "SELECT COUNT(*), project_id FROM Documents WHERE document_type_code = 'BK' GROUP BY project_id", "answer": "How many documents are with document type code BK for each product id?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT DISTINCT artist_name FROM song WHERE languages = 'english' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8", "answer": "What are the names of the different artists that have produced a song in English but have never receieved a rating higher than 8?\nAdditional table information: table: music_1"} +{"question": "SELECT school, TYPE FROM school WHERE NOT school_id IN (SELECT school_id FROM school_bus)", "answer": "Show the school name and type for schools without a school bus.\nAdditional table information: table: school_bus"} +{"question": "SELECT COUNT(*), sex FROM employee WHERE salary < 50000 GROUP BY sex", "answer": "Find the number of employees of each gender whose salary is lower than 50000.\nAdditional table information: table: company_1"} +{"question": "SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.sex = 'F' GROUP BY t1.clubname ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which club has the most female students as their members? Give me the name of the club.\nAdditional table information: table: club_1"} +{"question": "SELECT AVG(hours) FROM projects", "answer": "What is the average hours across all projects?\nAdditional table information: table: scientist_1"} +{"question": "SELECT T1.date_in_location_from, T1.date_in_locaton_to FROM Document_locations AS T1 JOIN All_documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = 'Robin CV'", "answer": "Find the starting date and ending data in location for the document named 'Robin CV'.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 1996", "answer": "Find the average fee on a CSU campus in 1996\nAdditional table information: table: csu_1"} +{"question": "SELECT name FROM channel WHERE OWNER <> 'CCTV'", "answer": "Find the names of channels that are not owned by CCTV.\nAdditional table information: table: program_share"} +{"question": "SELECT T2.name, COUNT(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id", "answer": "What are the names of different tracks, and how many races has each had?\nAdditional table information: table: race_track"} +{"question": "SELECT customer_details FROM Customers EXCEPT SELECT T1.customer_details FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id = T2.customer_id", "answer": "List the details of the customers who do not have any policies.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT name FROM airport WHERE country <> 'Iceland'", "answer": "What are the names of the airports which are not in the country 'Iceland'?\nAdditional table information: table: flight_company"} +{"question": "SELECT DISTINCT (catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE '%Murray%'", "answer": "Find all the catalog publishers whose name contains 'Murray'\nAdditional table information: table: product_catalog"} +{"question": "SELECT COUNT(DISTINCT student_id) FROM Student_Course_Enrolment", "answer": "How many distinct students are enrolled in courses?\nAdditional table information: table: e_learning"} +{"question": "SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "answer": "From which hometowns did no gymnasts come from?\nAdditional table information: table: gymnast"} +{"question": "SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the department with the most students minoring in it?\nAdditional table information: table: college_3"} +{"question": "SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType", "answer": "What is the average base price of different bed type? List bed type and average base price.\nAdditional table information: table: inn_1"} +{"question": "SELECT t1.customer_name, t1.customer_phone FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California'", "answer": "Find the names and phone numbers of customers living in California state.\nAdditional table information: table: customer_deliveries"} +{"question": "SELECT COUNT(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid WHERE t1.clubname = 'Bootup Baltimore'", "answer": "Count the number of different positions in the club 'Bootup Baltimore'.\nAdditional table information: table: club_1"} +{"question": "SELECT T1.FirstName, T1.SupportRepId FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) >= 10", "answer": "What are the first names and support rep ids for employees serving 10 or more customers?\nAdditional table information: table: chinook_1"} +{"question": "SELECT Case_burden FROM county_public_safety ORDER BY Population DESC", "answer": "What are the case burdens of counties, ordered descending by population?\nAdditional table information: table: county_public_safety"} +{"question": "SELECT partitionid FROM user_profiles WHERE name = 'Iron Man'", "answer": "What is the partition id of the user named 'Iron Man'.\nAdditional table information: table: twitter_1"} +{"question": "SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId WHERE T1.Name = 'AAC audio file'", "answer": "How many tracks are in the AAC audio file media type?\nAdditional table information: table: chinook_1"} +{"question": "SELECT location_code, COUNT(*) FROM Document_locations GROUP BY location_code", "answer": "Show the location codes and the number of documents in each location.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT COUNT(*) FROM Staff", "answer": "How many employees are there?\nAdditional table information: table: driving_school"} +{"question": "SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = 'Gorgoroth'", "answer": "Return the issue dates of volumes that are by the artist named Gorgoroth.\nAdditional table information: table: music_4"} +{"question": "SELECT DISTINCT payment_method_code FROM INVOICES", "answer": "Show me the distinct payment method codes from the invoice record.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT LOCATION FROM school ORDER BY Enrollment ASC NULLS FIRST", "answer": "What is the list of school locations sorted in ascending order of school enrollment?\nAdditional table information: table: school_player"} +{"question": "SELECT Name FROM people WHERE Age = 35 OR Age = 36", "answer": "Show the names of people aged either 35 or 36.\nAdditional table information: table: debate"} +{"question": "SELECT name FROM program ORDER BY launch NULLS FIRST", "answer": "What is the list of program names, sorted by the order of launch date?\nAdditional table information: table: program_share"} +{"question": "SELECT MIN(Order_Quantity), AVG(Order_Quantity), MAX(Order_Quantity) FROM INVOICES", "answer": "Show the minimum, average, maximum order quantity of all invoices.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT dorm_name, gender FROM dorm WHERE student_capacity > 300 OR student_capacity < 100", "answer": "What are the names and types of the dorms that have a capacity greater than 300 or less than 100?\nAdditional table information: table: dorm_1"} +{"question": "SELECT T2.name, T2.country FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name and country for the artist with most number of exhibitions?\nAdditional table information: table: theme_gallery"} +{"question": "SELECT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' INTERSECT SELECT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice'", "answer": "Find the name and age of the person who is a friend of both Dan and Alice.\nAdditional table information: table: network_2"} +{"question": "SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore'", "answer": "Who are the members of the club named 'Bootup Baltimore'? Give me their last names.\nAdditional table information: table: club_1"} +{"question": "SELECT AVG(capacity) FROM stadium WHERE opening_year = 2005", "answer": "What is the average capacity of the stadiums that were opened in year 2005?\nAdditional table information: table: swimming"} +{"question": "SELECT name FROM Person WHERE gender = 'male' ORDER BY age NULLS FIRST", "answer": "What is the name and age of every male? Order the results by age.\nAdditional table information: table: network_2"} +{"question": "SELECT MAX(T1.duration), MAX(T2.resolution), T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages NULLS FIRST", "answer": "What are the maximum duration and resolution of all songs, for each language, ordered alphabetically by language?\nAdditional table information: table: music_1"} +{"question": "SELECT AVG(T1.salary), COUNT(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name = T2.dept_name ORDER BY T2.budget DESC LIMIT 1", "answer": "Find the number and averaged salary of all instructors who are in the department with the highest budget.\nAdditional table information: table: college_2"} +{"question": "SELECT SUM(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan'", "answer": "Return the total revenue of companies with headquarters in Tokyo or Taiwan.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT COUNT(*) FROM architect WHERE NOT id IN (SELECT architect_id FROM mill WHERE built_year < 1850)", "answer": "How many architects haven't built a mill before year 1850?\nAdditional table information: table: architecture"} +{"question": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = 'Japan' AND t2.authorder = 1 AND t1.lname = 'Ohori'", "answer": "Find the titles of papers whose first author is affiliated with an institution in the country 'Japan' and has last name 'Ohori'?\nAdditional table information: table: icfp_1"} +{"question": "SELECT t3.address_content FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t1.customer_name = 'Maudie Kertzmann'", "answer": "Return the address content for the customer whose name is 'Maudie Kertzmann'.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT Description FROM aircraft", "answer": "List the description of all aircrafts.\nAdditional table information: table: aircraft"} +{"question": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = 'Heilo'", "answer": "How many instrument does the musician with last name 'Heilo' use?\nAdditional table information: table: music_2"} +{"question": "SELECT name, LOCATION FROM cinema WHERE capacity > (SELECT AVG(capacity) FROM cinema)", "answer": "Show the cinema name and location for cinemas with capacity above average.\nAdditional table information: table: cinema"} +{"question": "SELECT T1.customer_name FROM customers AS T1, orders AS T2, 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", "answer": "Which customers have ever canceled the purchase of the product 'food' (the item status is 'Cancel')?\nAdditional table information: table: tracking_orders"} +{"question": "SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = 'San Francisco State University' AND t1.year = 2000", "answer": "What is the campus fee of 'San Francisco State University' in year 2000?\nAdditional table information: table: csu_1"} +{"question": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = 'warm'", "answer": "What are the different product names for products that have the 'warm' characteristic:?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2", "answer": "Which party has two or more records?\nAdditional table information: table: election"} +{"question": "SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'Red'", "answer": "List the names of all distinct wines that are made of red color grape.\nAdditional table information: table: wine_1"} +{"question": "SELECT apt_type_code, MAX(room_count), MIN(room_count) FROM Apartments GROUP BY apt_type_code", "answer": "Return each apartment type code along with the maximum and minimum number of rooms among each type.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT TYPE FROM artwork GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "List the most common type of artworks.\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT product_id FROM products_booked GROUP BY product_id HAVING COUNT(*) = 3", "answer": "What is the id of the product that is booked for 3 times?\nAdditional table information: table: products_for_hire"} +{"question": "SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T1.dept_code = T3.dept_code WHERE T3.dept_name = 'History' AND T1.prof_high_degree <> 'Ph.D.'", "answer": "Find the first name and office of history professor who did not get a Ph.D. degree.\nAdditional table information: table: college_1"} +{"question": "SELECT Carrier FROM phone ORDER BY Price DESC LIMIT 1", "answer": "What is the carrier of the most expensive phone?\nAdditional table information: table: phone_market"} +{"question": "SELECT T2.name, T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the name and id of the team with the most victories in 2008 postseason?\nAdditional table information: table: baseball_1"} +{"question": "SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2002 ORDER BY t3.degrees DESC LIMIT 1", "answer": "How many faculty members did the university that conferred the most degrees in 2002 have?\nAdditional table information: table: csu_1"} +{"question": "SELECT MAX(Weeks_on_Top), MIN(Weeks_on_Top) FROM volume", "answer": "Give the maximum and minimum weeks on top across all volumes.\nAdditional table information: table: music_4"} +{"question": "SELECT DISTINCT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Google'", "answer": "Which authors belong to the institution 'Google'? Show the first names and last names.\nAdditional table information: table: icfp_1"} +{"question": "SELECT T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of party with most number of members?\nAdditional table information: table: party_people"} +{"question": "SELECT state FROM park GROUP BY state HAVING COUNT(*) > 2", "answer": "Which states have more than 2 parks?\nAdditional table information: table: baseball_1"} +{"question": "SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC NULLS FIRST", "answer": "List the research staff details, and order in ascending order.\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%'", "answer": "Find the first names of students whose first names contain letter 'a'.\nAdditional table information: table: college_3"} +{"question": "SELECT COUNT(*) FROM Accounts", "answer": "How many accounts are there?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT firstname FROM list WHERE classroom = 108", "answer": "What are the first names of students in room 108?\nAdditional table information: table: student_1"} +{"question": "SELECT song_name FROM song ORDER BY resolution NULLS FIRST", "answer": "What are the names of all songs that are ordered by their resolution numbers?\nAdditional table information: table: music_1"} +{"question": "SELECT Payment_ID, Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa'", "answer": "Which Payments were processed with Visa? List the payment Id, the date and the amount.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2", "answer": "Which advisors have more than two students?\nAdditional table information: table: voter_2"} +{"question": "SELECT customer_phone FROM available_policies", "answer": "Find all the phone numbers.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT roomName FROM Rooms WHERE basePrice > (SELECT AVG(basePrice) FROM Rooms)", "answer": "What are the name of rooms that cost more than the average.\nAdditional table information: table: inn_1"} +{"question": "SELECT Name FROM HOST WHERE NOT Host_ID IN (SELECT Host_ID FROM party_host)", "answer": "List the names of hosts who did not serve as a host of any party in our record.\nAdditional table information: table: party_host"} +{"question": "SELECT song_name, releasedate FROM song ORDER BY releasedate DESC LIMIT 1", "answer": "What is the name of the song that was released in the most recent year?\nAdditional table information: table: music_1"} +{"question": "SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T2.Country = 'Japan' ORDER BY T1.Year DESC", "answer": "What are the years of film market estimation for the market of Japan, ordered by year descending?\nAdditional table information: table: film_rank"} +{"question": "SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population < 100000", "answer": "Which delegates are from counties with population smaller than 100000?\nAdditional table information: table: election"} +{"question": "SELECT COUNT(*) FROM Accounts", "answer": "How many accounts do we have?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT name, seating FROM track WHERE year_opened > 2000 ORDER BY seating NULLS FIRST", "answer": "What are the names and seatings for all tracks opened after 2000, ordered by seating?\nAdditional table information: table: race_track"} +{"question": "SELECT route_name FROM Delivery_Routes ORDER BY route_name NULLS FIRST", "answer": "List the names of all routes in alphabetic order.\nAdditional table information: table: customer_deliveries"} +{"question": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t2.position = 'President'", "answer": "Who is the president of the club 'Bootup Baltimore'? Give me the first and last name.\nAdditional table information: table: club_1"} +{"question": "SELECT AVG(Quantity) FROM stock", "answer": "Give the average quantity of stocks.\nAdditional table information: table: device"} +{"question": "SELECT COUNT(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54'", "answer": "How many project members were leaders or started working before '1989-04-24 23:51:54'?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT MAX(amount_outstanding), MIN(amount_outstanding), AVG(amount_outstanding) FROM Customers", "answer": "What is the maximum, minimum, and average amount of money outsanding for all customers?\nAdditional table information: table: driving_school"} +{"question": "SELECT DISTINCT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Brittany Harris' OR T2.year > 2000", "answer": "What are names of the movies that are either made after 2000 or reviewed by Brittany Harris?\nAdditional table information: table: movie_1"} +{"question": "SELECT LOCATION FROM gas_station ORDER BY open_year NULLS FIRST", "answer": "order all gas station locations by the opening year.\nAdditional table information: table: gas_company"} +{"question": "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", "answer": "What are the statement ids, statement details, and account details, for all accounts?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT TYPE, Nationality FROM ship", "answer": "What are the types and nationalities of every ship?\nAdditional table information: table: ship_mission"} +{"question": "SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the catalog publisher that has the most catalogs.\nAdditional table information: table: product_catalog"} +{"question": "SELECT product_description FROM products WHERE product_name = 'Chocolate'", "answer": "Return the description of the product called 'Chocolate'.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT song_name FROM song WHERE rating < (SELECT MAX(rating) FROM song WHERE genre_is = 'blues')", "answer": "What are the names of the songs that have a lower rating than at least one blues song?\nAdditional table information: table: music_1"} +{"question": "SELECT organization_name FROM organizations WHERE organization_name LIKE '%Party%'", "answer": "What are the names of organizations that contain the word 'Party'?\nAdditional table information: table: e_government"} +{"question": "SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = 'Heilo' AND T3.title = 'Badlands'", "answer": "What instruments did the musician with the last name 'Heilo' play in 'Badlands'?\nAdditional table information: table: music_2"} +{"question": "SELECT Stuid, SUM(hours_played) FROM Plays_games GROUP BY Stuid", "answer": "Show all student ids and the number of hours played.\nAdditional table information: table: game_1"} +{"question": "SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' OR T3.name = 'Psychiatry'", "answer": "Find the name of physicians who are affiliated with Surgery or Psychiatry department.\nAdditional table information: table: hospital_1"} +{"question": "SELECT product_name, product_description FROM products_for_hire WHERE product_type_code = 'Cutlery' AND daily_hire_cost < 20", "answer": "What are the names and descriptions of the products that are of 'Cutlery' type and have daily hire cost lower than 20?\nAdditional table information: table: products_for_hire"} +{"question": "SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1", "answer": "Find id of the candidate who most recently accessed the course?\nAdditional table information: table: student_assessment"} +{"question": "SELECT County_name FROM county ORDER BY Population ASC NULLS FIRST LIMIT 3", "answer": "Show the 3 counties with the smallest population.\nAdditional table information: table: election"} +{"question": "SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country", "answer": "What are the countries of perpetrators? Show each country and the corresponding number of perpetrators there.\nAdditional table information: table: perpetrator"} +{"question": "SELECT DISTINCT instrument FROM Instruments", "answer": "What are the different instruments listed in the database?\nAdditional table information: table: music_2"} +{"question": "SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%' ORDER BY department_id NULLS FIRST", "answer": "display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M and make the result set in ascending order by department number.\nAdditional table information: table: hr_1"} +{"question": "SELECT Headquarters, COUNT(*) FROM company GROUP BY Headquarters", "answer": "Show the different headquarters and number of companies at each headquarter.\nAdditional table information: table: company_employee"} +{"question": "SELECT COUNT(*) FROM Project_outcomes WHERE outcome_code = 'Patent'", "answer": "How many patents outcomes were listed for all the projects?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT T2.title, AVG(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY AVG(T1.stars) DESC LIMIT 1", "answer": "Find the movies with the highest average rating. Return the movie titles and average rating.\nAdditional table information: table: movie_1"} +{"question": "SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'", "answer": "What are the different states that had students successfully try out?\nAdditional table information: table: soccer_2"} +{"question": "SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Dameon' AND T2.staff_last_name = 'Frami' UNION SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Jolie' AND T2.staff_last_name = 'Weber'", "answer": "What are the id of problems reported by the staff named Dameon Frami or Jolie Weber?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT COUNT(*) FROM Lessons WHERE lesson_status_code = 'Cancelled'", "answer": "How many lessons have been cancelled?\nAdditional table information: table: driving_school"} +{"question": "SELECT title FROM papers WHERE title LIKE '%Database%'", "answer": "Which paper's title contains the word 'Database'?\nAdditional table information: table: icfp_1"} +{"question": "SELECT SUM(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id = t2.claim_id WHERE t2.created_date = (SELECT created_date FROM claims_documents ORDER BY created_date NULLS FIRST LIMIT 1)", "answer": "How much amount in total were claimed in the most recently created document?\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT role_code, role_name, role_description FROM ROLES", "answer": "List all role codes, role names, and role descriptions.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT SUM(city_population) FROM district WHERE city_area > (SELECT AVG(city_area) FROM district)", "answer": "What is the total population for all the districts that have an area larger tahn the average city area?\nAdditional table information: table: store_product"} +{"question": "SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = (SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "List all the policy types used by the customer enrolled in the most policies.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT DISTINCT payment_method FROM customers", "answer": "What are all the payment methods?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1", "answer": "What is the name of the patient who made the most recent appointment?\nAdditional table information: table: hospital_1"} +{"question": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.fname, t1.lname ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the last name of the author that has published the most papers?\nAdditional table information: table: icfp_1"} +{"question": "SELECT LOCATION FROM performance GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common location of performances.\nAdditional table information: table: performance_attendance"} +{"question": "SELECT COUNT(*) FROM Projects", "answer": "Show the number of projects.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT Headquarters FROM company WHERE Industry = 'Banking' INTERSECT SELECT Headquarters FROM company WHERE Industry = 'Oil and gas'", "answer": "Show the headquarters that have both companies in banking industry and companies in oil and gas industry.\nAdditional table information: table: company_employee"} +{"question": "SELECT guest_first_name, guest_last_name FROM Guests", "answer": "Return the first names and last names of all guests\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT date_of_birth FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "answer": "What is the birthday of the staff member with first name as Janessa and last name as Sawayn?\nAdditional table information: table: driving_school"} +{"question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'MADLOCK' AND T1.lastname = 'RAY'", "answer": "Find the number of teachers who teach the student called MADLOCK RAY.\nAdditional table information: table: student_1"} +{"question": "SELECT COUNT(*) FROM building", "answer": "How many buildings are there?\nAdditional table information: table: protein_institute"} +{"question": "SELECT name, CLASS, rank FROM captain", "answer": "Find the name, class and rank of all captains.\nAdditional table information: table: ship_1"} +{"question": "SELECT title, directed_by FROM film", "answer": "Show the title and director for all films.\nAdditional table information: table: cinema"} +{"question": "SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1", "answer": "Which park did the most people attend in 2008?\nAdditional table information: table: baseball_1"} +{"question": "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'", "answer": "What are the names of the stations which serve both 'Ananthapuri Express' and 'Guruvayur Express' trains?\nAdditional table information: table: train_station"} +{"question": "SELECT payment_method_code, party_phone FROM parties WHERE party_email = 'enrico09@example.com'", "answer": "What is the payment method code and party phone of the party with the email 'enrico09@example.com'?\nAdditional table information: table: e_government"} +{"question": "SELECT DISTINCT building_description FROM Apartment_Buildings", "answer": "Show all distinct building descriptions.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name HAVING COUNT(*) >= 2", "answer": "Give the names of characteristics that are in two or more products?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT COUNT(*) FROM film", "answer": "How many film are there?\nAdditional table information: table: film_rank"} +{"question": "SELECT AVG(Years_working) FROM journalist", "answer": "What is the average number of years spent working as a journalist?\nAdditional table information: table: news_report"} +{"question": "SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100", "answer": "What are the descriptions of the service types with product price above 100?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT DISTINCT (Famous_Release_date) FROM artist", "answer": "Give the distinct famous release dates for all artists.\nAdditional table information: table: music_4"} +{"question": "SELECT Country, COUNT(*) FROM member GROUP BY Country", "answer": "Show the different countries and the number of members from each.\nAdditional table information: table: decoration_competition"} +{"question": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE lastname = 'Heilo' GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the type of vocals that the band member with the last name 'Heilo' played the most?\nAdditional table information: table: music_2"} +{"question": "SELECT name, CLASS FROM ship WHERE NOT ship_id IN (SELECT ship_id FROM captain)", "answer": "what are the names and classes of the ships that do not have any captain yet?\nAdditional table information: table: ship_1"} +{"question": "SELECT COUNT(DISTINCT crs_code) FROM CLASS", "answer": "What are the number of different course codes?\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Eric' AND t3.lname = 'Tai'", "answer": "Count the number of clubs for which the student named 'Eric Tai' is a member.\nAdditional table information: table: club_1"} +{"question": "SELECT SUM(hours) FROM projects", "answer": "Find the total hours of all projects.\nAdditional table information: table: scientist_1"} +{"question": "SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students", "answer": "What are the login names used both by some course authors and some students?\nAdditional table information: table: e_learning"} +{"question": "SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which nationality has the most hosts?\nAdditional table information: table: party_host"} +{"question": "SELECT COUNT(DISTINCT dept_name) FROM department", "answer": "How many different departments are there?\nAdditional table information: table: college_1"} +{"question": "SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'Spanish'", "answer": "What is the date of enrollment of the course named 'Spanish'?\nAdditional table information: table: e_learning"} +{"question": "SELECT channel_code FROM customer_contact_channels GROUP BY channel_code HAVING COUNT(customer_id) < 5", "answer": "Which contact channel codes were used less than 5 times?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T2.emp_fname, T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num", "answer": "What are the first names of all teachers who have taught a course and the corresponding course codes?\nAdditional table information: table: college_1"} +{"question": "SELECT major FROM Student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which major has most number of students?\nAdditional table information: table: allergy_1"} +{"question": "SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = 'San Jose State University' AND T2.year = 1996", "answer": "What is the campus fee for San Jose State University in 1996?\nAdditional table information: table: csu_1"} +{"question": "SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor", "answer": "What are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT document_name, document_id FROM Documents WHERE document_type_code = 'BK'", "answer": "Find names and ids of all documents with document type code BK.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT DISTINCT T1.id, T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12", "answer": "What are the id and name of the stations that have ever had more than 12 bikes available?\nAdditional table information: table: bike_1"} +{"question": "SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'University of Pennsylvania'", "answer": "Find the number of papers published by the institution 'University of Pennsylvania'.\nAdditional table information: table: icfp_1"} +{"question": "SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Aerosmith'", "answer": "List Aerosmith's albums.\nAdditional table information: table: store_1"} +{"question": "SELECT T1.Fname, T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID = T2.FacID WHERE T2.DNO = 520", "answer": "What are the full names of faculty members who are a part of department 520?\nAdditional table information: table: college_3"} +{"question": "SELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1", "answer": "List the most common result of the musicals.\nAdditional table information: table: musical"} +{"question": "SELECT star_rating_code, AVG(price_range) FROM HOTELS GROUP BY star_rating_code", "answer": "What is the average price range of hotels for each each star rating code?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT AVG(balance) FROM checking", "answer": "What is the average balance in checking accounts?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT Low_Estimate, High_Estimate FROM film_market_estimation", "answer": "Return the low and high estimates for all film markets.\nAdditional table information: table: film_rank"} +{"question": "SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport'", "answer": "What is the number of routes that end at John F Kennedy International Airport?\nAdditional table information: table: flight_4"} +{"question": "SELECT MAX(customer_code), MIN(customer_code) FROM Customers", "answer": "Return the maximum and minimum customer codes.\nAdditional table information: table: department_store"} +{"question": "SELECT name FROM enzyme WHERE product <> 'Heme'", "answer": "What are the names of enzymes whose product is not 'Heme'?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT SUM(number_deaths), SUM(damage_millions_USD) FROM storm WHERE max_speed > (SELECT AVG(max_speed) FROM storm)", "answer": "Return the total number of deaths and total damange in millions for storms that had a max speed greater than the average.\nAdditional table information: table: storm_record"} +{"question": "SELECT name, Assets_billion FROM Companies ORDER BY name ASC NULLS FIRST", "answer": "What are the name and assets of each company, sorted in ascending order of company name?\nAdditional table information: table: company_office"} +{"question": "SELECT T1.skill_id, T1.skill_description FROM Skills AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.skill_id = T2.skill_id GROUP BY T1.skill_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which skill is used in fixing the most number of faults? List the skill id and description.\nAdditional table information: table: assets_maintenance"} +{"question": "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", "answer": "Return the budget type codes, budget type descriptions and document ids for documents with expenses.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals'", "answer": "What are the first name and last name of the players who were paid salary by team Washington Nationals in both 2005 and 2007?\nAdditional table information: table: baseball_1"} +{"question": "SELECT COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = 'food'", "answer": "How many students are affected by food related allergies?\nAdditional table information: table: allergy_1"} +{"question": "SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'", "answer": "Find the players whose names contain letter 'a'.\nAdditional table information: table: soccer_2"} +{"question": "SELECT * FROM Student_Addresses ORDER BY monthly_rental DESC", "answer": "Find all information about student addresses, and sort by monthly rental in descending order.\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT title FROM course GROUP BY title HAVING COUNT(*) > 1", "answer": "Find the title of the course that is offered by more than one department.\nAdditional table information: table: college_2"} +{"question": "SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Afghanistan' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Albania'", "answer": "Find the name of the storm that affected both Afghanistan and Albania regions.\nAdditional table information: table: storm_record"} +{"question": "SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_id", "answer": "Find the personal names of students not enrolled in any course.\nAdditional table information: table: e_learning"} +{"question": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID = T3.Tourist_ID WHERE T3.Tourist_Details = 'Vincent'", "answer": "Which tourist attractions does the visitor with detail 'Vincent' visit?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1", "answer": "Find the first names of the teachers that teach first grade.\nAdditional table information: table: student_1"} +{"question": "SELECT COUNT(*) FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.city = 'Lake Geovannyton'", "answer": "How many customers are living in city 'Lake Geovannyton'?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT student_id FROM student_course_attendance", "answer": "List the id of students who attended some courses?\nAdditional table information: table: student_assessment"} +{"question": "SELECT customer_status_code, COUNT(*) FROM Customers GROUP BY customer_status_code", "answer": "For each customer status code, how many customers are classified that way?\nAdditional table information: table: driving_school"} +{"question": "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", "answer": "Which cities' temperature in March is lower than that in July or higher than that in Oct?\nAdditional table information: table: city_record"} +{"question": "SELECT TYPE FROM school GROUP BY TYPE HAVING COUNT(*) = 2", "answer": "Show the types of schools that have two schools.\nAdditional table information: table: school_bus"} +{"question": "SELECT campus FROM degrees GROUP BY campus ORDER BY SUM(degrees) DESC LIMIT 1", "answer": "What campus has the most degrees conferrred over its entire existence?\nAdditional table information: table: csu_1"} +{"question": "SELECT T2.title, AVG(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY AVG(T1.stars) NULLS FIRST LIMIT 1", "answer": "What are the movie titles and average rating of the movies with the lowest average rating?\nAdditional table information: table: movie_1"} +{"question": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame' AND t3.characteristic_type_code = 'Grade'", "answer": "What are the names of the characteristics of the product 'sesame' that have the characteristic type code 'Grade'?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT T1.driverid, T1.forename, COUNT(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING COUNT(*) >= 2", "answer": "What is the id, forename, and number of races for all drivers that have participated in at least 2 races?\nAdditional table information: table: formula_1"} +{"question": "SELECT class_code FROM CLASS WHERE class_room = 'KLR209'", "answer": "List the codes of all courses that take place in room KLR209.\nAdditional table information: table: college_1"} +{"question": "SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math' ORDER BY T3.tot_cred NULLS FIRST", "answer": "Find the name of instructors who are advisors of the students from the Math department, and sort the results by students' total credit.\nAdditional table information: table: college_2"} +{"question": "SELECT T2.name, T3.name FROM wedding AS T1 JOIN people AS T2 ON T1.male_id = T2.people_id JOIN people AS T3 ON T1.female_id = T3.people_id WHERE T1.year > 2014", "answer": "Show the pair of male and female names in all weddings after year 2014\nAdditional table information: table: wedding"} +{"question": "SELECT allergy, allergytype FROM Allergy_type", "answer": "What are the allergies and their types?\nAdditional table information: table: allergy_1"} +{"question": "SELECT AVG(age), job FROM Person WHERE gender = 'male' GROUP BY job", "answer": "What is average age of male for different job title?\nAdditional table information: table: network_2"} +{"question": "SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT MIN(Price) FROM wine WHERE Winery = 'John Anthony')", "answer": "Find the distinct names of all wines that have prices higher than some wines from John Anthony winery.\nAdditional table information: table: wine_1"} +{"question": "SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'statistics' ORDER BY T2.registration_date NULLS FIRST", "answer": "List the id of students who registered course statistics in the order of registration date.\nAdditional table information: table: student_assessment"} +{"question": "SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate < 100)", "answer": "Show the names of cities in counties that have a crime rate less than 100.\nAdditional table information: table: county_public_safety"} +{"question": "SELECT product FROM product WHERE max_page_size = 'A4' AND pages_per_minute_color < 5", "answer": "Find products with max page size as 'A4' and pages per minute color smaller than 5.\nAdditional table information: table: store_product"} +{"question": "SELECT COUNT(*) FROM postseason WHERE YEAR = 1885 AND ties = 1", "answer": "How many games in 1885 postseason resulted in ties (that is, the value of 'ties' is '1')?\nAdditional table information: table: baseball_1"} +{"question": "SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING COUNT(*) >= 2", "answer": "What categories have two or more corresponding books that were made after 1989?\nAdditional table information: table: culture_company"} +{"question": "SELECT Title FROM film WHERE NOT Film_ID IN (SELECT Film_ID FROM film_market_estimation)", "answer": "What are the titles of films that do not have a film market estimation?\nAdditional table information: table: film_rank"} +{"question": "SELECT County_name FROM county ORDER BY County_name DESC", "answer": "Return the names of all counties sorted by county name in descending alphabetical order.\nAdditional table information: table: election"} +{"question": "SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = 'San Jose State University' AND t1.year = 2000", "answer": "What is the campus fee in the year 2000 for San Jose State University?\nAdditional table information: table: csu_1"} +{"question": "SELECT T1.Product_Name FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name HAVING COUNT(*) >= 2 ORDER BY T1.Product_Name NULLS FIRST", "answer": "Show the names of products that are in at least two events in ascending alphabetical order of product name.\nAdditional table information: table: solvency_ii"} +{"question": "SELECT T2.day_Number, T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date", "answer": "What is the day Number and date of all the documents?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "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'", "answer": "What is the sum of hours for projects that scientists with the name Michael Rogers or Carol Smith are assigned to?\nAdditional table information: table: scientist_1"} +{"question": "SELECT Wheels, LOCATION FROM railway", "answer": "List the wheels and locations of the railways.\nAdditional table information: table: railway"} +{"question": "SELECT rank, company, market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion NULLS FIRST, profits_billion NULLS FIRST", "answer": "find the rank, company names, market values of the companies in the banking industry order by their sales and profits in billion.\nAdditional table information: table: gas_company"} +{"question": "SELECT dept_name, building FROM department ORDER BY budget DESC LIMIT 1", "answer": "Find the name and building of the department with the highest budget.\nAdditional table information: table: college_2"} +{"question": "SELECT DISTINCT T3.Fname FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T2.gradepoint >= 3.8", "answer": "What are the distinct first names for students with a grade point of 3.8 or above in at least one course?\nAdditional table information: table: college_3"} +{"question": "SELECT COUNT(*) FROM track", "answer": "How many tracks do we have?\nAdditional table information: table: race_track"} +{"question": "SELECT Winery FROM WINE ORDER BY SCORE NULLS FIRST LIMIT 1", "answer": "What is the winery at which the wine with the highest score was made?\nAdditional table information: table: wine_1"} +{"question": "SELECT COUNT(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city <> 'San Francisco'", "answer": "How many trips did not end in San Francisco?\nAdditional table information: table: bike_1"} +{"question": "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", "answer": "Give me a list of cities whose temperature in Mar is lower than that in July and which have also served as host cities?\nAdditional table information: table: city_record"} +{"question": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Jeremy' AND t1.lname = 'Gibbons'", "answer": "Find the titles of all the papers written by 'Jeremy Gibbons'\nAdditional table information: table: icfp_1"} +{"question": "SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 2005", "answer": "What is the average fee for a CSU campus in the year of 2005?\nAdditional table information: table: csu_1"} +{"question": "SELECT t2.section_title FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code WHERE t1.document_name = 'David CV'", "answer": "Give the section titles of the document with the name 'David CV'.\nAdditional table information: table: document_management"} +{"question": "SELECT POSITION, AVG(Points) FROM player GROUP BY POSITION", "answer": "For each position, what is the average number of points for players in that position?\nAdditional table information: table: sports_competition"} +{"question": "SELECT MAX(product_price), MIN(product_price), product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code NULLS FIRST", "answer": "Give the maximum and minimum product prices for each product type, grouped and ordered by product type.\nAdditional table information: table: department_store"} +{"question": "SELECT COUNT(*) FROM inst", "answer": "Count the number of institutions.\nAdditional table information: table: icfp_1"} +{"question": "SELECT classroom, COUNT(*) FROM list GROUP BY classroom", "answer": "For each classroom, show the classroom number and find how many students are using it.\nAdditional table information: table: student_1"} +{"question": "SELECT T1.Royal_Family_Details, T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID = T2.Tourist_Attraction_ID", "answer": "Which tourist attractions are related to royal family? Tell me their details and how we can get there.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT country FROM addresses GROUP BY country HAVING COUNT(address_id) > 4", "answer": "List the countries having more than 4 addresses listed.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T1.Attraction_Type_Description, T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the description and code of the attraction type most tourist attractions belong to.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT Advisor FROM Student WHERE StuID = 1004", "answer": "Who advises student 1004?\nAdditional table information: table: allergy_1"} +{"question": "SELECT AVG(Profits_billion) FROM Companies", "answer": "What are the average profits of companies?\nAdditional table information: table: company_office"} +{"question": "SELECT COUNT(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan'", "answer": "How many friends does Dan have?\nAdditional table information: table: network_2"} +{"question": "SELECT decor, COUNT(*) FROM Rooms WHERE bedType = 'King' GROUP BY decor", "answer": "How many rooms have king beds? Report the number for each decor type.\nAdditional table information: table: inn_1"} +{"question": "SELECT patient FROM undergoes ORDER BY dateundergoes NULLS FIRST LIMIT 1", "answer": "Which patient is undergoing the most recent treatment?\nAdditional table information: table: hospital_1"} +{"question": "SELECT name FROM circuits WHERE country = 'UK' OR country = 'Malaysia'", "answer": "What are the names of all the circuits that are in the UK or Malaysia?\nAdditional table information: table: formula_1"} +{"question": "SELECT DISTINCT T1.creation FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T3.born_state = 'Alabama'", "answer": "What are the distinct creation years of the departments managed by a secretary born in state 'Alabama'?\nAdditional table information: table: department_management"} +{"question": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'Colorado'", "answer": "What are the names of customers who live in Colorado state?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T2.Author, COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author", "answer": "Show each author and the number of workshops they submitted to.\nAdditional table information: table: workshop_paper"} +{"question": "SELECT category, COUNT(*) FROM book_club GROUP BY category", "answer": "How many books fall into each category?\nAdditional table information: table: culture_company"} +{"question": "SELECT product_name, product_id FROM products WHERE product_price BETWEEN 600 AND 700", "answer": "What are the names and ids of products costing between 600 and 700?\nAdditional table information: table: department_store"} +{"question": "SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'A' AND T2.class_code = 10018", "answer": "What is the last name of the student who received an A in the class with the code 10018?\nAdditional table information: table: college_1"} +{"question": "SELECT AVG(age), MIN(age) FROM artist WHERE country = 'United States'", "answer": "What is the average and minimum age of all artists from United States.\nAdditional table information: table: theme_gallery"} +{"question": "SELECT COUNT(DISTINCT team) FROM elimination", "answer": "How many different teams have had eliminated wrestlers?\nAdditional table information: table: wrestler"} +{"question": "SELECT season, home_team, away_team FROM game", "answer": "List the season, home team, away team of all the games.\nAdditional table information: table: game_injury"} +{"question": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T2.Committee = 'Appropriations'", "answer": "Which county do the delegates on 'Appropriations' committee belong to? Give me the county names.\nAdditional table information: table: election"} +{"question": "SELECT T3.Name, COUNT(*) FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name", "answer": "Show the names of journalists and the number of events they reported.\nAdditional table information: table: news_report"} +{"question": "SELECT employee_id, job_id FROM employees WHERE salary < (SELECT MIN(salary) FROM employees WHERE job_id = 'MK_MAN')", "answer": "display the employee number and job id for all employees whose salary is smaller than any salary of those employees whose job title is MK_MAN.\nAdditional table information: table: hr_1"} +{"question": "SELECT COUNT(DISTINCT gender) FROM dorm", "answer": "Find the number of distinct gender for dorms.\nAdditional table information: table: dorm_1"} +{"question": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the name of the shop that has the most kind of devices in stock.\nAdditional table information: table: device"} +{"question": "SELECT T1.name_first, T1.name_last FROM player AS T1, player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first, T1.name_last FROM player AS T1, player_award AS T2 WHERE T2.year = 1961", "answer": "Which players won awards in both 1960 and 1961? Return their first names and last names.\nAdditional table information: table: baseball_1"} +{"question": "SELECT COUNT(DISTINCT advisor) FROM Student", "answer": "How many advisors are there?\nAdditional table information: table: allergy_1"} +{"question": "SELECT Kids FROM Reservations WHERE CheckIn = '2010-09-21' AND FirstName = 'DAMIEN' AND LastName = 'TRACHSEL'", "answer": "How many kids stay in the room DAMIEN TRACHSEL checked in on Sep 21, 2010?\nAdditional table information: table: inn_1"} +{"question": "SELECT COUNT(*) FROM university WHERE NOT school_id IN (SELECT school_id FROM basketball_match)", "answer": "Count the number of universities that do not participate in the baketball match.\nAdditional table information: table: university_basketball"} +{"question": "SELECT minister FROM party ORDER BY left_office DESC LIMIT 1", "answer": "Return the minister who left office at the latest time.\nAdditional table information: table: party_people"} +{"question": "SELECT calendar_date, day_Number FROM Ref_calendar", "answer": "Show all calendar dates and day Numbers.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT pName, HS FROM Player WHERE HS < 1500", "answer": "Find the name and training hours of players whose hours are below 1500.\nAdditional table information: table: soccer_2"} +{"question": "SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = 'Deputy'", "answer": "Find the names of the customers who have an deputy policy.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100", "answer": "Find the distinct winery of wines having price between 50 and 100.\nAdditional table information: table: wine_1"} +{"question": "SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name of the organization that has published the largest number of papers.\nAdditional table information: table: icfp_1"} +{"question": "SELECT T2.Governor FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1", "answer": "Who were the governors of the parties associated with delegates from district 1?\nAdditional table information: table: election"} +{"question": "SELECT AVG(Num_of_Audience) FROM festival_detail", "answer": "What is the average number of audience for festivals?\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 2 EXCEPT SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id JOIN Claims AS T3 ON T2.policy_id = T3.policy_id", "answer": "Give me the the customer details and id for the customers who had two or more policies but did not file any claims.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = 'Clara') AND first_name <> 'Clara'", "answer": "display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara excluding Clara.\nAdditional table information: table: hr_1"} +{"question": "SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate < 100)", "answer": "What are the names of cities that are in counties that have a crime rate below 100?\nAdditional table information: table: county_public_safety"} +{"question": "SELECT Amount_Settled, Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC NULLS FIRST LIMIT 1", "answer": "Among all the claims, what is the amount claimed in the claim with the least amount settled? List both the settlement amount and claim amount.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT COUNT(*) FROM company WHERE Headquarters = 'USA'", "answer": "How many companies are headquartered in the US?\nAdditional table information: table: company_employee"} +{"question": "SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 GROUP BY T2.bname ORDER BY SUM(T1.amount) DESC LIMIT 1", "answer": "Find the name of bank branch that provided the greatest total amount of loans to customers with credit score is less than 100.\nAdditional table information: table: loan_1"} +{"question": "SELECT COUNT(DISTINCT city) FROM Person", "answer": "How many different cities are they from?\nAdditional table information: table: network_2"} +{"question": "SELECT COUNT(*), T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id", "answer": "For each product which has problems, what are the number of problems and the product id?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.'", "answer": "Find the names of all instructors in computer science department\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(DISTINCT city) FROM station", "answer": "How many different cities have these stations?\nAdditional table information: table: bike_1"} +{"question": "SELECT COUNT(*) FROM Statements", "answer": "Count the number of statements.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT Leader_Name, College_Location FROM college", "answer": "Show the leader names and locations of colleges.\nAdditional table information: table: decoration_competition"} +{"question": "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'", "answer": "What is the zip code of staff with first name as Janessa and last name as Sawayn lived?\nAdditional table information: table: driving_school"} +{"question": "SELECT Fname FROM STUDENT WHERE Age > 22", "answer": "What are the first names of all the students aged above 22?\nAdditional table information: table: voter_2"} +{"question": "SELECT COUNT(*) FROM Band", "answer": "Find the number of bands.\nAdditional table information: table: music_2"} +{"question": "SELECT COUNT(*) FROM Rating WHERE stars > 3", "answer": "What is the total number of ratings that has more than 3 stars?\nAdditional table information: table: movie_1"} +{"question": "SELECT T1.forename, T1.surname, T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING COUNT(*) > 8 UNION SELECT T1.forename, T1.surname, T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING COUNT(*) > 5", "answer": "What are the drivers' first names,last names, and ids for all those that had more than 8 stops or participated in more than 5 races?\nAdditional table information: table: formula_1"} +{"question": "SELECT DISTINCT allergytype FROM Allergy_type", "answer": "What are the different allergy types?\nAdditional table information: table: allergy_1"} +{"question": "SELECT T1.Product_Name FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name HAVING COUNT(*) >= 2", "answer": "Show the names of products that are in at least two events.\nAdditional table information: table: solvency_ii"} +{"question": "SELECT AVG(bedroom_count) FROM Apartments", "answer": "What is the average number of bedrooms of all apartments?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT document_id, COUNT(copy_number) FROM Draft_Copies GROUP BY document_id ORDER BY COUNT(copy_number) DESC LIMIT 1", "answer": "Which document has the most draft copies? List its document id and number of draft copies.\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "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'", "answer": "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.\nAdditional table information: table: flight_company"} +{"question": "SELECT T1.datetime_detention_start, datetime_detention_end FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.last_name = 'Schultz'", "answer": "Find the start and end dates of detentions of teachers with last name 'Schultz'.\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT customer_details FROM customers UNION SELECT staff_details FROM staff", "answer": "What are the names of the customers and staff members?\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT Clean_Jerk FROM body_builder ORDER BY Total DESC LIMIT 1", "answer": "What are the clean and jerk score of the body builder with the highest total score?\nAdditional table information: table: body_builder"} +{"question": "SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*) >= 2", "answer": "What are the investors that have invested in at least two entrepreneurs?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT decor, COUNT(*) FROM Rooms WHERE bedType = 'King' GROUP BY decor", "answer": "Find the number of rooms with king bed for each decor type.\nAdditional table information: table: inn_1"} +{"question": "SELECT COUNT(DISTINCT dept_address) FROM department WHERE school_code = 'BUS'", "answer": "What are the different locations of the school with the code BUS?\nAdditional table information: table: college_1"} +{"question": "SELECT DISTINCT T3.name FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.title = 'Gone with the Wind'", "answer": "Find the names of all reviewers who rated Gone with the Wind.\nAdditional table information: table: movie_1"} +{"question": "SELECT T1.Date_of_ceremony FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T2.Weeks_on_Top > 2", "answer": "Please show the date of ceremony of the volumes that last more than 2 weeks on top.\nAdditional table information: table: music_4"} +{"question": "SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = 'Fail'", "answer": "Return the completion date for all the tests that have 'Fail' result.\nAdditional table information: table: e_learning"} +{"question": "SELECT open_year FROM branch GROUP BY open_year HAVING COUNT(*) >= 2", "answer": "What are the opening years in which at least two shops opened?\nAdditional table information: table: shop_membership"} +{"question": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = 'Solveig' GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the types of vocals that the band member with the first name 'Solveig' played the most?\nAdditional table information: table: music_2"} +{"question": "SELECT Rating FROM Restaurant WHERE ResName = 'Subway'", "answer": "What is the rating of the restaurant Subway?\nAdditional table information: table: restaurant_1"} +{"question": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised NULLS FIRST LIMIT 1", "answer": "Return the last name of the staff member who handled the complaint with the earliest date raised.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T2.dept_name = 'Accounting' OR T2.dept_name = 'Biology'", "answer": "What is the number of professors who are in the Accounting or Biology departments?\nAdditional table information: table: college_1"} +{"question": "SELECT song_name FROM song ORDER BY resolution NULLS FIRST", "answer": "Give me a list of the names of all songs ordered by their resolution.\nAdditional table information: table: music_1"} +{"question": "SELECT date_from FROM Project_Staff ORDER BY date_from ASC NULLS FIRST LIMIT 1", "answer": "When did the first staff for the projects started working?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T3.cost > 5000", "answer": "Find the physicians who are trained in a procedure that costs more than 5000.\nAdditional table information: table: hospital_1"} +{"question": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'flax'", "answer": "Find the number of characteristics that the product 'flax' has.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT t1.name, t1.sex, MIN(oppose_rate) FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex", "answer": "Find the name of the candidates whose oppose percentage is the lowest for each sex.\nAdditional table information: table: candidate_poll"} +{"question": "SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code JOIN Projects AS T3 ON T2.project_id = T3.project_id WHERE T3.project_details = 'sint'", "answer": "What is the description for the results whose project detail is 'sint'?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT DISTINCT cName FROM college WHERE enr > (SELECT MIN(enr) FROM college WHERE state = 'FL')", "answer": "What are the names of the colleges that are larger than at least one college in Florida?\nAdditional table information: table: soccer_2"} +{"question": "SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What is the status code with the least number of customers?\nAdditional table information: table: driving_school"} +{"question": "SELECT customer_id FROM customers WHERE customer_name LIKE '%Diana%'", "answer": "What are the IDs of customers who have 'Diana' in part of their names?\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT order_id, customer_id FROM customer_orders WHERE order_status_code = 'Cancelled' ORDER BY order_date NULLS FIRST", "answer": "What are the order ids and customer ids for orders that have been Cancelled, sorted by their order dates?\nAdditional table information: table: department_store"} +{"question": "SELECT County_name FROM county ORDER BY Population ASC NULLS FIRST LIMIT 3", "answer": "What are the 3 counties that have the smallest population? Give me the county names.\nAdditional table information: table: election"} +{"question": "SELECT Phone FROM EMPLOYEE", "answer": "List the phone numbers of all employees.\nAdditional table information: table: chinook_1"} +{"question": "SELECT AVG(International_Passengers) FROM airport", "answer": "What is the average number of international passengers of all airports?\nAdditional table information: table: aircraft"} +{"question": "SELECT Kids FROM Reservations WHERE CheckIn = '2010-09-21' AND FirstName = 'DAMIEN' AND LastName = 'TRACHSEL'", "answer": "Return the number of kids for the room reserved and checked in by DAMIEN TRACHSEL on Sep 21, 2010.\nAdditional table information: table: inn_1"} +{"question": "SELECT COUNT(*), T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id", "answer": "For each project id, how many tasks are there?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the card type code with most number of cards?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1", "answer": "List the countries that have more than one mountain.\nAdditional table information: table: climbing"} +{"question": "SELECT gender_code, COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC", "answer": "Sort the gender codes in descending order of their corresponding number of guests. Return both the gender codes and counts.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT T2.company, COUNT(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id", "answer": "For each company id, what are the companies and how many gas stations does each one operate?\nAdditional table information: table: gas_company"} +{"question": "SELECT T1.Product_Name, COUNT(*) FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name", "answer": "Show the names of products and the number of events they are in.\nAdditional table information: table: solvency_ii"} +{"question": "SELECT MAX(Price), MAX(Score) FROM WINE WHERE Appelation = 'St. Helena'", "answer": "What are the maximum price and score of wines produced by St. Helena appelation?\nAdditional table information: table: wine_1"} +{"question": "SELECT COUNT(*) FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 100 OR T2.ticket_price < 10", "answer": "Count the number of exhibitions that have had an attendnance of over 100 or a ticket prices under 10.\nAdditional table information: table: theme_gallery"} +{"question": "SELECT COUNT(*) FROM item WHERE NOT i_id IN (SELECT i_id FROM review)", "answer": "Find the number of items without any review.\nAdditional table information: table: epinions_1"} +{"question": "SELECT name FROM Employee WHERE salary > (SELECT AVG(salary) FROM Employee)", "answer": "What are the names of all employees who have a salary higher than average?\nAdditional table information: table: flight_1"} +{"question": "SELECT COUNT(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.gender = 'M'", "answer": "Find the total number of students living in the male dorm (with gender M).\nAdditional table information: table: dorm_1"} +{"question": "SELECT COUNT(*) FROM instruments WHERE instrument = 'drums'", "answer": "How many songs have used the instrument 'drums'?\nAdditional table information: table: music_2"} +{"question": "SELECT StuID FROM Student WHERE Advisor = 1121", "answer": "What are the ids of all students who have advisor number 1121?\nAdditional table information: table: game_1"} +{"question": "SELECT Team FROM player ORDER BY Age DESC LIMIT 1", "answer": "Which team has the oldest player?\nAdditional table information: table: school_player"} +{"question": "SELECT COUNT(*) FROM county", "answer": "How many counties are there in total?\nAdditional table information: table: election"} +{"question": "SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Initial Application'", "answer": "For grants that have descriptions of Regular and Initial Applications, what are their start dates?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT Membership_card FROM member GROUP BY Membership_card HAVING COUNT(*) > 5", "answer": "Which membership card has more than 5 members?\nAdditional table information: table: coffee_shop"} +{"question": "SELECT COUNT(*) FROM patient WHERE NOT SSN IN (SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication = T2.Code WHERE T2.name = 'Procrastin-X')", "answer": "How many patients are not using Procrastin-X as medication?\nAdditional table information: table: hospital_1"} +{"question": "SELECT COUNT(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population > 20000)", "answer": "Show the number of cities in counties that have a population more than 20000.\nAdditional table information: table: county_public_safety"} +{"question": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1", "answer": "Return the name of the heaviest entrepreneur.\nAdditional table information: table: entrepreneur"} +{"question": "SELECT DISTINCT District FROM election", "answer": "What are the distinct districts for elections?\nAdditional table information: table: election"} +{"question": "SELECT T2.Railway_ID, T1.Builder FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID GROUP BY T2.Railway_ID ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the id and builder of the railway that are associated with the most trains.\nAdditional table information: table: railway"} +{"question": "SELECT MIN(seating), MAX(seating), AVG(seating) FROM track", "answer": "What is the minimum, maximum, and average seating for all tracks.\nAdditional table information: table: race_track"} +{"question": "SELECT founded FROM university WHERE affiliation <> 'Public' ORDER BY founded DESC LIMIT 1", "answer": "Find the founded year of the newest non public school.\nAdditional table information: table: university_basketball"} +{"question": "SELECT COUNT(DISTINCT dept_name) FROM course", "answer": "How many departments offer courses?\nAdditional table information: table: college_2"} +{"question": "SELECT investor_id, COUNT(*) FROM TRANSACTIONS GROUP BY investor_id", "answer": "Show the number of transactions for different investors.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT T1.staff_name, T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1", "answer": "Return the name and job title of the staff with the latest date assigned.\nAdditional table information: table: department_store"} +{"question": "SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = 'Deputy' OR t1.policy_type_code = 'Uniform'", "answer": "Find the names of customers who either have an deputy policy or uniformed policy.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT artist_name FROM artist WHERE country = 'UK' AND gender = 'Male'", "answer": "What are the names of all male British artists?\nAdditional table information: table: music_1"} +{"question": "SELECT allergytype FROM Allergy_type WHERE allergy = 'Cat'", "answer": "What is the type of allergy Cat?\nAdditional table information: table: allergy_1"} +{"question": "SELECT College, COUNT(*) FROM submission GROUP BY College", "answer": "For each college, return the college name and the count of authors with submissions from that college.\nAdditional table information: table: workshop_paper"} +{"question": "SELECT lname, sex FROM Student WHERE StuID IN (SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = 'Call of Destiny' INTERSECT SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = 'Works of Widenius')", "answer": "what is the last name and gender of all students who played both Call of Destiny and Works of Widenius?\nAdditional table information: table: game_1"} +{"question": "SELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas'", "answer": "Show all headquarters with both a company in banking industry and a company in Oil and gas.\nAdditional table information: table: gas_company"} +{"question": "SELECT COUNT(*) FROM Companies WHERE Industry = 'Banking' OR Industry = 'Conglomerate'", "answer": "How many companies are in either 'Banking' industry or 'Conglomerate' industry?\nAdditional table information: table: company_office"} +{"question": "SELECT T2.email_address FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T1.zip_postcode = '918'", "answer": "What are the email addresses of teachers whose address has zip code '918'?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Tracy' AND t3.lname = 'Kim'", "answer": "For how many clubs is 'Tracy Kim' a member?\nAdditional table information: table: club_1"} +{"question": "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", "answer": "List first name and last name of customers that have more than 2 payments.\nAdditional table information: table: driving_school"} +{"question": "SELECT T1.campus, SUM(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T2.year >= 1998 AND T2.year <= 2002 GROUP BY T1.campus", "answer": "how many degrees were conferred between 1998 and 2002?\nAdditional table information: table: csu_1"} +{"question": "SELECT SUM(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010", "answer": "How many games in total did team Boston Red Stockings attend from 2000 to 2010?\nAdditional table information: table: baseball_1"} +{"question": "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", "answer": "What are the names of the services that have never been used?\nAdditional table information: table: e_government"} +{"question": "SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1", "answer": "Which problem log was created most recently? Give me the log id.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE '%gmail.com%'", "answer": "Count the number of customers that have an email containing 'gmail.com'.\nAdditional table information: table: chinook_1"} +{"question": "SELECT T1.White, T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID", "answer": "Show white percentages of cities and the crime rates of counties they are in.\nAdditional table information: table: county_public_safety"} +{"question": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "answer": "What are the names of gymnasts?\nAdditional table information: table: gymnast"} +{"question": "SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%'", "answer": "What are the descriptions of the categories that products with product descriptions that contain the letter t are in?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT Destroyed_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID", "answer": "Show the employee ids and the number of documents destroyed by each employee.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT COUNT(*) FROM VOTING_RECORD", "answer": "How many voting records do we have?\nAdditional table information: table: voter_2"} +{"question": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Badlands'", "answer": "What are the vocal types used in song 'Badlands'?\nAdditional table information: table: music_2"} +{"question": "SELECT name, price FROM Products ORDER BY price ASC NULLS FIRST LIMIT 1", "answer": "Select the name and price of the cheapest product.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId GROUP BY T2.MediaTypeId ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What is the least common media type in all tracks?\nAdditional table information: table: chinook_1"} +{"question": "SELECT product, chromosome, porphyria FROM enzyme WHERE LOCATION = 'Cytosol'", "answer": "What is the product, chromosome and porphyria related to the enzymes which take effect at the location 'Cytosol'?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT name FROM airports WHERE city = 'Goroka'", "answer": "Find the name of the airport in the city of Goroka.\nAdditional table information: table: flight_4"} +{"question": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id ORDER BY t2.age NULLS FIRST LIMIT 1", "answer": "What is the name of the ship that is commanded by the youngest captain?\nAdditional table information: table: ship_1"} +{"question": "SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT MAX(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff')", "answer": "What is id of the staff who had a Staff Department Assignment earlier than any Clerical Staff?\nAdditional table information: table: department_store"} +{"question": "SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id = T2.id WHERE T2.dept_name = 'History'", "answer": "What is the id of the instructor who advises of all students from History department?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(*), rank FROM captain GROUP BY rank", "answer": "Count the number of captains that have each rank.\nAdditional table information: table: ship_1"} +{"question": "SELECT COUNT(*), T3.product_id FROM orders AS T1, 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", "answer": "For each product, return its id and the number of times it was ordered.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT COUNT(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing'", "answer": "Find the number of manufactures that are based in Tokyo or Beijing.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.dribbling = (SELECT MAX(overall_rating) FROM Player_Attributes)", "answer": "What are the names of players who have the best dribbling?\nAdditional table information: table: soccer_1"} +{"question": "SELECT COUNT(*), T3.school_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T2.dept_code = T3.dept_code GROUP BY T3.school_code", "answer": "Find the number of classes in each school.\nAdditional table information: table: college_1"} +{"question": "SELECT amenity_name FROM dorm_amenity ORDER BY amenity_name NULLS FIRST", "answer": "List in alphabetic order all different amenities.\nAdditional table information: table: dorm_1"} +{"question": "SELECT T1.name, T2.balance + T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance > (SELECT AVG(balance) FROM savings)", "answer": "What are the names and sum of checking and savings balances for accounts with savings balances higher than the average savings balance?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT T1.first_name, T1.job_id FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T2.department_name = 'Finance'", "answer": "What is the first name and job id for all employees in the Finance department?\nAdditional table information: table: hr_1"} +{"question": "SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1", "answer": "What is the id of the student who most recently registered course 301?\nAdditional table information: table: student_assessment"} +{"question": "SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING AVG(total_amount_purchased) > 50000 OR AVG(total_amount_purchased) < 30000", "answer": "What are the ids of suppliers which have an average amount purchased of above 50000 or below 30000?\nAdditional table information: table: department_store"} +{"question": "SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Completed' INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Part'", "answer": "Show the names of customers who have both an order in completed status and an order in part status.\nAdditional table information: table: customers_and_products_contacts"} +{"question": "SELECT COUNT(DISTINCT transaction_type_code) FROM TRANSACTIONS", "answer": "How many distinct transaction types are used in the transactions?\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT T1.surname, T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING COUNT(*) = 11 INTERSECT SELECT T1.surname, T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING COUNT(*) > 5", "answer": "What are the drivers' last names and id who had 11 pit stops and participated in more than 5 race results?\nAdditional table information: table: formula_1"} +{"question": "SELECT Amount_Settled, Amount_Claimed FROM Claims ORDER BY Amount_Claimed DESC LIMIT 1", "answer": "Find the settlement amount of the claim with the largest claim amount. Show both the settlement amount and claim amount.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT COUNT(*) FROM park WHERE state = 'NY'", "answer": "How many parks are there in the state of NY?\nAdditional table information: table: baseball_1"} +{"question": "SELECT manufacturer FROM \"vehicles\".\"cars\" WHERE order_year = '1998'", "answer": "who is the manufacturer for the order year 1998? \nAdditional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion"} +{"question": "SELECT Fname FROM STUDENT ORDER BY Age DESC", "answer": "Find the first name of students in the descending order of age.\nAdditional table information: table: college_3"} +{"question": "SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There", "answer": "Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT TYPE, AVG(Tonnage) FROM ship GROUP BY TYPE", "answer": "For each type, what is the average tonnage?\nAdditional table information: table: ship_mission"} +{"question": "SELECT LOCATION FROM school ORDER BY Founded DESC", "answer": "What is the list of school locations sorted in descending order of school foundation year?\nAdditional table information: table: school_player"} +{"question": "SELECT T1.artist_name, T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate LIKE '%Mar%'", "answer": "List the name and gender for all artists who released songs in March.\nAdditional table information: table: music_1"} +{"question": "SELECT AVG(pages_per_minute_color) FROM product", "answer": "What is the average pages per minute color?\nAdditional table information: table: store_product"} +{"question": "SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE enroll_grade = 'C'", "answer": "What are the first names of all students who got a grade C in a class?\nAdditional table information: table: college_1"} +{"question": "SELECT cName FROM college WHERE enr > (SELECT MAX(enr) FROM college WHERE state = 'FL')", "answer": "What are the names of all colleges with a larger enrollment than the largest college in Florida?\nAdditional table information: table: soccer_2"} +{"question": "SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2000 AND T2.city = 'Atlanta'", "answer": "Find the number of games taken place in city Atlanta in 2000.\nAdditional table information: table: baseball_1"} +{"question": "SELECT * FROM swimmer", "answer": "Find all details for each swimmer.\nAdditional table information: table: swimming"} +{"question": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Bob'", "answer": "Who are Bob's friends?\nAdditional table information: table: network_2"} +{"question": "SELECT state_province_county FROM addresses WHERE NOT address_id IN (SELECT employee_address_id FROM Employees)", "answer": "Find the states which do not have any employee in their record.\nAdditional table information: table: customer_deliveries"} +{"question": "SELECT physician, department FROM affiliated_with WHERE primaryaffiliation = 1", "answer": "List the physicians' employee ids together with their primary affiliation departments' ids.\nAdditional table information: table: hospital_1"} +{"question": "SELECT T1.custid, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT MAX(balance) FROM checking)", "answer": "Find the name and id of accounts whose checking balance is below the maximum checking balance.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT T1.director, T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars = 5", "answer": "What are the names of directors who directed movies with 5 star rating? Also return the title of these movies.\nAdditional table information: table: movie_1"} +{"question": "SELECT DISTINCT T1.customer_first_name, T1.customer_last_name, T1.phone_number FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id", "answer": "Show the unique first names, last names, and phone numbers for all customers with any account.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT COUNT(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.Sex = 'M' AND T2.Election_Cycle = 'Fall'", "answer": "Count the number of male students who had class senator votes in the fall election cycle.\nAdditional table information: table: voter_2"} +{"question": "SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T1.dept_name = 'Art'", "answer": "Find the names of all instructors in the Art department who have taught some course and the course_id.\nAdditional table information: table: college_2"} +{"question": "SELECT t1.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID WHERE t2.Price_in_Dollar < (SELECT MAX(Price_in_Dollar) FROM furniture_manufacte)", "answer": "Find the names of furnitures whose prices are lower than the highest price.\nAdditional table information: table: manufacturer"} +{"question": "SELECT * FROM employees WHERE NOT department_id IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200)", "answer": "What are the ids for employees who do not work in departments with managers that have ids between 100 and 200?\nAdditional table information: table: hr_1"} +{"question": "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", "answer": "What is the name of the activity that has the most faculty members involved in?\nAdditional table information: table: activity_1"} +{"question": "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'", "answer": "What is average lesson price taught by staff with first name as Janessa and last name as Sawayn?\nAdditional table information: table: driving_school"} +{"question": "SELECT guest_first_name, guest_last_name FROM Guests", "answer": "What are the first names and last names of all the guests?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT MIN(salary), department_id FROM employees GROUP BY department_id", "answer": "return the smallest salary for every departments.\nAdditional table information: table: hr_1"} +{"question": "SELECT MAX(Points) FROM climber WHERE Country = 'United Kingdom'", "answer": "Return the maximum number of points for climbers from the United Kingdom.\nAdditional table information: table: climbing"} +{"question": "SELECT T1.Name, T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING COUNT(*) <= 1", "answer": "What are the names and ids of the tourist attractions that are visited at most once?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT name, city, country FROM airports ORDER BY elevation NULLS FIRST LIMIT 1", "answer": "Find the name, city, and country of the airport that has the lowest altitude.\nAdditional table information: table: flight_4"} +{"question": "SELECT COUNT(*) FROM review", "answer": "Find the number of reviews.\nAdditional table information: table: epinions_1"} +{"question": "SELECT T1.name FROM student AS T1 JOIN advisor AS T2 ON T1.id = T2.s_id GROUP BY T2.s_id HAVING COUNT(*) > 1", "answer": "What are the names of students who have more than one advisor?\nAdditional table information: table: college_2"} +{"question": "SELECT Title FROM ALBUM ORDER BY Title NULLS FIRST", "answer": "What are all the album titles, in alphabetical order?\nAdditional table information: table: chinook_1"} +{"question": "SELECT title, directed_by FROM film", "answer": "What are the title and director of each film?\nAdditional table information: table: cinema"} +{"question": "SELECT T1.Aircraft, COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft", "answer": "For each aircraft that has won an award, what is its name and how many time has it won?\nAdditional table information: table: aircraft"} +{"question": "SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1", "answer": "Find the physician who prescribed the highest dose. What is his or her name?\nAdditional table information: table: hospital_1"} +{"question": "SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990", "answer": "Show publishers with a book published in 1989 and a book in 1990.\nAdditional table information: table: culture_company"} +{"question": "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%'", "answer": "Find the name of the project for which a scientist whose name contains \u2018Smith\u2019 is assigned to.\nAdditional table information: table: scientist_1"} +{"question": "SELECT AVG(price) FROM products", "answer": "Compute the average price of all the products.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE '%Monadic%'", "answer": "Find the last names of all the authors that have written a paper with title containing the word 'Monadic'.\nAdditional table information: table: icfp_1"} +{"question": "SELECT SUM(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.facility_code = 'Gym'", "answer": "Show the total number of rooms of all apartments with facility code 'Gym'.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT f_id FROM files ORDER BY duration DESC LIMIT 1", "answer": "Find the id of the song that lasts the longest.\nAdditional table information: table: music_1"} +{"question": "SELECT name, age, country FROM artist ORDER BY Year_Join NULLS FIRST", "answer": "What are the names, ages, and countries of artists, sorted by the year they joined?\nAdditional table information: table: theme_gallery"} +{"question": "SELECT SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = 'Lucas' AND T1.last_name = 'Mancini'", "answer": "What is the total amount of money spent by Lucas Mancini?\nAdditional table information: table: store_1"} +{"question": "SELECT T1.Name, T2.Decoration_Theme FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID", "answer": "Show the names of members and the decoration themes they have.\nAdditional table information: table: decoration_competition"} +{"question": "SELECT location_name, location_description FROM Ref_locations WHERE location_code = 'x'", "answer": "What are the name and description for location code x?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Success' INTERSECT SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Fail'", "answer": "Which services type had both successful and failure event details?\nAdditional table information: table: local_govt_in_alabama"} +{"question": "SELECT T1.name FROM instructor AS T1 JOIN teaches AS T2 ON T1.id = T2.id JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.title = 'C Programming'", "answer": "What are the names of instructors who have taught C Programming courses?\nAdditional table information: table: college_2"} +{"question": "SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100", "answer": "What are the response received dates for the documents described as 'Regular' or granted with more than 100?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "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", "answer": "Which city has hosted the most events?\nAdditional table information: table: city_record"} +{"question": "SELECT COUNT(*) FROM scientists", "answer": "Find the total number of scientists.\nAdditional table information: table: scientist_1"} +{"question": "SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = 'Central Coast'", "answer": "Find the appelations that produce wines after the year of 2008 but not in Central Coast area.\nAdditional table information: table: wine_1"} +{"question": "SELECT T2.dept_name, T2.dept_address FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name and address of the department that has the highest number of students.\nAdditional table information: table: college_1"} +{"question": "SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1", "answer": "What is the name of the hardware product with the greatest price?\nAdditional table information: table: department_store"} +{"question": "SELECT T1.name, T1.long, AVG(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id GROUP BY T2.start_station_id", "answer": "For each station, return its longitude and the average duration of trips that started from the station.\nAdditional table information: table: bike_1"} +{"question": "SELECT COUNT(*) FROM VOTING_RECORD", "answer": "Find the number of voting records in total.\nAdditional table information: table: voter_2"} +{"question": "SELECT T1.good_or_bad_customer FROM customers AS T1 JOIN discount_coupons AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.coupon_amount = 500", "answer": "Are the customers holding coupons with amount 500 bad or good?\nAdditional table information: table: products_for_hire"} +{"question": "SELECT t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex ORDER BY AVG(t2.unsure_rate) DESC LIMIT 1", "answer": "What is the sex of the candidate who had the highest unsure rate?\nAdditional table information: table: candidate_poll"} +{"question": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.sex = 'F'", "answer": "Find all the female members of club 'Bootup Baltimore'. Show the first name and last name.\nAdditional table information: table: club_1"} +{"question": "SELECT main_industry, COUNT(*) FROM company GROUP BY main_industry ORDER BY SUM(market_value) DESC LIMIT 1", "answer": "For each main industry, what is the total number of companies for the industry with the highest total market value?\nAdditional table information: table: gas_company"} +{"question": "SELECT order_id, COUNT(*) FROM Order_items GROUP BY order_id", "answer": "Show the order ids and the number of items in each order.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1", "answer": "Which countries have more than one mountain?\nAdditional table information: table: climbing"} +{"question": "SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING COUNT(T1.id) > 10", "answer": "What are the names of the albums that have more than 10 tracks?\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(*) FROM school", "answer": "Count the number of schools.\nAdditional table information: table: school_player"} +{"question": "SELECT DISTINCT Reign FROM wrestler WHERE LOCATION <> 'Tokyo , Japan'", "answer": "Give the different reigns of wrestlers who are not located in Tokyo, Japan.\nAdditional table information: table: wrestler"} +{"question": "SELECT COUNT fleet_series_quantity FROM \"vehicles\".\"cars\" WHERE fuel_propulsion = 'CNG'", "answer": "how many times is the fuel propulsion is cng? \nAdditional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion"} +{"question": "SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name ORDER BY COUNT(*) DESC LIMIT 3", "answer": "Find the top 3 products which have the largest number of problems?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid'", "answer": "Find the names of states that have some college students playing in goalie and mid positions.\nAdditional table information: table: soccer_2"} +{"question": "SELECT COUNT(DISTINCT customer_id) FROM Accounts", "answer": "How many customers have opened an account?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT t3.name FROM record AS t1 JOIN event AS t2 ON t1.event_id = t2.id JOIN stadium AS t3 ON t3.id = t2.stadium_id GROUP BY t2.stadium_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the names of stadiums that the most swimmers have been to.\nAdditional table information: table: swimming"} +{"question": "SELECT SUM(crs_credit), dept_code FROM course GROUP BY dept_code", "answer": "What is the total credit does each department offer?\nAdditional table information: table: college_1"} +{"question": "SELECT SUM(revenue), name FROM manufacturers GROUP BY name", "answer": "Find the total revenue for each manufacturer.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT customer_name FROM customers WHERE payment_method <> 'Cash'", "answer": "Find the name of customers who did not pay with Cash.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT COUNT(*) FROM performance", "answer": "How many performances are there?\nAdditional table information: table: performance_attendance"} +{"question": "SELECT COUNT(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = 'voluptatem'", "answer": "How many problems are there for product voluptatem?\nAdditional table information: table: tracking_software_problems"} +{"question": "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", "answer": "What is the maximum price of wines from the appelation in the Central Coast area, which was produced before 2005?\nAdditional table information: table: wine_1"} +{"question": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What is the role with the smallest number of employees? Find the role codes.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT COUNT(DISTINCT t3.characteristic_name) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame'", "answer": "Count the number of different characteristic names the product 'cumin' has.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT T1.booking_id, T1.amount_of_refund FROM Bookings AS T1 JOIN Payments AS T2 ON T1.booking_id = T2.booking_id GROUP BY T1.booking_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the id and the amount of refund of the booking that incurred the most times of payments?\nAdditional table information: table: products_for_hire"} +{"question": "SELECT party_name FROM party WHERE NOT party_id IN (SELECT party_id FROM Member)", "answer": "Show names of parties that does not have any members.\nAdditional table information: table: party_people"} +{"question": "SELECT name FROM station WHERE lat < 37.5", "answer": "What are the names of stations that have latitude lower than 37.5?\nAdditional table information: table: bike_1"} +{"question": "SELECT DISTINCT T1.first_name, T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS'", "answer": "Return the full name of the staff who provided a customer with the first name April and the last name Burns with a film rental.\nAdditional table information: table: sakila_1"} +{"question": "SELECT TYPE, AVG(Tonnage) FROM ship GROUP BY TYPE", "answer": "Show different types of ships and the average tonnage of ships of each type.\nAdditional table information: table: ship_mission"} +{"question": "SELECT name_first, name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998", "answer": "What are first and last names of players participating in all star game in 1998?\nAdditional table information: table: baseball_1"} +{"question": "SELECT COUNT(DISTINCT i_id) FROM review", "answer": "How many different items were reviewed by some users?\nAdditional table information: table: epinions_1"} +{"question": "SELECT date, zip_code FROM weather WHERE max_temperature_f >= 80", "answer": "When and in what zip code did max temperature reach 80?\nAdditional table information: table: bike_1"} +{"question": "SELECT name FROM Person WHERE age < 30", "answer": "What is the name of the person whose age is below 30?\nAdditional table information: table: network_2"} +{"question": "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", "answer": "Show the statement id and the statement detail for the statement with most number of accounts.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT organization_name FROM organizations ORDER BY date_formed ASC NULLS FIRST", "answer": "What are the names of organizations, ordered by the date they were formed, ascending?\nAdditional table information: table: e_government"} +{"question": "SELECT kids FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY'", "answer": "How many kids stay in the rooms reserved by ROY SWEAZY?\nAdditional table information: table: inn_1"} +{"question": "SELECT T3.staff_first_name, T3.staff_last_name FROM problems AS T1, product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = 'rem' EXCEPT SELECT T3.staff_first_name, T3.staff_last_name FROM problems AS T1, product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = 'aut'", "answer": "Which staff members who reported problems from the product 'rem' but not 'aut'? Give me their first and last names.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT DISTINCT Visit_Date FROM VISITS", "answer": "Find all the distinct visit dates.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1", "answer": "Where is store 1 located?\nAdditional table information: table: sakila_1"} +{"question": "SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE DEPT_NAME = 'Accounting'", "answer": "Find the number of professors in accounting department.\nAdditional table information: table: college_1"} +{"question": "SELECT T1.date_of_notes FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.first_name = 'Fanny'", "answer": "Find the dates of assessment notes for students with first name 'Fanny'.\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT AVG(student_capacity), SUM(student_capacity) FROM dorm WHERE gender = 'X'", "answer": "Find the average and total capacity of dorms for the students with gender X.\nAdditional table information: table: dorm_1"} +{"question": "SELECT DISTINCT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Google'", "answer": "Find the first names and last names of the authors whose institution affiliation is 'Google'.\nAdditional table information: table: icfp_1"} +{"question": "SELECT * FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code", "answer": "Select all the data from the products and each product's manufacturer.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT SUM(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = 'San Francisco State University'", "answer": "How many people graduated from San Francisco State University in 2004?\nAdditional table information: table: csu_1"} +{"question": "SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'OTHA' AND T2.lastname = 'MOYER'", "answer": "Which students study under the teacher named OTHA MOYER? Give me the first and last names of the students.\nAdditional table information: table: student_1"} +{"question": "SELECT Name FROM city ORDER BY Name ASC NULLS FIRST", "answer": "What are the names of cities in ascending alphabetical order?\nAdditional table information: table: county_public_safety"} +{"question": "SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1", "answer": "Return the song in the volume that has spent the most weeks on top?\nAdditional table information: table: music_4"} +{"question": "SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name = 'Ashley'", "answer": "Find the phone number of performer 'Ashley'.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = 'Metallica'", "answer": "Hom many albums does the artist 'Metallica' have?\nAdditional table information: table: chinook_1"} +{"question": "SELECT T2.first_name, T2.last_name FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.address_id WHERE T1.state_province_county = 'Wisconsin'", "answer": "What are the first names and last names of students with address in Wisconsin state?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT Party, COUNT(*) FROM representative GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the party that has the largest number of representatives?\nAdditional table information: table: election_representative"} +{"question": "SELECT COUNT(patient) FROM stay WHERE room = 112", "answer": "How many patients stay in room 112?\nAdditional table information: table: hospital_1"} +{"question": "SELECT DISTINCT Region FROM club ORDER BY Region ASC NULLS FIRST", "answer": "List the distinct region of clubs in ascending alphabetical order.\nAdditional table information: table: sports_competition"} +{"question": "SELECT T2.name, T1.category_id, COUNT(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id", "answer": "What are the names and ids of the different categories, and how many films are in each?\nAdditional table information: table: sakila_1"} +{"question": "SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING COUNT(*) > 3", "answer": "What are the payment method codes that have been used by more than 3 parties?\nAdditional table information: table: e_government"} +{"question": "SELECT decor, AVG(basePrice), MIN(basePrice) FROM Rooms GROUP BY decor", "answer": "Find the average and minimum price of the rooms in different decor.\nAdditional table information: table: inn_1"} +{"question": "SELECT COUNT(*), nationality FROM constructors GROUP BY nationality", "answer": "For each nationality, how many different constructors are there?\nAdditional table information: table: formula_1"} +{"question": "SELECT AVG(Num_of_Factories) FROM manufacturer WHERE num_of_shops > 20", "answer": "Find the average number of factories for the manufacturers that have more than 20 shops.\nAdditional table information: table: manufacturer"} +{"question": "SELECT COUNT(*) FROM airlines WHERE country = 'Russia'", "answer": "What is the number of airlines based in Russia?\nAdditional table information: table: flight_4"} +{"question": "SELECT T1.first_name, T1.last_name, T3.city FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T1.first_name LIKE '%z%'", "answer": "What are the full names and cities of employees who have the letter Z in their first names?\nAdditional table information: table: hr_1"} +{"question": "SELECT id, market_share FROM browser WHERE name = 'Safari'", "answer": "What is the id and market share of the browser Safari?\nAdditional table information: table: browser_web"} +{"question": "SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1", "answer": "Show the locations of schools that have more than 1 player.\nAdditional table information: table: school_player"} +{"question": "SELECT COUNT(*) FROM Documents_with_expenses", "answer": "How many documents have expenses?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T1.bname, T1.city FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T2.loan_type = 'Business'", "answer": "Find the city and name of bank branches that provide business loans.\nAdditional table information: table: loan_1"} +{"question": "SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10", "answer": "display those departments where more than ten employees work who got a commission percentage.\nAdditional table information: table: hr_1"} +{"question": "SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 2 EXCEPT SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id JOIN Claims AS T3 ON T2.policy_id = T3.policy_id", "answer": "Which customer had at least 2 policies but did not file any claims? List the customer details and id.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'KAWA' AND T2.lastname = 'GORDON'", "answer": "Find the number of students taught by the teacher KAWA GORDON.\nAdditional table information: table: student_1"} +{"question": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T2.Committee = 'Appropriations'", "answer": "What are the names of the county that the delegates on 'Appropriations' committee belong to?\nAdditional table information: table: election"} +{"question": "SELECT Carrier FROM device ORDER BY Carrier ASC NULLS FIRST", "answer": "What are the different carriers for devices, listed in alphabetical order?\nAdditional table information: table: device"} +{"question": "SELECT COUNT(*) FROM Visitors WHERE NOT Tourist_ID IN (SELECT Tourist_ID FROM Visits)", "answer": "Count the number of tourists who did not visit any place.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T3.name, T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id ORDER BY T1.register_year NULLS FIRST", "answer": "What are the names of the members and branches at which they are registered sorted by year of registration?\nAdditional table information: table: shop_membership"} +{"question": "SELECT origin FROM Flight WHERE destination = 'Honolulu'", "answer": "Show origins of all flights with destination Honolulu.\nAdditional table information: table: flight_1"} +{"question": "SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.region_name = 'Denmark'", "answer": "What are the names of the storms that affected Denmark?\nAdditional table information: table: storm_record"} +{"question": "SELECT COUNT(*) FROM Employee", "answer": "How many employees do we have?\nAdditional table information: table: flight_1"} +{"question": "SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.crs_description LIKE '%Statistics%'", "answer": "Find the name of department that offers the class whose description has the word 'Statistics'.\nAdditional table information: table: college_1"} +{"question": "SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq", "answer": "Find the id of the courses that do not have any prerequisite?\nAdditional table information: table: college_2"} +{"question": "SELECT T1.Name, T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID", "answer": "What are the names of climbers and the corresponding names of mountains that they climb?\nAdditional table information: table: climbing"} +{"question": "SELECT activity_name FROM Activity", "answer": "What activities do we have?\nAdditional table information: table: activity_1"} +{"question": "SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'CIS-220' INTERSECT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'QM-261'", "answer": "What is the first name of the professor who is teaching CIS-220 and QM-261?\nAdditional table information: table: college_1"} +{"question": "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'", "answer": "Find the dates of orders which belong to the customer named 'Jeramie'.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT customer_name, customer_phone, customer_email FROM Customers ORDER BY date_became_customer NULLS FIRST", "answer": "List the names, phone numbers, and emails of all customers sorted by their dates of becoming customers.\nAdditional table information: table: customer_deliveries"} +{"question": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2", "answer": "Find the booking start date and end date for the apartments that have more than two bedrooms.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1", "answer": "Return the address of store 1.\nAdditional table information: table: sakila_1"} +{"question": "SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.start_date = (SELECT MAX(start_date) FROM policies)", "answer": "Find the customer who started a policy most recently.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT COUNT(DISTINCT Industry) FROM Companies", "answer": "How many different industries are the companies in?\nAdditional table information: table: company_office"} +{"question": "SELECT COUNT(DISTINCT rank) FROM captain", "answer": "How many different captain ranks are there?\nAdditional table information: table: ship_1"} +{"question": "SELECT T3.Name FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID WHERE T2.Num_of_Audience > 200", "answer": "Show the names of people that are on affirmative side of debates with number of audience bigger than 200.\nAdditional table information: table: debate"} +{"question": "SELECT MAX(Population), MIN(Population) FROM county", "answer": "Return the maximum and minimum population among all counties.\nAdditional table information: table: election"} +{"question": "SELECT COUNT(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Columbus Crew'", "answer": "How many distinct colleges are associated with players from the team with name 'Columbus Crew'.\nAdditional table information: table: match_season"} +{"question": "SELECT AVG(age), gender FROM Person GROUP BY gender", "answer": "What is the average age for each gender?\nAdditional table information: table: network_2"} +{"question": "SELECT major, COUNT(*) FROM Student GROUP BY major", "answer": "How many students are there for each major?\nAdditional table information: table: allergy_1"} +{"question": "SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY COUNT(*) DESC LIMIT 2", "answer": "What are the ids of the two department store chains with the largest number of department stores?\nAdditional table information: table: department_store"} +{"question": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'laurel'", "answer": "Count the number of characteristics of the product named 'laurel'.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = 'Fail'", "answer": "What are the cell phone numbers of the candidates that received an assessment code of 'Fail'?\nAdditional table information: table: student_assessment"} +{"question": "SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the code of the city that has the most students.\nAdditional table information: table: voter_2"} +{"question": "SELECT T2.Country, T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID", "answer": "What are the countries of markets and their corresponding years of market estimation?\nAdditional table information: table: film_rank"} +{"question": "SELECT T3.Location, T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age NULLS FIRST", "answer": "For each party, find its location and the name of its host. Sort the result in ascending order of the age of the host.\nAdditional table information: table: party_host"} +{"question": "SELECT T1.City_Town FROM Addresses AS T1 JOIN Customers AS T2 ON T1.Address_ID = T2.Address_ID EXCEPT SELECT T1.City_Town FROM Addresses AS T1 JOIN Performers AS T2 ON T1.Address_ID = T2.Address_ID", "answer": "Show all cities where at least one customer lives in but no performer lives in.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.crossing > 90 AND T2.preferred_foot = 'right'", "answer": "List the names of all players who have a crossing score higher than 90 and prefer their right foot.\nAdditional table information: table: soccer_1"} +{"question": "SELECT email FROM employees WHERE commission_pct = 'null' AND salary BETWEEN 7000 AND 12000 AND department_id = 50", "answer": "display the emails of the employees who have no commission percentage and salary within the range 7000 to 12000 and works in that department which number is 50.\nAdditional table information: table: hr_1"} +{"question": "SELECT COUNT(DISTINCT student_id) FROM Student_Course_Enrolment", "answer": "Find the number of distinct students enrolled in courses.\nAdditional table information: table: e_learning"} +{"question": "SELECT party_name FROM party WHERE NOT party_id IN (SELECT party_id FROM Member)", "answer": "What are the names of parties that have no members?\nAdditional table information: table: party_people"} +{"question": "SELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name = T2.name JOIN PersonFriend AS T3 ON T1.friend = T3.name JOIN PersonFriend AS T4 ON T3.friend = T4.name WHERE T2.name = 'Alice' AND T4.name <> 'Alice'", "answer": "What are the names of all of Alice's friends of friends?\nAdditional table information: table: network_2"} +{"question": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING AVG(product_price) > (SELECT AVG(product_price) FROM products)", "answer": "Find the product type whose average price is higher than the average price of all products.\nAdditional table information: table: department_store"} +{"question": "SELECT SUM(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research'", "answer": "What is the total grant amount of the organisations described as research?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT AVG(age), MIN(age), CLASS FROM captain GROUP BY CLASS", "answer": "Return the average and minimum age of captains in each class.\nAdditional table information: table: ship_1"} +{"question": "SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Customer_Payments)", "answer": "List the number of customers that did not have any payment history.\nAdditional table information: table: driving_school"} +{"question": "SELECT date_from, date_to FROM Project_Staff WHERE project_id IN (SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY COUNT(*) DESC LIMIT 1) UNION SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'leader'", "answer": "From what date and to what date do the staff work on a project that has the most staff and has staff in a leader role?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT COUNT(DISTINCT POSITION) FROM player", "answer": "Count the number of distinct player positions.\nAdditional table information: table: school_player"} +{"question": "SELECT pPos FROM tryout GROUP BY pPos ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which position is most popular among players in the tryout?\nAdditional table information: table: soccer_2"} +{"question": "SELECT country FROM stadium EXCEPT SELECT country FROM stadium WHERE opening_year > 2006", "answer": "Which countries do not have a stadium that was opened after 2006?\nAdditional table information: table: swimming"} +{"question": "SELECT T2.department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY T2.department_name", "answer": "Give the name of each department and the number of employees in each.\nAdditional table information: table: hr_1"} +{"question": "SELECT T3.location FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.market_value > 100", "answer": "What are the locations that have gas stations owned by a company with a market value greater than 100?\nAdditional table information: table: gas_company"} +{"question": "SELECT DISTINCT T1.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T3.market_share > 15", "answer": "What distinct accelerator names are compatible with the browswers that have market share higher than 15?\nAdditional table information: table: browser_web"} +{"question": "SELECT COUNT(*) FROM flight WHERE velocity > 200", "answer": "How many flights have a velocity larger than 200?\nAdditional table information: table: flight_company"} +{"question": "SELECT state FROM bank GROUP BY state ORDER BY SUM(no_of_customers) DESC LIMIT 1", "answer": "Which state has the greatest total number of bank customers?\nAdditional table information: table: loan_1"} +{"question": "SELECT t2.service_name FROM first_notification_of_loss AS t1 JOIN services AS t2 ON t1.service_id = t2.service_id GROUP BY t1.service_id HAVING COUNT(*) > 2", "answer": "Which services have been used more than twice in first notification of loss? Return the service name.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT SUM(revenue) FROM manufacturers WHERE headquarter = 'Austin'", "answer": "What is the sum of revenue from companies with headquarters in Austin?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT MAX(used_kb), MIN(used_kb), AVG(used_kb) FROM screen_mode", "answer": "List the maximum, minimum and average number of used kb in screen mode.\nAdditional table information: table: phone_1"} +{"question": "SELECT AVG(Working_Horses) FROM farm WHERE Total_Horses > 5000", "answer": "Give the average number of working horses on farms with more than 5000 total horses.\nAdditional table information: table: farm"} +{"question": "SELECT DISTINCT name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE ratingDate = 'null'", "answer": "What are the different names of all reviewers whose ratings do not have a date field?\nAdditional table information: table: movie_1"} +{"question": "SELECT T1.student_id, COUNT(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id", "answer": "For every student who is registered for some course, how many courses are they registered for?\nAdditional table information: table: student_assessment"} +{"question": "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)", "answer": "What is the name of the project that requires the fewest number of hours, and the names of the scientists assigned to it?\nAdditional table information: table: scientist_1"} +{"question": "SELECT name, member_id FROM member WHERE Membership_card = 'Black' OR age < 30", "answer": "Find the ids and names of members who are under age 30 or with black membership card.\nAdditional table information: table: coffee_shop"} +{"question": "SELECT name, city, country, elevation FROM airports WHERE city = 'New York'", "answer": "Find the name, city, country, and altitude (or elevation) of the airports in the city of New York.\nAdditional table information: table: flight_4"} +{"question": "SELECT FirstName, LastName FROM EMPLOYEE WHERE City = 'Calgary'", "answer": "What are the first names and last names of the employees who live in Calgary city.\nAdditional table information: table: chinook_1"} +{"question": "SELECT T1.driverid, COUNT(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING COUNT(*) <= 30", "answer": "Find the driver id and number of races of all drivers who have at most participated in 30 races?\nAdditional table information: table: formula_1"} +{"question": "SELECT T1.stu_fname, T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'C' OR T2.enroll_grade = 'A'", "answer": "Find names of all students who took some course and got A or C.\nAdditional table information: table: college_1"} +{"question": "SELECT SUM(T2.balance), T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name", "answer": "What are the names of customers with accounts, and what are the total savings balances for each?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT DName FROM DEPARTMENT WHERE Building = 'Mergenthaler'", "answer": "What is the name of the department in the Building Mergenthaler?\nAdditional table information: table: college_3"} +{"question": "SELECT publisher FROM book_club GROUP BY publisher ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the publisher with most number of books?\nAdditional table information: table: culture_company"} +{"question": "SELECT T1.activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID", "answer": "How many faculty members participate in each activity? Return the activity names and the number of faculty members.\nAdditional table information: table: activity_1"} +{"question": "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", "answer": "Show statement id, statement detail, account detail for accounts.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT MAX(Cows), MIN(Cows) FROM farm", "answer": "Return the maximum and minimum number of cows across all farms.\nAdditional table information: table: farm"} +{"question": "SELECT COUNT(*) FROM customer WHERE active = '1'", "answer": "How many customers have an active value of 1?\nAdditional table information: table: sakila_1"} +{"question": "SELECT campus FROM campuses WHERE YEAR < 1800", "answer": "What campuses opened before 1800?\nAdditional table information: table: csu_1"} +{"question": "SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017", "answer": "What are the unique names of all race held between 2014 and 2017?\nAdditional table information: table: formula_1"} +{"question": "SELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = 'Fail'", "answer": "Find the cell mobile number of the candidates whose assessment code is 'Fail'?\nAdditional table information: table: student_assessment"} +{"question": "SELECT T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID WHERE T1.White > 90", "answer": "What are the crime rates of counties that contain cities that have white percentages of over 90?\nAdditional table information: table: county_public_safety"} +{"question": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame'", "answer": "Return the characteristic names of the 'sesame' product.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT cust_name FROM customer WHERE credit_score < (SELECT AVG(credit_score) FROM customer)", "answer": "Find the name of customers whose credit score is below the average credit scores of all customers.\nAdditional table information: table: loan_1"} +{"question": "SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T1.Total_Points > 57.5", "answer": "Give the different hometowns of gymnasts that have a total point score of above 57.5.\nAdditional table information: table: gymnast"} +{"question": "SELECT name FROM races ORDER BY date DESC LIMIT 1", "answer": "What is the name of the race that occurred most recently?\nAdditional table information: table: formula_1"} +{"question": "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", "answer": "What are the names of the customers who have made two or less orders?\nAdditional table information: table: tracking_orders"} +{"question": "SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'English'", "answer": "How many students are attending English courses?\nAdditional table information: table: student_assessment"} +{"question": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1", "answer": "List the software platform shared by the greatest number of devices.\nAdditional table information: table: device"} +{"question": "SELECT T2.Store_Name FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.City_Town = 'Feliciaberg'", "answer": "What are the names of the drama workshop groups with address in Feliciaberg city?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1", "answer": "List the most common type of Status across cities.\nAdditional table information: table: farm"} +{"question": "SELECT COUNT(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code = T2.dept_code WHERE dept_name = 'Computer Info. Systems'", "answer": "How many courses are offered by the Computer Info. Systems department?\nAdditional table information: table: college_1"} +{"question": "SELECT employee_id, salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam')", "answer": "display the employee id and salary of all employees who report to Payam (first name).\nAdditional table information: table: hr_1"} +{"question": "SELECT Team, COUNT(*) FROM technician GROUP BY Team", "answer": "For each team, how many technicians are there?\nAdditional table information: table: machine_repair"} +{"question": "SELECT t2.team_name FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE enrollment < (SELECT AVG(enrollment) FROM university)", "answer": "Find the team names of the universities whose enrollments are smaller than the average enrollment size.\nAdditional table information: table: university_basketball"} +{"question": "SELECT MIN(T2.HS), T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID GROUP BY T1.pPos", "answer": "For each position, what is the minimum time students spent practicing?\nAdditional table information: table: soccer_2"} +{"question": "SELECT city, COUNT(*) FROM station GROUP BY city HAVING COUNT(*) >= 15", "answer": "What is the name of every city that has at least 15 stations and how many stations does it have?\nAdditional table information: table: bike_1"} +{"question": "SELECT flno, distance FROM Flight ORDER BY price DESC LIMIT 1", "answer": "What is the flight number and its distance for the one with the maximum price?\nAdditional table information: table: flight_1"} +{"question": "SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers", "answer": "Return the phone numbers for all customers and suppliers.\nAdditional table information: table: department_store"} +{"question": "SELECT DISTINCT LOCATION FROM track", "answer": "Give the different locations of tracks.\nAdditional table information: table: race_track"} +{"question": "SELECT payment_method_code, party_phone FROM parties WHERE party_email = 'enrico09@example.com'", "answer": "Find the payment method and phone of the party with email 'enrico09@example.com'.\nAdditional table information: table: e_government"} +{"question": "SELECT book_title, author_or_editor FROM book_club WHERE YEAR > 1989", "answer": "What are the titles and authors or editors that correspond to books made after 1989?\nAdditional table information: table: culture_company"} +{"question": "SELECT minister, took_office, left_office FROM party ORDER BY left_office NULLS FIRST", "answer": "Show the ministers and the time they took and left office, listed by the time they left office.\nAdditional table information: table: party_people"} +{"question": "SELECT COUNT(*) FROM candidate", "answer": "How many candidates are there?\nAdditional table information: table: candidate_poll"} +{"question": "SELECT T2.firstname, T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom GROUP BY T2.firstname, T2.lastname ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which teacher teaches the most students? Give me the first name and last name of the teacher.\nAdditional table information: table: student_1"} +{"question": "SELECT AVG(enrollment) FROM university WHERE founded < 1850", "answer": "Return the average enrollment of universities founded before 1850.\nAdditional table information: table: university_basketball"} +{"question": "SELECT gname, gtype FROM Video_games ORDER BY gname NULLS FIRST", "answer": "Show all video games and their types in the order of their names.\nAdditional table information: table: game_1"} +{"question": "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", "answer": "Find the white grape used to produce wines with scores above 90.\nAdditional table information: table: wine_1"} +{"question": "SELECT Lieutenant_Governor, Comptroller FROM party WHERE Party = 'Democratic'", "answer": "Show the lieutenant governor and comptroller from the democratic party.\nAdditional table information: table: election"} +{"question": "SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Australian Grand Prix' INTERSECT SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Chinese Grand Prix'", "answer": "Find the id and forenames of drivers who participated both the races with name Australian Grand Prix and the races with name Chinese Grand Prix?\nAdditional table information: table: formula_1"} +{"question": "SELECT T2.Railway_ID, T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID GROUP BY T2.Railway_ID HAVING COUNT(*) > 1", "answer": "Show id and location of railways that are associated with more than one train.\nAdditional table information: table: railway"} +{"question": "SELECT customer_id, customer_first_name FROM Customers EXCEPT SELECT T1.customer_id, T2.customer_first_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE card_type_code = 'Credit'", "answer": "Show the customer ids and firstname without a credit card.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT COUNT(*) FROM claims_processing_stages", "answer": "How many claim processing stages are there in total?\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT T2.Delegate, T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District", "answer": "What are the delegate and name of the county they belong to, for each county?\nAdditional table information: table: election"} +{"question": "SELECT Major FROM STUDENT WHERE Sex = 'F' GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common major among female (sex is F) students?\nAdditional table information: table: voter_2"} +{"question": "SELECT DISTINCT characteristic_name FROM CHARACTERISTICS", "answer": "Find the names of all the product characteristics.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT YEAR FROM festival_detail WHERE LOCATION = 'United States' INTERSECT SELECT YEAR FROM festival_detail WHERE LOCATION <> 'United States'", "answer": "In which year are there festivals both inside the 'United States' and outside the 'United States'?\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT product_id, COUNT(DISTINCT order_id) FROM Order_items GROUP BY product_id", "answer": "How many distinct order ids correspond to each product?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT name, open_date, organized_by FROM Church", "answer": "Show the name, open date, and organizer for all churches.\nAdditional table information: table: wedding"} +{"question": "SELECT name FROM building WHERE height_feet >= 200 AND floors >= 20", "answer": "List the names of buildings with at least 200 feet of height and with at least 20 floors.\nAdditional table information: table: protein_institute"} +{"question": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' AND salary > 80000", "answer": "Find the names of all instructors in Comp. Sci. department with salary > 80000.\nAdditional table information: table: college_2"} +{"question": "SELECT pName, HS FROM Player WHERE HS < 1500", "answer": "What are the names and number of hours spent training for each player who trains for less than 1500 hours?\nAdditional table information: table: soccer_2"} +{"question": "SELECT payment_method FROM Customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the payment method that is used most frequently.\nAdditional table information: table: customer_deliveries"} +{"question": "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'", "answer": "Who is the advisor of Linda Smith? Give me the first name and last name.\nAdditional table information: table: activity_1"} +{"question": "SELECT T1.compatible_since_year FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id = T3.id WHERE T3.name = 'CACHEbox' AND T2.name = 'Internet Explorer'", "answer": "When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible?\nAdditional table information: table: browser_web"} +{"question": "SELECT name FROM CLub WHERE NOT Club_ID IN (SELECT Club_ID FROM player)", "answer": "What are the names of all clubs that do not have any players?\nAdditional table information: table: sports_competition"} +{"question": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Boeing 737-800' INTERSECT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Airbus A340-300'", "answer": "What are the names of all employees who can fly both the Boeing 737-800 and the Airbus A340-300?\nAdditional table information: table: flight_1"} +{"question": "SELECT name FROM instructor WHERE NOT id IN (SELECT id FROM teaches WHERE semester = 'Spring')", "answer": "Find the names of instructors who didn't each any courses in any Spring semester.\nAdditional table information: table: college_2"} +{"question": "SELECT Age FROM people ORDER BY Height DESC LIMIT 1", "answer": "What is the age of the tallest person?\nAdditional table information: table: gymnast"} +{"question": "SELECT student_capacity, gender FROM dorm WHERE dorm_name LIKE '%Donor%'", "answer": "What is the student capacity and type of gender for the dorm whose name as the phrase Donor in it?\nAdditional table information: table: dorm_1"} +{"question": "SELECT roomName FROM Rooms WHERE bedType = 'King' OR bedType = 'Queen'", "answer": "List the name of rooms with king or queen bed.\nAdditional table information: table: inn_1"} +{"question": "SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.rating DESC LIMIT 3", "answer": "What are the names and countries of origin for the artists who produced the top three highly rated songs.\nAdditional table information: table: music_1"} +{"question": "SELECT COUNT(*), Competition FROM MATCH GROUP BY Competition", "answer": "Find the number of matches in different competitions.\nAdditional table information: table: city_record"} +{"question": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING COUNT(*) > 1", "answer": "Find the name of customers who have more than one loan.\nAdditional table information: table: loan_1"} +{"question": "SELECT Name FROM city ORDER BY White DESC LIMIT 5", "answer": "What are the names of the five cities with the greatest proportion of white people?\nAdditional table information: table: county_public_safety"} +{"question": "SELECT payment_method_code, COUNT(*) FROM Customer_Payments GROUP BY payment_method_code", "answer": "List all payment methods and number of payments using each payment methods.\nAdditional table information: table: driving_school"} +{"question": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' AND t2.position = 'CTO'", "answer": "Who is the 'CTO' of club 'Hopkins Student Enterprises'? Show the first name and last name.\nAdditional table information: table: club_1"} +{"question": "SELECT Customer_Name FROM Clients EXCEPT SELECT T2.Customer_Name FROM Bookings AS T1 JOIN Clients AS T2 ON T1.Customer_ID = T2.Client_ID", "answer": "What are the names of the clients who do not have any booking?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT t2.unit_of_measure, t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = 'chervil'", "answer": "Find the unit of measurement and product category code of product named 'chervil'.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT Name FROM ship WHERE NOT Ship_ID IN (SELECT Ship_ID FROM mission)", "answer": "What are the names of the ships that are not involved in any missions?\nAdditional table information: table: ship_mission"} +{"question": "SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType", "answer": "For each bed type, find the average base price of different bed type.\nAdditional table information: table: inn_1"} +{"question": "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", "answer": "What is the area for the appelation which produced the most wines prior to 2010?\nAdditional table information: table: wine_1"} +{"question": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = 'sesame'", "answer": "How many characteristics does the product named 'sesame' have?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%'", "answer": "What are the full name, hire date, salary, and department id for employees without the letter M in their first name?\nAdditional table information: table: hr_1"} +{"question": "SELECT Character FROM actor ORDER BY age DESC", "answer": "What are the characters of actors in descending order of age?\nAdditional table information: table: musical"} +{"question": "SELECT DISTINCT T1.cust_name, T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id", "answer": "Find the name and credit score of the customers who have some loans.\nAdditional table information: table: loan_1"} +{"question": "SELECT LOCATION FROM cinema WHERE openning_year = 2010 INTERSECT SELECT LOCATION FROM cinema WHERE openning_year = 2011", "answer": "Show all the locations where some cinemas were opened in both year 2010 and year 2011.\nAdditional table information: table: cinema"} +{"question": "SELECT T1.department_name, T2.city, T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id", "answer": "display the department name, city, and state province for each department.\nAdditional table information: table: hr_1"} +{"question": "SELECT city FROM addresses WHERE zip_postcode = 255", "answer": "Find the city with post code 255.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T2.Visit_Date, T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID = T2.Tourist_ID WHERE T1.Tourist_Details = 'Vincent'", "answer": "What are the visit date and details of the visitor whose detail is 'Vincent'?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC", "answer": "List the companies of entrepreneurs in descending order of money requested.\nAdditional table information: table: entrepreneur"} +{"question": "SELECT cName, state, MIN(enr) FROM college GROUP BY state", "answer": "What is the name of the school with smallest enrollment size per state?\nAdditional table information: table: soccer_2"} +{"question": "SELECT DISTINCT salary FROM instructor WHERE salary < (SELECT MAX(salary) FROM instructor)", "answer": "Find the salaries of all distinct instructors that are less than the largest salary.\nAdditional table information: table: college_2"} +{"question": "SELECT CName FROM COURSE ORDER BY Credits NULLS FIRST", "answer": "List the course name of courses sorted by credits.\nAdditional table information: table: college_3"} +{"question": "SELECT theme, YEAR FROM exhibition ORDER BY ticket_price DESC", "answer": "Show theme and year for all exhibitions in an descending order of ticket price.\nAdditional table information: table: theme_gallery"} +{"question": "SELECT T1.season FROM game AS T1 JOIN injury_accident AS T2 ON T1.id = T2.game_id WHERE T2.player = 'Walter Samuel'", "answer": "What is the season of the game which causes the player 'Walter Samuel' to get injured?\nAdditional table information: table: game_injury"} +{"question": "SELECT T2.card_type_code, COUNT(*) FROM Financial_transactions AS T1 JOIN Customers_cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_code", "answer": "What are the different card types, and how many transactions have been made with each?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY AVG(T2.rating) NULLS FIRST LIMIT 1", "answer": "Find the name of the item with the lowest average rating.\nAdditional table information: table: epinions_1"} +{"question": "SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount > 100", "answer": "What are the cities that do not have any branches with more than 100 members?\nAdditional table information: table: shop_membership"} +{"question": "SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy'", "answer": "Find the number of routes with destination airports in Italy.\nAdditional table information: table: flight_4"} +{"question": "SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID ORDER BY Rank_in_Round ASC NULLS FIRST", "answer": "Show the names of members in ascending order of their rank in rounds.\nAdditional table information: table: decoration_competition"} +{"question": "SELECT SUM(student_capacity) FROM dorm", "answer": "Find the total capacity of all dorms.\nAdditional table information: table: dorm_1"} +{"question": "SELECT g_name, rating FROM genre ORDER BY g_name NULLS FIRST", "answer": "What are the names of all genres in alphabetical order, combined with its ratings?\nAdditional table information: table: music_1"} +{"question": "SELECT fname, lname FROM authors ORDER BY lname NULLS FIRST", "answer": "Sort the list of all the first and last names of authors in alphabetical order of the last names.\nAdditional table information: table: icfp_1"} +{"question": "SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers", "answer": "What are the phone numbers of all customers and suppliers.\nAdditional table information: table: department_store"} +{"question": "SELECT T1.name_first, T1.name_last, T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 3", "answer": "Which 3 players won the most player awards? List their full name and id.\nAdditional table information: table: baseball_1"} +{"question": "SELECT date_from, date_to FROM Project_Staff WHERE project_id IN (SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY COUNT(*) DESC LIMIT 1) UNION SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'leader'", "answer": "List from which date and to which date these staff work: project staff of the project which hires the most staffs\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = 'Karson'", "answer": "On what dates did the student whose personal name is 'Karson' enroll in and complete the courses?\nAdditional table information: table: e_learning"} +{"question": "SELECT t2.state_province_county, COUNT(*) FROM customer_addresses AS t1 JOIN addresses AS t2 ON t1.address_id = t2.address_id GROUP BY t2.state_province_county", "answer": "List the state names and the number of customers living in each state.\nAdditional table information: table: customer_deliveries"} +{"question": "SELECT SUM(no_of_customers) FROM bank WHERE city = 'New York City'", "answer": "Find the number of customers in the banks at New York City.\nAdditional table information: table: loan_1"} +{"question": "SELECT COUNT(*) FROM STUDENTS WHERE NOT student_id IN (SELECT student_id FROM Behavior_Incident)", "answer": "How many students are not involved in any behavior incident?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT MIN(rank) FROM review", "answer": "Find the highest rank of all reviews.\nAdditional table information: table: epinions_1"} +{"question": "SELECT T2.star_rating_description FROM HOTELS AS T1 JOIN Ref_Hotel_Star_Ratings AS T2 ON T1.star_rating_code = T2.star_rating_code WHERE T1.price_range > 10000", "answer": "What are the star rating descriptions of the hotels with price above 10000?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T2.Date_of_Birth FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor = 'Simon Woodroffe' OR T1.Investor = 'Peter Jones'", "answer": "What are the dates of birth of entrepreneurs with investor 'Simon Woodroffe' or 'Peter Jones'?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT T1.date_incident_start, date_incident_end FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.last_name = 'Fahey'", "answer": "Find the start and end dates of behavior incidents of students with last name 'Fahey'.\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT f_id, genre_is, artist_name FROM song WHERE languages = 'english' ORDER BY rating NULLS FIRST", "answer": "List the id, genre and artist name of English songs ordered by rating.\nAdditional table information: table: music_1"} +{"question": "SELECT first_name, last_name, gender_mf FROM customers WHERE good_or_bad_customer = 'good' ORDER BY last_name NULLS FIRST", "answer": "What are the first name, last name, and gender of all the good customers? Order by their last name.\nAdditional table information: table: products_for_hire"} +{"question": "SELECT Status, AVG(Population) FROM city GROUP BY Status", "answer": "Please show the different statuses of cities and the average population of cities with each status.\nAdditional table information: table: farm"} +{"question": "SELECT AVG(Price), AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = 'Zinfandel'", "answer": "Give the average price and case of wines made from Zinfandel grapes in the year 2009.\nAdditional table information: table: wine_1"} +{"question": "SELECT TYPE FROM institution GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the institution type with the largest number of institutions.\nAdditional table information: table: protein_institute"} +{"question": "SELECT COUNT(*) FROM debate", "answer": "How many debates are there?\nAdditional table information: table: debate"} +{"question": "SELECT state_province_county, COUNT(*) FROM addresses GROUP BY state_province_county", "answer": "Show each state and the number of addresses in each state.\nAdditional table information: table: customers_and_products_contacts"} +{"question": "SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = '8'", "answer": "Find the names of catalog entries with level number 8.\nAdditional table information: table: product_catalog"} +{"question": "SELECT T1.name_first, T1.name_last, T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which manager won the most manager award? Give me the manager's first name, last name and id.\nAdditional table information: table: baseball_1"} +{"question": "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'", "answer": "Which customers have orders with status 'Packing'? Give me the customer names.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT T2.Visit_Date, T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID = T2.Tourist_ID WHERE T1.Tourist_Details = 'Vincent'", "answer": "Find the visit date and details of the tourist whose detail is 'Vincent'\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT AVG(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'", "answer": "Find the average hours for the students whose tryout decision is no.\nAdditional table information: table: soccer_2"} +{"question": "SELECT COUNT(*) FROM dorm", "answer": "How many dorms are there?\nAdditional table information: table: dorm_1"} +{"question": "SELECT AVG(HS) FROM Player", "answer": "What is the average training hours of all players?\nAdditional table information: table: soccer_2"} +{"question": "SELECT T2.Name, T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID", "answer": "What are the names of wrestlers and the elimination moves?\nAdditional table information: table: wrestler"} +{"question": "SELECT name FROM Employee ORDER BY salary ASC NULLS FIRST LIMIT 3", "answer": "Show the name of employees with three lowest salaries.\nAdditional table information: table: flight_1"} +{"question": "SELECT Planned_Delivery_Date, Actual_Delivery_Date FROM BOOKINGS", "answer": "What are the planned delivery date and actual delivery date for each booking?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT Name, Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus' OR How_to_Get_There = 'walk'", "answer": "What are the names and opening hours of the tourist attractions that can be accessed by bus or walk?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT SUM(Amount_Claimed) FROM Claims", "answer": "Find the total claimed amount of all the claims.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported < (SELECT MIN(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = 'Lysanne' AND T4.staff_last_name = 'Turcotte')", "answer": "What are the ids of the problems reported before the date of any problem reported by Lysanne Turcotte?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = 'Rock' OR T3.name = 'MPEG audio file'", "answer": "List the name of tracks belongs to genre Rock or media type is MPEG audio file.\nAdditional table information: table: store_1"} +{"question": "SELECT fname, lname FROM student WHERE major <> (SELECT major FROM student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "What is the first and last name of the students who are not in the largest major?\nAdditional table information: table: dorm_1"} +{"question": "SELECT SUM(faculty) FROM faculty WHERE YEAR = 2002", "answer": "How many faculty is there in total in the year of 2002?\nAdditional table information: table: csu_1"} +{"question": "SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Confirmed' INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Provisional'", "answer": "Show the apartment numbers of apartments with bookings that have status code both 'Provisional' and 'Confirmed'\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 2", "answer": "Give the codes of document types that have more than 2 corresponding documents.\nAdditional table information: table: document_management"} +{"question": "SELECT allergy, allergytype FROM Allergy_type", "answer": "Show all allergies and their types.\nAdditional table information: table: allergy_1"} +{"question": "SELECT COUNT(*) FROM Activity", "answer": "Find the number of activities available.\nAdditional table information: table: activity_1"} +{"question": "SELECT COUNT(*), T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name", "answer": "What are the naems of all the projects, and how many scientists were assigned to each of them?\nAdditional table information: table: scientist_1"} +{"question": "SELECT name FROM person EXCEPT SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.job = 'student'", "answer": "Find the name of the person who has no student friends.\nAdditional table information: table: network_2"} +{"question": "SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common type of ships?\nAdditional table information: table: ship_mission"} +{"question": "SELECT country, COUNT(*) FROM airlines GROUP BY country ORDER BY COUNT(*) DESC", "answer": "List all countries and their number of airlines in the descending order of number of airlines.\nAdditional table information: table: flight_4"} +{"question": "SELECT COUNT(*), customer_id FROM Accounts GROUP BY customer_id", "answer": "How many accounts does each customer have? List the number and customer id.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT T1.title, T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T2.inventory_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the title and inventory id of the film that is rented most often.\nAdditional table information: table: sakila_1"} +{"question": "SELECT Date, Venue FROM workshop ORDER BY Venue NULLS FIRST", "answer": "Show the date and venue of each workshop in ascending alphabetical order of the venue.\nAdditional table information: table: workshop_paper"} +{"question": "SELECT T1.pName, T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'", "answer": "Find the name and college of students whose decisions are yes in the tryout.\nAdditional table information: table: soccer_2"} +{"question": "SELECT Party, COUNT(*) FROM representative GROUP BY Party", "answer": "What are the different parties of representative? Show the party name and the number of representatives in each party.\nAdditional table information: table: election_representative"} +{"question": "SELECT T2.Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name", "answer": "What are the names of the technicians and how many machines are they assigned to repair?\nAdditional table information: table: machine_repair"} +{"question": "SELECT T1.first_name, T1.job_id FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T2.department_name = 'Finance'", "answer": "Give the first name and job id for all employees in the Finance department.\nAdditional table information: table: hr_1"} +{"question": "SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees)", "answer": "How many universities have a campus fee higher than average?\nAdditional table information: table: csu_1"} +{"question": "SELECT T2.Author, T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID", "answer": "Show the authors of submissions and the acceptance results of their submissions.\nAdditional table information: table: workshop_paper"} +{"question": "SELECT TYPE, COUNT(*) FROM mill GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common mill type, and how many are there?\nAdditional table information: table: architecture"} +{"question": "SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = 'Pass'", "answer": "What are the ids of the candidates that have an outcome code of Pass?\nAdditional table information: table: student_assessment"} +{"question": "SELECT apt_number FROM Apartments ORDER BY room_count ASC NULLS FIRST", "answer": "Sort the apartment numbers in ascending order of room count.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT Team, Starting_Year FROM technician", "answer": "What are the team and starting year of technicians?\nAdditional table information: table: machine_repair"} +{"question": "SELECT t2.product_details, t2.product_id FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY SUM(t1.order_quantity) NULLS FIRST LIMIT 1", "answer": "What are the name and ID of the product bought the most.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT * FROM item", "answer": "List all information in the item table.\nAdditional table information: table: epinions_1"} +{"question": "SELECT customer_details FROM customers WHERE customer_details LIKE '%Diana%'", "answer": "Which customers have the substring 'Diana' in their names? Return the customer details.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT first_name, last_name FROM actor GROUP BY first_name, last_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the most common full name among all actors.\nAdditional table information: table: sakila_1"} +{"question": "SELECT COUNT(*) FROM products WHERE product_category_code = 'Seeds'", "answer": "Count the number of products in the category 'Seeds'.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT StuID FROM Student WHERE age = (SELECT MAX(age) FROM Student)", "answer": "What student id corresponds to the oldest student?\nAdditional table information: table: allergy_1"} +{"question": "SELECT Pilot_name FROM pilot WHERE Team = 'Bradley' OR Team = 'Fordham'", "answer": "Show the names of pilots from team 'Bradley' or 'Fordham'.\nAdditional table information: table: pilot_record"} +{"question": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE stageposition = 'back' GROUP BY lastname ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the last name of the musician that has been at the back position the most?\nAdditional table information: table: music_2"} +{"question": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Tennis Club'", "answer": "Count the members of the club 'Tennis Club'.\nAdditional table information: table: club_1"} +{"question": "SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5", "answer": "What are the titles of all movies that have rating star is between 3 and 5?\nAdditional table information: table: movie_1"} +{"question": "SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%'", "answer": "Which document type is described with the prefix 'Initial'?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT COUNT(*) FROM COURSES", "answer": "Find the total number of courses offered.\nAdditional table information: table: e_learning"} +{"question": "SELECT DISTINCT state FROM college WHERE enr < (SELECT MAX(enr) FROM college)", "answer": "Find the states where have the colleges whose enrollments are less than the largest size.\nAdditional table information: table: soccer_2"} +{"question": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2", "answer": "display the ID for those employees who did two or more jobs in the past.\nAdditional table information: table: hr_1"} +{"question": "SELECT dept_address FROM department WHERE dept_name = 'History'", "answer": "Where is the history department?\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(*) FROM Accounts", "answer": "How many accounts do we have?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT COUNT(DISTINCT pPos) FROM tryout", "answer": "What are the unique types of player positions in the tryout?\nAdditional table information: table: soccer_2"} +{"question": "SELECT COUNT(*) FROM Tasks", "answer": "How many tasks are there?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT name FROM scientists ORDER BY name NULLS FIRST", "answer": "List the names of all scientists sorted in alphabetical order.\nAdditional table information: table: scientist_1"} +{"question": "SELECT MAX(T1.stars), T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT MAX(YEAR) FROM Movie)", "answer": "What is the maximum stars and year for the most recent movie?\nAdditional table information: table: movie_1"} +{"question": "SELECT T1.sales_details, T2.date_of_transaction FROM SALES AS T1 JOIN TRANSACTIONS AS T2 ON T1.sales_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction < 3000", "answer": "What are the sale details and dates of transactions with amount smaller than 3000?\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT T1.name FROM instructor AS T1 JOIN teaches AS T2 ON T1.id = T2.id JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.title = 'C Programming'", "answer": "Find the name of the instructors who taught C Programming course before.\nAdditional table information: table: college_2"} +{"question": "SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.age < 20", "answer": "Show total hours per week and number of games played for students under 20.\nAdditional table information: table: game_1"} +{"question": "SELECT Winery FROM WINE ORDER BY SCORE NULLS FIRST LIMIT 1", "answer": "Which winery is the wine that has the highest score from?\nAdditional table information: table: wine_1"} +{"question": "SELECT COUNT(DISTINCT brand) FROM camera_lens", "answer": "How many different kinds of lens brands are there?\nAdditional table information: table: mountain_photos"} +{"question": "SELECT COUNT(*) FROM Employees", "answer": "Find the number of employees we have.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT product_name, product_category_code FROM products ORDER BY product_price DESC LIMIT 1", "answer": "What is the name and category code of the product with the highest price?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT building_short_name FROM Apartment_Buildings WHERE building_manager = 'Emma'", "answer": "Show the short names of the buildings managed by 'Emma'.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT customer_phone FROM available_policies WHERE policy_type_code = 'Life Insurance'", "answer": "What are the phone numbers of customers using the policy with the code 'Life Insurance'?\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT title FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq)", "answer": "Find the name of the courses that do not have any prerequisite?\nAdditional table information: table: college_2"} +{"question": "SELECT gender_code, COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC", "answer": "Show each gender code and the corresponding count of guests sorted by the count in descending order.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT COUNT(*) FROM Students WHERE personal_name LIKE '%son%'", "answer": "How many students have personal names that contain the word 'son'?\nAdditional table information: table: e_learning"} +{"question": "SELECT Name FROM wrestler ORDER BY Days_held ASC NULLS FIRST LIMIT 1", "answer": "What is the name of the wrestler with the fewest days held?\nAdditional table information: table: wrestler"} +{"question": "SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id HAVING COUNT(*) >= 2", "answer": "Show the region name with at least two storms.\nAdditional table information: table: storm_record"} +{"question": "SELECT DISTINCT blockcode FROM room WHERE unavailable = 0", "answer": "Tell me the distinct block codes where some rooms are available.\nAdditional table information: table: hospital_1"} +{"question": "SELECT AVG(weight), MIN(weight), sex FROM people GROUP BY sex", "answer": "Find the average and minimum weight for each gender.\nAdditional table information: table: candidate_poll"} +{"question": "SELECT AVG(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = 'AIB'", "answer": "What is the average points of players from club with name 'AIB'.\nAdditional table information: table: sports_competition"} +{"question": "SELECT COUNT(*), T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director", "answer": "How many movie reviews does each director get?\nAdditional table information: table: movie_1"} +{"question": "SELECT artist_name FROM artist WHERE country = 'UK' INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'english'", "answer": "What are the names of all singers that are from the UK and released a song in English?\nAdditional table information: table: music_1"} +{"question": "SELECT DName FROM DEPARTMENT EXCEPT SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO", "answer": "Find the name of the department that has no students minored in?\nAdditional table information: table: college_3"} +{"question": "SELECT role_description FROM ROLES WHERE role_code = (SELECT role_code FROM users WHERE user_login = 1 GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "What is the description of the most popular role among users that have logged in?\nAdditional table information: table: document_management"} +{"question": "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", "answer": "What is the placement date of the order whose invoice number is 10?\nAdditional table information: table: tracking_orders"} +{"question": "SELECT mascot FROM school WHERE enrollment > (SELECT AVG(enrollment) FROM school)", "answer": "What are the mascots for schools with enrollments above the average?\nAdditional table information: table: school_finance"} +{"question": "SELECT individual_first_name, individual_middle_name, individual_last_name FROM individuals ORDER BY individual_last_name NULLS FIRST", "answer": "List every individual's first name, middle name and last name in alphabetical order by last name.\nAdditional table information: table: e_government"} +{"question": "SELECT title, YEAR, director FROM movie ORDER BY budget_million NULLS FIRST", "answer": "What are the titles, years, and directors of all movies, ordered by budget in millions?\nAdditional table information: table: culture_company"} +{"question": "SELECT T1.engineer_id, T1.first_name, T1.last_name FROM Maintenance_Engineers AS T1, Engineer_Visits AS T2 GROUP BY T1.engineer_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which engineer has visited the most times? Show the engineer id, first name and last name.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT service_name FROM services ORDER BY service_name NULLS FIRST", "answer": "Give me a list of all the service names sorted alphabetically.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID = T2.nurse", "answer": "Find the names of nurses who are on call.\nAdditional table information: table: hospital_1"} +{"question": "SELECT COUNT(*) FROM store", "answer": "Count the number of stores.\nAdditional table information: table: sakila_1"} +{"question": "SELECT company FROM customers WHERE first_name = 'Eduardo' AND last_name = 'Martins'", "answer": "Eduardo Martins is a customer at which company?\nAdditional table information: table: store_1"} +{"question": "SELECT MAX(Transit_Passengers), MIN(Transit_Passengers) FROM airport", "answer": "What is the maximum and mininum number of transit passengers for all airports?\nAdditional table information: table: aircraft"} +{"question": "SELECT T1.organisation_type, T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the organisation type and id of the organisation which has the most number of research staff?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT DISTINCT name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE ratingDate = 'null'", "answer": "Find the names of all reviewers who have ratings with a NULL value for the date.\nAdditional table information: table: movie_1"} +{"question": "SELECT COUNT(DISTINCT class_section) FROM CLASS WHERE crs_code = 'ACCT-211'", "answer": "How many sections does course ACCT-211 has?\nAdditional table information: table: college_1"} +{"question": "SELECT country FROM competition WHERE competition_type = 'Tournament' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1", "answer": "what is the name of the country that participated in the most tournament competitions?\nAdditional table information: table: sports_competition"} +{"question": "SELECT DISTINCT District FROM election", "answer": "Show all the distinct districts for elections.\nAdditional table information: table: election"} +{"question": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT AVG(balance) FROM checking) INTERSECT SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM savings)", "answer": "What are the names of accounts with checking balances greater than the average checking balance and savings balances below the average savings balance?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT COUNT(DISTINCT payment_method_code) FROM parties", "answer": "How many distinct payment methods are used by parties?\nAdditional table information: table: e_government"} +{"question": "SELECT COUNT(DISTINCT complaint_type_code) FROM complaints", "answer": "Count the number of different complaint type codes.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT SUM(Rating_in_percent), OWNER FROM channel GROUP BY OWNER", "answer": "What is the total rating of channel for each channel owner?\nAdditional table information: table: program_share"} +{"question": "SELECT T3.forename, T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Australian Grand Prix' EXCEPT SELECT T3.forename, T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Chinese Grand Prix'", "answer": "What are the first and last names of all drivers who participated in the Australian Grand Prix but not the Chinese Grand Prix?\nAdditional table information: table: formula_1"} +{"question": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY SUM(T2.amount) NULLS FIRST", "answer": "List the name of all different customers who have some loan sorted by their total loan amount.\nAdditional table information: table: loan_1"} +{"question": "SELECT grade, COUNT(DISTINCT classroom), COUNT(*) FROM list GROUP BY grade", "answer": "For each grade, return the grade number, the number of classrooms used for the grade, and the total number of students enrolled in the grade.\nAdditional table information: table: student_1"} +{"question": "SELECT COUNT(*) FROM Faculty", "answer": "What is the total number of faculty members?\nAdditional table information: table: activity_1"} +{"question": "SELECT COUNT(DISTINCT claim_outcome_code) FROM claims_processing", "answer": "How many distinct claim outcome codes are there?\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT LName FROM STUDENT WHERE Sex = 'F' ORDER BY Age DESC", "answer": "What are the last names of female students, ordered by age descending?\nAdditional table information: table: college_3"} +{"question": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'male' AND T1.job = 'doctor'", "answer": "Find the male friend of Alice whose job is a doctor?\nAdditional table information: table: network_2"} +{"question": "SELECT Carrier FROM device WHERE NOT Device_ID IN (SELECT Device_ID FROM stock)", "answer": "List the carriers of devices that have no devices in stock.\nAdditional table information: table: device"} +{"question": "SELECT lot_details, investor_id FROM LOTS", "answer": "Return the lot details and investor ids.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT COUNT(DISTINCT Country) FROM climber", "answer": "Count the number of different countries that climbers are from.\nAdditional table information: table: climbing"} +{"question": "SELECT COUNT(DISTINCT POSITION) FROM player", "answer": "how many different positions are there?\nAdditional table information: table: sports_competition"} +{"question": "SELECT DISTINCT Visit_Date FROM VISITS", "answer": "What are the distinct visit dates?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT Census_Ranking FROM city WHERE Status <> 'Village'", "answer": "What are the census rankings of cities that do not have the status 'Village'?\nAdditional table information: table: farm"} +{"question": "SELECT Date FROM game ORDER BY home_team DESC", "answer": "List the dates of games by the home team name in descending order.\nAdditional table information: table: game_injury"} +{"question": "SELECT COUNT(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night'", "answer": "How many distinct programs are broadcast at 'Night' time?\nAdditional table information: table: program_share"} +{"question": "SELECT test_result, COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC", "answer": "List each test result and its count in descending order of count.\nAdditional table information: table: e_learning"} +{"question": "SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly'", "answer": "Find the countries that have never participated in any competition with Friendly type.\nAdditional table information: table: sports_competition"} +{"question": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported > (SELECT MAX(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = 'Rylan' AND T4.staff_last_name = 'Homenick')", "answer": "What are the ids of the problems reported after the date of any problems reported by Rylan Homenick?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT T2.organisation_id, T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING SUM(T1.grant_amount) > 6000", "answer": "Find the organisation ids and details of the organisations which are involved in\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING AVG(product_price) > (SELECT AVG(product_price) FROM products)", "answer": "What is the code of the product type with an average price higher than the average price of all products?\nAdditional table information: table: department_store"} +{"question": "SELECT Advisor, COUNT(*) FROM STUDENT GROUP BY Advisor", "answer": "How many students does each advisor have?\nAdditional table information: table: voter_2"} +{"question": "SELECT SUM(revenue), founder FROM manufacturers GROUP BY founder", "answer": "Find the total revenue of companies of each founder.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Pending' ORDER BY T2.customer_id NULLS FIRST", "answer": "What are the distinct names of customers with an order status of Pending, sorted by customer id?\nAdditional table information: table: department_store"} +{"question": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id", "answer": "Find the names of users who do not have a first notification of loss record.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT DISTINCT product_details FROM products", "answer": "Return the the details of all products.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id = T4.course_id WHERE T3.title = 'International Finance')", "answer": "Find the name of students who have taken the prerequisite course of the course with title International Finance.\nAdditional table information: table: college_2"} +{"question": "SELECT name, trade_name FROM medicine WHERE FDA_approved = 'Yes'", "answer": "What are the names and trade names of the medcines that are FDA approved?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT circuitid, LOCATION FROM circuits WHERE country = 'France' OR country = 'Belgium'", "answer": "What are the ids and locations of all circuits in France or Belgium?\nAdditional table information: table: formula_1"} +{"question": "SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Accounts)", "answer": "How many customers don't have an account?\nAdditional table information: table: customers_and_invoices"} +{"question": "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", "answer": "Return the name of the organization which has the most contact individuals.\nAdditional table information: table: e_government"} +{"question": "SELECT Occupation, COUNT(*) FROM player GROUP BY Occupation", "answer": "Show different occupations along with the number of players in each occupation.\nAdditional table information: table: riding_club"} +{"question": "SELECT T1.dorm_name, T1.student_capacity FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid GROUP BY T2.dormid ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Find the name and capacity of the dorm with least number of amenities.\nAdditional table information: table: dorm_1"} +{"question": "SELECT age FROM Person WHERE job = 'doctor' AND name = 'Zach'", "answer": "What is the age of the doctor named Zach?\nAdditional table information: table: network_2"} +{"question": "SELECT minister FROM party WHERE took_office > 1961 OR took_office < 1959", "answer": "Show the minister who took office after 1961 or before 1959.\nAdditional table information: table: party_people"} +{"question": "SELECT T1.CName FROM COURSE AS T1 JOIN ENROLLED_IN AS T2 ON T1.CID = T2.CID GROUP BY T2.CID HAVING COUNT(*) >= 5", "answer": "What are the name of courses that have at least five enrollments?\nAdditional table information: table: college_3"} +{"question": "SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = 'Shanghai'", "answer": "What is the temperature of 'Shanghai' city in January?\nAdditional table information: table: city_record"} +{"question": "SELECT Stories FROM buildings ORDER BY Height DESC LIMIT 1", "answer": "Find the stories of the building with the largest height.\nAdditional table information: table: company_office"} +{"question": "SELECT COUNT(*) FROM Student WHERE age = 18", "answer": "How many students are age 18?\nAdditional table information: table: allergy_1"} +{"question": "SELECT COUNT(*) FROM Reviewer", "answer": "How many reviewers listed?\nAdditional table information: table: movie_1"} +{"question": "SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121", "answer": "Find the id of courses which are registered or attended by student whose id is 121?\nAdditional table information: table: student_assessment"} +{"question": "SELECT T1.organisation_id, T1.organisation_type, T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the ids, types, and details of the organization with the most research staff?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common competition type?\nAdditional table information: table: sports_competition"} +{"question": "SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Latin' OR T1.Name = 'Pop'", "answer": "What is the average duration in milliseconds of tracks that belong to Latin or Pop genre?\nAdditional table information: table: chinook_1"} +{"question": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'International Finance')", "answer": "What is the title of the prerequisite class of International Finance course?\nAdditional table information: table: college_2"} +{"question": "SELECT semester, YEAR FROM SECTION GROUP BY semester, YEAR ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the year and semester with the most courses?\nAdditional table information: table: college_2"} +{"question": "SELECT city FROM airports GROUP BY city HAVING COUNT(*) = 2", "answer": "Find the cities which have exactly two airports.\nAdditional table information: table: flight_4"} +{"question": "SELECT DISTINCT Registration_Date, Election_Cycle FROM VOTING_RECORD", "answer": "What are the distinct registration dates and the election cycles?\nAdditional table information: table: voter_2"} +{"question": "SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Aerosmith'", "answer": "What are the titles of all the Aerosmith albums?\nAdditional table information: table: store_1"} +{"question": "SELECT name FROM browser ORDER BY market_share DESC", "answer": "List the name of browsers in descending order by market share.\nAdditional table information: table: browser_web"} +{"question": "SELECT t1.customer_name, t2.active_from_date FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t2.channel_code = 'Email'", "answer": "What are the name and active date of the customers whose contact channel code is email?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1", "answer": "What is the famous release date of the artist with the oldest age?\nAdditional table information: table: music_4"} +{"question": "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", "answer": "Show the school name and driver name for all school buses.\nAdditional table information: table: school_bus"} +{"question": "SELECT DISTINCT Director FROM film", "answer": "List the distinct director of all films.\nAdditional table information: table: film_rank"} +{"question": "SELECT name FROM student WHERE NOT id IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.dept_name = 'Biology')", "answer": "What are the names of students who haven't taken any Biology courses?\nAdditional table information: table: college_2"} +{"question": "SELECT T1.problem_description FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Christop'", "answer": "Which problems are reported by the staff with first name 'Christop'? Show the descriptions of the problems.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT name FROM instructor WHERE NOT id IN (SELECT id FROM teaches WHERE semester = 'Spring')", "answer": "What are the names of instructors who didn't teach courses in the Spring?\nAdditional table information: table: college_2"} +{"question": "SELECT name, LOCATION FROM cinema ORDER BY capacity DESC LIMIT 1", "answer": "What are the name and location of the cinema with the largest capacity?\nAdditional table information: table: cinema"} +{"question": "SELECT founder FROM manufacturers WHERE name = 'Sony'", "answer": "Who is the founder of Sony?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT COUNT(*), T1.dormid FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid WHERE T1.student_capacity > 100 GROUP BY T1.dormid", "answer": "Find the number of amenities for each of the dorms that can accommodate more than 100 students.\nAdditional table information: table: dorm_1"} +{"question": "SELECT advisor FROM Student GROUP BY advisor ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Give the advisor with the most students.\nAdditional table information: table: allergy_1"} +{"question": "SELECT Nationality, COUNT(*) FROM journalist GROUP BY Nationality", "answer": "Show the different nationalities and the number of journalists of each nationality.\nAdditional table information: table: news_report"} +{"question": "SELECT T2.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance NULLS FIRST LIMIT 1", "answer": "What is the name and checking balance of the account which has the lowest savings balance?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT clublocation FROM club WHERE clubname = 'Tennis Club'", "answer": "What is the location of the club named 'Tennis Club'?\nAdditional table information: table: club_1"} +{"question": "SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Ryley Goldner'", "answer": "Show the positions of the players from the team with name 'Ryley Goldner'.\nAdditional table information: table: match_season"} +{"question": "SELECT name, trade_name FROM medicine WHERE FDA_approved = 'Yes'", "answer": "What are the names and trade names of the medicines which has 'Yes' value in the FDA record?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT T2.title, AVG(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY AVG(T1.stars) DESC LIMIT 1", "answer": "What are the movie titles with the highest average rating and what are those ratings?\nAdditional table information: table: movie_1"} +{"question": "SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore'", "answer": "What is the average age of the members of the club 'Bootup Baltimore'?\nAdditional table information: table: club_1"} +{"question": "SELECT Nationality FROM pilot GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common nationality of pilots.\nAdditional table information: table: pilot_record"} +{"question": "SELECT T3.Name FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID WHERE T2.Num_of_shops > 50", "answer": "Show the names of phones that are on market with number of shops greater than 50.\nAdditional table information: table: phone_market"} +{"question": "SELECT AVG(access_count) FROM documents", "answer": "What is the average access count of documents?\nAdditional table information: table: document_management"} +{"question": "SELECT T1.Name, T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING COUNT(*) <= 1", "answer": "Show the names and ids of tourist attractions that are visited at most once.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = 'Katsuhiro' AND t1.lname = 'Ueno'", "answer": "Which institution does 'Katsuhiro Ueno' belong to?\nAdditional table information: table: icfp_1"} +{"question": "SELECT name FROM manufacturers WHERE revenue > (SELECT AVG(revenue) FROM manufacturers)", "answer": "Find the name of companies whose revenue is greater than the average revenue of all companies.\nAdditional table information: table: manufactory_1"} +{"question": "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)", "answer": "Find the names of scientists who are not working on the project with the highest hours.\nAdditional table information: table: scientist_1"} +{"question": "SELECT T2.product_name FROM problems AS T1, product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = 'Lacey' AND T3.staff_last_name = 'Bosco' INTERSECT SELECT T2.product_name FROM problems AS T1, product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = 'Kenton' AND T3.staff_last_name = 'Champlin'", "answer": "Find the products which have problems reported by both Lacey Bosco and Kenton Champlin?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT DISTINCT Name FROM WINE ORDER BY Name NULLS FIRST", "answer": "What are the names of wines, sorted in alphabetical order?\nAdditional table information: table: wine_1"} +{"question": "SELECT T1.Name FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId GROUP BY T2.GenreId ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the most common genre in all tracks?\nAdditional table information: table: chinook_1"} +{"question": "SELECT fname, lname FROM student WHERE major <> (SELECT major FROM student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "Find the first and last name of students who are not in the largest major.\nAdditional table information: table: dorm_1"} +{"question": "SELECT name FROM airport WHERE name LIKE '%international%'", "answer": "Which of the airport names contains the word 'international'?\nAdditional table information: table: flight_company"} +{"question": "SELECT AVG(T2.Weeks_on_Top) FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 25", "answer": "What is the average weeks on top of volumes associated with the artist aged 25 or younger?\nAdditional table information: table: music_4"} +{"question": "SELECT Order_Date FROM BOOKINGS", "answer": "What is the order date of each booking?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT DISTINCT building_description FROM Apartment_Buildings", "answer": "Give me a list of all the distinct building descriptions.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT MAX(authorder) FROM authorship)", "answer": "Which paper has the most authors? Give me the paper title.\nAdditional table information: table: icfp_1"} +{"question": "SELECT name FROM physician WHERE POSITION LIKE '%senior%'", "answer": "What are the names of the physicians who have 'senior' in their titles.\nAdditional table information: table: hospital_1"} +{"question": "SELECT nurse FROM on_call WHERE blockfloor = 1 AND blockcode = 1", "answer": "Find the ids of the nurses who are on call in block floor 1 and block code 1.\nAdditional table information: table: hospital_1"} +{"question": "SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE '4:%' UNION SELECT song_name FROM song WHERE languages = 'english'", "answer": "List the names of all songs that have 4 minute duration or are in English.\nAdditional table information: table: music_1"} +{"question": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Olin' AND t1.lname = 'Shivers'", "answer": "Which papers did the author 'Olin Shivers' write? Give me the paper titles.\nAdditional table information: table: icfp_1"} +{"question": "SELECT COUNT(DISTINCT bike_id) FROM trip", "answer": "How many different bike ids are there?\nAdditional table information: table: bike_1"} +{"question": "SELECT zip_code FROM weather GROUP BY zip_code HAVING AVG(mean_humidity) < 70 INTERSECT SELECT zip_code FROM trip GROUP BY zip_code HAVING COUNT(*) >= 100", "answer": "Give me the zip code where the average mean humidity is below 70 and at least 100 trips took place.\nAdditional table information: table: bike_1"} +{"question": "SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Confirmed'", "answer": "Which apartments have bookings with status code 'Confirmed'? Return their apartment numbers.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT COUNT(*) FROM COURSE", "answer": "How many courses are there in total?\nAdditional table information: table: college_3"} +{"question": "SELECT Fname, Lname FROM FACULTY WHERE sex = 'M' AND Building = 'NEB'", "answer": "What are the full names of faculties with sex M and who live in building NEB?\nAdditional table information: table: college_3"} +{"question": "SELECT billing_country, AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10", "answer": "What are the names of the countries and average invoice size of the top countries by size?\nAdditional table information: table: store_1"} +{"question": "SELECT Stuid, SUM(hours_played) FROM Plays_games GROUP BY Stuid", "answer": "What are the ids of all students and number of hours played?\nAdditional table information: table: game_1"} +{"question": "SELECT AVG(height), AVG(weight) FROM people WHERE sex = 'M'", "answer": "What are the average height and weight across males (sex is M)?\nAdditional table information: table: candidate_poll"} +{"question": "SELECT institution, LOCATION FROM institution WHERE founded > 1990 AND TYPE = 'Private'", "answer": "Show the names and locations of institutions that are founded after 1990 and have the type 'Private'.\nAdditional table information: table: protein_institute"} +{"question": "SELECT song_name FROM song WHERE languages = 'english'", "answer": "Find the names of all English songs.\nAdditional table information: table: music_1"} +{"question": "SELECT T1.name FROM student AS T1 JOIN advisor AS T2 ON T1.id = T2.s_id GROUP BY T2.s_id HAVING COUNT(*) > 1", "answer": "Find the name of the students who have more than one advisor?\nAdditional table information: table: college_2"} +{"question": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = 'USA' AND t2.authorder = 2 AND t1.lname = 'Turon'", "answer": "Find papers whose second author has last name 'Turon' and is affiliated with an institution in the country 'USA'.\nAdditional table information: table: icfp_1"} +{"question": "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", "answer": "What are the ids and names of the architects who built at least 3 bridges ?\nAdditional table information: table: architecture"} +{"question": "SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1", "answer": "Find the name of the room with the maximum occupancy.\nAdditional table information: table: inn_1"} +{"question": "SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Jazz'", "answer": "What is the average unit price of tracks that belong to Jazz genre?\nAdditional table information: table: chinook_1"} +{"question": "SELECT T1.teacher_id, T2.first_name FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id GROUP BY T1.teacher_id ORDER BY COUNT(*) DESC LIMIT 3", "answer": "Find the ids and first names of the 3 teachers that have the most number of assessment notes?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT Team, Starting_Year FROM technician", "answer": "What is the team and starting year for each technician?\nAdditional table information: table: machine_repair"} +{"question": "SELECT Official_native_language FROM country WHERE Official_native_language LIKE '%English%'", "answer": "Show all official native languages that contain the word 'English'.\nAdditional table information: table: match_season"} +{"question": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating > (SELECT AVG(rating) FROM review)", "answer": "Find the titles of items whose rating is higher than the average review rating of all items.\nAdditional table information: table: epinions_1"} +{"question": "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%'", "answer": "Give the ids of documents that have expenses and contain the letter s in their names.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT product_id, product_type_code FROM products ORDER BY product_price NULLS FIRST LIMIT 1", "answer": "Give the id and product type of the product with the lowest price.\nAdditional table information: table: department_store"} +{"question": "SELECT MAX(T1.HS), pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos", "answer": "For each position, what is the maximum number of hours for students who spent more than 1000 hours training?\nAdditional table information: table: soccer_2"} +{"question": "SELECT StuID FROM Student WHERE age > 20", "answer": "What are the student ids for students over 20 years old?\nAdditional table information: table: allergy_1"} +{"question": "SELECT name, city, country, elevation FROM airports WHERE city = 'New York'", "answer": "What is the name, city, country, and elevation for every airport in the city of New York?\nAdditional table information: table: flight_4"} +{"question": "SELECT project_id, COUNT(*) FROM Documents GROUP BY project_id", "answer": "How many documents correspond with each project id?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT COUNT(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE T1.EMP_LNAME = 'Graztevski'", "answer": "How many classes does the professor whose last name is Graztevski teach?\nAdditional table information: table: college_1"} +{"question": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_last_name = 'Bosco'", "answer": "Find the ids of the problems that are reported by the staff whose last name is Bosco.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT T1.stu_fname, T1.stu_lname, T4.crs_description FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code", "answer": "What are the names of all students who took a class and the corresponding course descriptions?\nAdditional table information: table: college_1"} +{"question": "SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50", "answer": "Show times of elimination of wrestlers with days held more than 50.\nAdditional table information: table: wrestler"} +{"question": "SELECT formats FROM files GROUP BY formats ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the file format that is used by the most files.\nAdditional table information: table: music_1"} +{"question": "SELECT AVG(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = 'SALE'", "answer": "Show the average amount of transactions with type code 'SALE'.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT COUNT(*), gender FROM Person WHERE age < 40 GROUP BY gender", "answer": "How many people are under 40 for each gender?\nAdditional table information: table: network_2"} +{"question": "SELECT T1.claim_id, T1.date_claim_made, T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.claim_id HAVING COUNT(*) = 1", "answer": "Which claims had exactly one settlement? For each, tell me the the date the claim was made, the date it was settled and the amount settled.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT DISTINCT classroom, grade FROM list", "answer": "What are the grade number and classroom number of each class in the list?\nAdditional table information: table: student_1"} +{"question": "SELECT T1.name, AVG(T2.rating) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id", "answer": "For each user, return the name and the average rating of reviews given by them.\nAdditional table information: table: epinions_1"} +{"question": "SELECT COUNT(*) FROM Video_games WHERE gtype = 'Massively multiplayer online game'", "answer": "How many video games have type Massively multiplayer online game?\nAdditional table information: table: game_1"} +{"question": "SELECT price_range FROM HOTELS", "answer": "What are the price ranges of hotels?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T2.Lname FROM DEPARTMENT AS T1 JOIN FACULTY AS T2 ON T1.DNO = T3.DNO JOIN MEMBER_OF AS T3 ON T2.FacID = T3.FacID WHERE T1.DName = 'Computer Science'", "answer": "What are the last names of faculty who are part of the computer science department?\nAdditional table information: table: college_3"} +{"question": "SELECT COUNT(*) FROM candidate", "answer": "Count the number of candidates.\nAdditional table information: table: candidate_poll"} +{"question": "SELECT COUNT(*) FROM school", "answer": "How many schools are there?\nAdditional table information: table: school_player"} +{"question": "SELECT council_tax_id, cmi_cross_ref_id FROM parking_fines", "answer": "List the council tax ids and their related cmi cross references of all the parking fines.\nAdditional table information: table: local_govt_mdm"} +{"question": "SELECT T2.team_id, T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id ORDER BY AVG(T1.attendance) DESC LIMIT 1", "answer": "In 2014, what are the id and rank of the team that has the largest average number of attendance?\nAdditional table information: table: baseball_1"} +{"question": "SELECT title FROM Movie WHERE NOT mID IN (SELECT mID FROM Rating)", "answer": "What are the titles of all movies that have not been rated?\nAdditional table information: table: movie_1"} +{"question": "SELECT T2.Name, T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'White'", "answer": "Give the names and scores of wines made from white grapes.\nAdditional table information: table: wine_1"} +{"question": "SELECT COUNT(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city <> 'San Francisco'", "answer": "Count the number of trips that did not end in San Francisco city.\nAdditional table information: table: bike_1"} +{"question": "SELECT T2.customer_last_name, T1.customer_id, T2.phone_number FROM Orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the last name, id and phone number of the customer who has made the greatest number of orders.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT COUNT(*) FROM race", "answer": "How many races are there?\nAdditional table information: table: race_track"} +{"question": "SELECT name FROM track WHERE NOT track_id IN (SELECT track_id FROM race)", "answer": "Show all track names that have had no races.\nAdditional table information: table: race_track"} +{"question": "SELECT school, nickname FROM university ORDER BY founded NULLS FIRST", "answer": "List all schools and their nicknames in the order of founded year.\nAdditional table information: table: university_basketball"} +{"question": "SELECT COUNT(*) FROM BOOKINGS", "answer": "How many bookings do we have?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT AVG(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University'", "answer": "Find the average height of the players who belong to the college called 'Yale University'.\nAdditional table information: table: baseball_1"} +{"question": "SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION <> 'East'", "answer": "List the distinct police forces of counties whose location is not on east side.\nAdditional table information: table: county_public_safety"} +{"question": "SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Christop' AND T2.staff_last_name = 'Berge' INTERSECT SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.closure_authorised_by_staff_id = T2.staff_id WHERE T2.staff_first_name = 'Ashley' AND T2.staff_last_name = 'Medhurst'", "answer": "For which product was there a problem reported by Christop Berge, with closure authorised by Ashley Medhurst? Return the product ids.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = 'Heilo'", "answer": "Find all the instruments ever used by the musician with last name 'Heilo'?\nAdditional table information: table: music_2"} +{"question": "SELECT COUNT(DISTINCT allergytype) FROM Allergy_type", "answer": "How many different allergy types exist?\nAdditional table information: table: allergy_1"} +{"question": "SELECT COUNT(*) FROM Accounts", "answer": "Show the number of accounts.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT T1.staff_name, T3.first_name, T3.last_name FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id JOIN Maintenance_Engineers AS T3 ON T2.engineer_id = T3.engineer_id", "answer": "Which staff have contacted which engineers? List the staff name and the engineer first name and last name.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT COUNT(*) FROM club", "answer": "What is the total number of clubs?\nAdditional table information: table: sports_competition"} +{"question": "SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct <> 'null' OR department_id <> 40", "answer": "display all the information of employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40.\nAdditional table information: table: hr_1"} +{"question": "SELECT COUNT(DISTINCT Industry) FROM Companies", "answer": "Count the number of distinct company industries.\nAdditional table information: table: company_office"} +{"question": "SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination", "answer": "For each denomination, return the denomination and the count of schools with that denomination.\nAdditional table information: table: school_player"} +{"question": "SELECT COUNT(DISTINCT region_id) FROM affected_region", "answer": "How many regions are affected?\nAdditional table information: table: storm_record"} +{"question": "SELECT DISTINCT transaction_type FROM Financial_Transactions", "answer": "Show all transaction types.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT Allergy, COUNT(*) FROM Has_allergy GROUP BY Allergy", "answer": "Show all allergies with number of students affected.\nAdditional table information: table: allergy_1"} +{"question": "SELECT email_address, date_of_birth FROM Customers WHERE first_name = 'Carole'", "answer": "What are the email addresses and date of births for all customers who have a first name of Carole?\nAdditional table information: table: driving_school"} +{"question": "SELECT COUNT(*) FROM Songs", "answer": "How many songs are there?\nAdditional table information: table: music_2"} +{"question": "SELECT COUNT(*), account_id FROM Financial_transactions", "answer": "Count the number of financial transactions that correspond to each account id.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT T1.State_County FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Marketing_Region_Code = 'CA'", "answer": "Find the states or counties where the stores with marketing region code 'CA' are located.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT id FROM trip WHERE duration >= (SELECT AVG(duration) FROM trip WHERE zip_code = 94103)", "answer": "What are the ids of all trips that had a duration as long as the average trip duration in the zip code 94103?\nAdditional table information: table: bike_1"} +{"question": "SELECT Accreditation_type, COUNT(*) FROM phone GROUP BY Accreditation_type", "answer": "Find the number of phones for each accreditation type.\nAdditional table information: table: phone_1"} +{"question": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID WHERE T2.Name = 'The Phantom of the Opera'", "answer": "What are the names of actors who have been in the musical titled The Phantom of the Opera?\nAdditional table information: table: musical"} +{"question": "SELECT id FROM trip ORDER BY duration NULLS FIRST LIMIT 1", "answer": "What is the id of the trip that has the shortest duration?\nAdditional table information: table: bike_1"} +{"question": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = 'Rock' AND T3.name = 'MPEG audio file'", "answer": "List the name of tracks belongs to genre Rock and whose media type is MPEG audio file.\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid')", "answer": "How many schools have students playing in goalie and mid-field positions?\nAdditional table information: table: soccer_2"} +{"question": "SELECT AVG(hours) FROM projects", "answer": "Find the average hours of all projects.\nAdditional table information: table: scientist_1"} +{"question": "SELECT T1.first_name, T1.last_name, SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY SUM(T2.total) DESC LIMIT 10", "answer": "What are the top 10 customers' first and last names with the highest gross sales, and also what are the sales?\nAdditional table information: table: store_1"} +{"question": "SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200", "answer": "What are the countries that have both mountains that are higher than 5600 and lower than 5200?\nAdditional table information: table: climbing"} +{"question": "SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = 'Pass'", "answer": "What are the enrollment dates of all the tests that have result 'Pass'?\nAdditional table information: table: e_learning"} +{"question": "SELECT name FROM Person ORDER BY age DESC", "answer": "Find the names of all person sorted in the descending order using age.\nAdditional table information: table: network_2"} +{"question": "SELECT COUNT(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id JOIN building AS T3 ON T3.building_id = T1.building_id WHERE T3.floors >= 20", "answer": "How many proteins are associated with an institution in a building with at least 20 floors?\nAdditional table information: table: protein_institute"} +{"question": "SELECT COUNT(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = 'Billy Cobham'", "answer": "How many albums does Billy Cobham has?\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(*) FROM chip_model WHERE wifi = 'No'", "answer": "Count the number of chip model that do not have wifi.\nAdditional table information: table: phone_1"} +{"question": "SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1", "answer": "Find the name of the most expensive hardware product.\nAdditional table information: table: department_store"} +{"question": "SELECT COUNT(DISTINCT state) FROM bank", "answer": "In how many different states are banks located?\nAdditional table information: table: loan_1"} +{"question": "SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = 'Heilo' AND T3.title = 'Le Pop'", "answer": "What instruments did the musician with the last name 'Heilo' play in the song 'Le Pop'?\nAdditional table information: table: music_2"} +{"question": "SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name", "answer": "What are the average prices of products, grouped by manufacturer name?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_date < '2018-03-17 07:13:53'", "answer": "Find the total amount of products ordered before 2018-03-17 07:13:53.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT SUM(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = 'San Jose State University'", "answer": "How many undergraduates are there at San Jose State\nAdditional table information: table: csu_1"} +{"question": "SELECT DISTINCT label FROM Albums", "answer": "What are all the labels?\nAdditional table information: table: music_2"} +{"question": "SELECT StuID FROM Student WHERE age = (SELECT MAX(age) FROM Student)", "answer": "Show the student id of the oldest student.\nAdditional table information: table: allergy_1"} +{"question": "SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC", "answer": "Show the ages of gymnasts in descending order of total points.\nAdditional table information: table: gymnast"} +{"question": "SELECT T2.first_name, T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id", "answer": "what are the first name and last name of all candidates?\nAdditional table information: table: student_assessment"} +{"question": "SELECT T1.id, T1.Name, T1.FDA_approved FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC", "answer": "What are the ids, names and FDA approval status of medicines in descending order of the number of enzymes that it can interact with.\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT T1.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name HAVING COUNT(*) > 1", "answer": "Show the names of countries that have more than one roller coaster.\nAdditional table information: table: roller_coaster"} +{"question": "SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name = 'China'", "answer": "What is the description of the marketing region China?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT DISTINCT LOCATION FROM cinema", "answer": "What are all the locations with a cinema?\nAdditional table information: table: cinema"} +{"question": "SELECT T1.Name, T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID", "answer": "Show names of actors and names of musicals they are in.\nAdditional table information: table: musical"} +{"question": "SELECT MAX(Weeks_on_Top), MIN(Weeks_on_Top) FROM volume", "answer": "What are the maximum and minimum week on top of all volumes?\nAdditional table information: table: music_4"} +{"question": "SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = 'Editor'", "answer": "Show the names of employees with role name Editor.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT Name FROM actor ORDER BY Name ASC NULLS FIRST", "answer": "What are the names of actors, ordered alphabetically?\nAdditional table information: table: musical"} +{"question": "SELECT T1.asset_id, T1.asset_details FROM Assets AS T1 JOIN Asset_Parts AS T2 ON T1.asset_id = T2.asset_id GROUP BY T1.asset_id HAVING COUNT(*) = 2 INTERSECT SELECT T1.asset_id, T1.asset_details FROM Assets AS T1 JOIN Fault_Log AS T2 ON T1.asset_id = T2.asset_id GROUP BY T1.asset_id HAVING COUNT(*) < 2", "answer": "Which assets have 2 parts and have less than 2 fault logs? List the asset id and detail.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT DISTINCT T2.source_system_code FROM customer_master_index AS T1 JOIN cmi_cross_references AS T2 ON T1.master_customer_id = T2.master_customer_id WHERE T1.cmi_details = 'Gottlieb , Becker and Wyman'", "answer": "What are the distinct cross reference source system codes which are related to the master customer details 'Gottlieb, Becker and Wyman'?\nAdditional table information: table: local_govt_mdm"} +{"question": "SELECT COUNT(*) FROM driver WHERE home_city = 'Hartford' OR age < 40", "answer": "How many drivers are from Hartford city or younger than 40?\nAdditional table information: table: school_bus"} +{"question": "SELECT theme, YEAR FROM exhibition WHERE ticket_price < 15", "answer": "Show theme and year for all exhibitions with ticket prices lower than 15.\nAdditional table information: table: theme_gallery"} +{"question": "SELECT T1.organisation_type, T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the type and id of the organization that has the most research staff?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT COUNT(*) FROM employees WHERE country = 'Canada'", "answer": "How many employees are living in Canada?\nAdditional table information: table: store_1"} +{"question": "SELECT date, max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f NULLS FIRST LIMIT 1", "answer": "What are the days that had the smallest temperature range, and what was that range?\nAdditional table information: table: bike_1"} +{"question": "SELECT name FROM useracct WHERE NOT u_id IN (SELECT u_id FROM review)", "answer": "Find the names of users who did not leave any review.\nAdditional table information: table: epinions_1"} +{"question": "SELECT AVG(Price), YEAR FROM WINE GROUP BY YEAR", "answer": "What is the average prices of wines for each each?\nAdditional table information: table: wine_1"} +{"question": "SELECT t1.attribute_name, t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 0", "answer": "Find the name and attribute ID of the attribute definitions with attribute value 0.\nAdditional table information: table: product_catalog"} +{"question": "SELECT first_name, last_name FROM employees WHERE department_id = 70 OR department_id = 90", "answer": "What are the first and last name for those employees who works either in department 70 or 90?\nAdditional table information: table: hr_1"} +{"question": "SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Return the id of the department with the fewest staff assignments.\nAdditional table information: table: department_store"} +{"question": "SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the code of the location with the largest number of documents.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T2.balance, T3.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance DESC", "answer": "What are the names, checking balances, and savings balances of customers, ordered by the total of checking and savings balances descending?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What is the description of the color used by least products?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Ryley Goldner'", "answer": "Return the positions of players on the team Ryley Goldner.\nAdditional table information: table: match_season"} +{"question": "SELECT COUNT(DISTINCT id) FROM teaches", "answer": "Count the number of distinct instructors who have taught a course.\nAdditional table information: table: college_2"} +{"question": "SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common college of authors of submissions.\nAdditional table information: table: workshop_paper"} +{"question": "SELECT T1.Store_Phone, T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID", "answer": "What are the phones and emails of workshop groups in which services are performed?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT SUM(num_of_component) FROM furniture", "answer": "How many furniture components are there in total?\nAdditional table information: table: manufacturer"} +{"question": "SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000", "answer": "What are the types of the ships that have both shiips with tonnage more than 6000 and those with tonnage less than 4000?\nAdditional table information: table: ship_mission"} +{"question": "SELECT COUNT(DISTINCT Artist_ID) FROM volume", "answer": "How many distinct artists have volumes?\nAdditional table information: table: music_4"} +{"question": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance NULLS FIRST LIMIT 1", "answer": "What is the name corresponding to the accoung with the lowest sum of checking and savings balances?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1", "answer": "Find the GDP of the city with the largest regional population.\nAdditional table information: table: city_record"} +{"question": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.age < 18", "answer": "Count the number of members in club 'Bootup Baltimore' whose age is below 18.\nAdditional table information: table: club_1"} +{"question": "SELECT T2.Name, T2.age, T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID ORDER BY T3.Theme ASC NULLS FIRST", "answer": "Show the names and ages of editors and the theme of journals for which they serve on committees, in ascending alphabetical order of theme.\nAdditional table information: table: journal_committee"} +{"question": "SELECT name FROM church EXCEPT SELECT T1.name FROM church AS T1 JOIN wedding AS T2 ON T1.church_id = T2.church_id WHERE T2.year = 2015", "answer": "Show all church names except for those that had a wedding in year 2015.\nAdditional table information: table: wedding"} +{"question": "SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.FirstName = 'Astrid' AND LastName = 'Gruber'", "answer": "What are the invoice dates for customers with the first name Astrid and the last name Gruber?\nAdditional table information: table: chinook_1"} +{"question": "SELECT COUNT(*) FROM Documents WHERE NOT document_id IN (SELECT document_id FROM Documents_with_expenses)", "answer": "How many documents do not have any expense?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT COUNT(*) FROM customers WHERE city = 'Prague'", "answer": "How many customers live in the city of Prague?\nAdditional table information: table: store_1"} +{"question": "SELECT DISTINCT Name FROM WINE ORDER BY Name NULLS FIRST", "answer": "List the names of all distinct wines in alphabetical order.\nAdditional table information: table: wine_1"} +{"question": "SELECT DISTINCT region_name FROM region ORDER BY Label NULLS FIRST", "answer": "What are the different region names, ordered by labels?\nAdditional table information: table: party_people"} +{"question": "SELECT transaction_type, SUM(transaction_amount) FROM Financial_transactions GROUP BY transaction_type", "answer": "Show the transaction types and the total amount of transactions.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT SUM(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = 'San Francisco State University'", "answer": "What is the number of graduates in 'San Francisco State University' in year 2004?\nAdditional table information: table: csu_1"} +{"question": "SELECT Grape, Appelation, Name FROM WINE WHERE Score > 93 ORDER BY Name NULLS FIRST", "answer": "List the grape, appelation and name of wines whose score is higher than 93 ordered by Name.\nAdditional table information: table: wine_1"} +{"question": "SELECT T1.Order_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID JOIN Products AS T3 ON T2.Product_ID = T3.Product_ID WHERE T3.Product_price > 1000", "answer": "Find the order dates of the orders with price above 1000.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid WHERE T2.distance > 5000 GROUP BY T1.aid ORDER BY COUNT(*) >= 5 NULLS FIRST", "answer": "What is the name and distance of every aircraft that can cover a distance of more than 5000 and which at least 5 people can fly?\nAdditional table information: table: flight_1"} +{"question": "SELECT flno, origin, destination FROM Flight ORDER BY origin NULLS FIRST", "answer": "Show flight number, origin, destination of all flights in the alphabetical order of the departure cities.\nAdditional table information: table: flight_1"} +{"question": "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'", "answer": "What is the zip code of the hosue of the employee named Janessa Sawayn?\nAdditional table information: table: driving_school"} +{"question": "SELECT classroom, COUNT(*) FROM list WHERE grade = '0' GROUP BY classroom", "answer": "For each grade 0 classroom, return the classroom number and the count of students.\nAdditional table information: table: student_1"} +{"question": "SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Morning' INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Night'", "answer": "find the program owners that have some programs in both morning and night time.\nAdditional table information: table: program_share"} +{"question": "SELECT COUNT(*) FROM useracct", "answer": "How many users are there?\nAdditional table information: table: epinions_1"} +{"question": "SELECT AVG(T1.stars), T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT MIN(YEAR) FROM Movie)", "answer": "What is the average rating stars and title for the oldest movie?\nAdditional table information: table: movie_1"} +{"question": "SELECT T2.apt_number, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id", "answer": "What are the apartment number, start date, and end date of each apartment booking?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed", "answer": "What are the ids of all the employees who authorize document destruction?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT ResName, Rating FROM Restaurant ORDER BY Rating DESC LIMIT 1", "answer": "Which restaurants have highest rating? List the restaurant name and its rating.\nAdditional table information: table: restaurant_1"} +{"question": "SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There", "answer": "List all the possible ways to get to attractions, together with the number of attractions accessible by these methods.\nAdditional table information: table: cre_Theme_park"} +{"question": "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'", "answer": "Find the number of activities Mark Giuliano is involved in.\nAdditional table information: table: activity_1"} +{"question": "SELECT COUNT(*) FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq)", "answer": "Count the number of courses without prerequisites.\nAdditional table information: table: college_2"} +{"question": "SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'", "answer": "What are the instruments are used in the song 'Le Pop'?\nAdditional table information: table: music_2"} +{"question": "SELECT AVG(Price), AVG(Score), Appelation FROM WINE GROUP BY Appelation", "answer": "What are the average price and score of wines grouped by appelation?\nAdditional table information: table: wine_1"} +{"question": "SELECT AVG(num_employees) FROM department WHERE ranking BETWEEN 10 AND 15", "answer": "What is the average number of employees of the departments whose rank is between 10 and 15?\nAdditional table information: table: department_management"} +{"question": "SELECT COUNT(*) FROM customer WHERE active = '1'", "answer": "Count the number of customers who are active.\nAdditional table information: table: sakila_1"} +{"question": "SELECT COUNT(*) FROM club", "answer": "How many clubs are there?\nAdditional table information: table: club_1"} +{"question": "SELECT venue, name FROM event ORDER BY Event_Attendance DESC LIMIT 2", "answer": "List the event venues and names that have the top 2 most number of people attended.\nAdditional table information: table: news_report"} +{"question": "SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5", "answer": "Find the last names of the teachers that teach fifth grade.\nAdditional table information: table: student_1"} +{"question": "SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the position that is most common among players in match seasons?\nAdditional table information: table: match_season"} +{"question": "SELECT T1.Season, T1.Player, T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id", "answer": "Who are the different players, what season do they play in, and what is the name of the team they are on?\nAdditional table information: table: match_season"} +{"question": "SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2", "answer": "List the nations that have more than two ships.\nAdditional table information: table: ship_mission"} +{"question": "SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the location code with the most documents?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T1.name_first, T1.name_last, T1.player_id, COUNT(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which player has the most all star game experiences? Give me the first name, last name and id of the player, as well as the number of times the player participated in all star game.\nAdditional table information: table: baseball_1"} +{"question": "SELECT apt_type_code, COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC NULLS FIRST", "answer": "Show the apartment type codes and the corresponding number of apartments sorted by the number of apartments in ascending order.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT participant_type_code FROM participants GROUP BY participant_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common participant type?\nAdditional table information: table: local_govt_in_alabama"} +{"question": "SELECT name, LOCATION, seating FROM track ORDER BY year_opened DESC LIMIT 1", "answer": "What is the name, location and seating for the most recently opened track?\nAdditional table information: table: race_track"} +{"question": "SELECT founder FROM manufacturers WHERE name = 'Sony'", "answer": "Return the founder of Sony.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT Author, College FROM submission", "answer": "For each submission, show the author and their affiliated college.\nAdditional table information: table: workshop_paper"} +{"question": "SELECT Song FROM volume WHERE Weeks_on_Top > 1", "answer": "Give the songs included in volumes that have more than 1 week on top.\nAdditional table information: table: music_4"} +{"question": "SELECT T1.staff_name, T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1", "answer": "What is the name and job title of the staff who was assigned the latest?\nAdditional table information: table: department_store"} +{"question": "SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id JOIN products AS T3 ON T2.product_id = T3.product_id GROUP BY T3.product_id HAVING COUNT(DISTINCT T1.customer_id) >= 2", "answer": "What are the distinct names of products purchased by at least two different customers?\nAdditional table information: table: department_store"} +{"question": "SELECT * FROM customer_master_index ORDER BY cmi_details DESC", "answer": "List all information about customer master index, and sort them by details in descending order.\nAdditional table information: table: local_govt_mdm"} +{"question": "SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.source_u_id GROUP BY T2.source_u_id ORDER BY AVG(trust) DESC LIMIT 1", "answer": "Find the name of the source user with the highest average trust score.\nAdditional table information: table: epinions_1"} +{"question": "SELECT flno FROM Flight ORDER BY distance ASC NULLS FIRST LIMIT 3", "answer": "What are the numbers of the shortest flights?\nAdditional table information: table: flight_1"} +{"question": "SELECT employee_id, first_name, last_name, job_id FROM employees WHERE salary > (SELECT MAX(salary) FROM employees WHERE job_id = 'PU_MAN')", "answer": "display the employee number, name( first name and last name ) and job title for all employees whose salary is more than any salary of those employees whose job title is PU_MAN.\nAdditional table information: table: hr_1"} +{"question": "SELECT role_description FROM ROLES WHERE role_code = (SELECT role_code FROM users WHERE user_login = 1 GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "Find the description of the most popular role among the users that have logged in.\nAdditional table information: table: document_management"} +{"question": "SELECT COUNT(*) FROM campuses", "answer": "How many CSU campuses are there?\nAdditional table information: table: csu_1"} +{"question": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Accounting' INTERSECT SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Computer Info. Systems'", "answer": "What are the first names of all students taking accoutning and Computer Information Systems classes?\nAdditional table information: table: college_1"} +{"question": "SELECT meter_200, meter_300 FROM swimmer WHERE nationality = 'Australia'", "answer": "Find all 200 meter and 300 meter results of swimmers with nationality 'Australia'.\nAdditional table information: table: swimming"} +{"question": "SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning'", "answer": "Which channels are broadcast in the morning? Give me the channel names.\nAdditional table information: table: program_share"} +{"question": "SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount > 100", "answer": "Show all cities without a branch having more than 100 memberships.\nAdditional table information: table: shop_membership"} +{"question": "SELECT AVG(age) FROM Person", "answer": "What is the average age for all people in the table?\nAdditional table information: table: network_2"} +{"question": "SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2", "answer": "Return the famous titles for artists that have volumes that lasted more than 2 weeks on top.\nAdditional table information: table: music_4"} +{"question": "SELECT employee_id, MAX(end_date) FROM job_history GROUP BY employee_id", "answer": "What are the employee ids for each employee and final dates of employment at their last job?\nAdditional table information: table: hr_1"} +{"question": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Tracy' AND t3.lname = 'Kim'", "answer": "Find the number of clubs where 'Tracy Kim' is a member.\nAdditional table information: table: club_1"} +{"question": "SELECT name FROM player WHERE points > (SELECT AVG(points) FROM player)", "answer": "What are the names of all players that got more than the average number of points?\nAdditional table information: table: sports_competition"} +{"question": "SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC NULLS FIRST", "answer": "What are the themes of parties ordered by the number of hosts in ascending manner?\nAdditional table information: table: party_host"} +{"question": "SELECT dept_name, AVG(salary) FROM instructor GROUP BY dept_name HAVING AVG(salary) > 42000", "answer": "What are the names and average salaries for departments with average salary higher than 42000?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(*) FROM users WHERE user_login = 1", "answer": "How many users are logged in?\nAdditional table information: table: document_management"} +{"question": "SELECT T1.name, T1.lat, MIN(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.end_station_id GROUP BY T2.end_station_id", "answer": "For each end station id, what is its name, latitude, and minimum duration for trips ended there?\nAdditional table information: table: bike_1"} +{"question": "SELECT T2.dept_name, AVG(T1.stu_gpa) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY AVG(T1.stu_gpa) DESC LIMIT 1", "answer": "Which department has the highest average student GPA, and what is the average gpa?\nAdditional table information: table: college_1"} +{"question": "SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name", "answer": "Select the average price of each manufacturer's products, showing the manufacturer's name.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT first_name, last_name FROM actor GROUP BY first_name, last_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most popular full name of the actors?\nAdditional table information: table: sakila_1"} +{"question": "SELECT T2.name, SUM(T1.show_times_per_day) FROM schedule AS T1 JOIN cinema AS T2 ON T1.cinema_id = T2.cinema_id GROUP BY T1.cinema_id", "answer": "What is total number of show times per dat for each cinema?\nAdditional table information: table: cinema"} +{"question": "SELECT Fname FROM STUDENT WHERE NOT StuID IN (SELECT StuID FROM ENROLLED_IN)", "answer": "Find the first name of students not enrolled in any course.\nAdditional table information: table: college_3"} +{"question": "SELECT DISTINCT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = 'Spain' AND T1.year > 2000", "answer": "What are the unique names of races that held after 2000 and the circuits were in Spain?\nAdditional table information: table: formula_1"} +{"question": "SELECT Title, Issues FROM book", "answer": "What are the title and issues of the books?\nAdditional table information: table: book_2"} +{"question": "SELECT AVG(Injured) FROM perpetrator", "answer": "What is the average number of people injured by all perpetrators?\nAdditional table information: table: perpetrator"} +{"question": "SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_id", "answer": "Find the last name of the individuals that have been contact individuals of an organization.\nAdditional table information: table: e_government"} +{"question": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Olin' AND t1.lname = 'Shivers'", "answer": "Find the papers which have 'Olin Shivers' as an author.\nAdditional table information: table: icfp_1"} +{"question": "SELECT label FROM albums GROUP BY label ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the label with the most albums?\nAdditional table information: table: music_2"} +{"question": "SELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Zach' AND T2.year = (SELECT MAX(YEAR) FROM PersonFriend WHERE name = 'Zach')", "answer": "What is the age of the friend of Zach with longest year relationship?\nAdditional table information: table: network_2"} +{"question": "SELECT T1.student_id, T2.last_name FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the id and last name of the student that has the most behavior incidents?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT name FROM program WHERE origin <> 'Beijing'", "answer": "Which programs' origins are not 'Beijing'? Give me the program names.\nAdditional table information: table: program_share"} +{"question": "SELECT COUNT(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Atsushi' AND t1.lname = 'Ohori'", "answer": "How many papers have 'Atsushi Ohori' published?\nAdditional table information: table: icfp_1"} +{"question": "SELECT SUM(T1.Money_Requested) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 1.85", "answer": "What is the total money requested by entrepreneurs with height more than 1.85?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT DISTINCT headquarter FROM manufacturers", "answer": "Give the distinct headquarters of manufacturers.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT YEAR FROM festival_detail GROUP BY YEAR HAVING COUNT(*) > 1", "answer": "List the year in which there are more than one festivals.\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC LIMIT 1", "answer": "List the time of elimination of the wrestlers with largest days held.\nAdditional table information: table: wrestler"} +{"question": "SELECT T2.roomName, COUNT(*), T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room", "answer": "Return the name and number of reservations made for each of the rooms.\nAdditional table information: table: inn_1"} +{"question": "SELECT role_description FROM ROLES WHERE role_name = 'Proof Reader'", "answer": "What is the description of the role named 'Proof Reader'?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT * FROM employees WHERE hire_date < '2002-06-21'", "answer": "What is all the information about employees hired before June 21, 2002?\nAdditional table information: table: hr_1"} +{"question": "SELECT COUNT(*) FROM Customers_cards WHERE card_type_code = 'Debit'", "answer": "Count the number of customer cards of the type Debit.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT MIN(membership_amount), MAX(membership_amount) FROM branch WHERE open_year = 2011 OR city = 'London'", "answer": "Show minimum and maximum amount of memberships for all branches opened in 2011 or located at city London.\nAdditional table information: table: shop_membership"} +{"question": "SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC NULLS FIRST", "answer": "Show the crime rates of counties in ascending order of number of police officers.\nAdditional table information: table: county_public_safety"} +{"question": "SELECT T2.apt_type_code, T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = 'Kyle'", "answer": "Show the apartment type codes and apartment numbers in the buildings managed by 'Kyle'.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT lastname FROM list WHERE classroom = 111", "answer": "Find the last names of students studying in room 111.\nAdditional table information: table: student_1"} +{"question": "SELECT T1.customer_id, T1.first_name, COUNT(*) FROM Customers AS T1 JOIN bookings AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id", "answer": "How many bookings did each customer make? List the customer id, first name, and the count.\nAdditional table information: table: products_for_hire"} +{"question": "SELECT SUM(faculty) FROM faculty WHERE YEAR = 2002", "answer": "How many faculty, in total, are there in the year 2002?\nAdditional table information: table: csu_1"} +{"question": "SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = 'walk' OR T2.How_to_Get_There = 'bus'", "answer": "What are the details of the markets that can be accessed by walk or bus?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT AVG(Scores) FROM submission", "answer": "Compute the average score of submissions.\nAdditional table information: table: workshop_paper"} +{"question": "SELECT Residence FROM player GROUP BY Residence HAVING COUNT(*) >= 2", "answer": "Show the residences that have at least two players.\nAdditional table information: table: riding_club"} +{"question": "SELECT Party_Theme, LOCATION FROM party", "answer": "Give me the theme and location of each party.\nAdditional table information: table: party_host"} +{"question": "SELECT COUNT(*) FROM tryout WHERE pPos = 'goalie'", "answer": "What is the number of students playing as a goalie?\nAdditional table information: table: soccer_2"} +{"question": "SELECT T3.Player_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T2.Rank = 1", "answer": "Show the names of players coached by the rank 1 coach.\nAdditional table information: table: riding_club"} +{"question": "SELECT COUNT(*), T1.blockfloor FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockfloor", "answer": "Find the number of rooms located on each block floor.\nAdditional table information: table: hospital_1"} +{"question": "SELECT Carrier FROM device WHERE NOT Device_ID IN (SELECT Device_ID FROM stock)", "answer": "What are the carriers of devices that are not in stock anywhere?\nAdditional table information: table: device"} +{"question": "SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1", "answer": "What are the denomination more than one school have?\nAdditional table information: table: school_player"} +{"question": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = 'BAL'", "answer": "Find the names of all the clubs that have at least a member from the city with city code 'BAL'.\nAdditional table information: table: club_1"} +{"question": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = 'USA' AND t2.authorder = 2 AND t1.lname = 'Turon'", "answer": "Which paper is published in an institution in 'USA' and have 'Turon' as its second author?\nAdditional table information: table: icfp_1"} +{"question": "SELECT COUNT(*) FROM ship", "answer": "How many ships are there?\nAdditional table information: table: ship_mission"} +{"question": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Badlands'", "answer": "What types of vocals are used in the song 'Badlands'?\nAdditional table information: table: music_2"} +{"question": "SELECT T3.Name, T2.Date FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID", "answer": "Show the names of journalists and the dates of the events they reported.\nAdditional table information: table: news_report"} +{"question": "SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.range = 'Toubkal Atlas' INTERSECT SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.range = 'Lasta Massif'", "answer": "List the brands of lenses that took both a picture of mountains with range 'Toubkal Atlas' and a picture of mountains with range 'Lasta Massif'\nAdditional table information: table: mountain_photos"} +{"question": "SELECT email_address, phone_number FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM complaints)", "answer": "What are the emails and phone numbers of custoemrs who have never filed a complaint?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT DISTINCT POSITION FROM match_season WHERE College = 'UCLA' OR College = 'Duke'", "answer": "Show the distinct position of players from college UCLA or Duke.\nAdditional table information: table: match_season"} +{"question": "SELECT Product_Name, AVG(Product_Price) FROM PRODUCTS GROUP BY Product_Name", "answer": "What are the different product names? What is the average product price for each of them?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT date, max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f NULLS FIRST LIMIT 1", "answer": "Find the day in which the difference between the max temperature and min temperature was the smallest. Also report the difference.\nAdditional table information: table: bike_1"} +{"question": "SELECT dept_name, budget FROM department WHERE budget > (SELECT AVG(budget) FROM department)", "answer": "What are the names and budgets of departments with budgets greater than the average?\nAdditional table information: table: college_2"} +{"question": "SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF'", "answer": "Give the ids of documents with expenses that have the budget code 'SF'.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T1.bname, T1.city FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T2.loan_type = 'Business'", "answer": "What are the names and cities of bank branches that offer loans for business?\nAdditional table information: table: loan_1"} +{"question": "SELECT COUNT(*) FROM customers WHERE state = 'CA'", "answer": "How many customers in state of CA?\nAdditional table information: table: store_1"} +{"question": "SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING COUNT(*) > 1", "answer": "On which days more than one revisions were made on catalogs.\nAdditional table information: table: product_catalog"} +{"question": "SELECT COUNT(DISTINCT Software_Platform) FROM device", "answer": "How many different software platforms are there for devices?\nAdditional table information: table: device"} +{"question": "SELECT Elimination_Move FROM Elimination WHERE Team = 'Team Orton'", "answer": "What are the elimination moves of wrestlers whose team is 'Team Orton'?\nAdditional table information: table: wrestler"} +{"question": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which allergy type is most common?\nAdditional table information: table: allergy_1"} +{"question": "SELECT bedType, COUNT(*) FROM Rooms GROUP BY bedType", "answer": "Find the number of rooms for each bed type.\nAdditional table information: table: inn_1"} +{"question": "SELECT COUNT(DISTINCT product_type_code) FROM products_for_hire", "answer": "How many different product types are there?\nAdditional table information: table: products_for_hire"} +{"question": "SELECT MAX(support_rate), MIN(consider_rate), MIN(oppose_rate) FROM candidate", "answer": "Return the maximum support rate, minimum consider rate, and minimum oppose rate across all candidates?\nAdditional table information: table: candidate_poll"} +{"question": "SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100", "answer": "What is the response received date for the document described as Regular that was granted more than 100 dollars?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT LOCATION FROM school WHERE NOT School_ID IN (SELECT School_ID FROM Player)", "answer": "List the locations of schools that do not have any player.\nAdditional table information: table: school_player"} +{"question": "SELECT SUM(beds) FROM Rooms WHERE bedtype = 'King'", "answer": "How many king beds are there?\nAdditional table information: table: inn_1"} +{"question": "SELECT Price FROM WINE WHERE YEAR < 2010", "answer": "What are the prices of wines produced before the year of 2010?\nAdditional table information: table: wine_1"} +{"question": "SELECT id FROM teaches WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT id FROM teaches WHERE semester = 'Spring' AND YEAR = 2010", "answer": "What are the ids of instructors who taught in the Fall of 2009 but not in the Spring of 2010?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(*) FROM player", "answer": "How many players are there?\nAdditional table information: table: riding_club"} +{"question": "SELECT emp_jobcode, COUNT(*) FROM employee GROUP BY emp_jobcode ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the count and code of the job with the most employee?\nAdditional table information: table: college_1"} +{"question": "SELECT DISTINCT T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800", "answer": "What are the file sizes and formats for all songs with a resolution lower than 800?\nAdditional table information: table: music_1"} +{"question": "SELECT Grape, Winery, YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR NULLS FIRST", "answer": "What are the grapes, wineries and years for wines with price higher than 100, sorted by year?\nAdditional table information: table: wine_1"} +{"question": "SELECT name FROM web_client_accelerator WHERE name LIKE '%Opera%'", "answer": "Which accelerator name contains substring 'Opera'?\nAdditional table information: table: browser_web"} +{"question": "SELECT COUNT(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id WHERE T2.account_name = '337'", "answer": "How many transaction does account with name 337 have?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT T2.name, T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math'", "answer": "What are the names and salaries of instructors who advise students in the Math department?\nAdditional table information: table: college_2"} +{"question": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance NULLS FIRST LIMIT 1", "answer": "Find the name of account that has the lowest total checking and saving balance.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC NULLS FIRST LIMIT 1", "answer": "Which team had the least number of attendances in home games in 1980?\nAdditional table information: table: baseball_1"} +{"question": "SELECT AVG(T1.Total) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 200", "answer": "What is the average total score of body builders with height bigger than 200?\nAdditional table information: table: body_builder"} +{"question": "SELECT DISTINCT T3.name FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.title = 'Gone with the Wind'", "answer": "What are the names of all the different reviewers who rates Gone with the Wind?\nAdditional table information: table: movie_1"} +{"question": "SELECT forename, surname FROM drivers WHERE nationality = 'German'", "answer": "What is the first and last name of all the German drivers?\nAdditional table information: table: formula_1"} +{"question": "SELECT Weight FROM people ORDER BY Height ASC NULLS FIRST LIMIT 1", "answer": "Return the weight of the shortest person.\nAdditional table information: table: entrepreneur"} +{"question": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010", "answer": "Find courses that ran in Fall 2009 but not in Spring 2010.\nAdditional table information: table: college_2"} +{"question": "SELECT clubdesc FROM club WHERE clubname = 'Pen and Paper Gaming'", "answer": "Find the description of the club 'Pen and Paper Gaming'.\nAdditional table information: table: club_1"} +{"question": "SELECT name FROM buildings WHERE Status = 'on-hold' ORDER BY Stories ASC NULLS FIRST", "answer": "Please show the names of the buildings whose status is 'on-hold', in ascending order of stories.\nAdditional table information: table: company_office"} +{"question": "SELECT T2.Fname, T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY COUNT(*) DESC LIMIT 3", "answer": "What are the full names of the 3 instructors who teach the most courses?\nAdditional table information: table: college_3"} +{"question": "SELECT problem_log_id, log_entry_date FROM problem_log WHERE problem_id = 10", "answer": "For the problem with id 10, return the ids and dates of its problem logs.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT AVG(product_price), product_category_code FROM products GROUP BY product_category_code", "answer": "Return the average price of products that have each category code.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT Product_Type_Code, COUNT(*) FROM Products GROUP BY Product_Type_Code", "answer": "Show different type codes of products and the number of products with each type code.\nAdditional table information: table: solvency_ii"} +{"question": "SELECT classroom FROM list GROUP BY classroom ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which classroom has the most students?\nAdditional table information: table: student_1"} +{"question": "SELECT COUNT(*) FROM Reservations WHERE FirstName = 'ROY' AND LastName = 'SWEAZY'", "answer": "Find the number of times ROY SWEAZY has reserved a room.\nAdditional table information: table: inn_1"} +{"question": "SELECT COUNT(DISTINCT party_name) FROM party", "answer": "Count the number of different parties.\nAdditional table information: table: party_people"} +{"question": "SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE country = 'Canada'", "answer": "Find the number of routes whose destination airports are in Canada.\nAdditional table information: table: flight_4"} +{"question": "SELECT T1.name FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the airline with the most routes?\nAdditional table information: table: flight_4"} +{"question": "SELECT DISTINCT (catalog_entry_name) FROM catalog_contents", "answer": "What are all the catalog entry names?\nAdditional table information: table: product_catalog"} +{"question": "SELECT COUNT(DISTINCT label) FROM albums", "answer": "How many unique labels are there for albums?\nAdditional table information: table: music_2"} +{"question": "SELECT budget_type_code, COUNT(*) FROM Documents_with_expenses GROUP BY budget_type_code", "answer": "Show budget type codes and the number of documents in each budget type.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT MAX(capacity), AVG(capacity), building FROM classroom GROUP BY building", "answer": "Find the maximum and average capacity among rooms in each building.\nAdditional table information: table: college_2"} +{"question": "SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee", "answer": "Show different nominees and the number of musicals they have been nominated.\nAdditional table information: table: musical"} +{"question": "SELECT COUNT(*) FROM bank", "answer": "How many bank branches are there?\nAdditional table information: table: loan_1"} +{"question": "SELECT MAX(group_equity_shareholding) FROM operate_company", "answer": "What is maximum group equity shareholding of the companies?\nAdditional table information: table: flight_company"} +{"question": "SELECT COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = 'food'", "answer": "How many students have a food allergy?\nAdditional table information: table: allergy_1"} +{"question": "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'", "answer": "What are the names of any scientists who worked on projects named 'Matter of Time' and 'A Puzzling Pattern'?\nAdditional table information: table: scientist_1"} +{"question": "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", "answer": "Show the station name with at least two trains.\nAdditional table information: table: train_station"} +{"question": "SELECT Product_Name FROM Products ORDER BY Product_Price ASC NULLS FIRST", "answer": "Sort the names of products in ascending order of their price.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the range that has the most number of mountains.\nAdditional table information: table: climbing"} +{"question": "SELECT T1.Marketing_Region_Name FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code = T2.Marketing_Region_Code WHERE T2.Store_Name = 'Rob Dinning'", "answer": "Return the name of the marketing region the store Rob Dinning is located in.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT T1.id, T1.Name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 2", "answer": "For every medicine id, what are the names of the medicines that can interact with more than one enzyme?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT POSITION FROM player WHERE Points > 20 INTERSECT SELECT POSITION FROM player WHERE Points < 10", "answer": "What are the positions with both players having more than 20 points and less than 10 points.\nAdditional table information: table: sports_competition"} +{"question": "SELECT product_category_description, unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs'", "answer": "What is the product category description and unit of measurement of category 'Herbs'?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT COUNT(*) FROM employees WHERE country = 'Canada'", "answer": "How many employees live in Canada?\nAdditional table information: table: store_1"} +{"question": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Give the color description that is least common across products.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT COUNT(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2000", "answer": "How many players were in the team Boston Red Stockings in 2000?\nAdditional table information: table: baseball_1"} +{"question": "SELECT order_id, COUNT(*) FROM Order_items GROUP BY order_id", "answer": "How many order items correspond to each order id?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT customer_name, customer_id FROM customers WHERE customer_address LIKE '%TN%'", "answer": "What are the names and ids of customers whose address contains TN?\nAdditional table information: table: department_store"} +{"question": "SELECT Carrier FROM phone GROUP BY Carrier ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most frequently used carrier of the phones.\nAdditional table information: table: phone_market"} +{"question": "SELECT T3.Location, T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age NULLS FIRST", "answer": "Show the locations of parties and the names of the party hosts in ascending order of the age of the host.\nAdditional table information: table: party_host"} +{"question": "SELECT Party FROM representative GROUP BY Party HAVING COUNT(*) >= 3", "answer": "What parties have at least three representatives?\nAdditional table information: table: election_representative"} +{"question": "SELECT Name FROM pilot ORDER BY Name ASC NULLS FIRST", "answer": "List all pilot names in ascending alphabetical order.\nAdditional table information: table: aircraft"} +{"question": "SELECT headquarters, COUNT(*) FROM company GROUP BY headquarters", "answer": "List all headquarters and the number of companies in each headquarter.\nAdditional table information: table: gas_company"} +{"question": "SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Find the emails of customers who has filed a complaints of the product with the most complaints.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code", "answer": "What are the descriptions of all the project outcomes?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed NULLS FIRST", "answer": "What are ids of the all distinct orders, sorted by placement date?\nAdditional table information: table: tracking_orders"} +{"question": "SELECT title, phone, hire_date FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards'", "answer": "What is the title, phone number and hire date for the employee named Nancy Edwards?\nAdditional table information: table: store_1"} +{"question": "SELECT phone, room, building FROM Faculty WHERE Fname = 'Jerry' AND Lname = 'Prince'", "answer": "What are the phone, room, and building of the faculty member called Jerry Prince?\nAdditional table information: table: activity_1"} +{"question": "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'", "answer": "What are the different pilot names who had piloted a flight in the country 'United States' or in the airport named 'Billund Airport'?\nAdditional table information: table: flight_company"} +{"question": "SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = 'AC/DC'", "answer": "What are the titles of albums by the artist 'AC/DC'?\nAdditional table information: table: chinook_1"} +{"question": "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", "answer": "What is the name of organization that has the greatest number of contact individuals?\nAdditional table information: table: e_government"} +{"question": "SELECT Industry FROM Companies WHERE Headquarters = 'USA' INTERSECT SELECT Industry FROM Companies WHERE Headquarters = 'China'", "answer": "Show the industries shared by companies whose headquarters are 'USA' and companies whose headquarters are 'China'.\nAdditional table information: table: company_office"} +{"question": "SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay = T3.StayID WHERE T3.room = 111", "answer": "What are the names of patients who are staying in room 111 and have an undergoing treatment?\nAdditional table information: table: hospital_1"} +{"question": "SELECT COUNT(*) FROM Staff", "answer": "How many staff in total?\nAdditional table information: table: driving_school"} +{"question": "SELECT Publication_Date FROM publication ORDER BY Price DESC", "answer": "What are the dates of publications in descending order of price?\nAdditional table information: table: book_2"} +{"question": "SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000", "answer": "Which directors had a movie in either 1999 or 2000?\nAdditional table information: table: culture_company"} +{"question": "SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number = t2.catalog_level_number ORDER BY t1.price_in_dollars NULLS FIRST LIMIT 1", "answer": "Find the level name of the catalog with the lowest price (in USD).\nAdditional table information: table: product_catalog"} +{"question": "SELECT name FROM projects WHERE hours BETWEEN 100 AND 300", "answer": "Find the name of projects that require between 100 and 300 hours of work.\nAdditional table information: table: scientist_1"} +{"question": "SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999", "answer": "Show all director names who have a movie in both year 1999 and 2000.\nAdditional table information: table: culture_company"} +{"question": "SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T2.name = 'Creative Labs' INTERSECT SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T2.name = 'Sony'", "answer": "What are the names of products produced by both Creative Labs and Sony?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT COUNT(*) FROM useracct WHERE NOT u_id IN (SELECT u_id FROM review)", "answer": "Find the number of users who did not write any review.\nAdditional table information: table: epinions_1"} +{"question": "SELECT name, trade_name FROM medicine EXCEPT SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id JOIN enzyme AS T3 ON T3.id = T2.enzyme_id WHERE T3.product = 'Protoporphyrinogen IX'", "answer": "What are the medicine and trade names that cannot interact with the enzyme with the product 'Heme'?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs'", "answer": "Return the unit of measure for 'Herb' products.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT AVG(age), MAX(age), sex FROM student GROUP BY sex", "answer": "What is the average and oldest age for each gender of student?\nAdditional table information: table: dorm_1"} +{"question": "SELECT COUNT(DISTINCT Publication_Date) FROM publication", "answer": "What is the number of distinct publication dates?\nAdditional table information: table: book_2"} +{"question": "SELECT Name FROM actor ORDER BY Name ASC NULLS FIRST", "answer": "List the name of actors in ascending alphabetical order.\nAdditional table information: table: musical"} +{"question": "SELECT T1.surname, T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING COUNT(*) = 11 INTERSECT SELECT T1.surname, T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING COUNT(*) > 5", "answer": "What are the last names and ids of all drivers who had 11 pit stops and participated in more than 5 races?\nAdditional table information: table: formula_1"} +{"question": "SELECT COUNT(*) FROM APPELLATIONS WHERE County = 'Napa'", "answer": "Count the number of appelations in Napa County.\nAdditional table information: table: wine_1"} +{"question": "SELECT COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = 'Lucas' AND T1.last_name = 'Mancini'", "answer": "How many orders does Luca Mancini have in his invoices?\nAdditional table information: table: store_1"} +{"question": "SELECT T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id JOIN medicine AS T3 ON T2.medicine_id = T3.id WHERE T3.name = 'Amisulpride' AND T2.interaction_type = 'inhibitor'", "answer": "What are the names of the enzymes used in the medicine Amisulpride that acts as inhibitors?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT T2.Fname, T2.Lname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID = T2.StuID WHERE T1.DNO = 140", "answer": "What are the full names of students minoring in department 140?\nAdditional table information: table: college_3"} +{"question": "SELECT MAX(stars), MIN(stars) FROM Rating", "answer": "What is the lowest and highest rating star?\nAdditional table information: table: movie_1"} +{"question": "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", "answer": "What is the last name of the contact individual from the Labour party organization who was contacted most recently?\nAdditional table information: table: e_government"} +{"question": "SELECT order_item_id FROM order_items WHERE product_id = 11", "answer": "Find all the order items whose product id is 11. What are the order item ids?\nAdditional table information: table: tracking_orders"} +{"question": "SELECT DISTINCT cName FROM college WHERE enr > (SELECT MIN(enr) FROM college WHERE state = 'FL')", "answer": "Find names of colleges with enrollment greater than that of some (at least one) college in the FL state.\nAdditional table information: table: soccer_2"} +{"question": "SELECT T1.Name FROM Tourist_Attractions AS T1, VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Vincent' INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1, VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Marcelle'", "answer": "Which tourist attractions do the tourists Vincent and Marcelle visit? Tell me the names of the attractions.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2", "answer": "What are the famous title of the artists associated with volumes with more than 2 weeks on top?\nAdditional table information: table: music_4"} +{"question": "SELECT first_name, department_id FROM employees WHERE last_name = 'McEwen'", "answer": "What are the first names and department numbers for employees with last name McEwen?\nAdditional table information: table: hr_1"} +{"question": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code HAVING COUNT(*) >= 5", "answer": "What are the codes of card types that have 5 or more cards?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT AVG(followers) FROM user_profiles WHERE UID IN (SELECT UID FROM tweets)", "answer": "Find the average number of followers for the users who had some tweets.\nAdditional table information: table: twitter_1"} +{"question": "SELECT name FROM Person WHERE job = 'student' AND age = (SELECT MAX(age) FROM person WHERE job = 'student')", "answer": "Who is the oldest person whose job is student?\nAdditional table information: table: network_2"} +{"question": "SELECT Name FROM technician ORDER BY Age ASC NULLS FIRST", "answer": "What are the names of the technicians by ascending order of age?\nAdditional table information: table: machine_repair"} +{"question": "SELECT MIN(low_temperature), MAX(wind_speed_mph) FROM weekly_weather", "answer": "show the lowest low temperature and highest wind speed in miles per hour.\nAdditional table information: table: station_weather"} +{"question": "SELECT f_id FROM files WHERE formats = 'mp4' UNION SELECT f_id FROM song WHERE resolution > 720", "answer": "What are the ids of all songs that are available on mp4 or have a higher resolution than 720?\nAdditional table information: table: music_1"} +{"question": "SELECT COUNT(*), T3.school_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T2.dept_code = T3.dept_code GROUP BY T3.school_code", "answer": "How many classes exist for each school?\nAdditional table information: table: college_1"} +{"question": "SELECT DISTINCT T1.player_name, T1.birthday FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY potential DESC LIMIT 5", "answer": "List the names and birthdays of the top five players in terms of potential.\nAdditional table information: table: soccer_1"} +{"question": "SELECT customer_status_code, cell_mobile_phone_number, email_address FROM Customers WHERE first_name = 'Marina' OR last_name = 'Kohler'", "answer": "What is the status code, phone number, and email address of the customer whose last name is Kohler or whose first name is Marina?\nAdditional table information: table: driving_school"} +{"question": "SELECT AVG(rating), languages FROM song GROUP BY languages", "answer": "What is the average song rating for each language?\nAdditional table information: table: music_1"} +{"question": "SELECT date_of_birth FROM Guests WHERE gender_code = 'Male'", "answer": "What are dates of birth of all the guests whose gender is 'Male'?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT product FROM product WHERE max_page_size = 'A4' OR pages_per_minute_color < 5", "answer": "What are the products with the maximum page size eqal to A4 or a pages per minute color less than 5?\nAdditional table information: table: store_product"} +{"question": "SELECT DISTINCT city FROM addresses", "answer": "List all the distinct cities\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T2.title, T2.film_id, T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the title, id, and description of the movie with the greatest number of actors?\nAdditional table information: table: sakila_1"} +{"question": "SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid')", "answer": "How many schools have some students playing in goalie and mid positions.\nAdditional table information: table: soccer_2"} +{"question": "SELECT name FROM station WHERE NOT station_id IN (SELECT station_id FROM train_station)", "answer": "Show station names without any trains.\nAdditional table information: table: train_station"} +{"question": "SELECT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id GROUP BY t3.city ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which city has the most customers living in?\nAdditional table information: table: customers_and_addresses"} +{"question": "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", "answer": "What is the name of the party form that is most common?\nAdditional table information: table: e_government"} +{"question": "SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = 'operating system' OR T2.course_name = 'data structure'", "answer": "What are the addresses of the course authors who teach either 'operating system' or 'data structure' course.\nAdditional table information: table: e_learning"} +{"question": "SELECT DISTINCT payment_method_code FROM INVOICES", "answer": "What are the distinct payment method codes in all the invoices?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT T2.title, T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY T1.stars DESC LIMIT 3", "answer": "What are the names and years of the movies that has the top 3 highest rating star?\nAdditional table information: table: movie_1"} +{"question": "SELECT other_account_details FROM Accounts WHERE account_name = '338'", "answer": "What are the other account details for the account with the name 338?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT DISTINCT main_industry FROM company", "answer": "Show all main industry for all companies.\nAdditional table information: table: gas_company"} +{"question": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2", "answer": "List the names of aircrafts and that won matches at least twice.\nAdditional table information: table: aircraft"} +{"question": "SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150", "answer": "Which rooms cost between 120 and 150? Give me the room names.\nAdditional table information: table: inn_1"} +{"question": "SELECT AVG(Horizontal_Bar_Points) FROM gymnast", "answer": "Return the average horizontal bar points across all gymnasts.\nAdditional table information: table: gymnast"} +{"question": "SELECT COUNT(*) FROM authors", "answer": "How many authors are there?\nAdditional table information: table: icfp_1"} +{"question": "SELECT name, age FROM people WHERE is_male = 'T' AND NOT people_id IN (SELECT male_id FROM wedding)", "answer": "Show the name and age for all male people who don't have a wedding.\nAdditional table information: table: wedding"} +{"question": "SELECT T1.title, T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title", "answer": "For each director who directed more than one movie, what are the titles and dates of release for all those movies?\nAdditional table information: table: movie_1"} +{"question": "SELECT DISTINCT Name FROM WINE ORDER BY price NULLS FIRST", "answer": "What are the names of wines, sorted by price ascending?\nAdditional table information: table: wine_1"} +{"question": "SELECT SUM(maxOccupancy) FROM Rooms WHERE decor = 'modern'", "answer": "How many people in total can stay in the modern rooms of this inn?\nAdditional table information: table: inn_1"} +{"question": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY AVG(room_count) DESC LIMIT 3", "answer": "Show the top 3 apartment type codes sorted by the average number of rooms in descending order.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration NULLS FIRST LIMIT 1", "answer": "What are the names of the artists who sang the shortest song?\nAdditional table information: table: music_1"} +{"question": "SELECT customer_id, COUNT(*) FROM Customers_cards GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the customer id with most number of cards, and how many does he have?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT Name FROM artwork WHERE TYPE <> 'Program Talent Show'", "answer": "List the name of artworks whose type is not 'Program Talent Show'.\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT gender, COUNT(*) FROM Customers GROUP BY gender", "answer": "Show the number of customers for each gender.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t2.support_rate < t2.oppose_rate", "answer": "Find the names of the candidates whose support percentage is lower than their oppose rate.\nAdditional table information: table: candidate_poll"} +{"question": "SELECT Name FROM scientists WHERE NOT ssn IN (SELECT scientist FROM AssignedTo)", "answer": "Find the name of scientists who are not assigned to any project.\nAdditional table information: table: scientist_1"} +{"question": "SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000", "answer": "Find the locations where have both tracks with more than 90000 seats and tracks with less than 70000 seats.\nAdditional table information: table: race_track"} +{"question": "SELECT T1.id, T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id JOIN injury_accident AS T3 ON T2.id = T3.game_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the id and name of the stadium where the most injury accidents happened?\nAdditional table information: table: game_injury"} +{"question": "SELECT COUNT(*) FROM Vehicles", "answer": "How many vehicle in total?\nAdditional table information: table: driving_school"} +{"question": "SELECT Area, County FROM APPELLATIONS", "answer": "What are the areas and counties for all appelations?\nAdditional table information: table: wine_1"} +{"question": "SELECT COUNT(DISTINCT President_Vote) FROM VOTING_RECORD", "answer": "How many distinct president votes are recorded?\nAdditional table information: table: voter_2"} +{"question": "SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'photo' INTERSECT SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'film'", "answer": "Give me the description of the service type that offers not only the photo product but also the film product.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT date_joined_staff FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "answer": "When did the staff member with first name as Janessa and last name as Sawayn join the company?\nAdditional table information: table: driving_school"} +{"question": "SELECT T1.supplier_name, T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id = T2.supplier_id JOIN addresses AS T3 ON T2.address_id = T3.address_id ORDER BY T3.address_details NULLS FIRST", "answer": "What are the names and phone numbers for all suppliers, sorted in alphabetical order of their addressed?\nAdditional table information: table: department_store"} +{"question": "SELECT COUNT(*) FROM inst", "answer": "How many institutions are there?\nAdditional table information: table: icfp_1"} +{"question": "SELECT gname FROM Video_games WHERE gtype = 'Collectible card game'", "answer": "What are the names of all video games that are collectible cards?\nAdditional table information: table: game_1"} +{"question": "SELECT project_details FROM Projects WHERE organisation_id IN (SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "What are the details for the projects which were launched by the organization with the most projects?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT COUNT(DISTINCT region_id) FROM affected_region", "answer": "Count the number of different affected regions.\nAdditional table information: table: storm_record"} +{"question": "SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1", "answer": "List the school color of the school that has the largest enrollment.\nAdditional table information: table: school_player"} +{"question": "SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the id of the product ordered the most often on invoices.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT zip_code, AVG(mean_temperature_f) FROM weather WHERE date LIKE '8/%' GROUP BY zip_code", "answer": "For each zip code, return the average mean temperature of August there.\nAdditional table information: table: bike_1"} +{"question": "SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName", "answer": "Find the states where have some college students in tryout.\nAdditional table information: table: soccer_2"} +{"question": "SELECT price_range FROM HOTELS WHERE star_rating_code = '5'", "answer": "What are the price ranges of five star hotels?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT COUNT(*) FROM department WHERE NOT department_id IN (SELECT department_id FROM management)", "answer": "How many departments are led by heads who are not mentioned?\nAdditional table information: table: department_management"} +{"question": "SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928", "answer": "What are the names of ships that were involved in a mission launched after 1928?\nAdditional table information: table: ship_mission"} +{"question": "SELECT T1.incident_type_code, T2.incident_type_description FROM Behavior_Incident AS T1 JOIN Ref_Incident_Type AS T2 ON T1.incident_type_code = T2.incident_type_code GROUP BY T1.incident_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the code and description of the most frequent behavior incident type?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = 'walk'", "answer": "Find the details of the shops that can be reached by walk.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT dorm_name FROM dorm WHERE student_capacity > 300", "answer": "Find the name of dorms that can accommodate more than 300 students.\nAdditional table information: table: dorm_1"} +{"question": "SELECT service_id, event_details FROM EVENTS", "answer": "List the service id and details for the events.\nAdditional table information: table: local_govt_in_alabama"} +{"question": "SELECT country FROM customers WHERE first_name = 'Roberto' AND last_name = 'Almeida'", "answer": "In which country does Roberto Almeida?\nAdditional table information: table: store_1"} +{"question": "SELECT name FROM Aircraft WHERE distance > (SELECT AVG(distance) FROM Aircraft)", "answer": "Show names for all aircrafts with distances more than the average.\nAdditional table information: table: flight_1"} +{"question": "SELECT Name FROM WINE WHERE YEAR < (SELECT MIN(YEAR) FROM WINE WHERE Winery = 'Brander')", "answer": "What are the names of wines produced before any wine from the Brander winery?\nAdditional table information: table: wine_1"} +{"question": "SELECT Category, COUNT(*) FROM music_festival GROUP BY Category", "answer": "Please show the categories of the music festivals and the count.\nAdditional table information: table: music_4"} +{"question": "SELECT T1.Builder FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID WHERE T2.Name = 'Andaman Exp'", "answer": "Show the builder of railways associated with the trains named 'Andaman Exp'.\nAdditional table information: table: railway"} +{"question": "SELECT minister FROM party WHERE party_name <> 'Progress Party'", "answer": "Which ministers are not a part of the Progress Party?\nAdditional table information: table: party_people"} +{"question": "SELECT T1.first_name, T1.last_name FROM customer AS T1 JOIN rental AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.rental_date ASC NULLS FIRST LIMIT 1", "answer": "Return the full name of the customer who made the first rental.\nAdditional table information: table: sakila_1"} +{"question": "SELECT name FROM swimmer WHERE NOT id IN (SELECT swimmer_id FROM record)", "answer": "Find the names of the swimmers who have no record.\nAdditional table information: table: swimming"} +{"question": "SELECT Attendance FROM performance WHERE LOCATION = 'TD Garden' OR LOCATION = 'Bell Centre'", "answer": "Show the attendances of the performances at location 'TD Garden' or 'Bell Centre'\nAdditional table information: table: performance_attendance"} +{"question": "SELECT name FROM instructor WHERE salary > (SELECT MIN(salary) FROM instructor WHERE dept_name = 'Biology')", "answer": "What are the names of instructors who earn more than at least one instructor from the Biology department?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.city_code = 'NYC' AND T2.Election_Cycle = 'Spring'", "answer": "Which students live in the city with code 'NYC' and have class senator votes in the spring election cycle? Count the numbers.\nAdditional table information: table: voter_2"} +{"question": "SELECT DISTINCT T3.name, T2.title, T1.stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.director = T3.name", "answer": "For any rating where the name of reviewer is the same as the director of the movie, return the reviewer name, movie title, and number of stars.\nAdditional table information: table: movie_1"} +{"question": "SELECT customer_name, customer_id FROM customers WHERE customer_address LIKE '%TN%'", "answer": "Return the names and ids of customers who have TN in their address.\nAdditional table information: table: department_store"} +{"question": "SELECT id FROM trip WHERE duration >= (SELECT AVG(duration) FROM trip WHERE zip_code = 94103)", "answer": "Find the id for the trips that lasted at least as long as the average duration of trips in zip code 94103.\nAdditional table information: table: bike_1"} +{"question": "SELECT SUM(T2.balance), T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name", "answer": "Find the total saving balance for each account name.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT classroom, COUNT(DISTINCT grade) FROM list GROUP BY classroom", "answer": "For each classroom, show the classroom number and count the number of distinct grades that use the room.\nAdditional table information: table: student_1"} +{"question": "SELECT COUNT(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Blanche' AND T2.customer_last_name = 'Huels' AND T1.card_type_code = 'Credit'", "answer": "How many credit cards does customer Blanche Huels have?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT AVG(product_price) FROM products)", "answer": "Return ids of all the products that are supplied by supplier id 2 and are more expensive than the average price of all products.\nAdditional table information: table: department_store"} +{"question": "SELECT AVG(Population) FROM county", "answer": "On average how large is the population of the counties?\nAdditional table information: table: election"} +{"question": "SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = 'Cathrine'", "answer": "Return the addresses of the course authors or tutors whose personal name is 'Cathrine'.\nAdditional table information: table: e_learning"} +{"question": "SELECT phone_number FROM customers UNION SELECT phone_number FROM staff", "answer": "What are the phone numbers of all customers and all staff members?\nAdditional table information: table: customer_complaints"} +{"question": "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'", "answer": "Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to.\nAdditional table information: table: scientist_1"} +{"question": "SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1", "answer": "Which schools have more than 1 player? Give me the school locations.\nAdditional table information: table: school_player"} +{"question": "SELECT product FROM product WHERE max_page_size = 'A4' AND pages_per_minute_color < 5", "answer": "What are the products with the maximum page size A4 that also have a pages per minute color smaller than 5?\nAdditional table information: table: store_product"} +{"question": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which allergy type has most number of allergies?\nAdditional table information: table: allergy_1"} +{"question": "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", "answer": "Find the first and last name of the faculty who is involved in the largest number of activities.\nAdditional table information: table: activity_1"} +{"question": "SELECT departure_date, arrival_date FROM Flight WHERE origin = 'Los Angeles' AND destination = 'Honolulu'", "answer": "What are the departure and arrival dates of all flights from LA to Honolulu?\nAdditional table information: table: flight_1"} +{"question": "SELECT COUNT(*) FROM Aircraft", "answer": "How many aircrafts exist in the database?\nAdditional table information: table: flight_1"} +{"question": "SELECT transaction_type_code, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY transaction_type_code", "answer": "Show the average transaction amount for different transaction types.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT State FROM representative GROUP BY State HAVING COUNT(*) >= 2", "answer": "What states have at least two representatives?\nAdditional table information: table: election_representative"} +{"question": "SELECT COUNT(DISTINCT LOCATION) FROM perpetrator", "answer": "How many distinct locations of perpetrators are there?\nAdditional table information: table: perpetrator"} +{"question": "SELECT T1.name, T1.team_id, MAX(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id", "answer": "What is the highest salary among each team? List the team name, id and maximum salary.\nAdditional table information: table: baseball_1"} +{"question": "SELECT COUNT(*) FROM employee", "answer": "How many employees are there all together?\nAdditional table information: table: college_1"} +{"question": "SELECT date FROM weather WHERE max_temperature_f > 85", "answer": "What are the dates with a maximum temperature higher than 85?\nAdditional table information: table: bike_1"} +{"question": "SELECT Grape, Appelation FROM WINE", "answer": "List the grapes and appelations of all wines.\nAdditional table information: table: wine_1"} +{"question": "SELECT decor, COUNT(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor", "answer": "How many rooms cost more than 120, for each different decor?\nAdditional table information: table: inn_1"} +{"question": "SELECT aid FROM Aircraft WHERE distance > 1000", "answer": "Show ids for all aircrafts with more than 1000 distance.\nAdditional table information: table: flight_1"} +{"question": "SELECT product_name, product_category_code FROM products ORDER BY product_price DESC LIMIT 1", "answer": "Find the name and category of the most expensive product.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT COUNT(*) FROM Video_games WHERE gtype = 'Massively multiplayer online game'", "answer": "Count the number of video games with Massively multiplayer online game type .\nAdditional table information: table: game_1"} +{"question": "SELECT DISTINCT Location_Name FROM LOCATIONS", "answer": "Show all distinct location names.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT district FROM address GROUP BY district HAVING COUNT(*) >= 2", "answer": "Give the districts which have two or more addresses.\nAdditional table information: table: sakila_1"} +{"question": "SELECT lastname FROM teachers WHERE classroom = 109", "answer": "Find the last names of teachers teaching in classroom 109.\nAdditional table information: table: student_1"} +{"question": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING COUNT(DISTINCT T3.product_id) >= 3", "answer": "Find the names of customers who have bought by at least three distinct products.\nAdditional table information: table: department_store"} +{"question": "SELECT DISTINCT (Famous_Release_date) FROM artist", "answer": "What are the distinct Famous release dates?\nAdditional table information: table: music_4"} +{"question": "SELECT T3.Name, T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID", "answer": "Show names of technicians and series of machines they are assigned to repair.\nAdditional table information: table: machine_repair"} +{"question": "SELECT SUM(balance) FROM checking", "answer": "Find the total balance across checking accounts.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT draft_details FROM Document_Drafts WHERE document_id = 7", "answer": "What is draft detail of the document with id 7?\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "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'", "answer": "Give me a list of id and status of orders which belong to the customer named 'Jeramie'.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT document_name, access_count FROM documents ORDER BY access_count DESC LIMIT 1", "answer": "What is the name of the document which has been accessed the most times, as well as the number of times it has been accessed?\nAdditional table information: table: document_management"} +{"question": "SELECT AVG(no_of_customers) FROM bank WHERE state = 'Utah'", "answer": "What is the average number of customers across banks in the state of Utah?\nAdditional table information: table: loan_1"} +{"question": "SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY SUM(degrees) DESC LIMIT 1", "answer": "Which year has the most degrees conferred?\nAdditional table information: table: csu_1"} +{"question": "SELECT member_name FROM member WHERE party_id = 3 INTERSECT SELECT member_name FROM member WHERE party_id = 1", "answer": "Show the member names which are in both the party with id 3 and the party with id 1.\nAdditional table information: table: party_people"} +{"question": "SELECT AVG(floors), MAX(floors), MIN(floors) FROM building", "answer": "What are the average, maximum, and minimum number of floors for all buildings?\nAdditional table information: table: protein_institute"} +{"question": "SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id = T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type = T4.organisation_type WHERE T2.grant_amount > 5000 AND T4.organisation_type_description = 'Research'", "answer": "What are the send dates for all documents that have a grant amount of more than 5000 and are involved in research?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT COUNT(*) FROM book", "answer": "How many books are there?\nAdditional table information: table: book_2"} +{"question": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM checking)", "answer": "What are the names of customers with checking balances lower than the average checking balance?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT fname FROM student WHERE city_code = 'PHL' AND age BETWEEN 20 AND 25", "answer": "Find the first name of students living in city PHL whose age is between 20 and 25.\nAdditional table information: table: dorm_1"} +{"question": "SELECT Name FROM wrestler ORDER BY Days_held DESC", "answer": "What are the names of the wrestlers, ordered descending by days held?\nAdditional table information: table: wrestler"} +{"question": "SELECT card_id, customer_id, card_type_code, card_number FROM Customers_cards", "answer": "Show ids, customer ids, card type codes, card numbers for all cards.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT T2.dept_name, T2.dept_address, COUNT(*) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 3", "answer": "What is the name, address, and number of students in the departments that have the 3 most students?\nAdditional table information: table: college_1"} +{"question": "SELECT dorm_name FROM dorm WHERE student_capacity > 300", "answer": "What are the names of all the dorms that can accomdate more than 300 students?\nAdditional table information: table: dorm_1"} +{"question": "SELECT decor, AVG(basePrice), MIN(basePrice) FROM Rooms GROUP BY decor", "answer": "What is the average minimum and price of the rooms for each different decor.\nAdditional table information: table: inn_1"} +{"question": "SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "Find the name of the customers who use the most frequently used payment method.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name = 'Open'", "answer": "What is the description of the claim status 'Open'?\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT COUNT(*) FROM scientists WHERE NOT ssn IN (SELECT scientist FROM AssignedTo)", "answer": "How many scientists do not have any projects assigned to them?\nAdditional table information: table: scientist_1"} +{"question": "SELECT COUNT(*) FROM Person WHERE age > (SELECT MAX(age) FROM person WHERE job = 'engineer')", "answer": "Find the number of people whose age is greater than all engineers.\nAdditional table information: table: network_2"} +{"question": "SELECT MIN(T1.duration), MIN(T2.rating), T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is NULLS FIRST", "answer": "What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre?\nAdditional table information: table: music_1"} +{"question": "SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY SUM(degrees) DESC LIMIT 1", "answer": "In what year was the most degrees conferred?\nAdditional table information: table: csu_1"} +{"question": "SELECT stu_fname, stu_lname, stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1", "answer": "What is the first and last name of the youngest student with a GPA above 3, and what is their GPA?\nAdditional table information: table: college_1"} +{"question": "SELECT SUM(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan'", "answer": "What is the total revenue of all companies whose main office is at Tokyo or Taiwan?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT product_name, typical_buying_price FROM products", "answer": "What are the names and buying prices of all the products?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT milliseconds FROM tracks WHERE name = 'Fast As a Shark'", "answer": "How long does track Fast As a Shark has?\nAdditional table information: table: store_1"} +{"question": "SELECT T2.Birth_Date, T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC LIMIT 1", "answer": "What are the birth date and birth place of the body builder with the highest total points?\nAdditional table information: table: body_builder"} +{"question": "SELECT T1.purchase_details FROM PURCHASES AS T1 JOIN TRANSACTIONS AS T2 ON T1.purchase_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction > 10000", "answer": "What are the purchase details of transactions with amount bigger than 10000?\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT allergytype FROM Allergy_type WHERE allergy = 'Cat'", "answer": "What is allergy type of a cat allergy?\nAdditional table information: table: allergy_1"} +{"question": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.age < 18", "answer": "How many members of club 'Bootup Baltimore' are younger than 18?\nAdditional table information: table: club_1"} +{"question": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211' AND T1.stu_lname LIKE 'S%'", "answer": "What is the first name of the student whose last name starting with the letter S and is taking ACCT-211 class?\nAdditional table information: table: college_1"} +{"question": "SELECT SUM(enr) FROM college WHERE NOT cName IN (SELECT cName FROM tryout WHERE pPos = 'goalie')", "answer": "What is the total number of students enrolled in schools without any goalies?\nAdditional table information: table: soccer_2"} +{"question": "SELECT name, address_road, city FROM branch ORDER BY open_year NULLS FIRST", "answer": "Show name, address road, and city for all branches sorted by open year.\nAdditional table information: table: shop_membership"} +{"question": "SELECT nickname FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "answer": "What is the nickname of the employee named Janessa Sawayn?\nAdditional table information: table: driving_school"} +{"question": "SELECT employee_name FROM Employees EXCEPT SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id", "answer": "List the employees who have not showed up in any circulation history of documents. List the employee's name.\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1", "answer": "Show the detail of vehicle with id 1.\nAdditional table information: table: driving_school"} +{"question": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM checking)", "answer": "Find the name of accounts whose checking balance is below the average checking balance.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT BirthDate FROM EMPLOYEE WHERE City = 'Edmonton'", "answer": "What are the birth dates of employees living in Edmonton?\nAdditional table information: table: chinook_1"} +{"question": "SELECT DISTINCT name FROM genres", "answer": "List all different genre types.\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(*) FROM appointment", "answer": "How many appointments are there?\nAdditional table information: table: hospital_1"} +{"question": "SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' ORDER BY emp_dob NULLS FIRST", "answer": "What are the first names of all employees that are professors ordered by date of birth?\nAdditional table information: table: college_1"} +{"question": "SELECT SUM(Enrollment), affiliation FROM university WHERE founded > 1850 GROUP BY affiliation", "answer": "What are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type?\nAdditional table information: table: university_basketball"} +{"question": "SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T3.cost > 5000", "answer": "Which physicians are trained in procedures that are more expensive than 5000?\nAdditional table information: table: hospital_1"} +{"question": "SELECT project_id FROM Documents GROUP BY project_id HAVING COUNT(*) >= 2", "answer": "Show the ids for projects with at least 2 documents.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID", "answer": "What are the names of entrepreneurs?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff", "answer": "Which last names are both used by customers and by staff?\nAdditional table information: table: driving_school"} +{"question": "SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Le Pop'", "answer": "Who performed the song named 'Le Pop'?\nAdditional table information: table: music_2"} +{"question": "SELECT T1.name, T1.city, T2.dst_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid GROUP BY T2.dst_apid ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name and city of the airport that the most routes end at?\nAdditional table information: table: flight_4"} +{"question": "SELECT T1.customer_name FROM customers AS T1, orders AS T2, 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", "answer": "List the names of customers who have once canceled the purchase of the product 'food' (the item status is 'Cancel').\nAdditional table information: table: tracking_orders"} +{"question": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1", "answer": "What are the names of the courses that have exactly 1 student enrollment?\nAdditional table information: table: e_learning"} +{"question": "SELECT COUNT(*), time_of_day FROM broadcast GROUP BY time_of_day", "answer": "how many programs are broadcast in each time section of the day?\nAdditional table information: table: program_share"} +{"question": "SELECT COUNT(DISTINCT school_id) FROM basketball_match", "answer": "Count the number of schools that have had basketball matches.\nAdditional table information: table: university_basketball"} +{"question": "SELECT Fname, Lname FROM Student", "answer": "Show first name and last name for all students.\nAdditional table information: table: allergy_1"} +{"question": "SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2004 AND T2.campus = 'San Francisco State University'", "answer": "How many faculty lines are there in 'San Francisco State University' in year 2004?\nAdditional table information: table: csu_1"} +{"question": "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'", "answer": "How long is the total lesson time took by customer with first name as Rylan and last name as Goodwin?\nAdditional table information: table: driving_school"} +{"question": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id, customers AS t3 GROUP BY t3.customer_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Which products has been complained by the customer who has filed least amount of complaints?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT t1.dname FROM department AS t1 JOIN dept_locations AS t2 ON t1.dnumber = t2.dnumber WHERE t2.dlocation = 'Houston'", "answer": "Find the names of departments that are located in Houston.\nAdditional table information: table: company_1"} +{"question": "SELECT minister, party_name FROM party ORDER BY took_office DESC", "answer": "Who are the ministers and what parties do they belong to, listed descending by the times they took office?\nAdditional table information: table: party_people"} +{"question": "SELECT name FROM person EXCEPT SELECT name FROM PersonFriend", "answer": "What are the names of all people who do not have friends?\nAdditional table information: table: network_2"} +{"question": "SELECT Country_name, Capital FROM country", "answer": "What are the names and capitals of each country?\nAdditional table information: table: match_season"} +{"question": "SELECT T1.first_name, T1.last_name, COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 10", "answer": "What are the top 10 customers' first and last names by total number of orders and how many orders did they make?\nAdditional table information: table: store_1"} +{"question": "SELECT SUM(number_deaths), SUM(damage_millions_USD) FROM storm WHERE max_speed > (SELECT AVG(max_speed) FROM storm)", "answer": "What is the total number of deaths and damage for all storms with a max speed greater than the average?\nAdditional table information: table: storm_record"} +{"question": "SELECT COUNT(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.gender = 'M'", "answer": "What are the total number of students who are living in a male dorm?\nAdditional table information: table: dorm_1"} +{"question": "SELECT SUM(crs_credit), dept_code FROM course GROUP BY dept_code", "answer": "How many credits does the department offer?\nAdditional table information: table: college_1"} +{"question": "SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING COUNT(T1.track_id) > 100", "answer": "What are the names of all playlists that have more than 100 tracks?\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(*), T1.blockcode FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockcode", "answer": "How many rooms are located for each block code?\nAdditional table information: table: hospital_1"} +{"question": "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", "answer": "What are the names of projects that require more than 300 hours, and how many scientists are assigned to each?\nAdditional table information: table: scientist_1"} +{"question": "SELECT f_id FROM song WHERE resolution > (SELECT MAX(resolution) FROM song WHERE rating < 8)", "answer": "What is ids of the songs whose resolution is higher than the resolution of any songs with rating lower than 8?\nAdditional table information: table: music_1"} +{"question": "SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code = T2.color_code WHERE T2.color_description = 'yellow'", "answer": "What is the name of the product with the color description 'yellow'?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT amount FROM payment ORDER BY amount DESC LIMIT 1", "answer": "What is the largest payment amount?\nAdditional table information: table: sakila_1"} +{"question": "SELECT eid, name FROM Employee ORDER BY salary DESC LIMIT 1", "answer": "What is the id and name of the employee with the highest salary?\nAdditional table information: table: flight_1"} +{"question": "SELECT id FROM trip ORDER BY duration NULLS FIRST LIMIT 1", "answer": "What is the id of the shortest trip?\nAdditional table information: table: bike_1"} +{"question": "SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the id and full name of the customer with the most accounts.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT role_code, role_name, role_description FROM ROLES", "answer": "What are all the role codes, role names, and role descriptions?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed", "answer": "Which employees do not destroy any document? Find their employee ids.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT COUNT(*), SUM(student_capacity), gender FROM dorm GROUP BY gender", "answer": "How many dorms are there and what is the total capacity for each gender?\nAdditional table information: table: dorm_1"} +{"question": "SELECT COUNT(*) FROM people WHERE NOT people_id IN (SELECT People_ID FROM body_builder)", "answer": "How many persons are not body builders?\nAdditional table information: table: body_builder"} +{"question": "SELECT name FROM artist EXCEPT SELECT T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.year = 2004", "answer": "Show all artist names who didn't have an exhibition in 2004.\nAdditional table information: table: theme_gallery"} +{"question": "SELECT DISTINCT Carrier FROM phone WHERE Memory_in_G > 32", "answer": "List the distinct carriers of phones with memories bigger than 32.\nAdditional table information: table: phone_market"} +{"question": "SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees)", "answer": "Find the employee id for all employees who earn more than the average salary.\nAdditional table information: table: hr_1"} +{"question": "SELECT Support_rate, Consider_rate, Oppose_rate FROM candidate ORDER BY unsure_rate NULLS FIRST", "answer": "Please list support, consider, and oppose rates for each candidate in ascending order by unsure rate.\nAdditional table information: table: candidate_poll"} +{"question": "SELECT MIN(market_value), MAX(market_value), AVG(market_value) FROM company", "answer": "What is the minimum, maximum, and average market value for every company?\nAdditional table information: table: gas_company"} +{"question": "SELECT incident_type_description FROM Ref_Incident_Type WHERE incident_type_code = 'VIOLENCE'", "answer": "What is the incident type description for the incident type with code 'VIOLENCE'?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT COUNT(*) FROM scientists", "answer": "How many scientists are there?\nAdditional table information: table: scientist_1"} +{"question": "SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = 'Heilo' AND T3.title = 'Le Pop'", "answer": "What instrument did the musician with last name 'Heilo' use in the song 'Le Pop'?\nAdditional table information: table: music_2"} +{"question": "SELECT t4.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id JOIN event AS t3 ON t2.event_id = t3.id JOIN stadium AS t4 ON t4.id = t3.stadium_id WHERE t1.nationality = 'Australia'", "answer": "Find the names of stadiums that some Australian swimmers have been to.\nAdditional table information: table: swimming"} +{"question": "SELECT MAX(settlement_amount), MIN(settlement_amount) FROM settlements", "answer": "Find the maximum and minimum settlement amount.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT employee_id, first_name, last_name FROM employees WHERE department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%T%')", "answer": "display the employee number and name( first name and last name ) for all employees who work in a department with any employee whose name contains a \u2019T\u2019.\nAdditional table information: table: hr_1"} +{"question": "SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID GROUP BY T1.Device_ID HAVING COUNT(*) > 1", "answer": "What are the carriers of devices that are in stock in more than a single shop?\nAdditional table information: table: device"} +{"question": "SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000", "answer": "what is the phone number of employees whose salary is in the range of 8000 and 12000?\nAdditional table information: table: hr_1"} +{"question": "SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017", "answer": "Find the distinct names of all races held between 2014 and 2017?\nAdditional table information: table: formula_1"} +{"question": "SELECT name, salary FROM Employee ORDER BY salary NULLS FIRST", "answer": "What is the name and salary of all employees in order of salary?\nAdditional table information: table: flight_1"} +{"question": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.age > 18", "answer": "Count the number of members in club 'Bootup Baltimore' whose age is above 18.\nAdditional table information: table: club_1"} +{"question": "SELECT Name FROM county_public_safety WHERE NOT County_ID IN (SELECT County_ID FROM city)", "answer": "What are the names of counties that do not contain any cities?\nAdditional table information: table: county_public_safety"} +{"question": "SELECT DISTINCT rank FROM Faculty", "answer": "What ranks do we have for faculty?\nAdditional table information: table: activity_1"} +{"question": "SELECT Delegate, Committee FROM election", "answer": "Show the delegate and committee information of elections.\nAdditional table information: table: election"} +{"question": "SELECT title FROM course GROUP BY title HAVING COUNT(*) > 1", "answer": "What are the titles of courses that are offered in more than one department?\nAdditional table information: table: college_2"} +{"question": "SELECT T2.employee_name, T3.employee_name FROM Documents_to_be_destroyed AS T1 JOIN Employees AS T2 ON T1.Destruction_Authorised_by_Employee_ID = T2.employee_id JOIN Employees AS T3 ON T1.Destroyed_by_Employee_ID = T3.employee_id", "answer": "What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT TYPE, COUNT(*) FROM artwork GROUP BY TYPE", "answer": "Please show different types of artworks with the corresponding number of artworks of each type.\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT COUNT(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Art' AND T2.customer_last_name = 'Turcotte'", "answer": "Count the number of cards the customer with the first name Art and last name Turcotte has.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT DISTINCT T2.emp_fname, T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Computer Info. Systems'", "answer": "What are the different first names and highest degree attained for professors teaching in the Computer Information Systems department?\nAdditional table information: table: college_1"} +{"question": "SELECT sex, COUNT(*) FROM Faculty WHERE rank = 'AsstProf' GROUP BY sex", "answer": "Show the number of male and female assistant professors.\nAdditional table information: table: activity_1"} +{"question": "SELECT T1.employee_id, T2.job_title FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.department_id = 80", "answer": "what are the employee ids and job titles for employees in department 80?\nAdditional table information: table: hr_1"} +{"question": "SELECT T2.name, T2.year FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T1.driverid = T3.driverid WHERE T3.forename = 'Lewis'", "answer": "Give me a list of names and years of races that had any driver whose forename is Lewis?\nAdditional table information: table: formula_1"} +{"question": "SELECT department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY department_name", "answer": "display the department name and number of employees in each of the department.\nAdditional table information: table: hr_1"} +{"question": "SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma'", "answer": "Give me the average prices of wines that are produced by appelations in Sonoma County.\nAdditional table information: table: wine_1"} +{"question": "SELECT DISTINCT fname FROM student", "answer": "Find each student's first name.\nAdditional table information: table: club_1"} +{"question": "SELECT title FROM Movie WHERE director = 'James Cameron' OR YEAR < 1980", "answer": "What are the names of all movies made before 1980 or had James Cameron as the director?\nAdditional table information: table: movie_1"} +{"question": "SELECT COUNT(*), dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code", "answer": "Find the number of classes in each department.\nAdditional table information: table: college_1"} +{"question": "SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = 'United States'", "answer": "What are the different fates of the mission that involved ships from the United States?\nAdditional table information: table: ship_mission"} +{"question": "SELECT physician, department FROM affiliated_with WHERE primaryaffiliation = 1", "answer": "What are each physician's employee id and department id primarily affiliated.\nAdditional table information: table: hospital_1"} +{"question": "SELECT Case_burden FROM county_public_safety ORDER BY Population DESC", "answer": "Show the case burden of counties in descending order of population.\nAdditional table information: table: county_public_safety"} +{"question": "SELECT AVG(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = 'AIB'", "answer": "What is the average number of points for players from the 'AIB' club?\nAdditional table information: table: sports_competition"} +{"question": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = 'hot'", "answer": "Count the number of products with the 'hot' charactersitic.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name = 'Green'", "answer": "What is the attribute data type of the attribute with name 'Green'?\nAdditional table information: table: product_catalog"} +{"question": "SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID WHERE T2.value_points > 70", "answer": "Show names of technicians who are assigned to repair machines with value point more than 70.\nAdditional table information: table: machine_repair"} +{"question": "SELECT T1.name, T1.num_employees FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id WHERE T2.temporary_acting = 'Yes'", "answer": "Show the name and number of employees for the departments managed by heads whose temporary acting value is 'Yes'?\nAdditional table information: table: department_management"} +{"question": "SELECT COUNT(DISTINCT rating) FROM film", "answer": "Count the number of different film ratings.\nAdditional table information: table: sakila_1"} +{"question": "SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = 'lead'", "answer": "How many songs have vocals of type lead?\nAdditional table information: table: music_2"} +{"question": "SELECT COUNT(*) FROM products WHERE product_price > (SELECT AVG(product_price) FROM products)", "answer": "How many products have a price higher than the average?\nAdditional table information: table: customers_and_products_contacts"} +{"question": "SELECT Payment_Method_Code, Date_Payment_Made, Amount_Payment FROM Payments ORDER BY Date_Payment_Made ASC NULLS FIRST", "answer": "List the method, date and amount of all the payments, in ascending order of date.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT T2.dept_name, T1.dept_code FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.prof_high_degree = 'Ph.D.' GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of department where has the largest number of professors with a Ph.D. degree?\nAdditional table information: table: college_1"} +{"question": "SELECT T2.name, COUNT(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid", "answer": "Show aircraft names and number of flights for each aircraft.\nAdditional table information: table: flight_1"} +{"question": "SELECT DISTINCT President_Vote, VICE_President_Vote FROM VOTING_RECORD", "answer": "List all the distinct president votes and the vice president votes.\nAdditional table information: table: voter_2"} +{"question": "SELECT T1.Allergy, T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = 'Lisa' ORDER BY T1.Allergy NULLS FIRST", "answer": "What are the allergies the girl named Lisa has? And what are the types of them? Order the result by allergy names.\nAdditional table information: table: allergy_1"} +{"question": "SELECT COUNT(*), T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name", "answer": "Find the number of routes for each source airport and the airport name.\nAdditional table information: table: flight_4"} +{"question": "SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5", "answer": "what are the last names of the teachers who teach grade 5?\nAdditional table information: table: student_1"} +{"question": "SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING COUNT(*) > 2", "answer": "Find all the policy types that are used by more than 2 customers.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT COUNT(*), country FROM airports GROUP BY country ORDER BY COUNT(*) DESC", "answer": "What is the number of airports per country, ordered from most to least?\nAdditional table information: table: flight_4"} +{"question": "SELECT T1.part_id, T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id JOIN Skills_Required_To_Fix AS T3 ON T2.part_fault_id = T3.part_fault_id GROUP BY T1.part_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which part fault requires the most number of skills to fix? List part id and name.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT COUNT(*) FROM Documents WHERE NOT document_id IN (SELECT document_id FROM Documents_with_expenses)", "answer": "Count the number of documents that do not have expenses.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY SUM(transaction_amount) DESC LIMIT 1", "answer": "What is the transaction type that has processed the greatest total amount in transactions?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT building, room_number FROM classroom WHERE capacity BETWEEN 50 AND 100", "answer": "What are the room numbers and corresponding buildings for classrooms which can seat between 50 to 100 students?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(*) FROM journalist", "answer": "How many journalists are there?\nAdditional table information: table: news_report"} +{"question": "SELECT name, distance FROM Aircraft WHERE aid = 12", "answer": "What is the name and distance for aircraft with id 12?\nAdditional table information: table: flight_1"} +{"question": "SELECT COUNT(DISTINCT name) FROM projects", "answer": "Find the number of distinct projects.\nAdditional table information: table: scientist_1"} +{"question": "SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id", "answer": "What are the names of the different banks that have provided loans?\nAdditional table information: table: loan_1"} +{"question": "SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121", "answer": "What are the ids of the courses that are registered or attended by the student whose id is 121?\nAdditional table information: table: student_assessment"} +{"question": "SELECT DISTINCT date_moved_in FROM residents", "answer": "What are the distinct move in dates of the residents?\nAdditional table information: table: local_govt_and_lot"} +{"question": "SELECT DISTINCT firstname, lastname FROM teachers", "answer": "Report the first name and last name of all the teachers.\nAdditional table information: table: student_1"} +{"question": "SELECT AVG(Age) FROM artist", "answer": "What is the average age of all artists?\nAdditional table information: table: music_4"} +{"question": "SELECT T2.Lifespan FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY Vote_Percent DESC", "answer": "What are the lifespans of representatives in descending order of vote percent?\nAdditional table information: table: election_representative"} +{"question": "SELECT card_number, name, hometown FROM member ORDER BY LEVEL DESC", "answer": "Show card number, name, and hometown for all members in a descending order of level.\nAdditional table information: table: shop_membership"} +{"question": "SELECT T1.Status FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the status of the city that has hosted the most competitions?\nAdditional table information: table: farm"} +{"question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'TARRING' AND T2.lastname = 'LEIA'", "answer": "Find the number of students taught by TARRING LEIA.\nAdditional table information: table: student_1"} +{"question": "SELECT project_id, COUNT(*) FROM Documents GROUP BY project_id", "answer": "Show project ids and the number of documents in each project.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the last name of the musician that have produced the most songs?\nAdditional table information: table: music_2"} +{"question": "SELECT COUNT(*) FROM stadium", "answer": "How many stadiums are there?\nAdditional table information: table: swimming"} +{"question": "SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 1", "answer": "Which apartments have unit status availability of both 0 and 1? Return their apartment numbers.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT problem_log_id, log_entry_description FROM problem_log", "answer": "List all the log ids and their descriptions from the problem logs.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT COUNT(*) FROM party_events", "answer": "Count the number of party events.\nAdditional table information: table: party_people"} +{"question": "SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1", "answer": "Find the author who achieved the highest score in a submission.\nAdditional table information: table: workshop_paper"} +{"question": "SELECT T2.location_name, T1.location_code FROM Document_locations AS T1 JOIN Ref_locations AS T2 ON T1.location_code = T2.location_code GROUP BY T1.location_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What are the name and code of the location with the smallest number of documents?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT COUNT(*) FROM school", "answer": "How many schools are there?\nAdditional table information: table: school_finance"} +{"question": "SELECT Date, Venue FROM workshop ORDER BY Venue NULLS FIRST", "answer": "Sort the each workshop in alphabetical order of the venue. Return the date and venue of each workshop.\nAdditional table information: table: workshop_paper"} +{"question": "SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2", "answer": "What are the nations that have more than two ships?\nAdditional table information: table: ship_mission"} +{"question": "SELECT user_name, password FROM users GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the usernames and passwords of users that have the most common role?\nAdditional table information: table: document_management"} +{"question": "SELECT LOCATION FROM school ORDER BY Enrollment ASC NULLS FIRST", "answer": "List the locations of schools in ascending order of enrollment.\nAdditional table information: table: school_player"} +{"question": "SELECT Carrier FROM phone WHERE Memory_in_G < 32 INTERSECT SELECT Carrier FROM phone WHERE Memory_in_G > 64", "answer": "Show the carriers that have both phones with memory smaller than 32 and phones with memory bigger than 64.\nAdditional table information: table: phone_market"} +{"question": "SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1)", "answer": "Find all the stores in the district with the most population.\nAdditional table information: table: store_product"} +{"question": "SELECT name, average_attendance, total_attendance FROM stadium EXCEPT SELECT T2.name, T2.average_attendance, T2.total_attendance FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id", "answer": "Show the name, average attendance, total attendance for stadiums where no accidents happened.\nAdditional table information: table: game_injury"} +{"question": "SELECT name FROM races WHERE TIME > '12:00:00' OR TIME < '09:00:00'", "answer": "What are the names of all races that occurred after 12:00:00 or before 09:00:00?\nAdditional table information: table: formula_1"} +{"question": "SELECT COUNT(*) FROM ALBUM", "answer": "How many albums are there?\nAdditional table information: table: chinook_1"} +{"question": "SELECT DISTINCT Nominee FROM musical WHERE Award <> 'Tony Award'", "answer": "What are the distinct nominees of the musicals with the award that is not 'Tony Award'?\nAdditional table information: table: musical"} +{"question": "SELECT T1.student_id, T2.first_name FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the id and first name of the student that has the most number of assessment notes?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo", "answer": "What are the ids of all students who don't play sports?\nAdditional table information: table: game_1"} +{"question": "SELECT max_page_size FROM product GROUP BY max_page_size HAVING COUNT(*) > 3", "answer": "Find the list of page size which have more than 3 product listed\nAdditional table information: table: store_product"} +{"question": "SELECT Name FROM People ORDER BY Name ASC NULLS FIRST", "answer": "Return the names of people, ordered alphabetically.\nAdditional table information: table: gymnast"} +{"question": "SELECT Country FROM market ORDER BY Number_cities DESC", "answer": "What are the countries for each market ordered by decreasing number of cities?\nAdditional table information: table: film_rank"} +{"question": "SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.attribute_value = (SELECT attribute_value FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_value ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "Find the entry names of the catalog with the attribute that have the most entries.\nAdditional table information: table: product_catalog"} +{"question": "SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which reign is the most common among wrestlers?\nAdditional table information: table: wrestler"} +{"question": "SELECT T1.product_name, SUM(T2.order_quantity) FROM products AS T1 JOIN order_items AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_id", "answer": "Show the product name and total order quantity for each product.\nAdditional table information: table: customers_and_products_contacts"} +{"question": "SELECT COUNT(DISTINCT student_id) FROM Students_in_Detention", "answer": "How many distinct students have been in detention?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT Fname, Lname, Age FROM Student WHERE Sex = 'F'", "answer": "What are the full names and ages for all female students whose sex is F?\nAdditional table information: table: allergy_1"} +{"question": "SELECT T2.Building FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which building does the instructor who teaches the most number of courses live in?\nAdditional table information: table: college_3"} +{"question": "SELECT * FROM instructor ORDER BY salary NULLS FIRST", "answer": "List the information of all instructors ordered by their salary in ascending order.\nAdditional table information: table: college_2"} +{"question": "SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'", "answer": "Find the names of schools that have some players in the mid position but not in the goalie position.\nAdditional table information: table: soccer_2"} +{"question": "SELECT T1.transaction_type_description, T2.date_of_transaction FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code WHERE T2.share_count < 10", "answer": "Show the transaction type descriptions and dates if the share count is smaller than 10.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT COUNT(DISTINCT product_type_code) FROM products", "answer": "Find the number of different product types.\nAdditional table information: table: department_store"} +{"question": "SELECT SUM(total) FROM invoices WHERE billing_city = 'Chicago' AND billing_state = 'IL'", "answer": "What are the total amount of money in the invoices billed from Chicago, Illinois?\nAdditional table information: table: store_1"} +{"question": "SELECT document_id FROM Documents WHERE document_type_code = 'CV' EXCEPT SELECT document_id FROM Documents_with_expenses", "answer": "What are the ids of documents with the type code CV that do not have expenses.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t2.support_rate < t2.oppose_rate", "answer": "What are the names of candidates who have a lower support rate than oppose rate?\nAdditional table information: table: candidate_poll"} +{"question": "SELECT name FROM patient EXCEPT SELECT T1.name FROM patient AS T1 JOIN Prescribes AS T2 ON T2.Patient = T1.SSN JOIN Medication AS T3 ON T2.Medication = T3.Code WHERE T3.name = 'Procrastin-X'", "answer": "Find the names of patients who are not using the medication of Procrastin-X.\nAdditional table information: table: hospital_1"} +{"question": "SELECT Aircraft FROM aircraft WHERE NOT Aircraft_ID IN (SELECT Winning_Aircraft FROM MATCH)", "answer": "List the names of aircrafts and that did not win any match.\nAdditional table information: table: aircraft"} +{"question": "SELECT title FROM Movie WHERE YEAR > (SELECT MAX(YEAR) FROM Movie WHERE director = 'Steven Spielberg')", "answer": "What is the names of movies whose created year is after all movies directed by Steven Spielberg?\nAdditional table information: table: movie_1"} +{"question": "SELECT COUNT(*) FROM train WHERE name LIKE '%Express%'", "answer": "How many trains have 'Express' in their names?\nAdditional table information: table: station_weather"} +{"question": "SELECT T2.balance, T3.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance DESC", "answer": "Find the name, checking balance and savings balance of all accounts in the bank sorted by their total checking and savings balance in descending order.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT COUNT(*), Grape FROM WINE GROUP BY Grape", "answer": "How many wines are there for each grape?\nAdditional table information: table: wine_1"} +{"question": "SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public'", "answer": "Find the schools that were either founded after 1850 or public.\nAdditional table information: table: university_basketball"} +{"question": "SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2 ORDER BY College DESC", "answer": "What are the names of colleges that have two or more players, listed in descending alphabetical order?\nAdditional table information: table: match_season"} +{"question": "SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie')", "answer": "How many states that have some college students playing in the mid position but not in the goalie position.\nAdditional table information: table: soccer_2"} +{"question": "SELECT T3.Fname, T3.LName, T2.gradepoint FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID", "answer": "Find the student first and last names and grade points of all enrollments.\nAdditional table information: table: college_3"} +{"question": "SELECT COUNT(DISTINCT name) FROM products WHERE NOT name IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T2.name = 'Sony')", "answer": "How many products are not made by Sony?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT Nominee FROM musical WHERE Award = 'Tony Award' OR Award = 'Cleavant Derricks'", "answer": "Who are the nominees who were nominated for either of the Bob Fosse or Cleavant Derricks awards?\nAdditional table information: table: musical"} +{"question": "SELECT fname FROM authors WHERE lname = 'Ueno'", "answer": "What is the first name of the author with last name 'Ueno'?\nAdditional table information: table: icfp_1"} +{"question": "SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC", "answer": "What are the ages of the gymnasts, ordered descending by their total points?\nAdditional table information: table: gymnast"} +{"question": "SELECT town_city FROM customers WHERE customer_type_code = 'Good Credit Rating' GROUP BY town_city ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Which city has the least number of customers whose type code is 'Good Credit Rating'?\nAdditional table information: table: customer_complaints"} +{"question": "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'", "answer": "Find out the first name and last name of staff lived in city Damianfort.\nAdditional table information: table: driving_school"} +{"question": "SELECT name FROM storm WHERE NOT storm_id IN (SELECT storm_id FROM affected_region)", "answer": "Show the name of storms which don't have affected region in record.\nAdditional table information: table: storm_record"} +{"question": "SELECT T3.product_name, COUNT(*) FROM orders AS T1, 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", "answer": "List the name and count of each product in all orders.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT DISTINCT product_name FROM product ORDER BY product_id NULLS FIRST", "answer": "List all the distinct product names ordered by product id?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1", "answer": "Which party had the most hosts? Give me the party location.\nAdditional table information: table: party_host"} +{"question": "SELECT T2.customer_name, T3.city, T1.date_from, T1.date_to FROM customer_address_history AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id JOIN addresses AS T3 ON T1.address_id = T3.address_id", "answer": "Show the customer name, customer address city, date from, and date to for each customer address history.\nAdditional table information: table: customers_and_products_contacts"} +{"question": "SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Tennis Club'", "answer": "Compute the average age of the members in the club 'Tennis Club'.\nAdditional table information: table: club_1"} +{"question": "SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id = T2.document_id JOIN Ref_locations AS T3 ON T2.location_code = T3.location_code WHERE T1.document_name = 'Robin CV'", "answer": "Show the location name for document 'Robin CV'.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1", "answer": "List the most common type of competition.\nAdditional table information: table: sports_competition"} +{"question": "SELECT Name FROM Team", "answer": "What are the names of all teams?\nAdditional table information: table: match_season"} +{"question": "SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament'", "answer": "which countries did participated in both Friendly and Tournament type competitions.\nAdditional table information: table: sports_competition"} +{"question": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC", "answer": "What are the names of body builders in descending order of total scores?\nAdditional table information: table: body_builder"} +{"question": "SELECT date_of_transaction, share_count FROM TRANSACTIONS", "answer": "Show all date and share count of transactions.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT AVG(budget_million), MAX(budget_million), MIN(budget_million) FROM movie WHERE YEAR < 2000", "answer": "Return the average, maximum, and minimum budgets in millions for movies made before the year 2000.\nAdditional table information: table: culture_company"} +{"question": "SELECT COUNT(*) FROM Rooms WHERE bedType = 'King'", "answer": "How many rooms have a king bed?\nAdditional table information: table: inn_1"} +{"question": "SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.FirstName = 'Astrid' AND LastName = 'Gruber'", "answer": "Find all invoice dates corresponding to customers with first name Astrid and last name Gruber.\nAdditional table information: table: chinook_1"} +{"question": "SELECT detention_summary FROM Detention", "answer": "Return all detention summaries.\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT DISTINCT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age < (SELECT AVG(age) FROM person)", "answer": "Who has friends that are younger than the average age?\nAdditional table information: table: network_2"} +{"question": "SELECT Address FROM LOCATIONS WHERE Location_Name = 'UK Gallery'", "answer": "What is the address of the location 'UK Gallery'?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T1.club_id, T1.gold FROM match_result AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T1.club_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "How many gold medals has the club with the most coaches won?\nAdditional table information: table: riding_club"} +{"question": "SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC", "answer": "Find the name of players whose card is yes in the descending order of training hours.\nAdditional table information: table: soccer_2"} +{"question": "SELECT COUNT(*) FROM artist WHERE country = 'Bangladesh'", "answer": "How many artists are from Bangladesh?\nAdditional table information: table: music_1"} +{"question": "SELECT T2.cmi_cross_ref_id, T2.master_customer_id, COUNT(*) FROM Business_Rates AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id GROUP BY T2.cmi_cross_ref_id", "answer": "How many business rates are related to each cmi cross reference? List cross reference id, master customer id and the n\nAdditional table information: table: local_govt_mdm"} +{"question": "SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011", "answer": "What are the names of races held between 2009 and 2011?\nAdditional table information: table: formula_1"} +{"question": "SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id GROUP BY t2.swimmer_id HAVING COUNT(*) >= 2", "answer": "Find the name of the swimmer who has at least 2 records.\nAdditional table information: table: swimming"} +{"question": "SELECT COUNT(*) FROM Lessons WHERE lesson_status_code = 'Cancelled'", "answer": "How many lessons were in cancelled state?\nAdditional table information: table: driving_school"} +{"question": "SELECT COUNT(*) FROM accounts", "answer": "How many accounts are there in total?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT COUNT(*) FROM Ref_colors WHERE NOT color_code IN (SELECT color_code FROM products)", "answer": "How many colors are never used by any product?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT Nationality, COUNT(*) FROM HOST GROUP BY Nationality", "answer": "Show different nationalities along with the number of hosts of each nationality.\nAdditional table information: table: party_host"} +{"question": "SELECT COUNT(*) FROM Student WHERE age > 18 AND NOT StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food' OR T2.allergytype = 'animal')", "answer": "Find the number of students who are older than 18 and do not have allergy to either food or animal.\nAdditional table information: table: allergy_1"} +{"question": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id", "answer": "Find distinct cities of address of students?\nAdditional table information: table: student_assessment"} +{"question": "SELECT asset_acquired_date FROM Assets ORDER BY asset_acquired_date ASC NULLS FIRST LIMIT 1", "answer": "When was the first asset acquired?\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT T3.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T1.name = 'CACHEbox' INTERSECT SELECT T3.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T1.name = 'Fasterfox'", "answer": "List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'.\nAdditional table information: table: browser_web"} +{"question": "SELECT * FROM departments WHERE department_name = 'Marketing'", "answer": "Display all the information about the department Marketing.\nAdditional table information: table: hr_1"} +{"question": "SELECT DISTINCT start_station_name FROM trip WHERE duration < 100", "answer": "What are all the different start station names for a trip that lasted less than 100?\nAdditional table information: table: bike_1"} +{"question": "SELECT COUNT(*) FROM budget WHERE budgeted > 3000 AND YEAR <= 2001", "answer": "Count the number of budgets in year 2001 or before whose budgeted amount is greater than 3000\nAdditional table information: table: school_finance"} +{"question": "SELECT title, director FROM film WHERE NOT film_id IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.Market_ID WHERE country = 'China')", "answer": "Return the titles and directors of films that were never in the market of China.\nAdditional table information: table: film_rank"} +{"question": "SELECT Model_name FROM chip_model WHERE Launch_year BETWEEN 2002 AND 2004", "answer": "the names of models that launched between 2002 and 2004.\nAdditional table information: table: phone_1"} +{"question": "SELECT COUNT(*) FROM game WHERE season > 2007", "answer": "How many games are held after season 2007?\nAdditional table information: table: game_injury"} +{"question": "SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_id", "answer": "Which students not enrolled in any course? Find their personal names.\nAdditional table information: table: e_learning"} +{"question": "SELECT COUNT(*) FROM products WHERE product_category_code = 'Spices' AND typical_buying_price > 1000", "answer": "How many products are in the 'Spices' category and have a typical price of over 1000?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "What are the ids of the students who registered for some courses but had the least number of courses for all students?\nAdditional table information: table: student_assessment"} +{"question": "SELECT headquarters FROM company WHERE main_industry = 'Banking' GROUP BY headquarters HAVING COUNT(*) >= 2", "answer": "Show headquarters with at least two companies in the banking industry.\nAdditional table information: table: gas_company"} +{"question": "SELECT AVG(student_capacity), SUM(student_capacity) FROM dorm WHERE gender = 'X'", "answer": "What is the average and total capacity for all dorms who are of gender X?\nAdditional table information: table: dorm_1"} +{"question": "SELECT COUNT(*) FROM Customers", "answer": "How many customers are there?\nAdditional table information: table: driving_school"} +{"question": "SELECT flno FROM Flight WHERE origin = 'Los Angeles'", "answer": "Show all flight number from Los Angeles.\nAdditional table information: table: flight_1"} +{"question": "SELECT T1.Customer_Event_ID, T1.property_id FROM Customer_Events AS T1 JOIN Customer_Event_Notes AS T2 ON T1.Customer_Event_ID = T2.Customer_Event_ID GROUP BY T1.customer_event_id HAVING COUNT(*) BETWEEN 1 AND 3", "answer": "Which events have the number of notes between one and three? List the event id and the property id.\nAdditional table information: table: local_govt_and_lot"} +{"question": "SELECT product_id, product_name FROM products WHERE product_price < 600 OR product_price > 900", "answer": "Give the ids and names of products with price lower than 600 or higher than 900.\nAdditional table information: table: department_store"} +{"question": "SELECT director FROM Movie WHERE title = 'Avatar'", "answer": "Who is the director of movie Avatar?\nAdditional table information: table: movie_1"} +{"question": "SELECT COUNT(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code = T2.dept_code WHERE dept_name = 'Computer Info. Systems'", "answer": "How many courses does the department of Computer Information Systmes offer?\nAdditional table information: table: college_1"} +{"question": "SELECT CName FROM COURSE WHERE Credits = 1", "answer": "List all names of courses with 1 credit?\nAdditional table information: table: college_3"} +{"question": "SELECT T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Height DESC LIMIT 1", "answer": "Which company was started by the entrepreneur with the greatest height?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT course_description FROM COURSES WHERE course_name = 'database'", "answer": "Return the description for the courses named 'database'.\nAdditional table information: table: e_learning"} +{"question": "SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = 'West Germany'", "answer": "Show the distinct names of mountains climbed by climbers from country 'West Germany'.\nAdditional table information: table: climbing"} +{"question": "SELECT Name FROM journalist WHERE Nationality = 'England' OR Nationality = 'Wales'", "answer": "Show the names of journalists from 'England' or 'Wales'.\nAdditional table information: table: news_report"} +{"question": "SELECT allergytype, COUNT(*) FROM Allergy_type GROUP BY allergytype", "answer": "Show all allergy types and the number of allergies in each type.\nAdditional table information: table: allergy_1"} +{"question": "SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1", "answer": "Find the entry name of the catalog with the highest price (in USD).\nAdditional table information: table: product_catalog"} +{"question": "SELECT flno, distance FROM Flight ORDER BY price DESC LIMIT 1", "answer": "Show the flight number and distance of the flight with maximum price.\nAdditional table information: table: flight_1"} +{"question": "SELECT DISTINCT LOCATION FROM station", "answer": "What are all locations of train stations?\nAdditional table information: table: train_station"} +{"question": "SELECT Date_of_ceremony FROM music_festival WHERE Category = 'Best Song' AND RESULT = 'Awarded'", "answer": "What are the date of ceremony of music festivals with category 'Best Song' and result 'Awarded'?\nAdditional table information: table: music_4"} +{"question": "SELECT AVG(T1.ROM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = 'Nokia Corporation'", "answer": "What is the average ROM size of phones produced by the company named 'Nokia Corporation'?\nAdditional table information: table: phone_1"} +{"question": "SELECT invoice_number FROM invoices WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25'", "answer": "What are the invoice numbers created before 1989-09-03 or after 2007-12-25?\nAdditional table information: table: tracking_orders"} +{"question": "SELECT Draft_Pick_Number, Draft_Class FROM match_season WHERE POSITION = 'Defender'", "answer": "Show the draft pick numbers and draft classes of players whose positions are defenders.\nAdditional table information: table: match_season"} +{"question": "SELECT COUNT(*) FROM editor", "answer": "How many editors are there?\nAdditional table information: table: journal_committee"} +{"question": "SELECT COUNT(DISTINCT city) FROM airports WHERE country = 'Greenland'", "answer": "In how many cities are there airports in the country of Greenland?\nAdditional table information: table: flight_4"} +{"question": "SELECT name FROM races WHERE TIME > '12:00:00' OR TIME < '09:00:00'", "answer": "What are the names of races held after 12:00:00 or before 09:00:00?\nAdditional table information: table: formula_1"} +{"question": "SELECT Date FROM perpetrator ORDER BY Killed DESC", "answer": "List the date of perpetrators in descending order of the number of people killed.\nAdditional table information: table: perpetrator"} +{"question": "SELECT COUNT(DISTINCT Artist_ID) FROM volume", "answer": "Count the number of distinct artists who have volumes.\nAdditional table information: table: music_4"} +{"question": "SELECT origin FROM program ORDER BY origin NULLS FIRST", "answer": "What is the list of program origins ordered alphabetically?\nAdditional table information: table: program_share"} +{"question": "SELECT t1.name, t1.nationality FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' GROUP BY t2.swimmer_id HAVING COUNT(*) > 1", "answer": "Find the name and nationality of the swimmer who has won (i.e., has a result of 'win') more than 1 time.\nAdditional table information: table: swimming"} +{"question": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which room has the largest number of reservations?\nAdditional table information: table: inn_1"} +{"question": "SELECT T3.dept_name, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T1.emp_lname = 'Heffington'", "answer": "What is the name of the department and office location for the professor with the last name of Heffington?\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(DISTINCT UID) FROM tweets", "answer": "Find the number of users who posted some tweets.\nAdditional table information: table: twitter_1"} +{"question": "SELECT name, dept_name FROM student ORDER BY tot_cred NULLS FIRST", "answer": "Find the name of the students and their department names sorted by their total credits in ascending order.\nAdditional table information: table: college_2"} +{"question": "SELECT Police_force FROM county_public_safety WHERE LOCATION = 'East' INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = 'West'", "answer": "Which police forces operate in both counties that are located in the East and in the West?\nAdditional table information: table: county_public_safety"} +{"question": "SELECT FirstName, LastName FROM EMPLOYEE WHERE City = 'Calgary'", "answer": "Find the full names of employees living in the city of Calgary.\nAdditional table information: table: chinook_1"} +{"question": "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", "answer": "Which 3 wineries produce the most wines made from white grapes?\nAdditional table information: table: wine_1"} +{"question": "SELECT DISTINCT payment_method FROM customers", "answer": "Return all the distinct payment methods used by customers.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT state, acc_type, credit_score FROM customer WHERE no_of_loans = 0", "answer": "Find the state, account type, and credit score of the customer whose number of loan is 0.\nAdditional table information: table: loan_1"} +{"question": "SELECT T1.gender, T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.resolution NULLS FIRST LIMIT 1", "answer": "What is the gender and name of the artist who sang the song with the smallest resolution?\nAdditional table information: table: music_1"} +{"question": "SELECT employee_ID FROM Employees WHERE employee_name = 'Ebba'", "answer": "Show the id of the employee named Ebba.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT COUNT(*) FROM club", "answer": "Count the total number of clubs.\nAdditional table information: table: club_1"} +{"question": "SELECT name, date FROM races ORDER BY date DESC LIMIT 1", "answer": "What is the name and date of the race that occurred most recently?\nAdditional table information: table: formula_1"} +{"question": "SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1", "answer": "When was the school with the largest enrollment founded?\nAdditional table information: table: university_basketball"} +{"question": "SELECT document_name FROM documents EXCEPT SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code JOIN document_sections_images AS t3 ON t2.section_id = t3.section_id", "answer": "Find names of the document without any images.\nAdditional table information: table: document_management"} +{"question": "SELECT name FROM enzyme ORDER BY name DESC", "answer": "What are the names of enzymes in descending order?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT DISTINCT T1.name, T1.nationality FROM architect AS T1 JOIN mill AS t2 ON T1.id = T2.architect_id", "answer": "What are the distinct names and nationalities of the architects who have ever built a mill?\nAdditional table information: table: architecture"} +{"question": "SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4", "answer": "Give the distinct department ids of departments in which a manager is in charge of 4 or more employees?\nAdditional table information: table: hr_1"} +{"question": "SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration > (SELECT MIN(duration) FROM pitstops WHERE raceid = 841)", "answer": "Find the distinct driver id of all drivers that have a longer stop duration than some drivers in the race whose id is 841?\nAdditional table information: table: formula_1"} +{"question": "SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING MIN(bikes_available) < 7", "answer": "What are the ids of all stations that have a latitude above 37.4 and have never had less than 7 bikes available?\nAdditional table information: table: bike_1"} +{"question": "SELECT school_name FROM school WHERE NOT school_id IN (SELECT school_id FROM endowment)", "answer": "List the names of the schools without any endowment.\nAdditional table information: table: school_finance"} +{"question": "SELECT category, COUNT(*) FROM book_club GROUP BY category", "answer": "Show all book categories and the number of books in each category.\nAdditional table information: table: culture_company"} +{"question": "SELECT dorm_name FROM dorm WHERE NOT dormid IN (SELECT dormid FROM has_amenity)", "answer": "What are the names of all the dorms that don't have any amenities?\nAdditional table information: table: dorm_1"} +{"question": "SELECT COUNT(*), POSITION FROM player WHERE points < 30 GROUP BY POSITION", "answer": "find the number of players whose points are lower than 30 in each position.\nAdditional table information: table: sports_competition"} +{"question": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Weight DESC LIMIT 1", "answer": "What is the name of the perpetrator with the biggest weight.\nAdditional table information: table: perpetrator"} +{"question": "SELECT flag FROM ship GROUP BY flag ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which flag is most widely used among all ships?\nAdditional table information: table: ship_1"} +{"question": "SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which organisation type hires most research staff?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT COUNT(*) FROM Ref_calendar", "answer": "How many calendar items do we have?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT COUNT(*), rank FROM captain GROUP BY rank", "answer": "How many captains are in each rank?\nAdditional table information: table: ship_1"} +{"question": "SELECT T1.title, T3.name FROM course AS T1 JOIN teaches AS T2 ON T1.course_id = T2.course_id JOIN instructor AS T3 ON T2.id = T3.id WHERE YEAR = 2008 ORDER BY T1.title NULLS FIRST", "answer": "list in alphabetic order all course names and their instructors' names in year 2008.\nAdditional table information: table: college_2"} +{"question": "SELECT activity_name FROM Activity", "answer": "List all the activities we have.\nAdditional table information: table: activity_1"} +{"question": "SELECT T1.id, T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id WHERE T2.interaction_type = 'activitor' GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the id and name of the enzyme that can interact with the most medicines as an activator?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT DISTINCT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' OR T2.friend = 'Alice'", "answer": "What are the different names and ages of every friend of either Dan or alice?\nAdditional table information: table: network_2"} +{"question": "SELECT roomName FROM Rooms ORDER BY basePrice NULLS FIRST", "answer": "Sort all the rooms according to the price. Just report the room names.\nAdditional table information: table: inn_1"} +{"question": "SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.Customer_id GROUP BY T1.customer_id HAVING COUNT(*) > 1", "answer": "Find the the customer details and id for the customers who had more than one policy.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT COUNT(*), gender FROM artist GROUP BY gender", "answer": "What is the number of artists for each gender?\nAdditional table information: table: music_1"} +{"question": "SELECT Hispanic FROM city WHERE Black > 10", "answer": "Return the hispanic percentage for cities in which the black percentage is greater than 10.\nAdditional table information: table: county_public_safety"} +{"question": "SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = 'Sales Person' EXCEPT SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = 'Clerical Staff'", "answer": "Find the name and gender of the staff who has been assigned the job of Sales Person but never Clerical Staff.\nAdditional table information: table: department_store"} +{"question": "SELECT code, name, MIN(price) FROM products GROUP BY name", "answer": "What are the codes and names of the cheapest products in each category?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT billing_state, COUNT(*), SUM(total) FROM invoices WHERE billing_state = 'CA'", "answer": "List the number of invoices and the invoice total from California.\nAdditional table information: table: store_1"} +{"question": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'shopping'", "answer": "Find the tourist attractions that have parking or shopping as their feature details. What are the names of the attractions?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT Country FROM market ORDER BY Country ASC NULLS FIRST", "answer": "What are the countries for each market, ordered alphabetically?\nAdditional table information: table: film_rank"} +{"question": "SELECT AVG(age), MIN(age) FROM artist WHERE country = 'United States'", "answer": "Return the average and minimum ages across artists from the United States.\nAdditional table information: table: theme_gallery"} +{"question": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote INTERSECT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = '8741'", "answer": "What are the distinct last names of the students who have president votes and have 8741 as the advisor?\nAdditional table information: table: voter_2"} +{"question": "SELECT name_first, name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998", "answer": "List the first and last name for players who participated in all star game in 1998.\nAdditional table information: table: baseball_1"} +{"question": "SELECT T1.account_name, T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan' AND T2.customer_last_name = 'Keeling'", "answer": "Show the account name and other account detail for all accounts by the customer with first name Meaghan and last name Keeling.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT COUNT(*) FROM stadium WHERE country <> 'Russia'", "answer": "How many stadiums are not in country 'Russia'?\nAdditional table information: table: swimming"} +{"question": "SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name", "answer": "How many players are from each country?\nAdditional table information: table: match_season"} +{"question": "SELECT COUNT(*) FROM follows GROUP BY f1", "answer": "Find the number of followers for each user.\nAdditional table information: table: twitter_1"} +{"question": "SELECT country FROM people WHERE age < 25 INTERSECT SELECT country FROM people WHERE age > 30", "answer": "Show the country where people older than 30 and younger than 25 are from.\nAdditional table information: table: wedding"} +{"question": "SELECT code, name, MIN(price) FROM products GROUP BY name", "answer": "Select the code of the product that is cheapest in each product category.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT Name FROM representative WHERE NOT Representative_ID IN (SELECT Representative_ID FROM election)", "answer": "List the names of representatives that have not participated in elections listed here.\nAdditional table information: table: election_representative"} +{"question": "SELECT title FROM albums", "answer": "List every album's title.\nAdditional table information: table: store_1"} +{"question": "SELECT name FROM stadium ORDER BY capacity DESC LIMIT 1", "answer": "Find the name of the stadium that has the maximum capacity.\nAdditional table information: table: swimming"} +{"question": "SELECT zip_code FROM weather GROUP BY zip_code ORDER BY AVG(mean_sea_level_pressure_inches) NULLS FIRST LIMIT 1", "answer": "What is the zip code that has the lowest average mean sea level pressure?\nAdditional table information: table: bike_1"} +{"question": "SELECT * FROM employees WHERE department_id = 'null'", "answer": "What are all the employees without a department number?\nAdditional table information: table: hr_1"} +{"question": "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", "answer": "Find the last name of the latest contact individual of the organization 'Labour Party'.\nAdditional table information: table: e_government"} +{"question": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = 'sesame'", "answer": "Count the number of characteristics the product 'sesame' has.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT COUNT(DISTINCT Party) FROM representative", "answer": "How many distinct parties are there for representatives?\nAdditional table information: table: election_representative"} +{"question": "SELECT COUNT(*) FROM dorm_amenity", "answer": "How many diffrent dorm amenities are there?\nAdditional table information: table: dorm_1"} +{"question": "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", "answer": "Find the name and hours of project that has the most number of scientists.\nAdditional table information: table: scientist_1"} +{"question": "SELECT name, city FROM branch WHERE NOT branch_id IN (SELECT branch_id FROM membership_register_branch)", "answer": "What are the names and cities of the branches that do not have any registered members?\nAdditional table information: table: shop_membership"} +{"question": "SELECT name, address_road, city FROM branch ORDER BY open_year NULLS FIRST", "answer": "What are the names, address roads, and cities of the branches ordered by opening year?\nAdditional table information: table: shop_membership"} +{"question": "SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1", "answer": "Show me the owner of the channel with the highest rating.\nAdditional table information: table: program_share"} +{"question": "SELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1", "answer": "what is the GDP of the city with the largest population.\nAdditional table information: table: city_record"} +{"question": "SELECT T1.organisation_id, COUNT(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "List the organisation id with the maximum outcome count, and the count.\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Reggae' INTERSECT SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Rock'", "answer": "What are the album titles for albums containing both 'Reggae' and 'Rock' genre tracks?\nAdditional table information: table: chinook_1"} +{"question": "SELECT T2.Name, T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID", "answer": "Give the names of wrestlers and their elimination moves.\nAdditional table information: table: wrestler"} +{"question": "SELECT Comptroller, COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the people that have been comptroller the most times and the corresponding number of times.\nAdditional table information: table: election"} +{"question": "SELECT COUNT(*), sex FROM student WHERE age > (SELECT AVG(age) FROM student) GROUP BY sex", "answer": "How many students are older than average for each gender?\nAdditional table information: table: dorm_1"} +{"question": "SELECT Headquarters, Industry FROM company", "answer": "What are the headquarters and industries of all companies?\nAdditional table information: table: company_employee"} +{"question": "SELECT name, age, country FROM artist ORDER BY Year_Join NULLS FIRST", "answer": "Show all artist name, age, and country ordered by the yeared they joined.\nAdditional table information: table: theme_gallery"} +{"question": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY SUM(T2.amount) NULLS FIRST", "answer": "What are the names of the different customers who have taken out a loan, ordered by the total amount that they have taken?\nAdditional table information: table: loan_1"} +{"question": "SELECT characteristic_name, other_characteristic_details, characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name, t1.other_characteristic_details, t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id = t2.characteristic_id", "answer": "What are the names, details and data types of the characteristics which are never used by any product?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3", "answer": "What are the names of the three artists who have produced the most songs, and how many works did they produce?\nAdditional table information: table: music_1"} +{"question": "SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16'", "answer": "What are the different grant amounts for documents sent before '1986-08-26 20:49:27' and after the grant ended on '1989-03-16 18:27:16'?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT SUM(amount), T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname", "answer": "Find the total amount of loans offered by each bank branch.\nAdditional table information: table: loan_1"} +{"question": "SELECT Name FROM People ORDER BY Age DESC LIMIT 5", "answer": "What are the names of the five oldest people?\nAdditional table information: table: gymnast"} +{"question": "SELECT ObjectNumber FROM railway WHERE NOT Railway_ID IN (SELECT Railway_ID FROM train)", "answer": "List the object number of railways that do not have any trains.\nAdditional table information: table: railway"} +{"question": "SELECT SUM(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research'", "answer": "What is the total amount of grant money for research?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT T2.name, T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name and id of the team that won the most times in 2008 postseason.\nAdditional table information: table: baseball_1"} +{"question": "SELECT COUNT(DISTINCT roomtype) FROM room", "answer": "How many different types of rooms are there?\nAdditional table information: table: hospital_1"} +{"question": "SELECT T1.driverid, T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE POSITION = '1' GROUP BY T1.driverid HAVING COUNT(*) >= 2", "answer": "What is the id, first name, and last name of the driver who was in the first position for laptime at least twice?\nAdditional table information: table: formula_1"} +{"question": "SELECT AVG(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = 'Female'", "answer": "How many songs, on average, are sung by a female artist?\nAdditional table information: table: music_1"} +{"question": "SELECT College FROM match_season WHERE POSITION = 'Midfielder' INTERSECT SELECT College FROM match_season WHERE POSITION = 'Defender'", "answer": "Which college have both players with position midfielder and players with position defender?\nAdditional table information: table: match_season"} +{"question": "SELECT t1.name, t2.price_in_dollar FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID", "answer": "Give me the names and prices of furnitures which some companies are manufacturing.\nAdditional table information: table: manufacturer"} +{"question": "SELECT Famous_Title, Age FROM artist ORDER BY Age DESC", "answer": "Please list the age and famous title of artists in descending order of age.\nAdditional table information: table: music_4"} +{"question": "SELECT DISTINCT Country FROM manager", "answer": "Show the distinct countries of managers.\nAdditional table information: table: railway"} +{"question": "SELECT T2.Party FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes ASC NULLS FIRST LIMIT 1", "answer": "What is the party of the representative that has the smallest number of votes.\nAdditional table information: table: election_representative"} +{"question": "SELECT t3.headquartered_city, COUNT(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city", "answer": "Find the number of stores in each city.\nAdditional table information: table: store_product"} +{"question": "SELECT COUNT(*) FROM Person WHERE age > (SELECT MAX(age) FROM person WHERE job = 'engineer')", "answer": "How many people are older than every engineer?\nAdditional table information: table: network_2"} +{"question": "SELECT T2.name, COUNT(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id", "answer": "How many exhibitions has each artist had?\nAdditional table information: table: theme_gallery"} +{"question": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the most popular room in the hotel. The most popular room is the room that had seen the largest number of reservations.\nAdditional table information: table: inn_1"} +{"question": "SELECT AVG(T2.Weeks_on_Top) FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 25", "answer": "Return the average number of weeks on top for volumes by artists that are at most 25 years old.\nAdditional table information: table: music_4"} +{"question": "SELECT product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = 'red' AND t3.characteristic_name = 'fast'", "answer": "What are the names of the products that have a color description of 'red' and the 'fast' characteristic?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT Injured FROM perpetrator ORDER BY Injured ASC NULLS FIRST", "answer": "List the number of people injured by perpetrators in ascending order.\nAdditional table information: table: perpetrator"} +{"question": "SELECT phone, postal_code FROM address WHERE address = '1031 Daugavpils Parkway'", "answer": "Give the phone and postal code corresponding to the address '1031 Daugavpils Parkway'.\nAdditional table information: table: sakila_1"} +{"question": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID", "answer": "What are the names of perpetrators?\nAdditional table information: table: perpetrator"} +{"question": "SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1", "answer": "Which submission received the highest score in acceptance result. Show me the result.\nAdditional table information: table: workshop_paper"} +{"question": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating > 8 INTERSECT SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating < 5", "answer": "Find the titles of items that received both a rating higher than 8 and a rating below 5.\nAdditional table information: table: epinions_1"} +{"question": "SELECT fname, lname FROM Student WHERE NOT StuID IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food')", "answer": "What is the full name of each student who is not allergic to any type of food.\nAdditional table information: table: allergy_1"} +{"question": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%'", "answer": "List the project details of the projects with the research outcome described with the substring 'Published'.\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton'", "answer": "How many rooms does the Lamberton building have?\nAdditional table information: table: college_2"} +{"question": "SELECT semester, YEAR FROM SECTION GROUP BY semester, YEAR ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the year and semester when offers the largest number of courses.\nAdditional table information: table: college_2"} +{"question": "SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200", "answer": "Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200.\nAdditional table information: table: climbing"} +{"question": "SELECT DISTINCT publisher FROM book_club", "answer": "What are all the different book publishers?\nAdditional table information: table: culture_company"} +{"question": "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", "answer": "What are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters?\nAdditional table information: table: architecture"} +{"question": "SELECT AVG(ticket_price), MIN(ticket_price), MAX(ticket_price) FROM exhibition WHERE YEAR < 2009", "answer": "What are the average, minimum, and maximum ticket prices for exhibitions that happened prior to 2009?\nAdditional table information: table: theme_gallery"} +{"question": "SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = 'San Francisco State University' AND t2.year = 2001", "answer": "What degrees were conferred in San Francisco State University in the year 2001?\nAdditional table information: table: csu_1"} +{"question": "SELECT DISTINCT Name FROM WINE ORDER BY price NULLS FIRST", "answer": "List the names of all distinct wines ordered by price.\nAdditional table information: table: wine_1"} +{"question": "SELECT COUNT(*) FROM gymnast", "answer": "How many gymnasts are there?\nAdditional table information: table: gymnast"} +{"question": "SELECT COUNT(*) FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid WHERE T3.Title = 'Flash'", "answer": "Hom many musicians performed in the song 'Flash'?\nAdditional table information: table: music_2"} +{"question": "SELECT cmi_cross_ref_id FROM cmi_cross_references EXCEPT SELECT cmi_cross_ref_id FROM parking_fines", "answer": "Which cmi cross reference id is not related to any parking taxes?\nAdditional table information: table: local_govt_mdm"} +{"question": "SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC NULLS FIRST LIMIT 1", "answer": "Find the team that attended the least number of home games in 1980.\nAdditional table information: table: baseball_1"} +{"question": "SELECT COUNT(*), T1.company_id FROM Third_Party_Companies AS T1 JOIN Assets AS T2 ON T1.company_id = T2.supplier_company_id GROUP BY T1.company_id", "answer": "How many assets does each third party company supply? List the count and the company id.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT MIN(T2.HS), T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID GROUP BY T1.pPos", "answer": "What is minimum hours of the students playing in different position?\nAdditional table information: table: soccer_2"} +{"question": "SELECT COUNT manufacturer FROM \"vehicles\".\"cars\" WHERE model = 'GE40LFR'", "answer": "how many times is the model ge40lfr? \nAdditional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion"} +{"question": "SELECT city FROM Addresses ORDER BY city NULLS FIRST", "answer": "List all cities of addresses in alphabetical order.\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT AVG(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = 'Monaco Grand Prix'", "answer": "What is the average fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?\nAdditional table information: table: formula_1"} +{"question": "SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT AVG(balance) FROM savings))", "answer": "What are the balances of checking accounts belonging to people with savings balances greater than the average savings balance?\nAdditional table information: table: small_bank_1"} +{"question": "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'", "answer": "Give the details of the project with the document name 'King Book'.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code HAVING COUNT(DISTINCT dept_name) < 5", "answer": "How many different departments are there in each school that has less than 5 apartments?\nAdditional table information: table: college_1"} +{"question": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id HAVING COUNT(*) >= 2", "answer": "Show the names of counties that have at least two delegates.\nAdditional table information: table: election"} +{"question": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY SUM(T2.amount) DESC LIMIT 1", "answer": "What is the name of the customer who has greatest total loan amount?\nAdditional table information: table: loan_1"} +{"question": "SELECT COUNT(DISTINCT gtype) FROM Video_games", "answer": "What is the count of different game types?\nAdditional table information: table: game_1"} +{"question": "SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the country that the most papers are affiliated with.\nAdditional table information: table: icfp_1"} +{"question": "SELECT state_province_county FROM addresses WHERE line_1_number_building LIKE '%6862 Kaitlyn Knolls%'", "answer": "Give the state corresponding to the line number building '6862 Kaitlyn Knolls'.\nAdditional table information: table: e_government"} +{"question": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = 'Blackville'", "answer": "Which city is the headquarter of the store named 'Blackville' in?\nAdditional table information: table: store_product"} +{"question": "SELECT COUNT(DISTINCT id) FROM teaches", "answer": "How many different instructors have taught some course?\nAdditional table information: table: college_2"} +{"question": "SELECT student_id FROM student_course_attendance WHERE course_id = 301", "answer": "What are the id of students who registered course 301?\nAdditional table information: table: student_assessment"} +{"question": "SELECT Name FROM WINE WHERE Price > (SELECT MAX(Price) FROM WINE WHERE YEAR = 2006)", "answer": "Give the names of wines with prices above any wine produced in 2006.\nAdditional table information: table: wine_1"} +{"question": "SELECT DISTINCT product_name FROM products ORDER BY product_name NULLS FIRST", "answer": "Sort all the distinct products in alphabetical order.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT Major FROM STUDENT WHERE Sex = 'M'", "answer": "List the major of each male student.\nAdditional table information: table: voter_2"} +{"question": "SELECT T1.member_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id WHERE T2.Party_name <> 'Progress Party'", "answer": "Show member names that are not in the Progress Party.\nAdditional table information: table: party_people"} +{"question": "SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = 'Editor'", "answer": "Find the names of all the employees whose the role name is 'Editor'.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T2.customer_name FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE outcome_code = 'Order' GROUP BY T1.customer_id HAVING COUNT(*) >= 2", "answer": "Show the names of customers who have at least 2 mailshots with outcome code 'Order'.\nAdditional table information: table: customers_campaigns_ecommerce"} +{"question": "SELECT COUNT(*) FROM Has_allergy WHERE Allergy = 'Cat'", "answer": "How many students are affected by cat allergies?\nAdditional table information: table: allergy_1"} +{"question": "SELECT name FROM procedures ORDER BY cost NULLS FIRST LIMIT 3", "answer": "Find the three most expensive procedures.\nAdditional table information: table: hospital_1"} +{"question": "SELECT T2.product_type_code, T2.product_name, T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3", "answer": "Give me the product type, name and price for all the products supplied by supplier id 3.\nAdditional table information: table: department_store"} +{"question": "SELECT name, main_services FROM station ORDER BY total_passengers DESC LIMIT 3", "answer": "Show the names and main services for train stations that have the top three total number of passengers.\nAdditional table information: table: train_station"} +{"question": "SELECT customer_details FROM customers ORDER BY customer_details NULLS FIRST", "answer": "Sort the customer names in alphabetical order.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT bname FROM bank WHERE state = 'New York'", "answer": "Find the branch names of banks in the New York state.\nAdditional table information: table: loan_1"} +{"question": "SELECT T1.name, T1.area, T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed > 60 INTERSECT SELECT T1.name, T1.area, T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed < 55", "answer": "What are the country names, area and population which has both roller coasters with speed higher\nAdditional table information: table: roller_coaster"} +{"question": "SELECT employee_name FROM Employees WHERE role_code = 'HR'", "answer": "Which employees have the role with code 'HR'? Find their names.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT country FROM addresses GROUP BY country HAVING COUNT(address_id) > 4", "answer": "For which countries are there more than four distinct addresses listed?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT Fname FROM STUDENT WHERE NOT StuID IN (SELECT StuID FROM ENROLLED_IN)", "answer": "What are the first names of all students that are not enrolled in courses?\nAdditional table information: table: college_3"} +{"question": "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", "answer": "What are the ids, names and genders of the architects who built two bridges or one mill?\nAdditional table information: table: architecture"} +{"question": "SELECT T2.first_name, T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING COUNT(*) > 30", "answer": "Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name.\nAdditional table information: table: sakila_1"} +{"question": "SELECT customer_name FROM customers WHERE payment_method = 'Cash'", "answer": "What are the names of customers who use payment method 'Cash'?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T1.claim_id, T1.date_claim_made, T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.claim_id HAVING COUNT(*) = 1", "answer": "List the date the claim was made, the date it was settled and the amount settled for all the claims which had exactly one settlement.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT T2.title, MAX(T1.price) FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id", "answer": "What are the title and maximum price of each film?\nAdditional table information: table: cinema"} +{"question": "SELECT t1.name, t1.capacity FROM stadium AS t1 JOIN event AS t2 ON t1.id = t2.stadium_id WHERE t2.name = 'World Junior'", "answer": "Find the name and capacity of the stadium where the event named 'World Junior' happened.\nAdditional table information: table: swimming"} +{"question": "SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code GROUP BY t1.document_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the document with the most number of sections?\nAdditional table information: table: document_management"} +{"question": "SELECT COUNT(*) FROM Apartment_Bookings", "answer": "How many apartment bookings are there in total?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT T1.line_1, AVG(T2.monthly_rental) FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id", "answer": "What are the line 1 and average monthly rentals of all student addresses?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1", "answer": "What are the names of departments that have primarily affiliated physicians.\nAdditional table information: table: hospital_1"} +{"question": "SELECT COUNT(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009", "answer": "How many times did Boston Red Stockings lose in 2009 postseason?\nAdditional table information: table: baseball_1"} +{"question": "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", "answer": "What is the project id and detail for the project with at least two documents?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT COUNT(*) FROM Video_games", "answer": "How many video games do you have?\nAdditional table information: table: game_1"} +{"question": "SELECT customer_details FROM Customers EXCEPT SELECT T1.customer_details FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id = T2.customer_id", "answer": "Which customers do not have any policies? Find the details of these customers.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999", "answer": "Which directors had a movie both in the year 1999 and 2000?\nAdditional table information: table: culture_company"} +{"question": "SELECT Planned_Delivery_Date, Actual_Delivery_Date FROM BOOKINGS", "answer": "Show all the planned delivery dates and actual delivery dates of bookings.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT SUM(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id = t2.claim_id WHERE t2.created_date = (SELECT created_date FROM claims_documents ORDER BY created_date NULLS FIRST LIMIT 1)", "answer": "Find the total amount claimed in the most recently created document.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT T3.manager_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.company = 'ExxonMobil'", "answer": "Show the manager name for gas stations belonging to the ExxonMobil company.\nAdditional table information: table: gas_company"} +{"question": "SELECT catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1", "answer": "What is the product with the highest height? Give me the catalog entry name.\nAdditional table information: table: product_catalog"} +{"question": "SELECT Nationality FROM journalist ORDER BY Years_working DESC LIMIT 1", "answer": "What is the nationality of the journalist with the largest number of years working?\nAdditional table information: table: news_report"} +{"question": "SELECT MAX(T1.HS), pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos", "answer": "What is the maximum training hours for the students whose training hours is greater than 1000 in different positions?\nAdditional table information: table: soccer_2"} +{"question": "SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees)", "answer": "Find the count of universities whose campus fee is greater than the average campus fee.\nAdditional table information: table: csu_1"} +{"question": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY SUM(t3.order_quantity) DESC LIMIT 1", "answer": "What is the name of the customer that has purchased the most items?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT zip_code, COUNT(*) FROM weather WHERE max_wind_Speed_mph >= 25 GROUP BY zip_code", "answer": "For each zip code, how many times has the maximum wind speed reached 25 mph?\nAdditional table information: table: bike_1"} +{"question": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) EXCEPT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30)", "answer": "What are the names of the people who are older 40 but no friends under age 30?\nAdditional table information: table: network_2"} +{"question": "SELECT name, cost FROM procedures ORDER BY cost DESC", "answer": "List the name and cost of all procedures sorted by the cost from the highest to the lowest.\nAdditional table information: table: hospital_1"} +{"question": "SELECT name, LOCATION, seating FROM track ORDER BY year_opened DESC LIMIT 1", "answer": "Return the name, location, and seating of the track that was opened in the most recent year.\nAdditional table information: table: race_track"} +{"question": "SELECT T2.title, T1.rID, T1.stars, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.rID", "answer": "For each reviewer id, what is the title and rating for the movie with the smallest rating?\nAdditional table information: table: movie_1"} +{"question": "SELECT T2.city, COUNT(*), T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which city has the most addresses? List the city name, number of addresses, and city id.\nAdditional table information: table: sakila_1"} +{"question": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE stageposition = 'back' GROUP BY lastname ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the last name of the musicians who has played back position the most?\nAdditional table information: table: music_2"} +{"question": "SELECT t1.catalog_name, t1.date_of_publication FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id = t2.catalog_id WHERE catalog_level_number > 5", "answer": "Find the names and publication dates of all catalogs that have catalog level number greater than 5.\nAdditional table information: table: product_catalog"} +{"question": "SELECT COUNT(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = 'F' AND T1.allergy = 'Milk' OR T1.allergy = 'Eggs'", "answer": "How many female students have milk or egg allergies?\nAdditional table information: table: allergy_1"} +{"question": "SELECT DISTINCT T1.Fname, T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.President_VOTE WHERE T1.sex = 'F'", "answer": "What are the first and last names of all the female students who have president votes?\nAdditional table information: table: voter_2"} +{"question": "SELECT phone_number, email_address FROM Customers WHERE amount_outstanding > 2000", "answer": "What are the phone numbers and email addresses of all customers who have an outstanding balance of more than 2000?\nAdditional table information: table: driving_school"} +{"question": "SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = 'Female' AND T2.languages = 'bangla'", "answer": "What countries are the female artists who sung in the language Bangla from?\nAdditional table information: table: music_1"} +{"question": "SELECT T2.roomName, COUNT(*), T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room", "answer": "For each room, find its name and the number of times reservations were made for it.\nAdditional table information: table: inn_1"} +{"question": "SELECT T2.first_name, T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id", "answer": "What are the first and last names of all the candidates?\nAdditional table information: table: student_assessment"} +{"question": "SELECT COUNT(*) FROM Students WHERE NOT student_id IN (SELECT student_id FROM Student_Course_Enrolment)", "answer": "How many students did not have any course enrollment?\nAdditional table information: table: e_learning"} +{"question": "SELECT T1.first_name, T1.last_name, T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY SUM(amount) ASC NULLS FIRST LIMIT 1", "answer": "What is the full name and id of the customer who has the lowest total amount of payment?\nAdditional table information: table: sakila_1"} +{"question": "SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "what is id of students who registered some courses but the least number of courses in these students?\nAdditional table information: table: student_assessment"} +{"question": "SELECT STATEMENT_ID, COUNT(*) FROM Accounts GROUP BY STATEMENT_ID", "answer": "Show all statement id and the number of accounts for each statement.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T1.Service_Type_Description, T1.Service_Type_Code FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T1.Service_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the description and code of the service type that is performed the most times.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT catalog_entry_name, capacity FROM Catalog_Contents WHERE price_in_dollars > 700", "answer": "Find the name and capacity of products with price greater than 700 (in USD).\nAdditional table information: table: product_catalog"} +{"question": "SELECT COUNT(*) FROM airlines WHERE country = 'Russia'", "answer": "How many airlines does Russia has?\nAdditional table information: table: flight_4"} +{"question": "SELECT MAX(stu_gpa), AVG(stu_gpa), MIN(stu_gpa), dept_code FROM student GROUP BY dept_code", "answer": "Find the max, average, and minimum gpa of all students in each department.\nAdditional table information: table: college_1"} +{"question": "SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31", "answer": "What are the dates that have an average sea level pressure between 30.3 and 31?\nAdditional table information: table: bike_1"} +{"question": "SELECT SUM(T1.Order_Quantity) FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_Name = 'photo'", "answer": "What are the total order quantities of photo products?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT T1.date_in_location_from, T1.date_in_locaton_to FROM Document_locations AS T1 JOIN All_documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = 'Robin CV'", "answer": "What is 'the date in location from' and 'the date in location to' for the document with name 'Robin CV'?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T1.emp_fname, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T3.dept_code = T2.dept_code WHERE T3.dept_name = 'History' AND T2.prof_high_degree = 'Ph.D.'", "answer": "What are the first names and office of the professors who are in the history department and have a Ph.D?\nAdditional table information: table: college_1"} +{"question": "SELECT t1.name, t1.sex, MIN(oppose_rate) FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex", "answer": "For each sex, what is the name and sex of the candidate with the oppose rate for their sex?\nAdditional table information: table: candidate_poll"} +{"question": "SELECT AVG(price_range) FROM HOTELS WHERE star_rating_code = '5' AND pets_allowed_yn = 1", "answer": "What is the average price range of five star hotels that allow pets?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T3.name, T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id", "answer": "List the name of a building along with the name of a company whose office is in the building.\nAdditional table information: table: company_office"} +{"question": "SELECT COUNT(*) FROM county_public_safety", "answer": "Count the number of countries.\nAdditional table information: table: county_public_safety"} +{"question": "SELECT T2.day_Number, T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date", "answer": "Return the day Number and stored date for all the documents.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = 'red' AND t3.characteristic_name = 'fast'", "answer": "Find the name of the products that have the color description 'red' and have the characteristic name 'fast'.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT T2.Location, T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft", "answer": "Please list the location and the winning aircraft name.\nAdditional table information: table: aircraft"} +{"question": "SELECT T2.guest_first_name, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id", "answer": "What are the guest first name, start date, and end date of each apartment booking?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7", "answer": "What are the different names for each station that has ever had 7 bikes available?\nAdditional table information: table: bike_1"} +{"question": "SELECT DISTINCT product_name FROM product ORDER BY product_name NULLS FIRST", "answer": "List the names of all the distinct product names in alphabetical order?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT T3.booking_start_date, T3.booking_end_date FROM Products_for_hire AS T1 JOIN products_booked AS T2 ON T1.product_id = T2.product_id JOIN bookings AS T3 ON T2.booking_id = T3.booking_id WHERE T1.product_name = 'Book collection A'", "answer": "What are the start date and end date of the booking that has booked the product named 'Book collection A'?\nAdditional table information: table: products_for_hire"} +{"question": "SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING AVG(bikes_available) > 10 EXCEPT SELECT name FROM station WHERE city = 'San Jose'", "answer": "What are the names of all stations that have more than 10 bikes available and are not located in San Jose?\nAdditional table information: table: bike_1"} +{"question": "SELECT project_id FROM Documents GROUP BY project_id HAVING COUNT(*) >= 2", "answer": "What are project ids of projects that have 2 or more corresponding documents?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT document_status_description FROM Ref_Document_Status WHERE document_status_code = 'working'", "answer": "What is the description of document status code 'working'?\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT T2.dept_name, T1.dept_code FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.prof_high_degree = 'Ph.D.' GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which department has the most professors with a Ph.D.?\nAdditional table information: table: college_1"} +{"question": "SELECT name, city, country FROM airports ORDER BY elevation DESC LIMIT 1", "answer": "What is the name, city, and country of the airport with the highest elevation?\nAdditional table information: table: flight_4"} +{"question": "SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000", "answer": "Show year where a track with a seating at least 5000 opened and a track with seating no more than 4000 opened.\nAdditional table information: table: race_track"} +{"question": "SELECT AVG(age), city_code FROM student GROUP BY city_code", "answer": "Find the average age of all students living in the each city.\nAdditional table information: table: dorm_1"} +{"question": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles'", "answer": "In which state is the college that Charles attends?\nAdditional table information: table: soccer_2"} +{"question": "SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details NULLS FIRST", "answer": "What are the details of all organizations that are described as Sponsors and sort the results in ascending order?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT T1.Royal_Family_Details, T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID = T2.Tourist_Attraction_ID", "answer": "What are the details and ways to get to tourist attractions related to royal family?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Bob'", "answer": "Find the name of persons who are friends with Bob.\nAdditional table information: table: network_2"} +{"question": "SELECT COUNT(*) FROM farm", "answer": "Count the number of farms.\nAdditional table information: table: farm"} +{"question": "SELECT MAX(elevation) FROM airports WHERE country = 'Iceland'", "answer": "What is the highest elevation of an airport in the country of Iceland?\nAdditional table information: table: flight_4"} +{"question": "SELECT DISTINCT T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Sarah Martinez'", "answer": "Find the names of all directors whose movies are rated by Sarah Martinez.\nAdditional table information: table: movie_1"} +{"question": "SELECT amenity_name FROM dorm_amenity ORDER BY amenity_name NULLS FIRST", "answer": "What are the different dorm amenity names in alphabetical order?\nAdditional table information: table: dorm_1"} +{"question": "SELECT COUNT(DISTINCT POSITION) FROM player", "answer": "How many different position for players are listed?\nAdditional table information: table: sports_competition"} +{"question": "SELECT customer_status_code, COUNT(*) FROM Customers GROUP BY customer_status_code", "answer": "List all customer status codes and the number of customers having each status code.\nAdditional table information: table: driving_school"} +{"question": "SELECT T1.course_name, T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = 'Computer Science'", "answer": "Find the names and descriptions of courses that belong to the subject named 'Computer Science'.\nAdditional table information: table: e_learning"} +{"question": "SELECT T3.course_name, COUNT(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id JOIN courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id", "answer": "For each course id, how many students are registered and what are the course names?\nAdditional table information: table: student_assessment"} +{"question": "SELECT AVG(Gold) FROM club_rank", "answer": "What is the average number of gold medals for a club?\nAdditional table information: table: sports_competition"} +{"question": "SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING COUNT(*) > 3", "answer": "Find the payment method code used by more than 3 parties.\nAdditional table information: table: e_government"} +{"question": "SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1", "answer": "Show the denomination shared by more than one school.\nAdditional table information: table: school_player"} +{"question": "SELECT document_type_code, document_type_name, document_type_description FROM Ref_document_types", "answer": "What are the codes, names, and descriptions of the different document types?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT COUNT(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Ray'", "answer": "How many lessons did the customer with the first name Ray take?\nAdditional table information: table: driving_school"} +{"question": "SELECT Team FROM player ORDER BY Age DESC LIMIT 1", "answer": "Find the team of the player of the highest age.\nAdditional table information: table: school_player"} +{"question": "SELECT T1.first_name, T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the full name of employee who supported the most number of customers.\nAdditional table information: table: store_1"} +{"question": "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'", "answer": "Show first name and last name for all the students advised by Michael Goodrich.\nAdditional table information: table: activity_1"} +{"question": "SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type = 'Graphics' OR t2.Company_name = 'Nokia Corporation'", "answer": "List the hardware model name for the phones that were produced by 'Nokia Corporation' or whose screen mode type is 'Graphics.'\nAdditional table information: table: phone_1"} +{"question": "SELECT COUNT(*) FROM chip_model WHERE wifi = 'No'", "answer": "How many models do not have the wifi function?\nAdditional table information: table: phone_1"} +{"question": "SELECT company, headquarters FROM company ORDER BY market_value DESC", "answer": "Show all company names and headquarters in the descending order of market value.\nAdditional table information: table: gas_company"} +{"question": "SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'", "answer": "Find the number of vocal types used in song 'Le Pop'\nAdditional table information: table: music_2"} +{"question": "SELECT COUNT(*) FROM papers", "answer": "How many papers are published in total?\nAdditional table information: table: icfp_1"} +{"question": "SELECT first_name FROM people ORDER BY first_name NULLS FIRST", "answer": "What are the first names of the people in alphabetical order?\nAdditional table information: table: student_assessment"} +{"question": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1", "answer": "Show names of shops that have more than one kind of device in stock.\nAdditional table information: table: device"} +{"question": "SELECT T2.emp_fname, T4.prof_office, T3.crs_description, T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num JOIN department AS T5 ON T4.dept_code = T5.dept_code", "answer": "What are the first names, office locations, and departments of all instructors, and also what are the descriptions of the courses they teach?\nAdditional table information: table: college_1"} +{"question": "SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count > 100 AND T3.transaction_type_code = 'PUR'", "answer": "What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is 'PUR'?\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = 'Dayana Robel'", "answer": "Tell me the types of the policy used by the customer named 'Dayana Robel'.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT title, rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1", "answer": "What are the title and rental rate of the film with the highest rental rate?\nAdditional table information: table: sakila_1"} +{"question": "SELECT t1.route_name FROM Delivery_Routes AS t1 JOIN Delivery_Route_Locations AS t2 ON t1.route_id = t2.route_id GROUP BY t1.route_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name of route that has the highest number of deliveries.\nAdditional table information: table: customer_deliveries"} +{"question": "SELECT COUNT(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night'", "answer": "find the number of different programs that are broadcast during night time.\nAdditional table information: table: program_share"} +{"question": "SELECT T1.name, T2.alid FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T2.alid ORDER BY COUNT(*) DESC LIMIT 10", "answer": "For the airline ids with the top 10 most routes operated, what are their names?\nAdditional table information: table: flight_4"} +{"question": "SELECT COUNT(*) FROM program", "answer": "Count the number of programs.\nAdditional table information: table: program_share"} +{"question": "SELECT Date, Venue FROM debate", "answer": "What are the date and venue of each debate?\nAdditional table information: table: debate"} +{"question": "SELECT city FROM city ORDER BY regional_population DESC LIMIT 3", "answer": "Which three cities have the largest regional population?\nAdditional table information: table: city_record"} +{"question": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = 'lead'", "answer": "What are the names of the songs without a lead vocal?\nAdditional table information: table: music_2"} +{"question": "SELECT rank, Fname, Lname FROM Faculty", "answer": "What are the rank, first name, and last name of the faculty members?\nAdditional table information: table: activity_1"} +{"question": "SELECT T1.id, T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the id and name of the browser that is compatible with the most web accelerators?\nAdditional table information: table: browser_web"} +{"question": "SELECT title, film_id FROM film WHERE rental_rate = 0.99 INTERSECT SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id HAVING COUNT(*) < 3", "answer": "What are the title and id of the film which has a rental rate of 0.99 and an inventory of below 3?\nAdditional table information: table: sakila_1"} +{"question": "SELECT T1.staff_name, T1.staff_id FROM Staff AS T1 JOIN Fault_Log AS T2 ON T1.staff_id = T2.recorded_by_staff_id EXCEPT SELECT T3.staff_name, T3.staff_id FROM Staff AS T3 JOIN Engineer_Visits AS T4 ON T3.staff_id = T4.contact_staff_id", "answer": "What is the name and id of the staff who recorded the fault log but has not contacted any visiting engineers?\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT T1.name, COUNT(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING COUNT(*) > 1", "answer": "Find the name of the user who tweeted more than once, and number of tweets tweeted by them.\nAdditional table information: table: twitter_1"} +{"question": "SELECT T2.emp_fname, T4.prof_office, T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num", "answer": "Find the first names and offices of all instructors who have taught some course and also find the course description.\nAdditional table information: table: college_1"} +{"question": "SELECT Category FROM music_festival WHERE RESULT = 'Awarded'", "answer": "Return the categories of music festivals that have the result 'Awarded'.\nAdditional table information: table: music_4"} +{"question": "SELECT MIN(market_value), MAX(market_value), AVG(market_value) FROM company", "answer": "Show minimum, maximum, and average market value for all companies.\nAdditional table information: table: gas_company"} +{"question": "SELECT title FROM albums WHERE title LIKE 'A%' ORDER BY title NULLS FIRST", "answer": "List every album whose title starts with A in alphabetical order.\nAdditional table information: table: store_1"} +{"question": "SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Monterey' AND T2.price < 50", "answer": "Give the neames of wines with prices below 50 and with appelations in Monterey county.\nAdditional table information: table: wine_1"} +{"question": "SELECT SUM(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.facility_code = 'Gym'", "answer": "Find the total number of rooms in the apartments that have facility code 'Gym'.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = 'San Jose State University' AND t1.year = 2000", "answer": "Find the campus fee of 'San Jose State University' in year 2000.\nAdditional table information: table: csu_1"} +{"question": "SELECT product_type_code, AVG(product_price) FROM products GROUP BY product_type_code", "answer": "Return the average price for each product type.\nAdditional table information: table: department_store"} +{"question": "SELECT COUNT(*), dept_code FROM student GROUP BY dept_code", "answer": "Find the number of students for each department.\nAdditional table information: table: college_1"} +{"question": "SELECT T2.Governor FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1", "answer": "Find the parties associated with the delegates from district 1. Who served as governors of the parties?\nAdditional table information: table: election"} +{"question": "SELECT lname FROM student WHERE sex = 'F' AND city_code = 'BAL' UNION SELECT lname FROM student WHERE sex = 'M' AND age < 20", "answer": "Find the last name of students who is either female (sex is F) and living in the city of code BAL or male (sex is M) and in age of below 20.\nAdditional table information: table: dorm_1"} +{"question": "SELECT T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id JOIN web_client_accelerator AS T3 ON T2.accelerator_id = T3.id WHERE T3.name = 'CProxy' AND T2.compatible_since_year > 1998", "answer": "What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ?\nAdditional table information: table: browser_web"} +{"question": "SELECT COUNT(DISTINCT Company) FROM entrepreneur", "answer": "How many distinct companies are there?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT date FROM weather WHERE zip_code = 94107 AND EVENTS <> 'Fog' AND EVENTS <> 'Rain'", "answer": "On which day has it neither been foggy nor rained in the zip code of 94107?\nAdditional table information: table: bike_1"} +{"question": "SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID GROUP BY T1.Device_ID HAVING COUNT(*) > 1", "answer": "Show the carriers of devices in stock at more than one shop.\nAdditional table information: table: device"} +{"question": "SELECT COUNT(*) FROM film", "answer": "Count the number of films.\nAdditional table information: table: film_rank"} +{"question": "SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT AVG(product_price) FROM products)", "answer": "What are the ids of products from the supplier with id 2, which are more expensive than the average price across all products?\nAdditional table information: table: department_store"} +{"question": "SELECT LOCATION FROM performance GROUP BY LOCATION HAVING COUNT(*) >= 2", "answer": "Show the locations that have at least two performances.\nAdditional table information: table: performance_attendance"} +{"question": "SELECT t1.manufacturer_id, t1.num_of_shops FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id ORDER BY t2.Price_in_Dollar DESC LIMIT 1", "answer": "Find the id and number of shops for the company that produces the most expensive furniture.\nAdditional table information: table: manufacturer"} +{"question": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = 'Movies'", "answer": "What are the names of all tracks that are on playlists titled Movies?\nAdditional table information: table: store_1"} +{"question": "SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT MIN(Price) FROM wine WHERE Winery = 'John Anthony')", "answer": "What are the distinct names of wines with prices higher than any wine from John Anthony winery.\nAdditional table information: table: wine_1"} +{"question": "SELECT name FROM artist WHERE NOT artist_id IN (SELECT artist_id FROM exhibition)", "answer": "Show names for artists without any exhibition.\nAdditional table information: table: theme_gallery"} +{"question": "SELECT f_id, genre_is, artist_name FROM song WHERE languages = 'english' ORDER BY rating NULLS FIRST", "answer": "What is the id, genre, and name of the artist for every English song ordered by ascending rating?\nAdditional table information: table: music_1"} +{"question": "SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2", "answer": "Who are the nominees who have been nominated more than two times?\nAdditional table information: table: musical"} +{"question": "SELECT T1.Name, T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID", "answer": "Show names of climbers and the names of mountains they climb.\nAdditional table information: table: climbing"} +{"question": "SELECT T2.type, COUNT(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T2.type", "answer": "Show the type of school and the number of buses for each type.\nAdditional table information: table: school_bus"} +{"question": "SELECT problem_log_id, log_entry_description FROM problem_log", "answer": "What are the log id and entry description of each problem?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT T1.subject_id, T2.subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) ASC NULLS FIRST", "answer": "Find the subject ID, name of subject and the corresponding number of courses for each subject, and sort by the course count in ascending order.\nAdditional table information: table: e_learning"} +{"question": "SELECT COUNT(DISTINCT FacID) FROM Faculty_participates_in", "answer": "Give me the number of faculty members who participate in an activity\nAdditional table information: table: activity_1"} +{"question": "SELECT * FROM departments WHERE department_name = 'Marketing'", "answer": "display all the information about the department Marketing.\nAdditional table information: table: hr_1"} +{"question": "SELECT T1.title FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE building = 'Chandler' AND semester = 'Fall' AND YEAR = 2010", "answer": "Give the title of the course offered in Chandler during the Fall of 2010.\nAdditional table information: table: college_2"} +{"question": "SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Confirmed'", "answer": "Show the distinct apartment numbers of the apartments that have bookings with status code 'Confirmed'.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT T2.protein_name, T1.institution FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id", "answer": "Show the protein name and the institution name.\nAdditional table information: table: protein_institute"} +{"question": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Americano'", "answer": "Find the names of customers who ordered both products Latte and Americano.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT enrollment, primary_conference FROM university ORDER BY founded NULLS FIRST LIMIT 1", "answer": "Show the enrollment and primary_conference of the oldest college.\nAdditional table information: table: university_basketball"} +{"question": "SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.project_id HAVING COUNT(*) > 2", "answer": "What are the task details, task ids, and project ids for the progrects that are detailed as 'omnis' or have at least 3 outcomes?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the customer who has the most policies listed?\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall' ORDER BY T3.amenity_name NULLS FIRST", "answer": "What amenities does Smith Hall have in alphabetical order?\nAdditional table information: table: dorm_1"} +{"question": "SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the customer id of the customer with the most accounts, and how many accounts does this person have?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT AVG(T2.Number_cities) FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T1.Low_Estimate > 10000", "answer": "Give the average number of cities within markets that had a low market estimation larger than 10000?\nAdditional table information: table: film_rank"} +{"question": "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'", "answer": "Which country does customer with first name as Carole and last name as Bernhard lived in?\nAdditional table information: table: driving_school"} +{"question": "SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'GELL' AND T1.lastname = 'TAMI'", "answer": "What are the last names of the teachers who teach the student called GELL TAMI?\nAdditional table information: table: student_1"} +{"question": "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", "answer": "Return the type name, type description, and date of creation for each document.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT COUNT(DISTINCT OWNER) FROM channel", "answer": "Count the number of distinct channel owners.\nAdditional table information: table: program_share"} +{"question": "SELECT open_date, COUNT(*) FROM church GROUP BY open_date", "answer": "Show all opening years and the number of churches that opened in that year.\nAdditional table information: table: wedding"} +{"question": "SELECT city FROM city WHERE regional_population > 10000000 UNION SELECT city FROM city WHERE regional_population < 5000000", "answer": "Please give me a list of cities whose regional population is over 8000000 or under 5000000.\nAdditional table information: table: city_record"} +{"question": "SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id", "answer": "Find the name of bank branches that provided some loans.\nAdditional table information: table: loan_1"} +{"question": "SELECT T1.Title, T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 GROUP BY T2.AlbumID", "answer": "Show the album names and ids for albums that contain tracks with unit price bigger than 1.\nAdditional table information: table: chinook_1"} +{"question": "SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name HAVING AVG(T1.price) >= 150", "answer": "What are the names and average prices of products for manufacturers whose products cost on average 150 or more?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT COUNT(*) FROM artist", "answer": "Count the number of artists.\nAdditional table information: table: theme_gallery"} +{"question": "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", "answer": "Give me a list of cities whose temperature in Mar is lower than that in Dec and which have never been host cities.\nAdditional table information: table: city_record"} +{"question": "SELECT first_name FROM Teachers WHERE email_address LIKE '%man%'", "answer": "Find the first names of teachers whose email address contains the word 'man'.\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT name FROM PersonFriend WHERE friend = 'Alice' AND YEAR = (SELECT MIN(YEAR) FROM PersonFriend WHERE friend = 'Alice')", "answer": "What are the names of all people who are friends with Alice for the shortest amount of time?\nAdditional table information: table: network_2"} +{"question": "SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE '%court%'", "answer": "Find all the building full names containing the word 'court'.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California'", "answer": "Find the names of customers who are not living in the state of California.\nAdditional table information: table: customer_deliveries"} +{"question": "SELECT country, COUNT(*) FROM people GROUP BY country", "answer": "Show all countries and the number of people from each country.\nAdditional table information: table: wedding"} +{"question": "SELECT T2.Name, T1.ArtistId FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistID GROUP BY T1.ArtistId HAVING COUNT(*) >= 3 ORDER BY T2.Name NULLS FIRST", "answer": "Please list the name and id of all artists that have at least 3 albums in alphabetical order.\nAdditional table information: table: chinook_1"} +{"question": "SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId GROUP BY T2.Name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the artist with the greatest number of albums?\nAdditional table information: table: chinook_1"} +{"question": "SELECT T1.employee_id, T2.job_title FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.department_id = 80", "answer": "display the employee ID and job name for all those jobs in department 80.\nAdditional table information: table: hr_1"} +{"question": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown <> 'Santo Domingo'", "answer": "Return the names of gymnasts who did not grow up in Santo Domingo.\nAdditional table information: table: gymnast"} +{"question": "SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Der Kapitan' AND T1.StagePosition = 'back'", "answer": "What is the first and last name of the artist who performed back stage for the song 'Der Kapitan'?\nAdditional table information: table: music_2"} +{"question": "SELECT t2.firstname FROM Performance AS t1 JOIN Band AS t2 ON t1.bandmate = t2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY firstname ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the first name of the band mate that has performed in most songs.\nAdditional table information: table: music_2"} +{"question": "SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T3.Type = 'Text' OR T1.RAM_MiB > 32", "answer": "List the hardware model name for the phones that have screen mode type 'Text' or RAM size greater than 32.\nAdditional table information: table: phone_1"} +{"question": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = 'back'", "answer": "Find all the songs that do not have a back vocal.\nAdditional table information: table: music_2"} +{"question": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID = T3.Tourist_ID WHERE T3.Tourist_Details = 'Vincent'", "answer": "Show the tourist attractions visited by the tourist whose detail is 'Vincent'.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T3.Name, T2.Date, T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Negative = T3.People_ID ORDER BY T3.Name ASC NULLS FIRST", "answer": "Show the names of people, and dates and venues of debates they are on the negative side, ordered in ascending alphabetical order of name.\nAdditional table information: table: debate"} +{"question": "SELECT name FROM manufacturers WHERE revenue < (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin')", "answer": "Find the name of companies whose revenue is smaller than the revenue of all companies based in Austin.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT TIME, train_number FROM train WHERE destination = 'Chennai' ORDER BY TIME NULLS FIRST", "answer": "Give me the times and numbers of all trains that go to Chennai, ordered by time.\nAdditional table information: table: station_weather"} +{"question": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = 'Rock' OR T3.name = 'MPEG audio file'", "answer": "What are the names of all tracks that belong to the Rock genre and whose media type is MPEG?\nAdditional table information: table: store_1"} +{"question": "SELECT MONTH FROM happy_hour GROUP BY MONTH ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which month has the most happy hours?\nAdditional table information: table: coffee_shop"} +{"question": "SELECT T1.Code, T1.Fate, T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID", "answer": "What are the mission codes, fates, and names of the ships involved?\nAdditional table information: table: ship_mission"} +{"question": "SELECT COUNT(*) FROM Project_outcomes WHERE outcome_code = 'Patent'", "answer": "How many Patent outcomes are generated from all the projects?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT document_id FROM Documents WHERE document_status_code = 'done' AND document_type_code = 'Paper'", "answer": "List the document ids for any documents with the status code done and the type code paper.\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT Tourist_Details FROM VISITORS", "answer": "What is the detail of each visitor?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT MIN(Crime_rate), MAX(Crime_rate) FROM county_public_safety", "answer": "Return the minimum and maximum crime rates across all counties.\nAdditional table information: table: county_public_safety"} +{"question": "SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY COUNT(*) NULLS FIRST LIMIT 5", "answer": "What is first names of the top 5 staff who have handled the greatest number of complaints?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT name FROM accounts ORDER BY name NULLS FIRST", "answer": "What are the names of all the customers in alphabetical order?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'statistics' ORDER BY T2.date_of_attendance NULLS FIRST", "answer": "List the id of students who attended statistics courses in the order of attendance date.\nAdditional table information: table: student_assessment"} +{"question": "SELECT SUM(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = 'Rodrick Heaney'", "answer": "Tell me the total quantity of products bought by the customer called 'Rodrick Heaney'.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT first_name, last_name, salary FROM employees WHERE salary < 6000", "answer": "What are the full names and salaries for any employees earning less than 6000?\nAdditional table information: table: hr_1"} +{"question": "SELECT fname FROM student WHERE city_code = 'PHL' AND age BETWEEN 20 AND 25", "answer": "What is the first name of the students who are in age 20 to 25 and living in PHL city?\nAdditional table information: table: dorm_1"} +{"question": "SELECT name FROM instructor WHERE name LIKE '%dar%'", "answer": "What are the names of all instructors with names that include 'dar'?\nAdditional table information: table: college_2"} +{"question": "SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*) >= 2", "answer": "Return the investors who have invested in two or more entrepreneurs.\nAdditional table information: table: entrepreneur"} +{"question": "SELECT Nationality FROM journalist WHERE Years_working > 10 INTERSECT SELECT Nationality FROM journalist WHERE Years_working < 3", "answer": "Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working.\nAdditional table information: table: news_report"} +{"question": "SELECT SUM(grant_amount), organisation_id FROM Grants GROUP BY organisation_id", "answer": "What is the total amount of grant money given to each organization and what is its id?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT payment_date FROM payments WHERE amount_paid > 300 OR payment_type_code = 'Check'", "answer": "What are the payment date of the payment with amount paid higher than 300 or with payment type is 'Check'\nAdditional table information: table: products_for_hire"} +{"question": "SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t3.district_name = 'Khanewal District'", "answer": "What are the names of all the stores located in Khanewal District?\nAdditional table information: table: store_product"} +{"question": "SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1", "answer": "What is the ship with the largest amount of tonnage called?\nAdditional table information: table: ship_mission"} +{"question": "SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = 'Julio'", "answer": "What are the names of the courses taught by the tutor whose personal name is 'Julio'?\nAdditional table information: table: e_learning"} +{"question": "SELECT T1.CName FROM COURSE AS T1 JOIN ENROLLED_IN AS T2 ON T1.CID = T2.CID GROUP BY T2.CID HAVING COUNT(*) >= 5", "answer": "Give the names of the courses with at least five enrollments.\nAdditional table information: table: college_3"} +{"question": "SELECT first_name, last_name, department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id)", "answer": "What are the full names and department ids for the lowest paid employees across all departments.\nAdditional table information: table: hr_1"} +{"question": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Davis' AND t3.lname = 'Steven'", "answer": "List the clubs having 'Davis Steven' as a member.\nAdditional table information: table: club_1"} +{"question": "SELECT MAX(T1.length_meters), T2.name FROM bridge AS T1 JOIN architect AS T2 ON T1.architect_id = T2.id", "answer": "What is the maximum length in meters for the bridges and what are the architects' names?\nAdditional table information: table: architecture"} +{"question": "SELECT T1.engineer_id, T1.first_name, T1.last_name FROM Maintenance_Engineers AS T1 JOIN Engineer_Visits AS T2 ON T1.engineer_id = T2.engineer_id GROUP BY T1.engineer_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Among those engineers who have visited, which engineer makes the least number of visits? List the engineer id, first name and last name.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT College FROM match_season GROUP BY College ORDER BY COUNT(*) DESC LIMIT 3", "answer": "Show the top 3 most common colleges of players in match seasons.\nAdditional table information: table: match_season"} +{"question": "SELECT departure_date, arrival_date FROM Flight WHERE origin = 'Los Angeles' AND destination = 'Honolulu'", "answer": "Show me the departure date and arrival date for all flights from Los Angeles to Honolulu.\nAdditional table information: table: flight_1"} +{"question": "SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the customer id and number of accounts with most accounts.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId", "answer": "What are the names of artists who have not released any albums?\nAdditional table information: table: chinook_1"} +{"question": "SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171", "answer": "How many courses do the student whose id is 171 attend?\nAdditional table information: table: student_assessment"} +{"question": "SELECT COUNT(*), formats FROM files GROUP BY formats", "answer": "For each file format, return the number of artists who released songs in that format.\nAdditional table information: table: music_1"} +{"question": "SELECT customer_name, customer_phone, payment_method_code FROM customers ORDER BY customer_number DESC", "answer": "Show the name, phone, and payment method code for all customers in descending order of customer number.\nAdditional table information: table: customers_and_products_contacts"} +{"question": "SELECT Model_name, RAM_MiB FROM chip_model ORDER BY RAM_MiB ASC NULLS FIRST LIMIT 1", "answer": "Which model has the least amount of RAM? List the model name and the amount of RAM.\nAdditional table information: table: phone_1"} +{"question": "SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31", "answer": "What are the dates in which the mean sea level pressure was between 30.3 and 31?\nAdditional table information: table: bike_1"} +{"question": "SELECT Date, LOCATION FROM performance", "answer": "What are the dates and locations of performances?\nAdditional table information: table: performance_attendance"} +{"question": "SELECT Working_year_starts FROM manager ORDER BY LEVEL DESC", "answer": "Show the working years of managers in descending order of their level.\nAdditional table information: table: railway"} +{"question": "SELECT AVG(acc_bal), acc_type FROM customer WHERE credit_score < 50 GROUP BY acc_type", "answer": "For each account type, find the average account balance of customers with credit score lower than 50.\nAdditional table information: table: loan_1"} +{"question": "SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1", "answer": "which poll source does the highest oppose rate come from?\nAdditional table information: table: candidate_poll"} +{"question": "SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote WHERE T2.Election_Cycle = 'Spring'", "answer": "Find the distinct Advisor of students who have treasurer votes in the spring election cycle.\nAdditional table information: table: voter_2"} +{"question": "SELECT title FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid GROUP BY T1.songid ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which song has the most vocals?\nAdditional table information: table: music_2"} +{"question": "SELECT date_left_staff FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "answer": "When did the staff member with first name as Janessa and last name as Sawayn leave the company?\nAdditional table information: table: driving_school"} +{"question": "SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1", "answer": "What is the name of the most expensive product?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars >= 4 ORDER BY T1.year NULLS FIRST", "answer": "Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year.\nAdditional table information: table: movie_1"} +{"question": "SELECT T3.Pilot_name, T2.Model FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID", "answer": "Show the names of pilots and models of aircrafts they have flied with.\nAdditional table information: table: pilot_record"} +{"question": "SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1", "answer": "Return the founded year for the school with the largest enrollment.\nAdditional table information: table: university_basketball"} +{"question": "SELECT built_year FROM ship GROUP BY built_year ORDER BY COUNT(*) DESC LIMIT 1", "answer": "In which year were most of ships built?\nAdditional table information: table: ship_1"} +{"question": "SELECT T2.account_name, T1.account_id, COUNT(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id", "answer": "Show the account name, id and the number of transactions for each account.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 4", "answer": "What are the codes of types of documents of which there are for or more?\nAdditional table information: table: document_management"} +{"question": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame' AND t3.characteristic_type_code = 'Grade'", "answer": "List all characteristics of product named 'sesame' with type code 'Grade'.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which institution has the most papers? Find the name of the institution.\nAdditional table information: table: icfp_1"} +{"question": "SELECT COUNT(*) FROM (SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 3)", "answer": "How many cities are there that have more than 3 airports?\nAdditional table information: table: flight_4"} +{"question": "SELECT T1.Marketing_Region_Name FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code = T2.Marketing_Region_Code WHERE T2.Store_Name = 'Rob Dinning'", "answer": "What is the name of the marketing region that the store Rob Dinning belongs to?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT title FROM albums ORDER BY title NULLS FIRST", "answer": "What are the titles of all the albums alphabetically ascending?\nAdditional table information: table: store_1"} +{"question": "SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING SUM(hoursperweek) > 10", "answer": "Show all student IDs with more than total 10 hours per week on all sports played.\nAdditional table information: table: game_1"} +{"question": "SELECT name FROM airports WHERE country = 'Cuba' OR country = 'Argentina'", "answer": "Find the name of the airports located in Cuba or Argentina.\nAdditional table information: table: flight_4"} +{"question": "SELECT headquarter FROM manufacturers WHERE founder = 'James'", "answer": "Where is the headquarter of the company founded by James?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT Name, Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus' OR How_to_Get_There = 'walk'", "answer": "Find the names and opening hours of the tourist attractions that we get to by bus or walk.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T2.name, T2.open_year FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year = 2016 GROUP BY T2.branch_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name and opening year for the branch that registered the most members in 2016?\nAdditional table information: table: shop_membership"} +{"question": "SELECT name, dates_active, number_deaths FROM storm WHERE number_deaths >= 1", "answer": "What are the names, dates active, and number of deaths for storms that had 1 or more death?\nAdditional table information: table: storm_record"} +{"question": "SELECT booking_start_date, booking_end_date FROM Apartment_Bookings", "answer": "What are the start date and end date of each apartment booking?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT T2.guest_first_name, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id", "answer": "Show the guest first names, start dates, and end dates of all the apartment bookings.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT COUNT(*) FROM INVESTORS", "answer": "Find the number of investors in total.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT COUNT(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id WHERE T2.dept_store_chain_name = 'South'", "answer": "How many department stores does the store chain South have?\nAdditional table information: table: department_store"} +{"question": "SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3", "answer": "What are the ids of the top three products that were purchased in the largest amount?\nAdditional table information: table: department_store"} +{"question": "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'", "answer": "How long is the total lesson time took by the customer named Rylan Goodwin?\nAdditional table information: table: driving_school"} +{"question": "SELECT COUNT(*) FROM event", "answer": "How many events are there?\nAdditional table information: table: swimming"} +{"question": "SELECT address FROM shop ORDER BY open_year NULLS FIRST", "answer": "Show the shop addresses ordered by their opening year.\nAdditional table information: table: coffee_shop"} +{"question": "SELECT Name FROM climber ORDER BY Points DESC", "answer": "List the names of climbers in descending order of points.\nAdditional table information: table: climbing"} +{"question": "SELECT SUM(gamesplayed) FROM Sportsinfo WHERE sportname = 'Football' AND onscholarship = 'Y'", "answer": "What is the total number of all football games played by scholarship students?\nAdditional table information: table: game_1"} +{"question": "SELECT name FROM buildings ORDER BY Height DESC", "answer": "What are the names of buildings sorted in descending order of building height?\nAdditional table information: table: company_office"} +{"question": "SELECT Name FROM Projects WHERE NOT Code IN (SELECT Project FROM AssignedTo)", "answer": "What are the names of projects that have not been assigned?\nAdditional table information: table: scientist_1"} +{"question": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING COUNT(DISTINCT T3.product_id) >= 3", "answer": "What are the distinct names of customers who have purchased at least three different products?\nAdditional table information: table: department_store"} +{"question": "SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = 'Germany'", "answer": "What are the addresses of customers living in Germany who have had an invoice?\nAdditional table information: table: chinook_1"} +{"question": "SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 5", "answer": "Find the names of the products with length smaller than 3 or height greater than 5.\nAdditional table information: table: product_catalog"} +{"question": "SELECT COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'", "answer": "How many routes does American Airlines operate?\nAdditional table information: table: flight_4"} +{"question": "SELECT COUNT(*), sex FROM student WHERE age > (SELECT AVG(age) FROM student) GROUP BY sex", "answer": "Find the number of students whose age is older than the average age for each gender.\nAdditional table information: table: dorm_1"} +{"question": "SELECT name, headquarter FROM manufacturers ORDER BY revenue DESC", "answer": "What are the names and headquarters of all manufacturers, ordered by revenue descending?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT T3.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name HAVING COUNT(*) > 1", "answer": "Show the names of journalists that have reported more than one event.\nAdditional table information: table: news_report"} +{"question": "SELECT employee_id, first_name, last_name, job_id FROM employees WHERE salary > (SELECT MAX(salary) FROM employees WHERE job_id = 'PU_MAN')", "answer": "What are the employee ids, full names, and job ids for employees who make more than the highest earning employee with title PU_MAN?\nAdditional table information: table: hr_1"} +{"question": "SELECT DISTINCT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000", "answer": "What are the forenames and surnames of all unique drivers who had a lap time of less than 93000 milliseconds?\nAdditional table information: table: formula_1"} +{"question": "SELECT DISTINCT T1.Fname, T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_President_VOTE WHERE T1.age = 18", "answer": "What are the first names and last names of the students who are 18 years old and have vice president votes.\nAdditional table information: table: voter_2"} +{"question": "SELECT fname, age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = 'Football' INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = 'Lacrosse')", "answer": "What are the first names and ages of all students who are playing both Football and Lacrosse?\nAdditional table information: table: game_1"} +{"question": "SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common maximum page size?\nAdditional table information: table: store_product"} +{"question": "SELECT COUNT(*) FROM customers WHERE state = 'CA'", "answer": "How many customers are from California?\nAdditional table information: table: store_1"} +{"question": "SELECT last_name FROM staff WHERE email_address LIKE '%wrau%'", "answer": "Find the last name of the staff whose email address contains 'wrau'.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT COUNT(DISTINCT StuID) FROM Sportsinfo", "answer": "How many different students are involved in sports?\nAdditional table information: table: game_1"} +{"question": "SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = 'mp3' INTERSECT SELECT song_name FROM song WHERE resolution < 1000", "answer": "What are the names of all songs that are in mp3 format and have a resolution lower than 1000?\nAdditional table information: table: music_1"} +{"question": "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'", "answer": "What is the average price for a lesson taught by Janessa Sawayn?\nAdditional table information: table: driving_school"} +{"question": "SELECT T3.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T1.name = 'John Williams'", "answer": "What are the names of all aircrafts that John Williams have certificates to be able to fly?\nAdditional table information: table: flight_1"} +{"question": "SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the busiest source airport that runs most number of routes in China.\nAdditional table information: table: flight_4"} +{"question": "SELECT TIME FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = 'Linda' AND Student.Lname = 'Smith' AND Restaurant.ResName = 'Subway'", "answer": "When did Linda Smith visit Subway?\nAdditional table information: table: restaurant_1"} +{"question": "SELECT COUNT(DISTINCT school_code) FROM department", "answer": "How many schools are there in the department?\nAdditional table information: table: college_1"} +{"question": "SELECT company, headquarters FROM company ORDER BY market_value DESC", "answer": "What are the names and headquarters of all companies ordered by descending market value?\nAdditional table information: table: gas_company"} +{"question": "SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee", "answer": "How many musicals has each nominee been nominated for?\nAdditional table information: table: musical"} +{"question": "SELECT COUNT(*) FROM Employees", "answer": "How many employees do we have?\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT T3.Shop_Name, T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID", "answer": "Show names of shops and the carriers of devices they have in stock.\nAdditional table information: table: device"} +{"question": "SELECT COUNT(*), T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which product has the most problems? Give me the number of problems and the product name.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT COUNT(*) FROM files WHERE duration LIKE '4:%'", "answer": "What is the count of the songs that last approximately 4 minutes?\nAdditional table information: table: music_1"} +{"question": "SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "answer": "List the distinct hometowns that are not associated with any gymnast.\nAdditional table information: table: gymnast"} +{"question": "SELECT AVG(International_Passengers) FROM airport", "answer": "What is the average number of international passengers for an airport?\nAdditional table information: table: aircraft"} +{"question": "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'", "answer": "Which country and state does staff with first name as Janessa and last name as Sawayn lived?\nAdditional table information: table: driving_school"} +{"question": "SELECT COUNT(DISTINCT class_section) FROM CLASS WHERE crs_code = 'ACCT-211'", "answer": "What is the number of different class sections offered in the course ACCT-211?\nAdditional table information: table: college_1"} +{"question": "SELECT T1.Festival_ID, T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID GROUP BY T1.Festival_ID HAVING COUNT(*) >= 2", "answer": "Show the ids and names of festivals that have at least two nominations for artworks.\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT COUNT(*), customer_id FROM Accounts GROUP BY customer_id", "answer": "Count the number of accounts corresponding to each customer id.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT artist_name FROM artist WHERE country = 'UK' INTERSECT SELECT artist_name FROM song WHERE languages = 'english'", "answer": "Find the names of the artists who are from UK and have produced English songs.\nAdditional table information: table: music_1"} +{"question": "SELECT investor_id, AVG(share_count) FROM TRANSACTIONS GROUP BY investor_id ORDER BY AVG(share_count) NULLS FIRST", "answer": "Show the average share count of transactions each each investor, ordered by average share count.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT gtype, COUNT(*) FROM Video_games GROUP BY gtype", "answer": "Show all video game types and the number of video games in each type.\nAdditional table information: table: game_1"} +{"question": "SELECT COUNT(*) FROM savings WHERE balance > (SELECT AVG(balance) FROM savings)", "answer": "Find the number of accounts with a savings balance that is higher than the average savings balance.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT * FROM people", "answer": "What is all the information about all people?\nAdditional table information: table: candidate_poll"} +{"question": "SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name NULLS FIRST", "answer": "Sort the information about course authors and tutors in alphabetical order of the personal name.\nAdditional table information: table: e_learning"} +{"question": "SELECT T1.City_Town FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Store_Name = 'FJA Filming'", "answer": "Find the city the store named 'FJA Filming' is in.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT unit_price FROM tracks WHERE name = 'Fast As a Shark'", "answer": "What is the unit price of the tune 'Fast As a Shark'?\nAdditional table information: table: store_1"} +{"question": "SELECT SUM(stu_hrs), dept_code FROM student GROUP BY dept_code", "answer": "Find the total number of hours have done for all students in each department.\nAdditional table information: table: college_1"} +{"question": "SELECT T2.title, T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars > (SELECT AVG(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.director = 'James Cameron')", "answer": "What are the titles and directors of the movies whose star is greater than the average stars of the movies directed by James Cameron?\nAdditional table information: table: movie_1"} +{"question": "SELECT MAX(Price), MAX(Score), YEAR FROM WINE GROUP BY YEAR", "answer": "What are the maximum price and score of wines in each year?\nAdditional table information: table: wine_1"} +{"question": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING SUM(access_count) > 10000", "answer": "What document types do have more than 10000 total access number.\nAdditional table information: table: document_management"} +{"question": "SELECT Festival_Name FROM festival_detail WHERE YEAR = 2007", "answer": "What are the names of festivals held in year 2007?\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT T1.name, COUNT(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid", "answer": "Find the name of each user and number of tweets tweeted by each of them.\nAdditional table information: table: twitter_1"} +{"question": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = 'Female'", "answer": "What are the start date and end date of the apartment bookings made by female guests (gender code 'Female')?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT SUM(T2.Killed) FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 1.84", "answer": "What is the total kills of the perpetrators with height more than 1.84.\nAdditional table information: table: perpetrator"} +{"question": "SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%'", "answer": "Find the balance of the checking account belonging to an owner whose name contains 'ee'.\nAdditional table information: table: small_bank_1"} +{"question": "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'", "answer": "What are the first name and last name of Linda Smith's advisor?\nAdditional table information: table: activity_1"} +{"question": "SELECT T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Which school has the fewest professors?\nAdditional table information: table: college_1"} +{"question": "SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code = 'ORG'", "answer": "Return the description of the budget type that has the code ORG.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = 'Binders Unbound'", "answer": "Who is the author of the paper titled 'Binders Unbound'? Give me the last name.\nAdditional table information: table: icfp_1"} +{"question": "SELECT Name FROM editor WHERE Age > 25", "answer": "List the names of editors who are older than 25.\nAdditional table information: table: journal_committee"} +{"question": "SELECT COUNT(DISTINCT customer_id) FROM Accounts", "answer": "Count the number of customers who hold an account.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT name, TIME, service FROM train", "answer": "Show the name, time, and service for all trains.\nAdditional table information: table: train_station"} +{"question": "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'", "answer": "Show the statement detail and the corresponding document name for the statement with detail 'Private Project'.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count < 50", "answer": "What are the lot details of lots associated with transactions with share count smaller than 50?\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT SUM(acc_bal) FROM customer WHERE state = 'Utah' OR state = 'Texas'", "answer": "Find the total account balance of each customer from Utah or Texas.\nAdditional table information: table: loan_1"} +{"question": "SELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'statistics' ORDER BY T2.date_of_attendance NULLS FIRST", "answer": "What are the ids of the students who attended courses in the statistics department in order of attendance date.\nAdditional table information: table: student_assessment"} +{"question": "SELECT COUNT(*) FROM COURSE", "answer": "Count the number of courses.\nAdditional table information: table: college_3"} +{"question": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the shop that has the most different kinds of devices in stock?\nAdditional table information: table: device"} +{"question": "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", "answer": "Find the name of the most popular party form.\nAdditional table information: table: e_government"} +{"question": "SELECT COUNT(*) FROM cinema", "answer": "How many cinema do we have?\nAdditional table information: table: cinema"} +{"question": "SELECT major, AVG(age), MIN(age), MAX(age) FROM Student GROUP BY major", "answer": "What are the average, minimum, and max ages for each of the different majors?\nAdditional table information: table: game_1"} +{"question": "SELECT COUNT(*) FROM All_documents WHERE document_type_code = 'CV' OR document_type_code = 'BK'", "answer": "How many documents have document type code CV or BK?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T1.student_id, T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) >= 2", "answer": "Find the student ID and personal name of the student with at least two enrollments.\nAdditional table information: table: e_learning"} +{"question": "SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.PostalCode = '70174'", "answer": "Find the cities corresponding to employees who help customers with the postal code 70174.\nAdditional table information: table: chinook_1"} +{"question": "SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'", "answer": "Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa.\nAdditional table information: table: sakila_1"} +{"question": "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", "answer": "What is the color of the grape whose wine products has the highest average price?\nAdditional table information: table: wine_1"} +{"question": "SELECT T3.Pilot_name, T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID ORDER BY T3.Rank NULLS FIRST", "answer": "Show the names of pilots and fleet series of the aircrafts they have flied with in ascending order of the rank of the pilot.\nAdditional table information: table: pilot_record"} +{"question": "SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1", "answer": "Find the name of the youngest organization.\nAdditional table information: table: e_government"} +{"question": "SELECT MAX(Enrollment) FROM university", "answer": "Return the maximum enrollment across all schools.\nAdditional table information: table: university_basketball"} +{"question": "SELECT Name FROM People ORDER BY Weight ASC NULLS FIRST", "answer": "What are the names of people in ascending order of weight?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT COUNT(*), city_code FROM student GROUP BY city_code HAVING COUNT(*) > 1", "answer": "How many students are from each city, and which cities have more than one cities?\nAdditional table information: table: dorm_1"} +{"question": "SELECT Candidate_ID FROM candidate ORDER BY oppose_rate NULLS FIRST LIMIT 1", "answer": "What is the id of the candidate with the lowest oppose rate?\nAdditional table information: table: candidate_poll"} +{"question": "SELECT AVG(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = 'Monaco Grand Prix'", "answer": "What is the average fastest lap speed for the Monaco Grand Prix in 2008?\nAdditional table information: table: formula_1"} +{"question": "SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND faculty > (SELECT MAX(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = 'Orange')", "answer": "Find the names of the campus which has more faculties in 2002 than every campus in Orange county.\nAdditional table information: table: csu_1"} +{"question": "SELECT DISTINCT Venue FROM debate", "answer": "Show the distinct venues of debates\nAdditional table information: table: debate"} +{"question": "SELECT COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = 'Lucas' AND T1.last_name = 'Mancini'", "answer": "How many orders does Lucas Mancini has?\nAdditional table information: table: store_1"} +{"question": "SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid HAVING SUM(hours_played) >= 1000", "answer": "What are the names of all the games that have been played for at least 1000 hours?\nAdditional table information: table: game_1"} +{"question": "SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE YEAR = 2009 OR YEAR = 2010", "answer": "Find the name of students who took any class in the years of 2009 and 2010.\nAdditional table information: table: college_2"} +{"question": "SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id = T2.i_id GROUP BY T2.i_id HAVING COUNT(*) > 1", "answer": "What are the names of instructors who advise more than one student?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(*) FROM Customers", "answer": "Count the number of customers.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT origin, destination FROM Flight WHERE price > 300", "answer": "Show origin and destination for flights with price higher than 300.\nAdditional table information: table: flight_1"} +{"question": "SELECT account_id, account_details FROM Accounts", "answer": "Show all account ids and account details.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT t1.Effective_Date FROM claims AS t1 JOIN settlements AS t2 ON t1.claim_id = t2.claim_id GROUP BY t1.claim_id ORDER BY SUM(t2.settlement_amount) DESC LIMIT 1", "answer": "What is the effective date of the claim that has the largest amount of total settlement?\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT t1.name, t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id ORDER BY t2.support_rate DESC LIMIT 1", "answer": "Find the name and gender of the candidate who got the highest support rate.\nAdditional table information: table: candidate_poll"} +{"question": "SELECT apt_type_code, COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC NULLS FIRST", "answer": "Return each apartment type code with the number of apartments having that apartment type, in ascending order of the number of apartments.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT circuitid, LOCATION FROM circuits WHERE country = 'France' OR country = 'Belgium'", "answer": "Find the id and location of circuits that belong to France or Belgium?\nAdditional table information: table: formula_1"} +{"question": "SELECT COUNT(*) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = 'Linda' AND Student.Lname = 'Smith' AND Restaurant.ResName = 'Subway'", "answer": "How many times has the student Linda Smith visited Subway?\nAdditional table information: table: restaurant_1"} +{"question": "SELECT Student.Fname, Student.Lname FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID GROUP BY Student.StuID ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which student visited restaurant most often? List student's first name and last name.\nAdditional table information: table: restaurant_1"} +{"question": "SELECT title, director FROM film WHERE NOT film_id IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.Market_ID WHERE country = 'China')", "answer": "What are the titles and directors of the films were never presented in China?\nAdditional table information: table: film_rank"} +{"question": "SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995", "answer": "Return the types of film market estimations in 1995.\nAdditional table information: table: film_rank"} +{"question": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'", "answer": "Find the states of the colleges that have students in the tryout who played in striker position.\nAdditional table information: table: soccer_2"} +{"question": "SELECT COUNT(*) FROM farm", "answer": "How many farms are there?\nAdditional table information: table: farm"} +{"question": "SELECT COUNT(*) FROM WINE WHERE Winery = 'Robert Biale'", "answer": "How many wines are produced at Robert Biale winery?\nAdditional table information: table: wine_1"} +{"question": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) > 1", "answer": "In which locations are there more than one movie theater with capacity above 300?\nAdditional table information: table: cinema"} +{"question": "SELECT name FROM instructor WHERE dept_name = 'Statistics' ORDER BY salary NULLS FIRST LIMIT 1", "answer": "Give the name of the lowest earning instructor in the Statistics department.\nAdditional table information: table: college_2"} +{"question": "SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Confirmed' INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = 'Provisional'", "answer": "Which apartments have bookings with both status codes 'Provisional' and 'Confirmed'? Give me the apartment numbers.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT AVG(age) FROM Student WHERE StuID IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food' INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'animal')", "answer": "Find the average age of the students who have allergies with food and animal types.\nAdditional table information: table: allergy_1"} +{"question": "SELECT T1.course_name, T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = 'Computer Science'", "answer": "What are the names and descriptions of the all courses under the 'Computer Science' subject?\nAdditional table information: table: e_learning"} +{"question": "SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Louisville , Kentucky' INTERSECT SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Hiram , Georgia'", "answer": "What are the names of the branches that have some members with a hometown in Louisville, Kentucky and also those from Hiram, Goergia?\nAdditional table information: table: shop_membership"} +{"question": "SELECT clubname FROM club WHERE clublocation = 'AKW'", "answer": "Find the name of all the clubs at 'AKW'.\nAdditional table information: table: club_1"} +{"question": "SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num ORDER BY T2.emp_fname NULLS FIRST", "answer": "Find the first names and offices of all professors sorted by alphabetical order of their first name.\nAdditional table information: table: college_1"} +{"question": "SELECT Country FROM perpetrator WHERE Injured > 50 INTERSECT SELECT Country FROM perpetrator WHERE Injured < 20", "answer": "Show the countries that have both perpetrators with injures more than 50 and perpetrators with injures smaller than 20.\nAdditional table information: table: perpetrator"} +{"question": "SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY AVG(salary) DESC LIMIT 1", "answer": "Find the name of the department which has the highest average salary of professors.\nAdditional table information: table: college_2"} +{"question": "SELECT Famous_Title, Age FROM artist ORDER BY Age DESC", "answer": "What are the famous titles and ages of each artist, listed in descending order by age?\nAdditional table information: table: music_4"} +{"question": "SELECT Area, County FROM APPELLATIONS", "answer": "List the area and county of all appelations.\nAdditional table information: table: wine_1"} +{"question": "SELECT DISTINCT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.name = 'Thesisin'", "answer": "List the names of all the physicians who prescribe Thesisin as medication.\nAdditional table information: table: hospital_1"} +{"question": "SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in", "answer": "Show the ids of the faculty who don't participate in any activity.\nAdditional table information: table: activity_1"} +{"question": "SELECT COUNT(*) FROM region AS t1 JOIN party AS t2 ON t1.region_id = t2.region_id JOIN party_events AS t3 ON t2.party_id = t3.party_id WHERE t1.region_name = 'United Kingdom' AND t3.Event_Name = 'Annaual Meeting'", "answer": "Count the number of Annual Meeting events that took place in the region of the United Kingdom.\nAdditional table information: table: party_people"} +{"question": "SELECT customer_details FROM customers EXCEPT SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id", "answer": "What are the names of customers who do not have any policies?\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num ORDER BY T2.emp_fname NULLS FIRST", "answer": "What are the first names and office locations for all professors sorted alphabetically by first name?\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(DISTINCT t3.product_id) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = 'Rodrick Heaney'", "answer": "How many types of products have Rodrick Heaney bought in total?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T1.id, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 3", "answer": "What is the id and trade name of the medicines can interact with at least 3 enzymes?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'", "answer": "What college has a student who successfully made the team in the role of a goalie?\nAdditional table information: table: soccer_2"} +{"question": "SELECT YEAR FROM SECTION GROUP BY YEAR ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the year which offers the largest number of courses.\nAdditional table information: table: college_2"} +{"question": "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'", "answer": "Find the id of the customers who have order status both 'On Road' and 'Shipped'.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT COUNT(*) FROM Rooms", "answer": "What is the total number of rooms available in this inn?\nAdditional table information: table: inn_1"} +{"question": "SELECT Birth_Place FROM people GROUP BY Birth_Place ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common birth place of people?\nAdditional table information: table: body_builder"} +{"question": "SELECT Aircraft FROM aircraft WHERE NOT Aircraft_ID IN (SELECT Winning_Aircraft FROM MATCH)", "answer": "What are the names of all aicrafts that have never won any match?\nAdditional table information: table: aircraft"} +{"question": "SELECT T1.Height FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Injured DESC", "answer": "What are the heights of perpetrators in descending order of the number of people they injured?\nAdditional table information: table: perpetrator"} +{"question": "SELECT Nominee FROM musical WHERE Award = 'Tony Award' INTERSECT SELECT Nominee FROM musical WHERE Award = 'Drama Desk Award'", "answer": "Who are the nominees who have been nominated for both a Tony Award and a Drama Desk Award?\nAdditional table information: table: musical"} +{"question": "SELECT AVG(Quantity) FROM stock", "answer": "What is the average quantity of stocks?\nAdditional table information: table: device"} +{"question": "SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'", "answer": "Which movies have 'Deleted Scenes' as a substring in the special feature?\nAdditional table information: table: sakila_1"} +{"question": "SELECT document_name FROM documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 3 INTERSECT SELECT document_name FROM documents GROUP BY document_structure_code ORDER BY COUNT(*) DESC LIMIT 3", "answer": "Find the list of documents that are both in the most three popular type and have the most three popular structure.\nAdditional table information: table: document_management"} +{"question": "SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = 'Gorgoroth'", "answer": "What are the issue dates of volumes associated with the artist 'Gorgoroth'?\nAdditional table information: table: music_4"} +{"question": "SELECT T1.season, T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.injury = 'Foot injury' OR T3.injury = 'Knee problem'", "answer": "In which season and which stadium did any player have an injury of 'Foot injury' or 'Knee problem'?\nAdditional table information: table: game_injury"} +{"question": "SELECT COUNT(DISTINCT T1.name), T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.Headquarter", "answer": "Find the number of different products that are produced by companies at different headquarter cities.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT Ref_Shipping_Agents.shipping_agent_name FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Documents.document_id = 2", "answer": "What is the name of the shipping agent of the document with id 2?\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname ORDER BY SUM(T2.amount) DESC LIMIT 1", "answer": "What is the name of the bank branch that has lent the greatest amount?\nAdditional table information: table: loan_1"} +{"question": "SELECT AVG(age), MAX(age), sex FROM student GROUP BY sex", "answer": "Find the average and oldest age for students with different sex.\nAdditional table information: table: dorm_1"} +{"question": "SELECT dept_name, building FROM department WHERE budget > (SELECT AVG(budget) FROM department)", "answer": "What is the name and building of the departments whose budget is more than the average budget?\nAdditional table information: table: college_2"} +{"question": "SELECT T3.Party_Theme, T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID", "answer": "For each party, return its theme and the name of its host.\nAdditional table information: table: party_host"} +{"question": "SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name ORDER BY COUNT(*) DESC LIMIT 3", "answer": "What are the three products that have the most problems?s\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT product_id FROM order_items GROUP BY product_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Give the product id for the product that was ordered most frequently.\nAdditional table information: table: department_store"} +{"question": "SELECT store_id FROM customer GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which store has most the customers?\nAdditional table information: table: sakila_1"} +{"question": "SELECT T1.name, COUNT(*) FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id GROUP BY T1.building_id", "answer": "For each building, show the name of the building and the number of institutions in it.\nAdditional table information: table: protein_institute"} +{"question": "SELECT AVG(room_count) FROM Apartments WHERE apt_type_code = 'Studio'", "answer": "What is the average number of rooms of apartments with type code 'Studio'?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = 'Indonesia'", "answer": "Which players are from Indonesia?\nAdditional table information: table: match_season"} +{"question": "SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common apartment type code among apartments with more than 1 bathroom.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT Fname, Lname, phone FROM Faculty WHERE Sex = 'F'", "answer": "Show the first name, last name, and phone number for all female faculty members.\nAdditional table information: table: activity_1"} +{"question": "SELECT vehicle_id FROM Vehicles", "answer": "What are the ids of all vehicles?\nAdditional table information: table: driving_school"} +{"question": "SELECT name FROM manufacturers WHERE revenue BETWEEN 100 AND 150", "answer": "Find the name of companies whose revenue is between 100 and 150.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3", "answer": "Show the details of the top 3 most expensive hotels.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT fname FROM student WHERE age > 20", "answer": "What are the first names of all students who are older than 20?\nAdditional table information: table: dorm_1"} +{"question": "SELECT T1.name, T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY AVG(T2.salary) ASC NULLS FIRST LIMIT 1", "answer": "What are the name and id of the team offering the lowest average salary?\nAdditional table information: table: baseball_1"} +{"question": "SELECT product_details FROM products WHERE product_details LIKE '%Latte%' OR product_details LIKE '%Americano%'", "answer": "Which product's detail contains the word 'Latte' or 'Americano'? Return the full detail.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT SUM(total_pounds) FROM purchase AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T2.city = 'London' AND T1.year = 2018", "answer": "How many total pounds were purchased in the year 2018 at all London branches?\nAdditional table information: table: shop_membership"} +{"question": "SELECT T1.Name, AVG(T2.Speed) FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name", "answer": "Show the names of countries and the average speed of roller coasters from each country.\nAdditional table information: table: roller_coaster"} +{"question": "SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010", "answer": "Give the distinct names of wines made before 2000 or after 2010.\nAdditional table information: table: wine_1"} +{"question": "SELECT name FROM Person WHERE age = (SELECT MAX(age) FROM person)", "answer": "What is the name of the person who is the oldest?\nAdditional table information: table: network_2"} +{"question": "SELECT T1.artist_name, T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate LIKE '%Mar%'", "answer": "What are the names and genders of all artists who released songs in the month of March?\nAdditional table information: table: music_1"} +{"question": "SELECT Name FROM Projects WHERE NOT Code IN (SELECT Project FROM AssignedTo)", "answer": "Select the project names which are not assigned yet.\nAdditional table information: table: scientist_1"} +{"question": "SELECT MAX(Enrollment) FROM university", "answer": "What is the maximum enrollment across all schools?\nAdditional table information: table: university_basketball"} +{"question": "SELECT gname, gtype FROM Video_games ORDER BY gname NULLS FIRST", "answer": "What are the names of all the video games and their types in alphabetical order?\nAdditional table information: table: game_1"} +{"question": "SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age NULLS FIRST LIMIT 1", "answer": "How old is the youngest winning pilot and what is their name?\nAdditional table information: table: aircraft"} +{"question": "SELECT COUNT(DISTINCT scientist) FROM assignedto", "answer": "Count the number of different scientists assigned to any project.\nAdditional table information: table: scientist_1"} +{"question": "SELECT COUNT(*) FROM Student WHERE city_code = 'HKG' OR city_code = 'CHI'", "answer": "How many students live in HKG or CHI?\nAdditional table information: table: allergy_1"} +{"question": "SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_Staff WHERE role_code = 'researcher')", "answer": "What are the details for all projects that did not hire any staff in a research role?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT MAX(Price), MAX(Score) FROM WINE WHERE Appelation = 'St. Helena'", "answer": "Give the maximum price and score for wines produced in the appelation St. Helena.\nAdditional table information: table: wine_1"} +{"question": "SELECT CName FROM COURSE WHERE Credits = 3 UNION SELECT CName FROM COURSE WHERE Credits = 1 AND Hours = 4", "answer": "Find the names of courses that have either 3 credits or 1 credit but 4 hours.\nAdditional table information: table: college_3"} +{"question": "SELECT MAX(gradepoint), MIN(gradepoint) FROM GRADECONVERSION", "answer": "What are the maximum and minumum grade points?\nAdditional table information: table: college_3"} +{"question": "SELECT rank, COUNT(*) FROM Faculty GROUP BY rank", "answer": "How many faculty members do we have for each faculty rank?\nAdditional table information: table: activity_1"} +{"question": "SELECT COUNT(*) FROM wrestler", "answer": "Count the number of wrestlers.\nAdditional table information: table: wrestler"} +{"question": "SELECT COUNT(*) FROM station WHERE city = 'Mountain View'", "answer": "How many stations does Mountain View city has?\nAdditional table information: table: bike_1"} +{"question": "SELECT Birth_Date FROM People ORDER BY Height ASC NULLS FIRST", "answer": "What are the birthdays of people in ascending order of height?\nAdditional table information: table: body_builder"} +{"question": "SELECT date FROM weather WHERE max_temperature_f > 85", "answer": "Give me the dates when the max temperature was higher than 85.\nAdditional table information: table: bike_1"} +{"question": "SELECT T1.name, T1.team_id, MAX(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id", "answer": "For each team, return the team name, id and the maximum salary among the team.\nAdditional table information: table: baseball_1"} +{"question": "SELECT StuID FROM Student WHERE Advisor = 1121", "answer": "Show ids for all students who have advisor 1121.\nAdditional table information: table: game_1"} +{"question": "SELECT COUNT(*), dept_name FROM student GROUP BY dept_name", "answer": "Find the total number of students in each department.\nAdditional table information: table: college_2"} +{"question": "SELECT T1.name, T1.email FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 GROUP BY T2.f1 HAVING COUNT(*) > 1", "answer": "Find the name and email for the users who have more than one follower.\nAdditional table information: table: twitter_1"} +{"question": "SELECT T2.Fname, T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the first name and last name of the student who have most number of sports?\nAdditional table information: table: game_1"} +{"question": "SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "What are the emails of customers who have filed complaints on the product which has had the greatest number of complaints?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT T1.id, T1.score, T1.date FROM game AS T1 JOIN injury_accident AS T2 ON T2.game_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 2", "answer": "What are the ids, scores, and dates of the games which caused at least two injury accidents?\nAdditional table information: table: game_injury"} +{"question": "SELECT TYPE FROM ship WHERE flag = 'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag = 'Malta'", "answer": "What types of ships have both ships that have Panama Flags and Malta flags?\nAdditional table information: table: ship_1"} +{"question": "SELECT DISTINCT firstname, lastname FROM teachers", "answer": "What are the first name and last name of all the teachers?\nAdditional table information: table: student_1"} +{"question": "SELECT COUNT(DISTINCT client) FROM web_client_accelerator", "answer": "How many different kinds of clients are supported by the web clients accelerators?\nAdditional table information: table: browser_web"} +{"question": "SELECT state, acc_type, credit_score FROM customer WHERE no_of_loans = 0", "answer": "What are the states, account types, and credit scores for customers who have 0 loans?\nAdditional table information: table: loan_1"} +{"question": "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'", "answer": "List first name and last name of customers lived in city Lockmanfurt.\nAdditional table information: table: driving_school"} +{"question": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Democratic'", "answer": "Return all the committees that have delegates from Democratic party.\nAdditional table information: table: election"} +{"question": "SELECT * FROM products WHERE price BETWEEN 60 AND 120", "answer": "Find all information of all the products with a price between $60 and $120.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT T2.Name, T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID", "answer": "Show the names of members and the location of the performances they attended.\nAdditional table information: table: performance_attendance"} +{"question": "SELECT SUM(beds) FROM Rooms WHERE bedtype = 'King'", "answer": "Find the total number of king beds available.\nAdditional table information: table: inn_1"} +{"question": "SELECT T2.apt_number, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id", "answer": "Show the apartment numbers, start dates, and end dates of all the apartment bookings.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY department_name", "answer": "What are the department names and how many employees work in each of them?\nAdditional table information: table: hr_1"} +{"question": "SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT MIN(order_date) FROM Customer_Orders WHERE order_status_code = 'Cancelled')", "answer": "What are the distinct ids of customers who made an order after any order that was Cancelled?\nAdditional table information: table: department_store"} +{"question": "SELECT customer_phone, customer_email FROM Customers WHERE customer_first_name = 'Aniyah' AND customer_last_name = 'Feest'", "answer": "What is the phone and email for customer with first name Aniyah and last name Feest?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT COUNT(DISTINCT incident_type_code) FROM Behavior_Incident", "answer": "How many distinct incident type codes are there?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT T2.School_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T1.amount > 8.5 GROUP BY T1.school_id HAVING COUNT(*) > 1", "answer": "Find the names of schools that have more than one donator with donation amount above 8.5.\nAdditional table information: table: school_finance"} +{"question": "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 NULLS FIRST LIMIT 1", "answer": "Find the last name of the first ever contact person of the organization with the highest UK Vat number.\nAdditional table information: table: e_government"} +{"question": "SELECT COUNT(*) FROM Financial_transactions", "answer": "Count the number of transactions.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT COUNT(*), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name", "answer": "Find the number of products for each manufacturer, showing the name of each company.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT T2.emp_fname, T4.prof_office, T3.crs_description, T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num JOIN department AS T5 ON T4.dept_code = T5.dept_code", "answer": "Find the first names and offices of all instructors who have taught some course and the course description and the department name.\nAdditional table information: table: college_1"} +{"question": "SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T2.name = 'Airbus A340-300'", "answer": "Show all flight numbers with aircraft Airbus A340-300.\nAdditional table information: table: flight_1"} +{"question": "SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS'", "answer": "List the names of all the channels owned by either CCTV or HBS\nAdditional table information: table: program_share"} +{"question": "SELECT T1.part_name, T1.part_id FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_id HAVING COUNT(*) > 2", "answer": "Which parts have more than 2 faults? Show the part name and id.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT CLASS, COUNT(*) FROM race GROUP BY CLASS", "answer": "What are the different classes of races, and how many races correspond to each?\nAdditional table information: table: race_track"} +{"question": "SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = 'Mary' INTERSECT SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = 'Susan'", "answer": "Find the id of users who are followed by Mary and Susan.\nAdditional table information: table: twitter_1"} +{"question": "SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code HAVING COUNT(*) >= 2", "answer": "Show the product type codes that have at least two products.\nAdditional table information: table: solvency_ii"} +{"question": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.advisor = 1121", "answer": "Which clubs have one or more members whose advisor is '1121'?\nAdditional table information: table: club_1"} +{"question": "SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id", "answer": "What are the names of departments that have at least one employee.\nAdditional table information: table: hr_1"} +{"question": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 3 INTERSECT SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 4", "answer": "What are the names of reviewers who had rated 3 star and 4 star?\nAdditional table information: table: movie_1"} +{"question": "SELECT T1.crs_code FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num WHERE T3.stu_lname = 'Smithson'", "answer": "What are the course codes for every class that the student with the last name Smithson took?\nAdditional table information: table: college_1"} +{"question": "SELECT building, COUNT(*) FROM Faculty GROUP BY building", "answer": "Show all the buildings along with the number of faculty members the buildings have.\nAdditional table information: table: activity_1"} +{"question": "SELECT DISTINCT T1.driverid, T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds > 100000", "answer": "What are the different driver ids and nationalities of all drivers who had a laptime of more than 100000 milliseconds?\nAdditional table information: table: formula_1"} +{"question": "SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid ORDER BY SUM(hours_played) DESC LIMIT 1", "answer": "What is the name of the game that has been played the most?\nAdditional table information: table: game_1"} +{"question": "SELECT AVG(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'", "answer": "Compute the average salary of the players in the team called 'Boston Red Stockings'.\nAdditional table information: table: baseball_1"} +{"question": "SELECT city FROM branch WHERE open_year = 2001 AND membership_amount > 100", "answer": "What are the cities that have a branch that opened in 2001 and a branch with more than 100 members?\nAdditional table information: table: shop_membership"} +{"question": "SELECT Studio, COUNT(*) FROM film GROUP BY Studio", "answer": "How films are produced by each studio?\nAdditional table information: table: film_rank"} +{"question": "SELECT T1.id FROM trip AS T1 JOIN weather AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.zip_code HAVING AVG(T2.mean_temperature_f) > 60", "answer": "For each zip code, find the ids of all trips that have a higher average mean temperature above 60?\nAdditional table information: table: bike_1"} +{"question": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Badlands'", "answer": "How many different instruments are used in the song 'Badlands'?\nAdditional table information: table: music_2"} +{"question": "SELECT SUM(T1.crs_credit), T1.dept_code FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code GROUP BY T1.dept_code", "answer": "What are the total number of credits offered by each department?\nAdditional table information: table: college_1"} +{"question": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.firstname = 'Solveig' AND T2.title = 'A Bar In Amsterdam'", "answer": "What are the types of vocals that the musician with the first name 'Solveig' played in the song 'A Bar in Amsterdam'?\nAdditional table information: table: music_2"} +{"question": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code HAVING COUNT(*) >= 5", "answer": "Show card type codes with at least 5 cards.\nAdditional table information: table: customers_card_transactions"} +{"question": "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", "answer": "In February, which city marks the highest temperature?\nAdditional table information: table: city_record"} +{"question": "SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID HAVING COUNT(*) >= 3", "answer": "Show names of musicals which have at least three actors.\nAdditional table information: table: musical"} +{"question": "SELECT T1.title, T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title", "answer": "For directors who had more than one movie, return the titles and produced years of all movies directed by them.\nAdditional table information: table: movie_1"} +{"question": "SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Latin' OR T1.Name = 'Pop'", "answer": "Find the average millisecond length of Latin and Pop tracks.\nAdditional table information: table: chinook_1"} +{"question": "SELECT customer_phone, customer_email FROM Customers WHERE customer_first_name = 'Aniyah' AND customer_last_name = 'Feest'", "answer": "Return the phone and email of the customer with the first name Aniyah and last name Feest.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT Team FROM Elimination WHERE Eliminated_By = 'Orton' INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = 'Benjamin'", "answer": "What are the teams that have both wrestlers eliminated by Orton and wrestlers eliminated by Benjamin?\nAdditional table information: table: wrestler"} +{"question": "SELECT current_series FROM \"regional_marketing\" WHERE Notes = 'New series began in June 2011'", "answer": "What is the current series where the new series began in June 2011? \nAdditional table information: table: regional_marketing\ncolumns: state_territory, text_bg_color, format, current_slogan, current_series, Notes"} +{"question": "SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011", "answer": "What are the names of all races held between 2009 and 2011?\nAdditional table information: table: formula_1"} +{"question": "SELECT name FROM manufacturers WHERE revenue < (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin')", "answer": "What are the names of companies with revenue less than the lowest revenue of any manufacturer in Austin?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.advisor = 1121", "answer": "List the clubs that have at least a member with advisor '1121'.\nAdditional table information: table: club_1"} +{"question": "SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200", "answer": "What are the titles of films that are either longer than 100 minutes or rated PG other than those that cost more than 200 to replace?\nAdditional table information: table: sakila_1"} +{"question": "SELECT campus FROM campuses WHERE YEAR = 1958", "answer": "Find all the campuses opened in 1958.\nAdditional table information: table: csu_1"} +{"question": "SELECT Theme FROM farm_competition ORDER BY YEAR ASC NULLS FIRST", "answer": "Return the themes of farm competitions, sorted by year ascending.\nAdditional table information: table: farm"} +{"question": "SELECT title FROM course WHERE dept_name = 'Statistics' INTERSECT SELECT title FROM course WHERE dept_name = 'Psychology'", "answer": "Find the title of course that is provided by both Statistics and Psychology departments.\nAdditional table information: table: college_2"} +{"question": "SELECT dorm_name FROM dorm EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge'", "answer": "Find the name of dorms that do not have amenity TV Lounge.\nAdditional table information: table: dorm_1"} +{"question": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the description of the color for most products?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn", "answer": "List the names of patients who have made appointments.\nAdditional table information: table: hospital_1"} +{"question": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.lastname = 'Heilo' AND T2.title = 'Der Kapitan'", "answer": "Which vocal type did the musician with last name 'Heilo' played in the song with title 'Der Kapitan'?\nAdditional table information: table: music_2"} +{"question": "SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students", "answer": "What are the personal names used both by some course authors and some students?\nAdditional table information: table: e_learning"} +{"question": "SELECT T1.Name, MAX(T1.Price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name", "answer": "For each manufacturer name, what are the names and prices of their most expensive product?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT COUNT(*) FROM EVENTS WHERE NOT event_id IN (SELECT event_id FROM Participants_in_Events)", "answer": "How many events did not have any participants?\nAdditional table information: table: local_govt_in_alabama"} +{"question": "SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1", "answer": "What is the last date that a staff member left a project?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT COUNT(*) FROM COURSE WHERE Credits > 2", "answer": "Count the number of courses with more than 2 credits.\nAdditional table information: table: college_3"} +{"question": "SELECT transaction_type, SUM(transaction_amount) FROM Financial_transactions GROUP BY transaction_type", "answer": "What are total transaction amounts for each transaction type?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT T1.id, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 3", "answer": "What are the ids and trade names of the medicine that can interact with at least 3 enzymes?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT Accreditation_level FROM phone GROUP BY Accreditation_level HAVING COUNT(*) > 3", "answer": "Find the accreditation level that more than 3 phones use.\nAdditional table information: table: phone_1"} +{"question": "SELECT Shop_Name, LOCATION FROM shop ORDER BY Shop_Name ASC NULLS FIRST", "answer": "Return the names and locations of shops, ordered by name in alphabetical order.\nAdditional table information: table: device"} +{"question": "SELECT DISTINCT T2.problem_id, T2.problem_log_id FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T1.staff_first_name = 'Rylan' AND T1.staff_last_name = 'Homenick'", "answer": "Which problem id and log id are assigned to the staff named Rylan Homenick?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT COUNT(*) FROM park WHERE city = 'Atlanta'", "answer": "How many parks are there in Atlanta city?\nAdditional table information: table: baseball_1"} +{"question": "SELECT StuID FROM Student WHERE sex = 'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname = 'Football'", "answer": "What are the ids of all male students who do not play football?\nAdditional table information: table: game_1"} +{"question": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the aircraft that has won an award the most?\nAdditional table information: table: aircraft"} +{"question": "SELECT T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID WHERE T3.Age < 34", "answer": "Show the fleet series of the aircrafts flied by pilots younger than 34\nAdditional table information: table: pilot_record"} +{"question": "SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the product ID of the most frequently ordered item on invoices?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "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%'", "answer": "What are the the lesson ids of all staff taught by Janessa Sawayn whose nickname has the letter s?\nAdditional table information: table: driving_school"} +{"question": "SELECT COUNT(DISTINCT allergy) FROM Allergy_type", "answer": "How many allergy entries are there?\nAdditional table information: table: allergy_1"} +{"question": "SELECT name, city FROM branch WHERE NOT branch_id IN (SELECT branch_id FROM membership_register_branch)", "answer": "List the branch name and city without any registered members.\nAdditional table information: table: shop_membership"} +{"question": "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'", "answer": "Show the movie titles and book titles for all companies in China.\nAdditional table information: table: culture_company"} +{"question": "SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Afghanistan' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Albania'", "answer": "What are the names of the storms that affected both the regions of Afghanistan and Albania?\nAdditional table information: table: storm_record"} +{"question": "SELECT T2.lname, T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.SportName = 'Football' OR T1.SportName = 'Lacrosse'", "answer": "Find the last and first name of students who are playing Football or Lacrosse.\nAdditional table information: table: game_1"} +{"question": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = 'HOU'", "answer": "Which clubs have one or more members from the city with code 'HOU'? Give me the names of the clubs.\nAdditional table information: table: club_1"} +{"question": "SELECT Age FROM Student WHERE Fname = 'Linda' AND Lname = 'Smith'", "answer": "What is the age of student Linda Smith?\nAdditional table information: table: restaurant_1"} +{"question": "SELECT lname, age FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Milk' INTERSECT SELECT StuID FROM Has_allergy WHERE Allergy = 'Cat')", "answer": "What are the last names and ages of the students who are allergic to milk and cat?\nAdditional table information: table: allergy_1"} +{"question": "SELECT T1.name, T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance NULLS FIRST LIMIT 1", "answer": "What are the names and balances of checking accounts belonging to the customer with the lowest savings balance?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT T1.subject_id, T2.subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id", "answer": "Find the subject ID, subject name, and the corresponding number of available courses for each subject.\nAdditional table information: table: e_learning"} +{"question": "SELECT COUNT(DISTINCT ID) FROM teaches WHERE semester = 'Spring' AND YEAR = 2010", "answer": "How many instructors teach a course in the Spring of 2010?\nAdditional table information: table: college_2"} +{"question": "SELECT stu_gpa, stu_phone, stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5", "answer": "What is the first name, gpa and phone number of the top 5 students with highest gpa?\nAdditional table information: table: college_1"} +{"question": "SELECT founder FROM manufacturers WHERE name LIKE 'S%'", "answer": "Who is the founders of companies whose first letter is S?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT * FROM basketball_match", "answer": "List all information regarding the basketball match.\nAdditional table information: table: university_basketball"} +{"question": "SELECT Name FROM WINE ORDER BY Score NULLS FIRST LIMIT 1", "answer": "What is the name of the highest rated wine?\nAdditional table information: table: wine_1"} +{"question": "SELECT minister FROM party WHERE party_name <> 'Progress Party'", "answer": "Show all ministers who do not belong to Progress Party.\nAdditional table information: table: party_people"} +{"question": "SELECT name FROM playlists", "answer": "What are the names of all the playlists?\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Eric' AND t3.lname = 'Tai'", "answer": "How many clubs does the student named 'Eric Tai' belong to?\nAdditional table information: table: club_1"} +{"question": "SELECT founded FROM university WHERE affiliation <> 'Public' ORDER BY founded DESC LIMIT 1", "answer": "What is the founded year of the non public school that was founded most recently?\nAdditional table information: table: university_basketball"} +{"question": "SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id GROUP BY t2.customer_details ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name of the customer that has been involved in the most policies.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT address, num_of_staff FROM shop WHERE NOT shop_id IN (SELECT shop_id FROM happy_hour)", "answer": "Find the address and staff number of the shops that do not have any happy hour.\nAdditional table information: table: coffee_shop"} +{"question": "SELECT COUNT(*) FROM Student WHERE age = 18", "answer": "How many students are 18 years old?\nAdditional table information: table: allergy_1"} +{"question": "SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1", "answer": "Return the name of the mountain with the greatest height.\nAdditional table information: table: climbing"} +{"question": "SELECT LName FROM Student WHERE age = (SELECT MIN(age) FROM Student)", "answer": "What is the last name of the youngest student?\nAdditional table information: table: allergy_1"} +{"question": "SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed", "answer": "What are the ids of all the employees who have destroyed documents?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT COUNT(DISTINCT major), COUNT(DISTINCT city_code) FROM student", "answer": "How many different majors are there and how many different city codes are there for each student?\nAdditional table information: table: dorm_1"} +{"question": "SELECT COUNT(*) FROM Student WHERE sex = 'M' AND StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food')", "answer": "How many male students (sex is 'M') are allergic to any type of food?\nAdditional table information: table: allergy_1"} +{"question": "SELECT name FROM city WHERE county_ID = (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1)", "answer": "What are the names of cities that are in the county with the most police officers?\nAdditional table information: table: county_public_safety"} +{"question": "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'", "answer": "Which customers made orders between 2009-01-01 and 2010-01-01? Find their names.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT Company_name, COUNT(*) FROM phone GROUP BY Company_name ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Find the name of the company that has the least number of phone models. List the company name and the number of phone model produced by that company.\nAdditional table information: table: phone_1"} +{"question": "SELECT T1.Location, T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID", "answer": "Show locations and nicknames of schools.\nAdditional table information: table: school_player"} +{"question": "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", "answer": "Which city lives most of staffs? List the city name and number of staffs.\nAdditional table information: table: driving_school"} +{"question": "SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'photo' INTERSECT SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'film'", "answer": "What is the description of the service type which offers both the photo product and the film product?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT T1.emp_lname, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History'", "answer": "What is the last name and office of the professor from the history department?\nAdditional table information: table: college_1"} +{"question": "SELECT DISTINCT YEAR FROM competition WHERE Competition_type <> 'Tournament'", "answer": "What are the distinct years in which the competitions type is not 'Tournament'?\nAdditional table information: table: sports_competition"} +{"question": "SELECT Date, Name, venue FROM event ORDER BY Event_Attendance DESC", "answer": "Show the dates, places, and names of events in descending order of the attendance.\nAdditional table information: table: news_report"} +{"question": "SELECT T2.location_name, T1.location_code FROM Document_locations AS T1 JOIN Ref_locations AS T2 ON T1.location_code = T2.location_code GROUP BY T1.location_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Show the location name and code with the least documents.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT Name FROM ship WHERE Nationality = 'United States' OR Nationality = 'United Kingdom'", "answer": "What are the names of the ships that are from either the US or the UK?\nAdditional table information: table: ship_mission"} +{"question": "SELECT customer_phone FROM available_policies WHERE policy_type_code = (SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "Find the phone numbers of customers using the most common policy type among the available policies.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT course_name FROM courses ORDER BY course_name NULLS FIRST", "answer": "List the names of courses in alphabetical order?\nAdditional table information: table: student_assessment"} +{"question": "SELECT mailing_date FROM Documents_Mailed WHERE document_id = 7", "answer": "What is the mail date of the document with id 7?\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT Song FROM volume ORDER BY Song NULLS FIRST", "answer": "Please list all songs in volumes in ascending alphabetical order.\nAdditional table information: table: music_4"} +{"question": "SELECT billing_country, SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8", "answer": "A list of the top 8 countries by gross/total invoice size. List country name and gross invoice size.\nAdditional table information: table: store_1"} +{"question": "SELECT DISTINCT firstname, lastname FROM list", "answer": "Show each student's first name and last name.\nAdditional table information: table: student_1"} +{"question": "SELECT Name, Other_Details FROM Staff", "answer": "What is the name and detail of each staff member?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T2.Name, T1.Team FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC", "answer": "What are the names of wrestlers and their teams in elimination, ordered descending by days held?\nAdditional table information: table: wrestler"} +{"question": "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'", "answer": "What is the total amount of moeny paid by the customer Carole Bernhard?\nAdditional table information: table: driving_school"} +{"question": "SELECT advisor, COUNT(*) FROM Student GROUP BY advisor", "answer": "Show all advisors and corresponding number of students.\nAdditional table information: table: allergy_1"} +{"question": "SELECT FirstName, LastName FROM CUSTOMER WHERE Email = 'luisg@embraer.com.br'", "answer": "Find the full name of the customer with the email 'luisg@embraer.com.br'.\nAdditional table information: table: chinook_1"} +{"question": "SELECT address FROM member WHERE age < 30 INTERSECT SELECT address FROM member WHERE age > 40", "answer": "Which address has both members younger than 30 and members older than 40?\nAdditional table information: table: coffee_shop"} +{"question": "SELECT other_hotel_details, star_rating_code FROM HOTELS ORDER BY price_range ASC NULLS FIRST LIMIT 3", "answer": "Show the details and star ratings of the 3 least expensive hotels.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT Name FROM TRACK WHERE Name LIKE '%you%'", "answer": "What are the names of tracks that contain the the word you in them?\nAdditional table information: table: chinook_1"} +{"question": "SELECT T2.Store_Email_Address FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.State_County = 'Alaska'", "answer": "List the email addresses of the drama workshop groups located in Alaska state.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT Company, Investor FROM entrepreneur", "answer": "List the companies and the investors of entrepreneurs.\nAdditional table information: table: entrepreneur"} +{"question": "SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT MAX(authorder) FROM authorship)", "answer": "Retrieve the title of the paper that has the largest number of authors.\nAdditional table information: table: icfp_1"} +{"question": "SELECT name FROM Employee EXCEPT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Boeing 737-800'", "answer": "What are the names of all employees who are not certified to fly Boeing 737-800s?\nAdditional table information: table: flight_1"} +{"question": "SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win'", "answer": "Find the names of swimmers who has a result of 'win'.\nAdditional table information: table: swimming"} +{"question": "SELECT Age, COUNT(*) FROM editor GROUP BY Age", "answer": "What are the different ages of editors? Show each age along with the number of editors of that age.\nAdditional table information: table: journal_committee"} +{"question": "SELECT Famous_Title FROM artist WHERE NOT Artist_ID IN (SELECT Artist_ID FROM volume)", "answer": "What are the famous titles of artists who do not have any volumes?\nAdditional table information: table: music_4"} +{"question": "SELECT AVG(enr) FROM College", "answer": "How many students, on average, does each college have enrolled?\nAdditional table information: table: soccer_2"} +{"question": "SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*) <= 5", "answer": "What are the types of competition that have most 5 competitions for that type?\nAdditional table information: table: sports_competition"} +{"question": "SELECT name, city, country FROM airports ORDER BY elevation DESC LIMIT 1", "answer": "Find the name, city, and country of the airport that has the highest latitude.\nAdditional table information: table: flight_4"} +{"question": "SELECT DISTINCT (BillingCountry) FROM INVOICE", "answer": "What are the distinct billing countries of the invoices?\nAdditional table information: table: chinook_1"} +{"question": "SELECT Enrollment FROM school WHERE Denomination <> 'Catholic'", "answer": "What are the enrollments of schools whose denomination is not 'Catholic'?\nAdditional table information: table: school_player"} +{"question": "SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T2.Position = 'Right Wing'", "answer": "Show the names of clubs that have players with position 'Right Wing'.\nAdditional table information: table: sports_competition"} +{"question": "SELECT title FROM Movie WHERE NOT mID IN (SELECT mID FROM Rating)", "answer": "Find the titles of all movies that have no ratings.\nAdditional table information: table: movie_1"} +{"question": "SELECT T1.name, T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY AVG(T2.salary) ASC NULLS FIRST LIMIT 1", "answer": "Which team offers the lowest average salary? Give me the name and id of the team.\nAdditional table information: table: baseball_1"} +{"question": "SELECT name, year_join FROM artist WHERE country <> 'United States'", "answer": "What are the names and year of joining for artists that do not have the country 'United States'?\nAdditional table information: table: theme_gallery"} +{"question": "SELECT DISTINCT (UnitPrice) FROM TRACK", "answer": "What are the distinct unit prices of all tracks?\nAdditional table information: table: chinook_1"} +{"question": "SELECT t2.All_Games, t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'Clemson'", "answer": "Find the location and all games score of the school that has Clemson as its team name.\nAdditional table information: table: university_basketball"} +{"question": "SELECT decor FROM Rooms WHERE roomName = 'Recluse and defiance'", "answer": "What is the decor of room Recluse and defiance?\nAdditional table information: table: inn_1"} +{"question": "SELECT DISTINCT state FROM college WHERE enr < (SELECT MAX(enr) FROM college)", "answer": "What are the states with colleges that have enrollments less than the some other college?\nAdditional table information: table: soccer_2"} +{"question": "SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3", "answer": "What are the details of the three most expensive hotels?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT product_details FROM products WHERE product_details LIKE '%Latte%' OR product_details LIKE '%Americano%'", "answer": "Find the detail of products whose detail contains the word 'Latte' or the word 'Americano'\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT COUNT(*) FROM medicine WHERE FDA_approved = 'No'", "answer": "How many medicines were not approved by the FDA?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT name FROM Person WHERE age > (SELECT MIN(age) FROM person WHERE job = 'engineer') ORDER BY age NULLS FIRST", "answer": "Find the name of people whose age is greater than any engineer sorted by their age.\nAdditional table information: table: network_2"} +{"question": "SELECT T1.electoral_register_id FROM Electoral_Register AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id WHERE T2.source_system_code = 'Electoral' OR T2.source_system_code = 'Tax'", "answer": "What are the register ids of electoral registries that have the cross reference source system code 'Electoral' or 'Tax'?\nAdditional table information: table: local_govt_mdm"} +{"question": "SELECT Shop_Name FROM shop WHERE NOT Shop_ID IN (SELECT Shop_ID FROM stock)", "answer": "What are the names of shops that do not have any devices in stock?\nAdditional table information: table: device"} +{"question": "SELECT T1.course_name, COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name", "answer": "List the name and the number of enrolled student for each course.\nAdditional table information: table: e_learning"} +{"question": "SELECT Product_Type_Code FROM Products WHERE Product_Price > 4500 INTERSECT SELECT Product_Type_Code FROM Products WHERE Product_Price < 3000", "answer": "Show the product type codes that have both products with price higher than 4500 and products with price lower than 3000.\nAdditional table information: table: solvency_ii"} +{"question": "SELECT T3.EMP_FNAME, T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM = T3.EMP_NUM WHERE DEPT_NAME = 'Biology'", "answer": "What is the first and last name of the professor in biology department?\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(*) FROM storm WHERE Number_Deaths > 0", "answer": "How many storms had death records?\nAdditional table information: table: storm_record"} +{"question": "SELECT Player FROM match_season WHERE College = 'UCLA'", "answer": "Who are the players from UCLA?\nAdditional table information: table: match_season"} +{"question": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING COUNT(*) <= 3", "answer": "Find the country of all appelations who have at most three wines.\nAdditional table information: table: wine_1"} +{"question": "SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500", "answer": "What are the official names of cities that have population over 1500 or less than 500?\nAdditional table information: table: farm"} +{"question": "SELECT name, distance FROM Aircraft WHERE aid = 12", "answer": "What is the name and distance for the aircraft that has an id of 12?\nAdditional table information: table: flight_1"} +{"question": "SELECT COUNT(*) FROM inventory WHERE store_id = 1", "answer": "Count the number of items store 1 has in stock.\nAdditional table information: table: sakila_1"} +{"question": "SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = 'mp3' INTERSECT SELECT song_name FROM song WHERE resolution < 1000", "answer": "Return the names of songs for which format is mp3 and resolution is below 1000.\nAdditional table information: table: music_1"} +{"question": "SELECT TYPE FROM institution WHERE founded > 1990 AND enrollment >= 1000", "answer": "Show the institution type with an institution founded after 1990 and an institution with at least 1000 enrollment.\nAdditional table information: table: protein_institute"} +{"question": "SELECT title FROM songs WHERE title LIKE '% the %'", "answer": "What are the names of the songs whose title has the word 'the'?\nAdditional table information: table: music_2"} +{"question": "SELECT T1.Title, T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID", "answer": "What are the titles of films and corresponding types of market estimations?\nAdditional table information: table: film_rank"} +{"question": "SELECT County_name, Population FROM county", "answer": "Show the county name and population of all counties.\nAdditional table information: table: election"} +{"question": "SELECT DISTINCT detention_type_code FROM Detention", "answer": "Return all distinct detention type codes.\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT DISTINCT POSITION FROM match_season", "answer": "Show all distinct positions of matches.\nAdditional table information: table: match_season"} +{"question": "SELECT T2.Date_of_Birth FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor = 'Simon Woodroffe' OR T1.Investor = 'Peter Jones'", "answer": "Return the dates of birth for entrepreneurs who have either the investor Simon Woodroffe or Peter Jones.\nAdditional table information: table: entrepreneur"} +{"question": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id HAVING COUNT(*) >= 2", "answer": "Which counties have two or more delegates? Give me the county names.\nAdditional table information: table: election"} +{"question": "SELECT title, YEAR, director FROM movie ORDER BY budget_million NULLS FIRST", "answer": "Show all movie titles, years, and directors, ordered by budget.\nAdditional table information: table: culture_company"} +{"question": "SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the id and details of the investor that has the largest number of transactions.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1", "answer": "What is the last date of the staff leaving the projects?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT AVG(room_count) FROM Apartments WHERE apt_type_code = 'Studio'", "answer": "Find the average room count of the apartments that have the 'Studio' type code.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = 'Duplex'", "answer": "What are the booking start and end dates of the apartments with type code 'Duplex'?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1", "answer": "What is the location of the party with the most hosts?\nAdditional table information: table: party_host"} +{"question": "SELECT model_name FROM chip_model ORDER BY launch_year NULLS FIRST", "answer": "List all the model names sorted by their launch year.\nAdditional table information: table: phone_1"} +{"question": "SELECT AVG(T1.price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name", "answer": "Find the average prices of all products from each manufacture, and list each company's name.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT grant_id, COUNT(*) FROM Documents GROUP BY grant_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "How many documents can one grant have at most? List the grant id and number.\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT cName FROM College WHERE enr > 18000 ORDER BY cName NULLS FIRST", "answer": "List the name of the colleges whose enrollment is greater 18000 sorted by the college's name.\nAdditional table information: table: soccer_2"} +{"question": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating = 10", "answer": "Find the names of goods that receive a rating of 10.\nAdditional table information: table: epinions_1"} +{"question": "SELECT T2.name, T1.category_id, COUNT(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id", "answer": "How many films are there in each category? List the genre name, genre id and the count.\nAdditional table information: table: sakila_1"} +{"question": "SELECT date_of_latest_logon FROM Students WHERE family_name = 'Jaskolski' OR family_name = 'Langosh'", "answer": "What are the dates of the latest logon of the students with family name 'Jaskolski' or 'Langosh'?\nAdditional table information: table: e_learning"} +{"question": "SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T2.bathroom_count > 2", "answer": "Show the addresses of the buildings that have apartments with more than 2 bathrooms.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT name, date FROM races ORDER BY date DESC LIMIT 1", "answer": "What is the name and date of the most recent race?\nAdditional table information: table: formula_1"} +{"question": "SELECT AVG(T2.Number_cities) FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T1.Low_Estimate > 10000", "answer": "What is the average number of cities of markets with low film market estimate bigger than 10000?\nAdditional table information: table: film_rank"} +{"question": "SELECT role_code FROM ROLES", "answer": "What are all role codes?\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT Studio FROM film WHERE Director = 'Nicholas Meyer' INTERSECT SELECT Studio FROM film WHERE Director = 'Walter Hill'", "answer": "Show the studios that have produced films with director 'Nicholas Meyer' and 'Walter Hill'.\nAdditional table information: table: film_rank"} +{"question": "SELECT order_id, customer_id FROM orders ORDER BY date_order_placed NULLS FIRST LIMIT 1", "answer": "what are the order id and customer id of the oldest order?\nAdditional table information: table: tracking_orders"} +{"question": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC", "answer": "Show names of actors in descending order of the year their musical is awarded.\nAdditional table information: table: musical"} +{"question": "SELECT AVG(age), sex FROM Student GROUP BY sex", "answer": "What are the average ages for male and female students?\nAdditional table information: table: allergy_1"} +{"question": "SELECT T2.firstname, T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'EVELINA' AND T1.lastname = 'BROMLEY'", "answer": "Find the first and last name of all the teachers that teach EVELINA BROMLEY.\nAdditional table information: table: student_1"} +{"question": "SELECT first_name, last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163)", "answer": "What is the full name ( first name and last name ) for those employees who gets more salary than the employee whose id is 163?\nAdditional table information: table: hr_1"} +{"question": "SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Find the year in which the least people enter hall of fame.\nAdditional table information: table: baseball_1"} +{"question": "SELECT LastName FROM CUSTOMER EXCEPT SELECT T1.LastName FROM CUSTOMER AS T1 JOIN Invoice AS T2 ON T1.CustomerId = T2.CustomerId WHERE T2.total > 20", "answer": "What are the last names of customers without invoice totals exceeding 20?\nAdditional table information: table: chinook_1"} +{"question": "SELECT DISTINCT T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Sarah Martinez'", "answer": "What are the names of all directors whose movies have been reviewed by Sarah Martinez?\nAdditional table information: table: movie_1"} +{"question": "SELECT email_address, phone_number FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM complaints)", "answer": "Find the email and phone number of the customers who have never filed a complaint before.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT Famous_Title FROM artist WHERE NOT Artist_ID IN (SELECT Artist_ID FROM volume)", "answer": "Find the famous titles of artists that do not have any volume.\nAdditional table information: table: music_4"} +{"question": "SELECT COUNT(DISTINCT director) FROM movie", "answer": "Count the number of different directors.\nAdditional table information: table: culture_company"} +{"question": "SELECT T2.customer_first_name, T2.customer_last_name, T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Give the full name and customer id of the customer with the fewest accounts.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT bike_id FROM trip WHERE zip_code = 94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which bike traveled the most often in zip code 94002?\nAdditional table information: table: bike_1"} +{"question": "SELECT origin, COUNT(*) FROM train GROUP BY origin", "answer": "Find the number of trains starting from each origin.\nAdditional table information: table: station_weather"} +{"question": "SELECT country FROM stadium GROUP BY country HAVING COUNT(*) <= 3", "answer": "Which country has at most 3 stadiums listed?\nAdditional table information: table: swimming"} +{"question": "SELECT powertrain FROM \"vehicles\".\"cars\" WHERE order_year = '2000'", "answer": "what is the powertrain (engine/transmission) when the order year is 2000? \nAdditional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion"} +{"question": "SELECT T1.organisation_id, COUNT(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the id of the organization with the maximum number of outcomes and how many outcomes are there?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = 'Pass'", "answer": "Find id of candidates whose assessment code is 'Pass'?\nAdditional table information: table: student_assessment"} +{"question": "SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id HAVING COUNT(*) > 1", "answer": "Which buildings have more than one company offices? Give me the building names.\nAdditional table information: table: company_office"} +{"question": "SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_details = 'quo'", "answer": "What is the type description of the organization whose detail is listed as 'quo'?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie'", "answer": "What are the names of all the states with college students playing in the mid position but no goalies?\nAdditional table information: table: soccer_2"} +{"question": "SELECT LOCATION, SUM(number_of_platforms), SUM(total_passengers) FROM station GROUP BY LOCATION", "answer": "Show all locations and the total number of platforms and passengers for all train stations in each location.\nAdditional table information: table: train_station"} +{"question": "SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 3", "answer": "Show the id and details for the investors who have the top 3 number of transactions.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id = t2.campus WHERE t2.year = 1956 AND totalenrollment_ay > 400 AND FTE_AY > 200", "answer": "What campus started in year 1956, has more than 200 full time students, and more than 400 students enrolled?\nAdditional table information: table: csu_1"} +{"question": "SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = 'Julio'", "answer": "Find the names of courses taught by the tutor who has personal name 'Julio'.\nAdditional table information: table: e_learning"} +{"question": "SELECT DISTINCT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'University of Oxford'", "answer": "Who belong to the institution 'University of Oxford'? Show the first names and last names.\nAdditional table information: table: icfp_1"} +{"question": "SELECT building_short_name FROM Apartment_Buildings WHERE building_manager = 'Emma'", "answer": "Which buildings does 'Emma' manage? Give me the short names of the buildings.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT customer_name FROM customers WHERE customer_name LIKE '%Alex%'", "answer": "Which customer's name contains 'Alex'? Find the full name.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = 'Germany'", "answer": "Find the address of all customers that live in Germany and have invoice.\nAdditional table information: table: chinook_1"} +{"question": "SELECT SUM(Amount_Settled) FROM Settlements", "answer": "What is the total amount of settlement made for all the settlements?\nAdditional table information: table: insurance_policies"} +{"question": "SELECT mID, AVG(stars) FROM Rating GROUP BY mID HAVING COUNT(*) >= 2", "answer": "For each movie that received more than 3 reviews, what is the average rating?\nAdditional table information: table: movie_1"} +{"question": "SELECT title FROM papers WHERE title LIKE '%ML%'", "answer": "Which papers have the substring 'ML' in their titles? Return the titles of the papers.\nAdditional table information: table: icfp_1"} +{"question": "SELECT T1.Museum_Details, T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID", "answer": "Give me the detail and opening hour for each museum.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT COUNT(*) FROM technician", "answer": "What is the number of technicians?\nAdditional table information: table: machine_repair"} +{"question": "SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id = T2.id ORDER BY T2.dock_count DESC LIMIT 1", "answer": "Which trip started from the station with the largest dock count? Give me the trip id.\nAdditional table information: table: bike_1"} +{"question": "SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims)", "answer": "Return the claim start date for the claims whose claimed amount is no more than the average\nAdditional table information: table: insurance_policies"} +{"question": "SELECT title, Studio FROM film WHERE Studio LIKE '%Universal%'", "answer": "Find the titles and studios of the films that are produced by some film studios that contained the word 'Universal'.\nAdditional table information: table: film_rank"} +{"question": "SELECT COUNT(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.Sex = 'M' AND T2.Election_Cycle = 'Fall'", "answer": "How many male (sex is M) students have class senator votes in the fall election cycle?\nAdditional table information: table: voter_2"} +{"question": "SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T2.dormid FROM dorm AS T3 JOIN has_amenity AS T4 ON T3.dormid = T4.dormid JOIN dorm_amenity AS T5 ON T4.amenid = T5.amenid GROUP BY T3.dormid ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "What are the first names of all students who live in the dorm with the most amenities?\nAdditional table information: table: dorm_1"} +{"question": "SELECT DISTINCT name FROM genres", "answer": "What are the different names of the genres?\nAdditional table information: table: store_1"} +{"question": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id", "answer": "Which customers do not have a first notification of loss record? Give me the customer names.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT transaction_type, COUNT(*) FROM Financial_transactions GROUP BY transaction_type", "answer": "Show the transaction type and the number of transactions.\nAdditional table information: table: customers_card_transactions"} +{"question": "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'", "answer": "What are the first names of the professors who do not play Canoeing or Kayaking as activities?\nAdditional table information: table: activity_1"} +{"question": "SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY overall_rating DESC LIMIT 3", "answer": "Who are the top 3 players in terms of overall rating?\nAdditional table information: table: soccer_1"} +{"question": "SELECT AVG(age), sex FROM Student GROUP BY sex", "answer": "Show the average age for male and female students.\nAdditional table information: table: allergy_1"} +{"question": "SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1", "answer": "What is the apartment number of the apartment with the most beds?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT AVG(total_amount_purchased), AVG(total_value_purchased) FROM Product_Suppliers WHERE supplier_id = (SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "What are the average amount purchased and value purchased for the supplier who supplies the most products.\nAdditional table information: table: department_store"} +{"question": "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", "answer": "Which city has the highest temperature in February?\nAdditional table information: table: city_record"} +{"question": "SELECT LOCATION FROM station GROUP BY LOCATION HAVING COUNT(*) = 1", "answer": "Show all locations with only 1 station.\nAdditional table information: table: train_station"} +{"question": "SELECT Elimination_Move FROM Elimination WHERE Team = 'Team Orton'", "answer": "Return the elimination movies of wrestlers on Team Orton.\nAdditional table information: table: wrestler"} +{"question": "SELECT t1.payment_method FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY SUM(t3.order_quantity) NULLS FIRST LIMIT 1", "answer": "What is the payment method of the customer that has purchased the least quantity of items?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989", "answer": "Which publishers did not publish a book in 1989?\nAdditional table information: table: culture_company"} +{"question": "SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor", "answer": "How many entrepreneurs correspond to each investor?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT POSITION FROM player GROUP BY name HAVING AVG(Points) >= 20", "answer": "What are the positions of players whose average number of points scored by that position is larger than 20?\nAdditional table information: table: sports_competition"} +{"question": "SELECT city FROM addresses WHERE zip_postcode = 255", "answer": "Which city is post code 255 located in?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT job_id FROM job_history WHERE end_date - start_date > 300 GROUP BY job_id HAVING COUNT(*) >= 2", "answer": "What are the job ids for jobs done more than once for a period of more than 300 days?\nAdditional table information: table: hr_1"} +{"question": "SELECT Name FROM pilot ORDER BY Age DESC", "answer": "What are the names of all pilots listed by descending age?\nAdditional table information: table: aircraft"} +{"question": "SELECT SUM(Share_in_percent) FROM channel WHERE OWNER = 'CCTV'", "answer": "What is the total share (in percent) of all the channels owned by CCTV?\nAdditional table information: table: program_share"} +{"question": "SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id ORDER BY T3.Number_Deaths DESC LIMIT 1", "answer": "What are the names of regions that were affected by the storm in which the most people died?\nAdditional table information: table: storm_record"} +{"question": "SELECT STATEMENT_ID, statement_details FROM Statements", "answer": "List all statement ids and statement details.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT COUNT(*) FROM market WHERE Number_cities < 300", "answer": "How many markets have number of cities smaller than 300?\nAdditional table information: table: film_rank"} +{"question": "SELECT job_title FROM jobs WHERE min_salary > 9000", "answer": "display the job title of jobs which minimum salary is greater than 9000.\nAdditional table information: table: hr_1"} +{"question": "SELECT T2.Party, COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party", "answer": "For each party, return the name of the party and the number of delegates from that party.\nAdditional table information: table: election"} +{"question": "SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1", "answer": "What are the first names of the teachers who teach grade 1?\nAdditional table information: table: student_1"} +{"question": "SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5", "answer": "What are the titles of all movies that have between 3 and 5 stars?\nAdditional table information: table: movie_1"} +{"question": "SELECT title FROM course WHERE dept_name = 'Statistics' EXCEPT SELECT title FROM course WHERE dept_name = 'Psychology'", "answer": "What are the titles of courses that are in the Statistics department but not the Psychology department?\nAdditional table information: table: college_2"} +{"question": "SELECT Name FROM county_public_safety ORDER BY Population DESC", "answer": "List the names of counties in descending order of population.\nAdditional table information: table: county_public_safety"} +{"question": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the last name of the musician that have produced the most number of songs?\nAdditional table information: table: music_2"} +{"question": "SELECT COUNT(*), formats FROM files GROUP BY formats", "answer": "How many songs were released for each format?\nAdditional table information: table: music_1"} +{"question": "SELECT DISTINCT firstname, lastname FROM list", "answer": "Report the first name and last name of all the students.\nAdditional table information: table: student_1"} +{"question": "SELECT stu_fname, stu_lname, stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1", "answer": "What is the first, last name, gpa of the youngest one among students whose GPA is above 3?\nAdditional table information: table: college_1"} +{"question": "SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY COUNT(*) DESC LIMIT 2", "answer": "Return the ids of the two department store chains with the most department stores.\nAdditional table information: table: department_store"} +{"question": "SELECT problem_log_id, problem_id FROM problem_log ORDER BY log_entry_date NULLS FIRST LIMIT 1", "answer": "Find the oldest log id and its corresponding problem id.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2", "answer": "What are the employee ids for employees who have held two or more jobs?\nAdditional table information: table: hr_1"} +{"question": "SELECT COUNT(*) FROM airport WHERE NOT id IN (SELECT airport_id FROM flight WHERE pilot = 'Thompson')", "answer": "How many airports haven't the pilot 'Thompson' driven an aircraft?\nAdditional table information: table: flight_company"} +{"question": "SELECT COUNT(DISTINCT transaction_type) FROM Financial_Transactions", "answer": "How many different types of transactions are there?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT fname FROM authors WHERE lname = 'Ueno'", "answer": "Which authors have last name 'Ueno'? List their first names.\nAdditional table information: table: icfp_1"} +{"question": "SELECT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id GROUP BY t3.city ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the city where the most customers live.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT AVG(Population) FROM county", "answer": "Show the average population of all counties.\nAdditional table information: table: election"} +{"question": "SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars = 4", "answer": "find the ids of reviewers who did not give 4 star.\nAdditional table information: table: movie_1"} +{"question": "SELECT COUNT(*) FROM Ref_colors WHERE NOT color_code IN (SELECT color_code FROM products)", "answer": "Count the number of colors that are not used in any products.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT T1.Title, T2.AlbumID, COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId GROUP BY T2.AlbumID", "answer": "Show the album names, ids and the number of tracks for each album.\nAdditional table information: table: chinook_1"} +{"question": "SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the payment method code used by the most orders?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT fname, lname FROM student WHERE age < (SELECT AVG(age) FROM student)", "answer": "Find the first and last name of students whose age is younger than the average age.\nAdditional table information: table: dorm_1"} +{"question": "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", "answer": "Which cities have served as host cities more than once? Return me their GDP and population.\nAdditional table information: table: city_record"} +{"question": "SELECT T1.fault_description, T2.fault_status FROM Fault_Log AS T1 JOIN Fault_Log_Parts AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id", "answer": "What are all the fault descriptions and the fault status of all the faults recoreded in the logs?\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT COUNT(*) FROM Player WHERE HS > 1000", "answer": "How many different players trained for more than 1000 hours?\nAdditional table information: table: soccer_2"} +{"question": "SELECT COUNT(DISTINCT state) FROM college WHERE enr < (SELECT AVG(enr) FROM college)", "answer": "How many states have smaller colleges than average?\nAdditional table information: table: soccer_2"} +{"question": "SELECT classroom, COUNT(*) FROM list GROUP BY classroom", "answer": "Report the number of students in each classroom.\nAdditional table information: table: student_1"} +{"question": "SELECT cust_name FROM customer WHERE acc_type = 'saving' INTERSECT SELECT cust_name FROM customer WHERE acc_type = 'checking'", "answer": "What are the names of customers who have both savings and checking accounts?\nAdditional table information: table: loan_1"} +{"question": "SELECT T1.student_id, COUNT(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id", "answer": "List the id of students who registered some courses and the number of their registered courses?\nAdditional table information: table: student_assessment"} +{"question": "SELECT transaction_id FROM Financial_transactions WHERE transaction_amount > (SELECT AVG(transaction_amount) FROM Financial_transactions)", "answer": "What are the ids for transactions that have an amount greater than the average amount of a transaction?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT T1.Name, T2.Name FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID", "answer": "What are the names of cities, as well as the names of the counties they correspond to?\nAdditional table information: table: county_public_safety"} +{"question": "SELECT store_id FROM customer GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the id of the store with the most customers.\nAdditional table information: table: sakila_1"} +{"question": "SELECT unit_price FROM tracks WHERE name = 'Fast As a Shark'", "answer": "How much is the track Fast As a Shark?\nAdditional table information: table: store_1"} +{"question": "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", "answer": "What is the id of the order which has the most items?\nAdditional table information: table: tracking_orders"} +{"question": "SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC NULLS FIRST", "answer": "What is the total horses record for each farm, sorted ascending?\nAdditional table information: table: farm"} +{"question": "SELECT title, director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1", "answer": "What is the title and director for the movie with highest worldwide gross in the year 2000 or before?\nAdditional table information: table: culture_company"} +{"question": "SELECT AVG(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.city_code = 'NYC' AND T2.Election_Cycle = 'Spring'", "answer": "What is the average age of students who have city code 'NYC' and have secretary votes for the spring election cycle?\nAdditional table information: table: voter_2"} +{"question": "SELECT T1.student_id, T2.first_name FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY AVG(monthly_rental) DESC LIMIT 1", "answer": "What are the id and first name of the student whose addresses have the highest average monthly rental?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT * FROM body_builder", "answer": "Show all information about each body builder.\nAdditional table information: table: body_builder"} +{"question": "SELECT SUM(enrollment), affiliation FROM university GROUP BY affiliation", "answer": "What are the total enrollments of universities of each affiliation type?\nAdditional table information: table: university_basketball"} +{"question": "SELECT T2.dept_store_id, T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = 'marketing' INTERSECT SELECT T2.dept_store_id, T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = 'managing'", "answer": "What are the ids and names of department stores with both marketing and managing departments?\nAdditional table information: table: department_store"} +{"question": "SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = 'Female'", "answer": "Show the start dates and end dates of all the apartment bookings made by guests with gender code 'Female'.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT county, COUNT(*), SUM(enrollment) FROM school GROUP BY county", "answer": "Show each county along with the number of schools and total enrollment in each county.\nAdditional table information: table: school_finance"} +{"question": "SELECT POSITION, Team FROM pilot", "answer": "What are the positions and teams of pilots?\nAdditional table information: table: pilot_record"} +{"question": "SELECT t1.product_id, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code JOIN product_characteristics AS t3 ON t1.product_id = t3.product_id GROUP BY t1.product_id HAVING COUNT(*) >= 2", "answer": "What are the product ids and color descriptions for products with two or more characteristics?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT gtype FROM Video_games WHERE gname = 'Call of Destiny'", "answer": "What is the type of video game Call of Destiny.\nAdditional table information: table: game_1"} +{"question": "SELECT card_number, name, hometown FROM member ORDER BY LEVEL DESC", "answer": "What are the card numbers, names, and hometowns of every member ordered by descending level?\nAdditional table information: table: shop_membership"} +{"question": "SELECT invoice_number FROM invoices WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25'", "answer": "Find the invoice numbers which are created before 1989-09-03 or after 2007-12-25.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_President_VOTE", "answer": "What are the distinct last names of the students who have class president votes?\nAdditional table information: table: voter_2"} +{"question": "SELECT T1.student_id, T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) <= 2", "answer": "Find the student ID and middle name for all the students with at most two enrollments.\nAdditional table information: table: e_learning"} +{"question": "SELECT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = 'Nameless , Painless'", "answer": "Find the first and last name of the author(s) who wrote the paper 'Nameless, Painless'.\nAdditional table information: table: icfp_1"} +{"question": "SELECT membership_card FROM member WHERE address = 'Hartford' INTERSECT SELECT membership_card FROM member WHERE address = 'Waterbury'", "answer": "What is the membership card held by both members living in Hartford and ones living in Waterbury address?\nAdditional table information: table: coffee_shop"} +{"question": "SELECT DISTINCT salary FROM instructor WHERE salary < (SELECT MAX(salary) FROM instructor)", "answer": "What are the distinct salaries of all instructors who earned less than the maximum salary?\nAdditional table information: table: college_2"} +{"question": "SELECT product_type_code, MAX(product_price), MIN(product_price) FROM products GROUP BY product_type_code", "answer": "For each product type, return the maximum and minimum price.\nAdditional table information: table: department_store"} +{"question": "SELECT date_stored FROM All_documents WHERE Document_name = 'Marry CV'", "answer": "When was the document named 'Marry CV' stored? Give me the date.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT COUNT(DISTINCT eid) FROM Certificate", "answer": "What is the count of distinct employees with certificates?\nAdditional table information: table: flight_1"} +{"question": "SELECT first_name, last_name, salary FROM employees WHERE commission_pct = 'null'", "answer": "Return the full names and salaries of employees with null commissions.\nAdditional table information: table: hr_1"} +{"question": "SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T2.name = 'Airbus A340-300'", "answer": "What are the flight numbers for the aircraft Airbus A340-300?\nAdditional table information: table: flight_1"} +{"question": "SELECT T1.Title, T2.AlbumID, COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId GROUP BY T2.AlbumID", "answer": "What are the names and ids of the different albums, and how many tracks are on each?\nAdditional table information: table: chinook_1"} +{"question": "SELECT building, COUNT(*) FROM Faculty GROUP BY building", "answer": "How many faculty members does each building have? List the result with the name of the building.\nAdditional table information: table: activity_1"} +{"question": "SELECT DISTINCT T1.fname, T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = 'Milk' OR T2.Allergy = 'Cat'", "answer": "Find the different first names and cities of the students who have allergy to milk or cat.\nAdditional table information: table: allergy_1"} +{"question": "SELECT COUNT(*), account_id FROM Financial_transactions", "answer": "How many transaction does each account have? Show the number and account id.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT COUNT(*) FROM invoices WHERE billing_city = 'Chicago' AND billing_state = 'IL'", "answer": "List the number of invoices from Chicago, IL.\nAdditional table information: table: store_1"} +{"question": "SELECT MAX(OMIM) FROM enzyme", "answer": "What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT location_code FROM Document_locations GROUP BY location_code HAVING COUNT(*) >= 3", "answer": "Show the location codes with at least 3 documents.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'", "answer": "List ids for all student who are on scholarship.\nAdditional table information: table: game_1"} +{"question": "SELECT T3.Name, T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID ORDER BY T1.Year_working NULLS FIRST", "answer": "Show names of companies and that of employees in descending order of number of years working for that employee.\nAdditional table information: table: company_employee"} +{"question": "SELECT COUNT(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' AND T1.sex = 'F'", "answer": "Find the number of female students (with F sex) living in Smith Hall\nAdditional table information: table: dorm_1"} +{"question": "SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'", "answer": "What instruments does the the song 'Le Pop' use?\nAdditional table information: table: music_2"} +{"question": "SELECT COUNT(*) FROM Video_games", "answer": "How many video games exist?\nAdditional table information: table: game_1"} +{"question": "SELECT LOCATION FROM performance WHERE Attendance > 2000 INTERSECT SELECT LOCATION FROM performance WHERE Attendance < 1000", "answer": "Show the locations that have both performances with more than 2000 attendees and performances with less than 1000 attendees.\nAdditional table information: table: performance_attendance"} +{"question": "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)", "answer": "Find the emails of parties with the most popular party form.\nAdditional table information: table: e_government"} +{"question": "SELECT name FROM people WHERE NOT people_id IN (SELECT people_id FROM candidate)", "answer": "Give the names of people who did not participate in the candidate election.\nAdditional table information: table: candidate_poll"} +{"question": "SELECT name FROM instructor ORDER BY salary DESC LIMIT 1", "answer": "Give the name of the highest paid instructor.\nAdditional table information: table: college_2"} +{"question": "SELECT T1.staff_id, T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from NULLS FIRST LIMIT 1", "answer": "Find the id and name of the staff who has been assigned for the shortest period.\nAdditional table information: table: department_store"} +{"question": "SELECT product_category, COUNT(*) FROM mailshot_campaigns GROUP BY product_category", "answer": "Show all distinct product categories along with the number of mailshots in each category.\nAdditional table information: table: customers_campaigns_ecommerce"} +{"question": "SELECT ResTypeDescription FROM Restaurant_Type WHERE ResTypeName = 'Sandwich'", "answer": "What is the description of the restaurant type Sandwich?\nAdditional table information: table: restaurant_1"} +{"question": "SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE enroll_grade = 'C'", "answer": "What is the first name of students who got grade C in any class?\nAdditional table information: table: college_1"} +{"question": "SELECT T1.emp_lname, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History'", "answer": "What are the last name and office of all history professors?\nAdditional table information: table: college_1"} +{"question": "SELECT text FROM tweets ORDER BY createdate NULLS FIRST", "answer": "List the text of all tweets in the order of date.\nAdditional table information: table: twitter_1"} +{"question": "SELECT T1.customer_name, T1.customer_phone FROM customers AS T1 JOIN mailshot_customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.outcome_code = 'No Response'", "answer": "Show the name and phone for customers with a mailshot with outcome code 'No Response'.\nAdditional table information: table: customers_campaigns_ecommerce"} +{"question": "SELECT COUNT(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2000", "answer": "How many players did Boston Red Stockings have in 2000?\nAdditional table information: table: baseball_1"} +{"question": "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'", "answer": "How long is the total lesson time taught by staff with first name as Janessa and last name as Sawayn?\nAdditional table information: table: driving_school"} +{"question": "SELECT bname FROM bank WHERE state = 'New York'", "answer": "What are the names of banks in the state of New York?\nAdditional table information: table: loan_1"} +{"question": "SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = 'Nominated'", "answer": "Please show the songs that have result 'nominated' at music festivals.\nAdditional table information: table: music_4"} +{"question": "SELECT account_id, customer_id, account_name FROM Accounts", "answer": "What are the account ids, customer ids, and account names for all the accounts?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT * FROM employees WHERE NOT employee_id IN (SELECT employee_id FROM job_history)", "answer": "display all the information of those employees who did not have any job in the past.\nAdditional table information: table: hr_1"} +{"question": "SELECT COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Art' AND T2.customer_last_name = 'Turcotte'", "answer": "Return the number of accounts that the customer with the first name Art and last name Turcotte has.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT COUNT(*) FROM Invoices", "answer": "How many invoices do we have?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT name FROM instructor WHERE name LIKE '%dar%'", "answer": "Find the names of all instructors whose name includes the substring \u201cdar\u201d.\nAdditional table information: table: college_2"} +{"question": "SELECT MIN(bathroom_count), MAX(bathroom_count) FROM Apartments", "answer": "What is the minimum and maximum number of bathrooms of all the apartments?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT school, LOCATION FROM university WHERE affiliation = 'Public'", "answer": "List all public schools and their locations.\nAdditional table information: table: university_basketball"} +{"question": "SELECT name FROM pilot WHERE NOT pilot_id IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia')", "answer": "find the name of pilots who did not win the matches held in the country of Australia.\nAdditional table information: table: aircraft"} +{"question": "SELECT T1.student_id, T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) <= 2", "answer": "What are the student IDs and middle names of the students enrolled in at most two courses?\nAdditional table information: table: e_learning"} +{"question": "SELECT T3.location FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.market_value > 100", "answer": "Show all locations where a gas station for company with market value greater than 100 is located.\nAdditional table information: table: gas_company"} +{"question": "SELECT DISTINCT T1.supplier_name, T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id = T2.supplier_id JOIN products AS T3 ON T2.product_id = T3.product_id WHERE T3.product_name = 'red jeans'", "answer": "List the names and phone numbers of all the distinct suppliers who supply red jeans.\nAdditional table information: table: department_store"} +{"question": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = 'back'", "answer": "What are the names of the songs that do not have back vocals?\nAdditional table information: table: music_2"} +{"question": "SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = 'Deputy' OR t1.policy_type_code = 'Uniform'", "answer": "Which customers have an insurance policy with the type code 'Deputy' or 'Uniform'? Return the customer details.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT complaint_status_code, COUNT(*) FROM complaints WHERE complaint_type_code = 'Product Failure' GROUP BY complaint_status_code", "answer": "Of complaints with the type code 'Product Failure', how many had each different status code?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT T2.firstname, T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom GROUP BY T2.firstname, T2.lastname ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name of the teacher who teaches the largest number of students.\nAdditional table information: table: student_1"} +{"question": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Stephanie' AND t1.lname = 'Weirich'", "answer": "Find the titles of the papers the author 'Stephanie Weirich' wrote.\nAdditional table information: table: icfp_1"} +{"question": "SELECT T3.staff_first_name, T3.staff_last_name FROM problems AS T1, product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = 'rem' EXCEPT SELECT T3.staff_first_name, T3.staff_last_name FROM problems AS T1, product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = 'aut'", "answer": "Find the first and last name of the staff members who reported problems from the product 'rem' but not 'aut'?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common status across all cities?\nAdditional table information: table: farm"} +{"question": "SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 GROUP BY T2.bname ORDER BY SUM(T1.amount) DESC LIMIT 1", "answer": "What is the name of the bank branch that has lended the largest total amount in loans, specifically to customers with credit scores below 100?\nAdditional table information: table: loan_1"} +{"question": "SELECT SUM(T1.budgeted) FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn'", "answer": "What is the total budget amount for school 'Glenn' in all years?\nAdditional table information: table: school_finance"} +{"question": "SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which role is most common for the staff?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT AVG(Gross_in_dollar) FROM film", "answer": "What is the average ticket sales gross in dollars of films?\nAdditional table information: table: film_rank"} +{"question": "SELECT name FROM media_types", "answer": "List all media types.\nAdditional table information: table: store_1"} +{"question": "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'", "answer": "What are the dates of the orders made by the customer named 'Jeramie'?\nAdditional table information: table: tracking_orders"} +{"question": "SELECT Name FROM country WHERE Languages <> 'German'", "answer": "List the names of countries whose language is not 'German'.\nAdditional table information: table: roller_coaster"} +{"question": "SELECT Party FROM people ORDER BY Age ASC NULLS FIRST LIMIT 1", "answer": "What is the party of the youngest people?\nAdditional table information: table: debate"} +{"question": "SELECT COUNT(*) FROM Documents", "answer": "Show the number of documents.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT product_category_code FROM products WHERE product_name = 'flax'", "answer": "Which category does the product named 'flax' belong to?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT DISTINCT artist_name FROM artist WHERE country = 'Bangladesh' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7", "answer": "What are the names of the different artists from Bangladesh who never received a rating higher than a 7?\nAdditional table information: table: music_1"} +{"question": "SELECT Status, AVG(Population) FROM city GROUP BY Status", "answer": "What are the statuses and average populations of each city?\nAdditional table information: table: farm"} +{"question": "SELECT T1.employee_id, T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id", "answer": "What are all the employee ids and the names of the countries in which they work?\nAdditional table information: table: hr_1"} +{"question": "SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester = 'Fall' AND YEAR = 2003)", "answer": "What are the names of students who took a course in the Fall of 2003?\nAdditional table information: table: college_2"} +{"question": "SELECT Publisher FROM publication GROUP BY Publisher HAVING COUNT(*) > 1", "answer": "Show publishers that have more than one publication.\nAdditional table information: table: book_2"} +{"question": "SELECT AVG(total_amount_purchased), AVG(total_value_purchased) FROM Product_Suppliers WHERE supplier_id = (SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "Return the average total amount purchased and total value purchased for the supplier who supplies the greatest number of products.\nAdditional table information: table: department_store"} +{"question": "SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35", "answer": "Show the nations that have both hosts older than 45 and hosts younger than 35.\nAdditional table information: table: party_host"} +{"question": "SELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas'", "answer": "What are the headquarters that have both a company in the banking and 'oil and gas' industries?\nAdditional table information: table: gas_company"} +{"question": "SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id ORDER BY T3.tot_cred DESC LIMIT 1", "answer": "What is the name of the instructor who advises the student with the greatest number of total credits?\nAdditional table information: table: college_2"} +{"question": "SELECT Product_Name, AVG(Product_Price) FROM PRODUCTS GROUP BY Product_Name", "answer": "For each distinct product name, show its average product price.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1", "answer": "What are the details of the car with id 1?\nAdditional table information: table: driving_school"} +{"question": "SELECT COUNT(DISTINCT state) FROM college WHERE enr > (SELECT AVG(enr) FROM college)", "answer": "How many states have a college with more students than average?\nAdditional table information: table: soccer_2"} +{"question": "SELECT student_id FROM student_course_attendance WHERE course_id = 301", "answer": "What are the ids of the students who registered for course 301?\nAdditional table information: table: student_assessment"} +{"question": "SELECT rank, COUNT(*) FROM Faculty GROUP BY rank", "answer": "For each faculty rank, show the number of faculty members who have it.\nAdditional table information: table: activity_1"} +{"question": "SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000", "answer": "Return the phone numbers of employees with salaries between 8000 and 12000.\nAdditional table information: table: hr_1"} +{"question": "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'", "answer": "Give me a list of distinct product ids from orders placed between 1975-01-01 and 1976-01-01?\nAdditional table information: table: tracking_orders"} +{"question": "SELECT AVG(T1.Votes) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE T2.Party = 'Republican'", "answer": "What is the average number of votes of representatives from party 'Republican'?\nAdditional table information: table: election_representative"} +{"question": "SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT AVG(balance) FROM savings))", "answer": "Find the checking balance of the accounts whose savings balance is higher than the average savings balance.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq", "answer": "What are the ids of courses without prerequisites?\nAdditional table information: table: college_2"} +{"question": "SELECT AVG(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'", "answer": "What is average salary of the players in the team named 'Boston Red Stockings' ?\nAdditional table information: table: baseball_1"} +{"question": "SELECT last_name FROM Teachers EXCEPT SELECT T1.last_name FROM Teachers AS T1 JOIN Detention AS T2 ON T1.teacher_id = T2.teacher_id", "answer": "Find the last names of teachers who are not involved in any detention.\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3", "answer": "Which teams had more than 3 eliminations?\nAdditional table information: table: wrestler"} +{"question": "SELECT T1.Total_Points FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age ASC NULLS FIRST LIMIT 1", "answer": "What is the total point count of the youngest gymnast?\nAdditional table information: table: gymnast"} +{"question": "SELECT T1.name, T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance NULLS FIRST LIMIT 1", "answer": "Find the name and checking balance of the account with the lowest savings balance.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500", "answer": "Find the official names of cities with population bigger than 1500 or smaller than 500.\nAdditional table information: table: farm"} +{"question": "SELECT name FROM playlists", "answer": "List the name of all playlist.\nAdditional table information: table: store_1"} +{"question": "SELECT AVG(order_quantity) FROM order_items", "answer": "What is the average amount of items ordered in each order?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = 'Dublin'", "answer": "Give the different positions of players who play for the country with the capital Dublin.\nAdditional table information: table: match_season"} +{"question": "SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore'", "answer": "Find the last names of the members of the club 'Bootup Baltimore'.\nAdditional table information: table: club_1"} +{"question": "SELECT document_id, document_name FROM Documents", "answer": "What are the ids and names for each of the documents?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T2.name, T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'History'", "answer": "What are the names and salaries of instructors who advises students in the History department?\nAdditional table information: table: college_2"} +{"question": "SELECT founder FROM manufacturers WHERE name LIKE 'S%'", "answer": "Find the founder of the company whose name begins with the letter 'S'.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT match_id FROM MATCH WHERE competition = '1994 FIFA World Cup qualification'", "answer": "What is the match id of the competition called '1994 FIFA World Cup qualification'?\nAdditional table information: table: city_record"} +{"question": "SELECT COUNT(DISTINCT city) FROM Person", "answer": "How many different cities do people originate from?\nAdditional table information: table: network_2"} +{"question": "SELECT customer_email, customer_name FROM customers WHERE payment_method = 'Visa'", "answer": "List the names and emails of customers who payed by Visa card.\nAdditional table information: table: customer_deliveries"} +{"question": "SELECT open_year FROM branch GROUP BY open_year HAVING COUNT(*) >= 2", "answer": "List all open years when at least two shops are opened.\nAdditional table information: table: shop_membership"} +{"question": "SELECT T1.title FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING COUNT(*) = 2", "answer": "What are the titles for courses with two prerequisites?\nAdditional table information: table: college_2"} +{"question": "SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T3.number_deaths >= 10", "answer": "What are the region names affected by the storm with a number of deaths of least 10?\nAdditional table information: table: storm_record"} +{"question": "SELECT Delegate FROM election WHERE District = 1", "answer": "Who is the delegate of district 1 in the elections?\nAdditional table information: table: election"} +{"question": "SELECT email, phone FROM customers WHERE first_name = 'Astrid' AND last_name = 'Gruber'", "answer": "What is the email and phone number of Astrid Gruber the customer?\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(DISTINCT city) FROM bank", "answer": "In how many different cities are banks located?\nAdditional table information: table: loan_1"} +{"question": "SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested DESC", "answer": "Return the weights of entrepreneurs, ordered descending by amount of money requested.\nAdditional table information: table: entrepreneur"} +{"question": "SELECT role_code FROM Employees GROUP BY role_code HAVING COUNT(*) >= 3", "answer": "Show all role codes with at least 3 employees.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT friend FROM PersonFriend WHERE name = 'Zach' AND YEAR = (SELECT MAX(YEAR) FROM PersonFriend WHERE name = 'Zach')", "answer": "Which friend of Zach has the longest-lasting friendship?\nAdditional table information: table: network_2"} +{"question": "SELECT Country FROM manager WHERE Age > 50 OR Age < 46", "answer": "Show the countries that have managers of age above 50 or below 46.\nAdditional table information: table: railway"} +{"question": "SELECT pPos FROM tryout GROUP BY pPos ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What was the most popular position at tryouts?\nAdditional table information: table: soccer_2"} +{"question": "SELECT T1.crs_code FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num WHERE T3.stu_lname = 'Smithson'", "answer": "What is the code of the course which the student whose last name is Smithson took?\nAdditional table information: table: college_1"} +{"question": "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", "answer": "What is the area of the appelation that produces the highest number of wines before the year of 2010?\nAdditional table information: table: wine_1"} +{"question": "SELECT Snatch, Clean_Jerk FROM body_builder ORDER BY Snatch ASC NULLS FIRST", "answer": "List the snatch score and clean jerk score of body builders in ascending order of snatch score.\nAdditional table information: table: body_builder"} +{"question": "SELECT COUNT(course_id) FROM Student_Course_Enrolment", "answer": "Find the number of distinct courses that have enrolled students.\nAdditional table information: table: e_learning"} +{"question": "SELECT DISTINCT POSITION FROM match_season", "answer": "What are the different positions for match season?\nAdditional table information: table: match_season"} +{"question": "SELECT Other_Details FROM LOCATIONS WHERE Location_Name = 'UK Gallery'", "answer": "What is the detail of the location UK Gallery?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT COUNT(*) FROM submission", "answer": "Count the number of submissions.\nAdditional table information: table: workshop_paper"} +{"question": "SELECT SUM(student_capacity) FROM dorm", "answer": "What is the total student capacity of all dorms?\nAdditional table information: table: dorm_1"} +{"question": "SELECT Name FROM member WHERE Country = 'United States' OR Country = 'Canada'", "answer": "Show the names of members whose country is 'United States' or 'Canada'.\nAdditional table information: table: decoration_competition"} +{"question": "SELECT DISTINCT directed_by FROM film", "answer": "Who are all the directors?\nAdditional table information: table: cinema"} +{"question": "SELECT DISTINCT artist_name FROM artist WHERE country = 'Bangladesh' EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7", "answer": "Find the names of the artists who are from Bangladesh and have never received rating higher than 7.\nAdditional table information: table: music_1"} +{"question": "SELECT song_name, releasedate FROM song ORDER BY releasedate DESC LIMIT 1", "answer": "What is the name of the song that was released most recently?\nAdditional table information: table: music_1"} +{"question": "SELECT Hosts FROM farm_competition WHERE Theme <> 'Aliens'", "answer": "What are the hosts of competitions whose theme is not 'Aliens'?\nAdditional table information: table: farm"} +{"question": "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", "answer": "What are the statement id and statement detail for the statement that has the most corresponding accounts?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T1.student_id, T2.course_name FROM student_course_registrations AS T1 JOIN courses AS T2 ON T1.course_id = T2.course_id", "answer": "What are the ids of all students for courses and what are the names of those courses?\nAdditional table information: table: student_assessment"} +{"question": "SELECT Name FROM climber WHERE Country <> 'Switzerland'", "answer": "List the names of climbers whose country is not Switzerland.\nAdditional table information: table: climbing"} +{"question": "SELECT COUNT(*), flag FROM ship GROUP BY flag", "answer": "What are the different ship flags, and how many ships have each?\nAdditional table information: table: ship_1"} +{"question": "SELECT name FROM storm WHERE NOT storm_id IN (SELECT storm_id FROM affected_region)", "answer": "What are the names of storms that did not affect any regions?\nAdditional table information: table: storm_record"} +{"question": "SELECT Headquarters FROM company ORDER BY Sales_in_Billion DESC LIMIT 1", "answer": "What is the headquarter of the company with the largest sales?\nAdditional table information: table: company_employee"} +{"question": "SELECT customer_details FROM customers UNION SELECT staff_details FROM staff", "answer": "Find the names of all the customers and staff members.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Pen and Paper Gaming'", "answer": "Find the number of members of club 'Pen and Paper Gaming'.\nAdditional table information: table: club_1"} +{"question": "SELECT zip_code, COUNT(*) FROM weather WHERE max_wind_Speed_mph >= 25 GROUP BY zip_code", "answer": "For each zip code, return how many times max wind speed reached 25?\nAdditional table information: table: bike_1"} +{"question": "SELECT COUNT(*) FROM ship", "answer": "how many ships are there?\nAdditional table information: table: ship_1"} +{"question": "SELECT T1.student_id, T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the student ID and login name of the student who are enrolled in the most courses?\nAdditional table information: table: e_learning"} +{"question": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = '2192'", "answer": "What are the distinct last names of the students who have president votes but do not have 2192 as the advisor?\nAdditional table information: table: voter_2"} +{"question": "SELECT name FROM channel ORDER BY rating_in_percent DESC", "answer": "Give me a list of all the channel names sorted by the channel rating in descending order.\nAdditional table information: table: program_share"} +{"question": "SELECT T1.fault_short_name, T3.skill_description FROM Part_Faults AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.part_fault_id = T2.part_fault_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id", "answer": "For all the faults of different parts, what are all the decriptions of the skills required to fix them? List the name of the faults and the skill description.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT T1.name, T1.height_feet FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id WHERE T2.founded > 1880 GROUP BY T1.building_id HAVING COUNT(*) >= 2", "answer": "Show the names and heights of buildings with at least two institutions founded after 1880.\nAdditional table information: table: protein_institute"} +{"question": "SELECT STATEMENT_ID, COUNT(*) FROM Accounts GROUP BY STATEMENT_ID", "answer": "What are the different statement ids on accounts, and the number of accounts for each?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "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", "answer": "What is the customer id of the customer who has the most orders?\nAdditional table information: table: tracking_orders"} +{"question": "SELECT name, followers FROM user_profiles ORDER BY followers DESC", "answer": "List the name and number of followers for each user, and sort the results by the number of followers in descending order.\nAdditional table information: table: twitter_1"} +{"question": "SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'inhibitor' INTERSECT SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'activitor'", "answer": "What are the medicine and trade names that can interact as an inhibitor and activitor with enzymes?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT region_name FROM region WHERE NOT region_id IN (SELECT region_id FROM affected_region)", "answer": "Show the name for regions not affected.\nAdditional table information: table: storm_record"} +{"question": "SELECT address_content FROM addresses WHERE city = 'East Julianaside' AND state_province_county = 'Texas' UNION SELECT address_content FROM addresses WHERE city = 'Gleasonmouth' AND state_province_county = 'Arizona'", "answer": "Find all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT order_id, SUM(product_quantity) FROM Order_items GROUP BY order_id", "answer": "Give the order ids for all orders, as well as the total product quantity in each.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.PostalCode = '70174'", "answer": "What city does the employee who helps the customer with postal code 70174 live in?\nAdditional table information: table: chinook_1"} +{"question": "SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2001 ORDER BY t3.degrees NULLS FIRST LIMIT 1", "answer": "How many faculty lines are there in the university that conferred the least number of degrees in year 2001?\nAdditional table information: table: csu_1"} +{"question": "SELECT Name FROM company ORDER BY Sales_in_Billion ASC NULLS FIRST", "answer": "List the names of companies by ascending number of sales.\nAdditional table information: table: company_employee"} +{"question": "SELECT AVG(price_range) FROM HOTELS WHERE star_rating_code = '5' AND pets_allowed_yn = 1", "answer": "Show the average price range of hotels that have 5 star ratings and allow pets.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT MAX(T2.fastestlapspeed), T1.name, T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year NULLS FIRST", "answer": "What are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year?\nAdditional table information: table: formula_1"} +{"question": "SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common hometown of gymnasts?\nAdditional table information: table: gymnast"} +{"question": "SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1", "answer": "What is detail of the student who most recently registered course?\nAdditional table information: table: student_assessment"} +{"question": "SELECT T3.name FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id JOIN artist AS T3 ON T3.artist_id = T2.artist_id GROUP BY T3.artist_id HAVING AVG(T1.attendance) > 200", "answer": "Show all artist names with an average exhibition attendance over 200.\nAdditional table information: table: theme_gallery"} +{"question": "SELECT SUM(revenue) FROM manufacturers WHERE revenue > (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin')", "answer": "What is the total revenue of companies with revenue greater than the lowest revenue of any manufacturer in Austin?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 23", "answer": "Return the issue dates of volumes by artists who are at most 23 years old?\nAdditional table information: table: music_4"} +{"question": "SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM entrepreneur)", "answer": "List the names of people that are not entrepreneurs.\nAdditional table information: table: entrepreneur"} +{"question": "SELECT COUNT(*) FROM Tasks", "answer": "How many tasks are there in total?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = 'advanced database'", "answer": "Which course author teaches the 'advanced database' course? Give me his or her login name.\nAdditional table information: table: e_learning"} +{"question": "SELECT COUNT(DISTINCT StuID) FROM Plays_games", "answer": "How many different students play games?\nAdditional table information: table: game_1"} +{"question": "SELECT name FROM Person WHERE gender = 'male' ORDER BY age NULLS FIRST", "answer": "Find the name and age of all males in order of their age.\nAdditional table information: table: network_2"} +{"question": "SELECT Dependent_name FROM dependent WHERE relationship = 'Spouse'", "answer": "find all dependent names who have a spouse relation with some employee.\nAdditional table information: table: company_1"} +{"question": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = 'Rock'", "answer": "What is the name of tracks whose genre is Rock?\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(*), dept_code FROM professor WHERE prof_high_degree = 'Ph.D.' GROUP BY dept_code", "answer": "How many professors have a Ph.D. in each department?\nAdditional table information: table: college_1"} +{"question": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Pending' ORDER BY T2.customer_id NULLS FIRST", "answer": "Return the distinct name of customers whose order status is Pending, in the order of customer id.\nAdditional table information: table: department_store"} +{"question": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor <> 'Rachel Elnaugh'", "answer": "Return the names of entrepreneurs do no not have the investor Rachel Elnaugh.\nAdditional table information: table: entrepreneur"} +{"question": "SELECT role_code, COUNT(*) FROM Employees GROUP BY role_code", "answer": "What is the code of each role and the number of employees in each role?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT asset_model FROM Assets WHERE NOT asset_id IN (SELECT asset_id FROM Fault_Log)", "answer": "Which assets did not incur any fault log? List the asset model.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT AVG(Order_Quantity) FROM Invoices WHERE payment_method_code = 'MasterCard'", "answer": "What is the average quantities ordered with payment method code 'MasterCard' on invoices?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking'", "answer": "Show all headquarters without a company in banking industry.\nAdditional table information: table: gas_company"} +{"question": "SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'", "answer": "Who are the players that have names containing the letter a?\nAdditional table information: table: soccer_2"} +{"question": "SELECT customer_phone FROM available_policies WHERE policy_type_code = 'Life Insurance'", "answer": "What are the customer phone numbers under the policy 'Life Insurance'?\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT catalog_level_name, catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10", "answer": "Find the name and level of catalog structure with level between 5 and 10.\nAdditional table information: table: product_catalog"} +{"question": "SELECT T2.product_name, COUNT(*) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T3.order_id = T1.order_id GROUP BY T2.product_name", "answer": "Show all product names and the number of customers having an order on each product.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT MAX(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE '%5%'", "answer": "Return the account details with the greatest value, as well as those that include the character 5.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT COUNT(*) FROM Employee", "answer": "What is the number of employees?\nAdditional table information: table: flight_1"} +{"question": "SELECT LOCATION, COUNT(*) FROM cinema GROUP BY LOCATION", "answer": "Show each location and the number of cinemas there.\nAdditional table information: table: cinema"} +{"question": "SELECT StuID FROM Student WHERE age > 20", "answer": "Show all student ids who are older than 20.\nAdditional table information: table: allergy_1"} +{"question": "SELECT COUNT(*) FROM people WHERE is_male = 'F' AND age > 30", "answer": "How many female people are older than 30 in our record?\nAdditional table information: table: wedding"} +{"question": "SELECT LOCATION FROM festival_detail ORDER BY Num_of_Audience DESC LIMIT 1", "answer": "What is the location of the festival with the largest number of audience?\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT Party_Theme, LOCATION FROM party", "answer": "What are the themes and locations of parties?\nAdditional table information: table: party_host"} +{"question": "SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000", "answer": "Show the names of mountains with height more than 5000 or prominence more than 1000.\nAdditional table information: table: climbing"} +{"question": "SELECT COUNT(*) FROM artist", "answer": "Count the number of artists.\nAdditional table information: table: music_4"} +{"question": "SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common nationality of hosts.\nAdditional table information: table: party_host"} +{"question": "SELECT job_id FROM employees GROUP BY job_id HAVING AVG(salary) > 8000", "answer": "Find the job ID for those jobs which average salary is above 8000.\nAdditional table information: table: hr_1"} +{"question": "SELECT date, theme, sales FROM journal EXCEPT SELECT T1.date, T1.theme, T1.sales FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID", "answer": "List the date, theme and sales of the journal which did not have any of the listed editors serving on committee.\nAdditional table information: table: journal_committee"} +{"question": "SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote WHERE T2.Election_Cycle = 'Spring'", "answer": "Who served as an advisor for students who have treasurer votes in the spring election cycle?\nAdditional table information: table: voter_2"} +{"question": "SELECT COUNT(DISTINCT label) FROM albums", "answer": "What are the unique labels for the albums?\nAdditional table information: table: music_2"} +{"question": "SELECT fname FROM authors ORDER BY fname NULLS FIRST", "answer": "Sort the first names of all the authors in alphabetical order.\nAdditional table information: table: icfp_1"} +{"question": "SELECT MAX(Age), MIN(Age) FROM STUDENT WHERE Major = 600", "answer": "What are the maximum and minimum age of students with major 600?\nAdditional table information: table: voter_2"} +{"question": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = 'Blackville'", "answer": "What city is the headquarter of the store Blackville?\nAdditional table information: table: store_product"} +{"question": "SELECT T1.region_name, COUNT(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id", "answer": "How many storms occured in each region?\nAdditional table information: table: storm_record"} +{"question": "SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3", "answer": "List the distinct ranges of the mountains with the top 3 prominence.\nAdditional table information: table: climbing"} +{"question": "SELECT AVG(age) FROM Student WHERE StuID IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food' INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'animal')", "answer": "How old are the students with allergies to food and animal types on average?\nAdditional table information: table: allergy_1"} +{"question": "SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE '%Functional%'", "answer": "Find the first names of all the authors who have written a paper with title containing the word 'Functional'.\nAdditional table information: table: icfp_1"} +{"question": "SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype = 'food'", "answer": "What are all the different food allergies?\nAdditional table information: table: allergy_1"} +{"question": "SELECT COUNT(*) FROM club", "answer": "How many clubs are there?\nAdditional table information: table: sports_competition"} +{"question": "SELECT customer_id, customer_name FROM customers WHERE customer_address LIKE '%WY%' AND payment_method_code <> 'Credit Card'", "answer": "What are the ids and names of customers with addressed that contain WY and who do not use a credit card for payment?\nAdditional table information: table: department_store"} +{"question": "SELECT T1.first_name, T1.last_name, T2.department_name, T3.city, T3.state_province FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id", "answer": "display the first and last name, department, city, and state province for each employee.\nAdditional table information: table: hr_1"} +{"question": "SELECT artist_name FROM artist WHERE country = 'UK' INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'english'", "answer": "Return the names of singers who are from UK and released an English song.\nAdditional table information: table: music_1"} +{"question": "SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1", "answer": "What is the highest acc percent score in the competition?\nAdditional table information: table: university_basketball"} +{"question": "SELECT DISTINCT T1.name, T1.location, T1.product FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.enzyme_id = T1.id WHERE T2.interaction_type = 'inhibitor'", "answer": "What are the distinct name, location and products of the enzymes which has any 'inhibitor' interaction?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT f_id FROM files WHERE formats = 'mp3'", "answer": "What are the id of songs whose format is mp3.\nAdditional table information: table: music_1"} +{"question": "SELECT COUNT(*) FROM Church WHERE Open_Date < 1850", "answer": "How many churches opened before 1850 are there?\nAdditional table information: table: wedding"} +{"question": "SELECT DISTINCT forename FROM drivers ORDER BY forename ASC NULLS FIRST", "answer": "List the forenames of all distinct drivers in alphabetical order?\nAdditional table information: table: formula_1"} +{"question": "SELECT COUNT(DISTINCT name) FROM projects", "answer": "How many different projects are there?\nAdditional table information: table: scientist_1"} +{"question": "SELECT T1.Team, T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID", "answer": "What are the team and the location of school each player belongs to?\nAdditional table information: table: school_player"} +{"question": "SELECT document_type_description FROM Ref_document_types WHERE document_type_name = 'Film'", "answer": "Return the description of the document type name 'Film'.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT Adults FROM Reservations WHERE CheckIn = '2010-10-23' AND FirstName = 'CONRAD' AND LastName = 'SELBIG'", "answer": "Find the number of adults for the room reserved and checked in by CONRAD SELBIG on Oct 23, 2010.\nAdditional table information: table: inn_1"} +{"question": "SELECT DISTINCT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'University of Oxford'", "answer": "Find the first names and last names of the authors whose institution affiliation is 'University of Oxford'.\nAdditional table information: table: icfp_1"} +{"question": "SELECT product_id, COUNT(DISTINCT order_id) FROM Order_items GROUP BY product_id", "answer": "Show the product ids and the number of unique orders containing each product.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly'", "answer": "What are the countries that have never participated in any friendly-type competitions?\nAdditional table information: table: sports_competition"} +{"question": "SELECT AVG(elevation), country FROM airports GROUP BY country", "answer": "Find the average elevation of all airports for each country.\nAdditional table information: table: flight_4"} +{"question": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Democratic' INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Liberal'", "answer": "Find the committees that have delegates both from from the democratic party and the liberal party.\nAdditional table information: table: election"} +{"question": "SELECT T1.lat, T1.long, T1.city FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id ORDER BY T2.duration NULLS FIRST LIMIT 1", "answer": "What is the latitude, longitude, and city of the station from which the trip with smallest duration started?\nAdditional table information: table: bike_1"} +{"question": "SELECT T2.cell_mobile_number FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.monthly_rental ASC NULLS FIRST LIMIT 1", "answer": "What is the cell phone number of the student whose address has the lowest monthly rental?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT T1.name, T1.city, T2.src_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T2.src_apid ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name and city of the airport which is the source for the most number of flight routes.\nAdditional table information: table: flight_4"} +{"question": "SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which party has the largest number of delegates?\nAdditional table information: table: election"} +{"question": "SELECT T1.account_id, T2.account_name FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id HAVING COUNT(*) >= 4", "answer": "What are the ids and names of accounts with 4 or more transactions?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT name, distance FROM Aircraft", "answer": "Show name and distance for all aircrafts.\nAdditional table information: table: flight_1"} +{"question": "SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id", "answer": "get the details of employees who manage a department.\nAdditional table information: table: hr_1"} +{"question": "SELECT T2.roomName, T1.Rate, T1.CheckIn, T1.CheckOut FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY T1.Rate DESC LIMIT 1", "answer": "Which room has the highest rate? List the room's full name, rate, check in and check out date.\nAdditional table information: table: inn_1"} +{"question": "SELECT COUNT(*) FROM gymnast", "answer": "Count the number of gymnasts.\nAdditional table information: table: gymnast"} +{"question": "SELECT customer_details FROM customers ORDER BY customer_details NULLS FIRST", "answer": "List the names of all the customers in alphabetical order.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT DISTINCT YEAR FROM party WHERE Governor = 'Eliot Spitzer'", "answer": "Find the distinct years when the governor was named 'Eliot Spitzer'.\nAdditional table information: table: election"} +{"question": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent'", "answer": "List the project details of the project both producing patent and paper as outcomes.\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT COUNT(*), AVG(age), city_code FROM student GROUP BY city_code", "answer": "Find the number and average age of students living in each city.\nAdditional table information: table: dorm_1"} +{"question": "SELECT city FROM airports GROUP BY city HAVING COUNT(*) = 2", "answer": "What are the cities with exactly two airports?\nAdditional table information: table: flight_4"} +{"question": "SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate", "answer": "Show ids for all employees who don't have a certificate.\nAdditional table information: table: flight_1"} +{"question": "SELECT T3.forename, T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Australian Grand Prix' EXCEPT SELECT T3.forename, T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = 'Chinese Grand Prix'", "answer": "What are the forenames and surnames of drivers who participated in the races named Australian Grand Prix but not the races named Chinese Grand Prix?\nAdditional table information: table: formula_1"} +{"question": "SELECT start_station_id, start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*) >= 200", "answer": "Find the ids and names of stations from which at least 200 trips started.\nAdditional table information: table: bike_1"} +{"question": "SELECT DName FROM DEPARTMENT WHERE Division = 'AS' UNION SELECT DName FROM DEPARTMENT WHERE Division = 'EN' AND Building = 'NEB'", "answer": "Find the names of departments that are either in division AS or in division EN and in Building NEB.\nAdditional table information: table: college_3"} +{"question": "SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport'", "answer": "Find the number of routes that have destination John F Kennedy International Airport.\nAdditional table information: table: flight_4"} +{"question": "SELECT name FROM Employee ORDER BY salary ASC NULLS FIRST LIMIT 3", "answer": "What is the name of the 3 employees who get paid the least?\nAdditional table information: table: flight_1"} +{"question": "SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1", "answer": "What is the phone number of the customer who has filed the most recent complaint?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1", "answer": "What is the name of the entrepreneur with the greatest weight?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT T1.first_name, T1.last_name, T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Give the full name and staff id of the staff who has handled the fewest payments.\nAdditional table information: table: sakila_1"} +{"question": "SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs'", "answer": "What is the unit of measuerment of the product category code 'Herbs'?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT Nickname FROM school_details WHERE Division <> 'Division 1'", "answer": "What are the nicknames of schools whose division is not 1?\nAdditional table information: table: school_player"} +{"question": "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'", "answer": "What are the distinct customers who have orders with status 'On Road'? Give me the customer details?\nAdditional table information: table: tracking_orders"} +{"question": "SELECT T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the name of the party with the most members.\nAdditional table information: table: party_people"} +{"question": "SELECT aid, name FROM Aircraft ORDER BY distance DESC LIMIT 1", "answer": "What is the id and name of the aircraft that can cover the maximum distance?\nAdditional table information: table: flight_1"} +{"question": "SELECT DISTINCT lot_details FROM LOTS", "answer": "Show all distinct lot details.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id JOIN products AS t3 ON t2.product_id = t3.product_id ORDER BY t3.product_price NULLS FIRST LIMIT 1", "answer": "What is the last name of the staff member in charge of the complaint on the product with the lowest price?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT MAX(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = 'Monaco Grand Prix'", "answer": "What is the maximum fastest lap speed in the Monaco Grand Prix in 2008?\nAdditional table information: table: formula_1"} +{"question": "SELECT Employees.employee_name, COUNT(*) FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id GROUP BY Circulation_History.document_id, Circulation_History.draft_number, Circulation_History.copy_number ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which employee has showed up in most circulation history documents. List the employee's name and the number of drafts and copies.\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code = T2.color_code WHERE T2.color_description = 'yellow'", "answer": "Give the name of the products that have a color description 'yellow'.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT T1.first_name, T1.last_name, T2.department_name, T3.city, T3.state_province FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id", "answer": "What are the full names, departments, cities, and state provinces for each employee?\nAdditional table information: table: hr_1"} +{"question": "SELECT T1.Name, T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = 'film festival'", "answer": "Find the names and descriptions of the photos taken at the tourist attraction called 'film festival'.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT name FROM enzyme WHERE name LIKE '%ALA%'", "answer": "What are the names of enzymes that include the string 'ALA'?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT T2.title, T1.mID FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the movie that is rated by most of times?\nAdditional table information: table: movie_1"} +{"question": "SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = 'Japanese' AND T2.points > 5", "answer": "Find the names of Japanese constructors that have once earned more than 5 points?\nAdditional table information: table: formula_1"} +{"question": "SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_outcomes)", "answer": "Which projects have no outcome? List the project details.\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which vocal type is the most frequently appearring type?\nAdditional table information: table: music_2"} +{"question": "SELECT County_name FROM county ORDER BY Population ASC NULLS FIRST", "answer": "Return the names of all counties sorted by population in ascending order.\nAdditional table information: table: election"} +{"question": "SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the teams with the most technicians?\nAdditional table information: table: machine_repair"} +{"question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'LORIA' AND T2.lastname = 'ONDERSMA'", "answer": "How many students does LORIA ONDERSMA teaches?\nAdditional table information: table: student_1"} +{"question": "SELECT COUNT(*) FROM climber", "answer": "Count the number of climbers.\nAdditional table information: table: climbing"} +{"question": "SELECT COUNT(*) FROM item WHERE NOT i_id IN (SELECT i_id FROM review)", "answer": "Find the number of items that did not receive any review.\nAdditional table information: table: epinions_1"} +{"question": "SELECT product_name, product_id FROM products WHERE product_price BETWEEN 600 AND 700", "answer": "Return the names and ids of all products whose price is between 600 and 700.\nAdditional table information: table: department_store"} +{"question": "SELECT id, country, city, name FROM airport ORDER BY name NULLS FIRST", "answer": "List the id, country, city and name of the airports ordered alphabetically by the name.\nAdditional table information: table: flight_company"} +{"question": "SELECT AVG(T1.HS), MAX(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'", "answer": "What is the average and maximum number of hours students who made the team practiced?\nAdditional table information: table: soccer_2"} +{"question": "SELECT T3.Name, COUNT(*) FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID GROUP BY T3.Name", "answer": "Show the names of companies and the number of employees they have\nAdditional table information: table: company_employee"} +{"question": "SELECT first_name, last_name FROM employees ORDER BY birth_date DESC LIMIT 1", "answer": "What si the youngest employee's first and last name?\nAdditional table information: table: store_1"} +{"question": "SELECT T2.customer_first_name, T2.customer_last_name, T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = '162'", "answer": "Give the full name and phone of the customer who has the account name 162.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT DName FROM DEPARTMENT WHERE Building = 'Mergenthaler'", "answer": "Find the department name that is in Building 'Mergenthaler'.\nAdditional table information: table: college_3"} +{"question": "SELECT match_id FROM MATCH WHERE competition = '1994 FIFA World Cup qualification'", "answer": "Find the match ids of the cities that hosted competition '1994 FIFA World Cup qualification'?\nAdditional table information: table: city_record"} +{"question": "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", "answer": "Show all train names and times in stations in London in descending order by train time.\nAdditional table information: table: train_station"} +{"question": "SELECT region_name FROM region WHERE region_name <> 'Denmark'", "answer": "Return the names of all regions other than Denmark.\nAdditional table information: table: storm_record"} +{"question": "SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3", "answer": "What are the majors only less than three students are studying?\nAdditional table information: table: voter_2"} +{"question": "SELECT classroom FROM list GROUP BY classroom ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the classroom that the most students use.\nAdditional table information: table: student_1"} +{"question": "SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = 'Taizhou ( Zhejiang )'", "answer": "What is the host year of city 'Taizhou ( Zhejiang )'?\nAdditional table information: table: city_record"} +{"question": "SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'researcher'", "answer": "When do all the researcher role staff start to work, and when do they stop working?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the transportation method most people choose to get to tourist attractions.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1", "answer": "What is the shop name corresponding to the shop that opened in the most recent year?\nAdditional table information: table: device"} +{"question": "SELECT individual_first_name, individual_middle_name, individual_last_name FROM individuals ORDER BY individual_last_name NULLS FIRST", "answer": "What are the first, middle, and last names of all individuals, ordered by last name?\nAdditional table information: table: e_government"} +{"question": "SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which sport has most number of students on scholarship?\nAdditional table information: table: game_1"} +{"question": "SELECT T1.duration, T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = 'pop' ORDER BY T2.song_name NULLS FIRST", "answer": "List the duration, file size and format of songs whose genre is pop, ordered by title?\nAdditional table information: table: music_1"} +{"question": "SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1", "answer": "Find the name of the patient who made the appointment with the most recent start date.\nAdditional table information: table: hospital_1"} +{"question": "SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = 'Brazil'", "answer": "Find the first names of all customers that live in Brazil and have an invoice.\nAdditional table information: table: chinook_1"} +{"question": "SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Tennis Club'", "answer": "Retrieve the average age of members of the club 'Tennis Club'.\nAdditional table information: table: club_1"} +{"question": "SELECT SUM(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE '%London%'", "answer": "What are the total number of Domestic Passengers of airports that contain the word 'London'.\nAdditional table information: table: aircraft"} +{"question": "SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'Close a policy' OR t3.service_name = 'Upgrade a policy'", "answer": "Which customers have used the service named 'Close a policy' or 'Upgrade a policy'? Give me the customer names.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = 'Binders Unbound'", "answer": "What are the last names of the author of the paper titled 'Binders Unbound'?\nAdditional table information: table: icfp_1"} +{"question": "SELECT T1.staff_name, COUNT(*) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id GROUP BY T1.staff_name", "answer": "How many engineers did each staff contact? List both the contact staff name and number of engineers contacted.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT name FROM track WHERE NOT track_id IN (SELECT track_id FROM race)", "answer": "Return the names of tracks that have no had any races.\nAdditional table information: table: race_track"} +{"question": "SELECT date, zip_code FROM weather WHERE max_temperature_f >= 80", "answer": "What zip codes have a station with a max temperature greater than or equal to 80 and when did it reach that temperature?\nAdditional table information: table: bike_1"} +{"question": "SELECT SUM(no_of_customers) FROM bank", "answer": "How many customers are there?\nAdditional table information: table: loan_1"} +{"question": "SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the name of the party that has the most delegates.\nAdditional table information: table: election"} +{"question": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 INTERSECT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010", "answer": "What are the ids for courses that were offered in both Fall of 2009 and Spring of 2010?\nAdditional table information: table: college_2"} +{"question": "SELECT t2.id, t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id GROUP BY t1.station_id ORDER BY AVG(high_temperature) DESC LIMIT 1", "answer": "Find the id and local authority of the station with has the highest average high temperature.\nAdditional table information: table: station_weather"} +{"question": "SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform", "answer": "Please show different software platforms and the corresponding number of devices using each.\nAdditional table information: table: device"} +{"question": "SELECT Name FROM technician WHERE Age = 36 OR Age = 37", "answer": "What are the names of the technicians aged either 36 or 37?\nAdditional table information: table: machine_repair"} +{"question": "SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = 'shared'", "answer": "How many songs have a shared vocal?\nAdditional table information: table: music_2"} +{"question": "SELECT AVG(T2.gradepoint) FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.LName = 'Smith'", "answer": "What is the average gradepoint for students with the last name Smith?\nAdditional table information: table: college_3"} +{"question": "SELECT salary, manager_id FROM employees WHERE manager_id <> 'null'", "answer": "What are the salaries and manager ids for employees who have managers?\nAdditional table information: table: hr_1"} +{"question": "SELECT COUNT(*) FROM park WHERE state = 'NY'", "answer": "Show me the number of parks the state of NY has.\nAdditional table information: table: baseball_1"} +{"question": "SELECT state FROM bank GROUP BY state ORDER BY SUM(no_of_customers) DESC LIMIT 1", "answer": "Find the state which has the most number of customers.\nAdditional table information: table: loan_1"} +{"question": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.fname, t1.lname ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which author has written the most papers? Find his or her last name.\nAdditional table information: table: icfp_1"} +{"question": "SELECT Name, Age FROM editor", "answer": "What are the names and ages of editors?\nAdditional table information: table: journal_committee"} +{"question": "SELECT T2.title, T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars > (SELECT AVG(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.director = 'James Cameron')", "answer": "What are the titles and directors of all movies that have a rating higher than the average James Cameron film rating?\nAdditional table information: table: movie_1"} +{"question": "SELECT T2.title, T1.mID FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the movie that has been reviewed the most?\nAdditional table information: table: movie_1"} +{"question": "SELECT DName FROM DEPARTMENT WHERE Division = 'AS' UNION SELECT DName FROM DEPARTMENT WHERE Division = 'EN' AND Building = 'NEB'", "answer": "What are the names of departments either in division AS, or in division EN and in building NEB?\nAdditional table information: table: college_3"} +{"question": "SELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Zach' AND T2.year = (SELECT MAX(YEAR) FROM PersonFriend WHERE name = 'Zach')", "answer": "What are the ages of all of Zach's friends who are in the longest relationship?\nAdditional table information: table: network_2"} +{"question": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t2.position = 'President'", "answer": "What are the first and last name of the president of the club 'Bootup Baltimore'?\nAdditional table information: table: club_1"} +{"question": "SELECT T1.id, T1.Name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 2", "answer": "What are the ids and names of the web accelerators that are compatible with two or more browsers?\nAdditional table information: table: browser_web"} +{"question": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY SUM(credits) DESC LIMIT 1", "answer": "Find the name of the department that offers the highest total credits?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(*) FROM market WHERE Number_cities < 300", "answer": "Count the number of markets that have a number of cities lower than 300.\nAdditional table information: table: film_rank"} +{"question": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'shopping'", "answer": "What are the names of the tourist attractions that have parking or shopping as their feature details?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T1.amenid = T2.amenid GROUP BY T2.amenid ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name of amenity that is most common in all dorms.\nAdditional table information: table: dorm_1"} +{"question": "SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1", "answer": "Show the result of the submission with the highest score.\nAdditional table information: table: workshop_paper"} +{"question": "SELECT DISTINCT T1.stageposition FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE Firstname = 'Solveig'", "answer": "Find all the stage positions of the musicians with first name 'Solveig'\nAdditional table information: table: music_2"} +{"question": "SELECT advisor FROM Student GROUP BY advisor HAVING COUNT(*) >= 2", "answer": "What are the advisors\nAdditional table information: table: game_1"} +{"question": "SELECT * FROM CUSTOMER WHERE State = 'NY'", "answer": "Find all the customer information in state NY.\nAdditional table information: table: chinook_1"} +{"question": "SELECT instrument FROM instruments GROUP BY instrument ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most used instrument?\nAdditional table information: table: music_2"} +{"question": "SELECT T2.product_type_code, T2.product_name, T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3", "answer": "Return the product type, name, and price for products supplied by supplier 3.\nAdditional table information: table: department_store"} +{"question": "SELECT Nationality, COUNT(*) FROM pilot GROUP BY Nationality", "answer": "What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality.\nAdditional table information: table: pilot_record"} +{"question": "SELECT order_id, COUNT(DISTINCT product_id) FROM Order_items GROUP BY order_id", "answer": "How many different products correspond to each order id?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT COUNT(DISTINCT driverId) FROM results WHERE NOT raceId IN (SELECT raceId FROM races WHERE YEAR <> 2009)", "answer": "How many drivers did not participate in the races held in 2009?\nAdditional table information: table: formula_1"} +{"question": "SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1", "answer": "Find all the forenames of distinct drivers who was in position 1 as standing and won?\nAdditional table information: table: formula_1"} +{"question": "SELECT SUM(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = 'Rodrick Heaney'", "answer": "What is the total quantity of products purchased by 'Rodrick Heaney'?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT MIN(order_date) FROM Customer_Orders WHERE order_status_code = 'Cancelled')", "answer": "Find the ids of all distinct customers who made order after some orders that were Cancelled.\nAdditional table information: table: department_store"} +{"question": "SELECT song_name FROM song WHERE genre_is = 'modern' OR languages = 'english'", "answer": "What are the names of the songs that are modern or sung in English?\nAdditional table information: table: music_1"} +{"question": "SELECT DISTINCT product_details FROM products", "answer": "What are the details of all products?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT first_name, last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000", "answer": "List the first name and last name of customers have the amount of outstanding between 1000 and 3000.\nAdditional table information: table: driving_school"} +{"question": "SELECT destination, COUNT(*) FROM Flight GROUP BY destination", "answer": "What are the destinations and number of flights to each one?\nAdditional table information: table: flight_1"} +{"question": "SELECT DISTINCT song_name FROM song WHERE resolution > (SELECT MIN(resolution) FROM song WHERE languages = 'english')", "answer": "What are the different names for all songs that have a higher resolution than English songs?\nAdditional table information: table: music_1"} +{"question": "SELECT max_page_size FROM product GROUP BY max_page_size HAVING COUNT(*) > 3", "answer": "What is the maximum page size for everything that has more than 3 products listed?\nAdditional table information: table: store_product"} +{"question": "SELECT region_name FROM region ORDER BY region_name NULLS FIRST", "answer": "What are the names of the regions in alphabetical order?\nAdditional table information: table: storm_record"} +{"question": "SELECT AVG(price) FROM wine WHERE NOT Appelation IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma')", "answer": "Find the average price of wines that are not produced from Sonoma county.\nAdditional table information: table: wine_1"} +{"question": "SELECT COUNT(*), cName FROM tryout GROUP BY cName ORDER BY COUNT(*) DESC", "answer": "How many students participated in tryouts for each college by descennding count?\nAdditional table information: table: soccer_2"} +{"question": "SELECT COUNT(*), role_code FROM users GROUP BY role_code", "answer": "Find the number of users in each role.\nAdditional table information: table: document_management"} +{"question": "SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC LIMIT 1", "answer": "What is the time of elimination for the wrestler with the most days held?\nAdditional table information: table: wrestler"} +{"question": "SELECT T1.Player, T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Columbus Crew'", "answer": "What are the players who played for Columbus Crew, and how many years did each play for?\nAdditional table information: table: match_season"} +{"question": "SELECT Publisher FROM publication WHERE Price > 10000000 INTERSECT SELECT Publisher FROM publication WHERE Price < 5000000", "answer": "Show the publishers that have publications with price higher than 10000000 and publications with price lower than 5000000.\nAdditional table information: table: book_2"} +{"question": "SELECT T1.project_id, COUNT(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY COUNT(*) ASC NULLS FIRST", "answer": "How many staff does each project has? List the project id and the number in an ascending order.\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Show the role code with the least employees.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T3.Player_name, T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID ORDER BY T3.Votes DESC", "answer": "Show the names of players and names of their coaches in descending order of the votes of players.\nAdditional table information: table: riding_club"} +{"question": "SELECT title FROM item ORDER BY title NULLS FIRST", "answer": "List the titles of all items in alphabetic order .\nAdditional table information: table: epinions_1"} +{"question": "SELECT COUNT(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id WHERE T2.dept_store_chain_name = 'South'", "answer": "Count the number of stores the chain South has.\nAdditional table information: table: department_store"} +{"question": "SELECT T2.name, COUNT(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid", "answer": "What is the name of each aircraft and how many flights does each one complete?\nAdditional table information: table: flight_1"} +{"question": "SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking'", "answer": "What are the headquarters without companies that are in the banking industry?\nAdditional table information: table: gas_company"} +{"question": "SELECT T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID WHERE T1.White > 90", "answer": "Show the crime rate of counties with a city having white percentage more than 90.\nAdditional table information: table: county_public_safety"} +{"question": "SELECT * FROM employees WHERE salary BETWEEN (SELECT MIN(salary) FROM employees) AND 2500", "answer": "What is all the information regarding employees with salaries above the minimum and under 2500?\nAdditional table information: table: hr_1"} +{"question": "SELECT ResName FROM Restaurant", "answer": "Show me all the restaurants.\nAdditional table information: table: restaurant_1"} +{"question": "SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Linda' AND t3.lname = 'Smith'", "answer": "How many clubs does 'Linda Smith' have membership for?\nAdditional table information: table: club_1"} +{"question": "SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'bangla' GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3", "answer": "Find the top 3 artists who have the largest number of songs works whose language is Bangla.\nAdditional table information: table: music_1"} +{"question": "SELECT COUNT(*), classroom FROM list GROUP BY classroom", "answer": "Find the number of students in one classroom.\nAdditional table information: table: student_1"} +{"question": "SELECT campus FROM campuses WHERE county = 'Los Angeles'", "answer": "What campuses are in Los Angeles county?\nAdditional table information: table: csu_1"} +{"question": "SELECT COUNT(DISTINCT Currency_Code) FROM Drama_Workshop_Groups", "answer": "Find the number of distinct currency codes used in drama workshop groups.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn", "answer": "Find the name of scientists who are assigned to some project.\nAdditional table information: table: scientist_1"} +{"question": "SELECT sportname, COUNT(*) FROM Sportsinfo GROUP BY sportname", "answer": "How many students play each sport?\nAdditional table information: table: game_1"} +{"question": "SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance NULLS FIRST", "answer": "What is the sum of checking and savings balances for all customers, ordered by the total balance?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT invoice_number, COUNT(*) FROM Financial_transactions GROUP BY invoice_number", "answer": "Show the invoice number and the number of transactions for each invoice.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT MAX(elevation) FROM airports WHERE country = 'Iceland'", "answer": "What is the maximum elevation of all airports in the country of Iceland?\nAdditional table information: table: flight_4"} +{"question": "SELECT preferred_foot, COUNT(*) FROM Player_Attributes WHERE overall_rating > 80 GROUP BY preferred_foot", "answer": "Of all players with an overall rating greater than 80, how many are right-footed and left-footed?\nAdditional table information: table: soccer_1"} +{"question": "SELECT DISTINCT city_code FROM Student", "answer": "What cities do students live in?\nAdditional table information: table: allergy_1"} +{"question": "SELECT LastName FROM CUSTOMER EXCEPT SELECT T1.LastName FROM CUSTOMER AS T1 JOIN Invoice AS T2 ON T1.CustomerId = T2.CustomerId WHERE T2.total > 20", "answer": "Find all the customer last names that do not have invoice totals larger than 20.\nAdditional table information: table: chinook_1"} +{"question": "SELECT Country FROM manager WHERE Age > 50 INTERSECT SELECT Country FROM manager WHERE Age < 46", "answer": "Show the countries that have both managers of age above 50 and managers of age below 46.\nAdditional table information: table: railway"} +{"question": "SELECT city, COUNT(*) FROM branch WHERE open_year < 2010 GROUP BY city", "answer": "Show the city and the number of branches opened before 2010 for each city.\nAdditional table information: table: shop_membership"} +{"question": "SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*) > 2", "answer": "Which headquarter locations are used by more than 2 companies?\nAdditional table information: table: company_office"} +{"question": "SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T2.dept_name = 'Accounting' OR T2.dept_name = 'Biology'", "answer": "How many professors who are from either Accounting or Biology department?\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(*) FROM Ref_budget_codes", "answer": "How many budget types do we have?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T1.Product_Name, COUNT(*) FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name ORDER BY COUNT(*) DESC", "answer": "Show the names of products and the number of events they are in, sorted by the number of events in descending order.\nAdditional table information: table: solvency_ii"} +{"question": "SELECT employee_id, first_name, last_name, salary FROM employees WHERE salary > (SELECT AVG(salary) FROM employees) AND department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%J%')", "answer": "What are the ids, full names, and salaries for employees making more than average and who work in a department with employees who have the letter J in their first name?\nAdditional table information: table: hr_1"} +{"question": "SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the budget type code with most number of documents.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT MIN(age), AVG(age), MAX(age) FROM Student", "answer": "What is the minimum, mean, and maximum age across all students?\nAdditional table information: table: allergy_1"} +{"question": "SELECT T1.id, T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.height > 4000", "answer": "What are the id and name of the photos for mountains?\nAdditional table information: table: mountain_photos"} +{"question": "SELECT LOCATION FROM railway GROUP BY LOCATION HAVING COUNT(*) > 1", "answer": "Show the locations that have more than one railways.\nAdditional table information: table: railway"} +{"question": "SELECT MAX(Milliseconds), MIN(Milliseconds) FROM TRACK", "answer": "Find the maximum and minimum durations of tracks in milliseconds.\nAdditional table information: table: chinook_1"} +{"question": "SELECT name FROM mill WHERE LOCATION <> 'Donceel'", "answer": "What are the names of the mills which are not located in 'Donceel'?\nAdditional table information: table: architecture"} +{"question": "SELECT campus FROM campuses WHERE YEAR < 1800", "answer": "Find the name of the campuses opened before 1800.\nAdditional table information: table: csu_1"} +{"question": "SELECT T2.Hardware_Model_name, T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type = 'Graphics'", "answer": "List the hardware model name and company name for the phone whose screen mode type is 'Graphics.'\nAdditional table information: table: phone_1"} +{"question": "SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE '2%'", "answer": "Find the names of all the products whose stock number starts with '2'.\nAdditional table information: table: product_catalog"} +{"question": "SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment ORDER BY T3.cost DESC LIMIT 1", "answer": "Find the physician who was trained in the most expensive procedure?\nAdditional table information: table: hospital_1"} +{"question": "SELECT COUNT(DISTINCT city) FROM stadium WHERE opening_year < 2006", "answer": "How many cities have a stadium that was opened before the year of 2006?\nAdditional table information: table: swimming"} +{"question": "SELECT T2.customer_first_name, T2.customer_last_name, T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = '162'", "answer": "What is the first name, last name, and phone of the customer with account name 162?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT AVG(Attendance) FROM performance", "answer": "What is the average number of attendees for performances?\nAdditional table information: table: performance_attendance"} +{"question": "SELECT image_name, image_url FROM images ORDER BY image_name NULLS FIRST", "answer": "List all the image name and URLs in the order of their names.\nAdditional table information: table: document_management"} +{"question": "SELECT T3.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T1.name = 'John Williams'", "answer": "Show names for all aircrafts of which John Williams has certificates.\nAdditional table information: table: flight_1"} +{"question": "SELECT T1.party_name, T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id", "answer": "What are the names of parties and their respective regions?\nAdditional table information: table: party_people"} +{"question": "SELECT COUNT(*) FROM services", "answer": "Count the total number of available services.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' INTERSECT SELECT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice'", "answer": "What are the names and ages of every person who is a friend of both Dan and Alice?\nAdditional table information: table: network_2"} +{"question": "SELECT COUNT(DISTINCT city) FROM EMPLOYEE", "answer": "How many distinct cities does the employees live in?\nAdditional table information: table: chinook_1"} +{"question": "SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which customer uses the most policies? Give me the customer name.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination", "answer": "Please show different denominations and the corresponding number of schools.\nAdditional table information: table: school_player"} +{"question": "SELECT customer_name FROM customers WHERE payment_method <> 'Cash'", "answer": "What is the name of customers who do not use Cash as payment method.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT MAX(booked_count), MIN(booked_count), AVG(booked_count) FROM products_booked", "answer": "What are the maximum, minimum, and average booked count for the products booked?\nAdditional table information: table: products_for_hire"} +{"question": "SELECT school_code FROM department WHERE dept_name = 'Accounting'", "answer": "What is the school code of the accounting department?\nAdditional table information: table: college_1"} +{"question": "SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the document type code with most number of documents?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT DISTINCT T1.age FROM management AS T2 JOIN head AS T1 ON T1.head_id = T2.head_id WHERE T2.temporary_acting = 'Yes'", "answer": "What are the distinct ages of the heads who are acting?\nAdditional table information: table: department_management"} +{"question": "SELECT order_shipping_charges, customer_id FROM customer_orders WHERE order_status_code = 'Cancelled' OR order_status_code = 'Paid'", "answer": "Show the shipping charge and customer id for customer orders with order status Cancelled or Paid.\nAdditional table information: table: customers_campaigns_ecommerce"} +{"question": "SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7", "answer": "Return the unique name for stations that have ever had 7 bikes available.\nAdditional table information: table: bike_1"} +{"question": "SELECT headquarters FROM company WHERE main_industry = 'Banking' GROUP BY headquarters HAVING COUNT(*) >= 2", "answer": "What are the headquarters with at least two companies in the banking industry?\nAdditional table information: table: gas_company"} +{"question": "SELECT t2.date_opened, t2.date_closed FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name LIKE '%Diana%'", "answer": "Retrieve the open and close dates of all the policies associated with the customer whose name contains 'Diana'\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name", "answer": "Show the country names and the corresponding number of players.\nAdditional table information: table: match_season"} +{"question": "SELECT headquarters, COUNT(*) FROM company GROUP BY headquarters", "answer": "For each headquarter, what are the headquarter and how many companies are centered there?\nAdditional table information: table: gas_company"} +{"question": "SELECT SUM(credits), dept_name FROM course GROUP BY dept_name", "answer": "Find the total credits of courses provided by different department.\nAdditional table information: table: college_2"} +{"question": "SELECT billing_state, COUNT(*), SUM(total) FROM invoices WHERE billing_state = 'CA'", "answer": "What is the number of invoices and total money billed in them from CA?\nAdditional table information: table: store_1"} +{"question": "SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = 'Daan' AND T4.last_name = 'Peeters'", "answer": "What are the tracks that Dean Peeters bought?\nAdditional table information: table: store_1"} +{"question": "SELECT T2.balance, T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T1.name = 'Brown'", "answer": "What are the checking and savings balances in accounts belonging to Brown?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT order_id FROM shipments WHERE shipment_date = (SELECT MAX(shipment_date) FROM shipments)", "answer": "Which order has the most recent shipment? Give me the order id.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT Grape, Appelation, Name FROM WINE WHERE Score > 93 ORDER BY Name NULLS FIRST", "answer": "What are the grapes, appelations, and wines with scores above 93, sorted by Name?\nAdditional table information: table: wine_1"} +{"question": "SELECT T1.name, COUNT(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id", "answer": "List the name for storms and the number of affected regions for each storm.\nAdditional table information: table: storm_record"} +{"question": "SELECT COUNT(*) FROM addresses WHERE state_province_county = 'Colorado'", "answer": "How many cities are there in state 'Colorado'?\nAdditional table information: table: e_government"} +{"question": "SELECT COUNT(*), T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T1.date_problem_reported > '1986-11-13' GROUP BY T2.product_id", "answer": "What are the products that have problems reported after 1986-11-13? Give me the product id and the count of problems reported after 1986-11-13.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT document_name FROM documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 3 INTERSECT SELECT document_name FROM documents GROUP BY document_structure_code ORDER BY COUNT(*) DESC LIMIT 3", "answer": "What are the names of documents that have both one of the three most common types and one of three most common structures?\nAdditional table information: table: document_management"} +{"question": "SELECT Official_Name FROM city WHERE NOT City_ID IN (SELECT Host_city_ID FROM farm_competition)", "answer": "What are the official names of cities that have not hosted a farm competition?\nAdditional table information: table: farm"} +{"question": "SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2", "answer": "What are the names of all colleges that have two or more players?\nAdditional table information: table: match_season"} +{"question": "SELECT CName FROM COURSE WHERE Days = 'MTW'", "answer": "What are the course names for courses taught on MTW?\nAdditional table information: table: college_3"} +{"question": "SELECT CName FROM COURSE WHERE Days = 'MTW'", "answer": "Which courses are taught on days MTW?\nAdditional table information: table: college_3"} +{"question": "SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16'", "answer": "What are the distinct grant amount for the grants where the documents were sent before '1986-08-26 20:49:27' and grant were ended after '1989-03-16 18:27:16'?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT Election_Cycle, COUNT(*) FROM VOTING_RECORD GROUP BY Election_Cycle", "answer": "Count the number of voting records for each election cycle.\nAdditional table information: table: voter_2"} +{"question": "SELECT MAX(monthly_rental), MIN(monthly_rental) FROM Student_Addresses", "answer": "Find the maximum and minimum monthly rental for all student addresses.\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT name FROM student WHERE dept_name = 'History' ORDER BY tot_cred DESC LIMIT 1", "answer": "Give the name of the student in the History department with the most credits.\nAdditional table information: table: college_2"} +{"question": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'female'", "answer": "What are all the friends of Alice who are female?\nAdditional table information: table: network_2"} +{"question": "SELECT problem_id FROM problems WHERE date_problem_reported < '1978-06-26'", "answer": "Which problems are reported before 1978-06-26? Give me the ids of the problems.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT flno FROM Flight WHERE distance > 2000", "answer": "Show flight number for all flights with more than 2000 distance.\nAdditional table information: table: flight_1"} +{"question": "SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN Prescribes AS T3 ON T3.Patient = T2.SSN JOIN Medication AS T4 ON T3.Medication = T4.Code WHERE room = 111", "answer": "What is the name of the medication used for the patient staying in room 111?\nAdditional table information: table: hospital_1"} +{"question": "SELECT SUM(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_short_name = 'Columbus Square'", "answer": "How many rooms in total are there in the apartments in the building with short name 'Columbus Square'?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT DISTINCT product_size FROM Products", "answer": "What are the different product sizes?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT COUNT(*) FROM student WHERE sex = 'F' AND age < 25", "answer": "How many female students (sex is F) whose age is below 25?\nAdditional table information: table: dorm_1"} +{"question": "SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = 'Metallica'", "answer": "Find the number of albums by the artist 'Metallica'.\nAdditional table information: table: chinook_1"} +{"question": "SELECT name FROM member WHERE NOT member_id IN (SELECT member_id FROM membership_register_branch)", "answer": "Show member names without any registered branch.\nAdditional table information: table: shop_membership"} +{"question": "SELECT school_name FROM school ORDER BY enrollment NULLS FIRST LIMIT 1", "answer": "List the name of the school with the smallest enrollment.\nAdditional table information: table: school_finance"} +{"question": "SELECT T1.invoice_date, T1.order_id, T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id", "answer": "What are the invoice dates, order ids, and order details for all invoices?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT Memory_in_G, Carrier FROM phone", "answer": "What are the memories and carriers of phones?\nAdditional table information: table: phone_market"} +{"question": "SELECT COUNT(*) FROM Staff WHERE first_name = 'Ludie'", "answer": "How many staff have the first name Ludie?\nAdditional table information: table: driving_school"} +{"question": "SELECT T1.name, T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T2.balance DESC LIMIT 3", "answer": "Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT COUNT(*) FROM Products_for_hire WHERE NOT product_id IN (SELECT product_id FROM products_booked WHERE booked_amount > 200)", "answer": "How many products are never booked with amount higher than 200?\nAdditional table information: table: products_for_hire"} +{"question": "SELECT MAX(amount_outstanding), MIN(amount_outstanding), AVG(amount_outstanding) FROM Customers", "answer": "What is maximum, minimum and average amount of outstanding of customer?\nAdditional table information: table: driving_school"} +{"question": "SELECT name, email FROM user_profiles WHERE name LIKE '%Swift%'", "answer": "Find the name and email of the user whose name contains the word \u2018Swift\u2019.\nAdditional table information: table: twitter_1"} +{"question": "SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING COUNT(*) >= 2 INTERSECT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING SUM(T2.number_city_affected) >= 10", "answer": "What are the names of storms that both affected two or more regions and affected a total of 10 or more cities?\nAdditional table information: table: storm_record"} +{"question": "SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_number = 'Suite 634'", "answer": "What is the booking status code of the apartment with apartment number 'Suite 634'?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT COUNT(DISTINCT affiliation) FROM university", "answer": "Find how many different affiliation types there are.\nAdditional table information: table: university_basketball"} +{"question": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName NULLS FIRST", "answer": "What are the names of all students who tried out in alphabetical order?\nAdditional table information: table: soccer_2"} +{"question": "SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*) > 2", "answer": "Show the headquarters shared by more than two companies.\nAdditional table information: table: company_office"} +{"question": "SELECT AVG(Snatch) FROM body_builder", "answer": "What is the average snatch score of body builders?\nAdditional table information: table: body_builder"} +{"question": "SELECT T3.manager_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.company = 'ExxonMobil'", "answer": "What are the names of the managers for gas stations that are operated by the ExxonMobil company?\nAdditional table information: table: gas_company"} +{"question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'MADLOCK' AND T1.lastname = 'RAY'", "answer": "How many teachers does the student named MADLOCK RAY have?\nAdditional table information: table: student_1"} +{"question": "SELECT roomName FROM Rooms WHERE basePrice > (SELECT AVG(basePrice) FROM Rooms)", "answer": "Find the name of rooms whose price is higher than the average price.\nAdditional table information: table: inn_1"} +{"question": "SELECT * FROM employees WHERE NOT employee_id IN (SELECT employee_id FROM job_history)", "answer": "What is all the information about employees who have never had a job in the past?\nAdditional table information: table: hr_1"} +{"question": "SELECT AVG(Price), AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = 'Zinfandel'", "answer": "What are the average prices and cases of wines produced in the year of 2009 and made of Zinfandel grape?\nAdditional table information: table: wine_1"} +{"question": "SELECT T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Contracts AS T2 ON T1.company_id = T2.maintenance_contract_company_id JOIN Ref_Company_Types AS T3 ON T1.company_type_code = T3.company_type_code ORDER BY T2.contract_end_date DESC LIMIT 1", "answer": "What is the description of the type of the company who concluded its contracts most recently?\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT Birth_Place, COUNT(*) FROM people GROUP BY Birth_Place", "answer": "List each birth place along with the number of people from there.\nAdditional table information: table: body_builder"} +{"question": "SELECT Song FROM volume WHERE Weeks_on_Top > 1", "answer": "What are the songs in volumes with more than 1 week on top?\nAdditional table information: table: music_4"} +{"question": "SELECT County_name, Population FROM county", "answer": "What are the name and population of each county?\nAdditional table information: table: election"} +{"question": "SELECT DISTINCT T2.problem_id, T2.problem_log_id FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T1.staff_first_name = 'Rylan' AND T1.staff_last_name = 'Homenick'", "answer": "List the problem id and log id which are assigned to the staff named Rylan Homenick.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT Name, Score FROM WINE", "answer": "What are the names and scores of all wines?\nAdditional table information: table: wine_1"} +{"question": "SELECT T2.school_name FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id JOIN endowment AS T3 ON T2.school_id = T3.school_id GROUP BY T2.school_name HAVING SUM(T1.budgeted) > 100 OR SUM(T3.amount) > 10", "answer": "Show the names of schools with a total budget amount greater than 100 or a total endowment greater than 10.\nAdditional table information: table: school_finance"} +{"question": "SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING AVG(total_amount_purchased) > 50000 OR AVG(total_amount_purchased) < 30000", "answer": "Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000.\nAdditional table information: table: department_store"} +{"question": "SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment ORDER BY T3.cost DESC LIMIT 1", "answer": "Which physician was trained in the procedure that costs the most.\nAdditional table information: table: hospital_1"} +{"question": "SELECT AVG(age), job FROM Person GROUP BY job", "answer": "What is average age for different job title?\nAdditional table information: table: network_2"} +{"question": "SELECT Name FROM People ORDER BY Name ASC NULLS FIRST", "answer": "What are the names of people in ascending alphabetical order?\nAdditional table information: table: gymnast"} +{"question": "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 NULLS FIRST, T1.Name NULLS FIRST", "answer": "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.\nAdditional table information: table: scientist_1"} +{"question": "SELECT first_name FROM customer WHERE NOT customer_id IN (SELECT customer_id FROM rental WHERE rental_date > '2005-08-23 02:06:01')", "answer": "Return the first names of customers who did not rented a film after the date '2005-08-23 02:06:01'.\nAdditional table information: table: sakila_1"} +{"question": "SELECT T2.name, T2.country FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the name and country corresponding to the artist who has had the most exhibitions.\nAdditional table information: table: theme_gallery"} +{"question": "SELECT Address FROM Restaurant WHERE ResName = 'Subway'", "answer": "What is the address of the restaurant Subway?\nAdditional table information: table: restaurant_1"} +{"question": "SELECT AVG(Age) FROM artist", "answer": "Return the average age across all artists.\nAdditional table information: table: music_4"} +{"question": "SELECT T2.first_name, T2.last_name, COUNT(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY COUNT(T1.reports_to) DESC LIMIT 1", "answer": "What are the first and last names of all the employees and how many people report to them?\nAdditional table information: table: store_1"} +{"question": "SELECT Major, COUNT(*) FROM Student GROUP BY Major HAVING COUNT(Major) BETWEEN 2 AND 30", "answer": "Which major has between 2 and 30 number of students? List major and the number of students.\nAdditional table information: table: restaurant_1"} +{"question": "SELECT T2.Comptroller FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2", "answer": "Who were the comptrollers of the parties associated with the delegates from district 1 or district 2?\nAdditional table information: table: election"} +{"question": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = 'white' OR t3.characteristic_name = 'hot'", "answer": "Count the products that have the color description 'white' or have the characteristic name 'hot'.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT email FROM employees WHERE commission_pct = 'null' AND salary BETWEEN 7000 AND 12000 AND department_id = 50", "answer": "What are the emails of employees with null commission, salary between 7000 and 12000, and who work in department 50?\nAdditional table information: table: hr_1"} +{"question": "SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T2.Position = 'Right Wing'", "answer": "What are the names of the clubs that have players in the position of 'Right Wing'?\nAdditional table information: table: sports_competition"} +{"question": "SELECT COUNT(*), gender FROM artist GROUP BY gender", "answer": "How many artists are male and how many are female?\nAdditional table information: table: music_1"} +{"question": "SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3", "answer": "Return the top 3 greatest support rates.\nAdditional table information: table: candidate_poll"} +{"question": "SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1", "answer": "Show all information on the airport that has the largest number of international passengers.\nAdditional table information: table: aircraft"} +{"question": "SELECT COUNT(*) FROM HOTELS", "answer": "How many available hotels are there in total?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT cloud_cover FROM weather WHERE zip_code = 94107 GROUP BY cloud_cover ORDER BY COUNT(*) DESC LIMIT 3", "answer": "What are the 3 most common cloud covers in the zip code of 94107?\nAdditional table information: table: bike_1"} +{"question": "SELECT COUNT(*) FROM county", "answer": "Count the total number of counties.\nAdditional table information: table: election"} +{"question": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY SUM(t3.order_quantity) DESC LIMIT 1", "answer": "Give me the name of the customer who ordered the most items in total.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT AVG(age) FROM Person", "answer": "What is the average age for all person?\nAdditional table information: table: network_2"} +{"question": "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'", "answer": "What are the names and dates for documents corresponding to project that has the details 'Graph Database project'?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T2.staff_id HAVING COUNT(*) > 1", "answer": "List the name of staff who has been assigned multiple jobs.\nAdditional table information: table: department_store"} +{"question": "SELECT T1.student_id, T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the student ID and login name of the student with the most course enrollments\nAdditional table information: table: e_learning"} +{"question": "SELECT MIN(age), AVG(age), MAX(age) FROM Student", "answer": "Show the minimum, average, and maximum age of all students.\nAdditional table information: table: allergy_1"} +{"question": "SELECT T1.first_name, T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY T2.invoice_date DESC LIMIT 5", "answer": "What are the first and last names of the 5 customers who purchased something most recently?\nAdditional table information: table: store_1"} +{"question": "SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id = t2.campus WHERE t2.faculty >= 600 AND t2.faculty <= 1000 AND T1.year = 2004", "answer": "List the campus that have between 600 and 1000 faculty lines in year 2004.\nAdditional table information: table: csu_1"} +{"question": "SELECT T2.title, T1.stars, T2.director, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T2.director", "answer": "Find the title and score of the movie with the lowest rating among all movies directed by each director.\nAdditional table information: table: movie_1"} +{"question": "SELECT publisher, COUNT(*) FROM book_club GROUP BY publisher", "answer": "How many books are there for each publisher?\nAdditional table information: table: culture_company"} +{"question": "SELECT AVG(product_price) FROM products WHERE product_type_code = 'Clothes'", "answer": "Find the average price of all product clothes.\nAdditional table information: table: department_store"} +{"question": "SELECT Major FROM STUDENT GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which major has the most students?\nAdditional table information: table: voter_2"} +{"question": "SELECT bname FROM bank ORDER BY no_of_customers DESC LIMIT 1", "answer": "What is the name of the bank branch with the greatest number of customers?\nAdditional table information: table: loan_1"} +{"question": "SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE = 'Fall'", "answer": "Return all the distinct secretary votes made in the fall election cycle.\nAdditional table information: table: voter_2"} +{"question": "SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC", "answer": "What is all the information about employees with D or S in their first name, ordered by salary descending?\nAdditional table information: table: hr_1"} +{"question": "SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the id of the account with the most transactions?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT Player FROM match_season WHERE College = 'UCLA'", "answer": "Show the players from college UCLA.\nAdditional table information: table: match_season"} +{"question": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which apartment type code appears the most often?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT Age FROM artist", "answer": "What are the ages of all music artists?\nAdditional table information: table: music_4"} +{"question": "SELECT T1.gender, T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.resolution NULLS FIRST LIMIT 1", "answer": "Return the gender and name of artist who produced the song with the lowest resolution.\nAdditional table information: table: music_1"} +{"question": "SELECT MIN(membership_amount), MAX(membership_amount) FROM branch WHERE open_year = 2011 OR city = 'London'", "answer": "What are the minimum and maximum membership amounts for all branches that either opened in 2011 or are located in London?\nAdditional table information: table: shop_membership"} +{"question": "SELECT COUNT(*) FROM campuses WHERE county = 'Los Angeles'", "answer": "How many campuses are there in Los Angeles county?\nAdditional table information: table: csu_1"} +{"question": "SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id ORDER BY trust NULLS FIRST LIMIT 1", "answer": "Find the name of the target user with the lowest trust score.\nAdditional table information: table: epinions_1"} +{"question": "SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1", "answer": "Show the authors who have submissions to more than one workshop.\nAdditional table information: table: workshop_paper"} +{"question": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating < 5", "answer": "Find the titles of items that received any rating below 5.\nAdditional table information: table: epinions_1"} +{"question": "SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = 'Pass'", "answer": "Which tests have 'Pass' results? Return the dates when the tests were taken.\nAdditional table information: table: e_learning"} +{"question": "SELECT price_range FROM HOTELS WHERE star_rating_code = '5'", "answer": "Show the price ranges of hotels with 5 star ratings.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T1.staff_id, T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from NULLS FIRST LIMIT 1", "answer": "What is the id and name of the staff who has been assigned for the least amount of time?\nAdditional table information: table: department_store"} +{"question": "SELECT DISTINCT name FROM nurse ORDER BY name NULLS FIRST", "answer": "List the names of all distinct nurses ordered by alphabetical order?\nAdditional table information: table: hospital_1"} +{"question": "SELECT Destruction_Authorised_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID", "answer": "Show the id of each employee and the number of document destruction authorised by that employee.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT Competition_type, COUNT(*) FROM competition GROUP BY Competition_type", "answer": "List the types of competition and the number of competitions of each type.\nAdditional table information: table: sports_competition"} +{"question": "SELECT document_name, access_count FROM documents ORDER BY document_name NULLS FIRST", "answer": "Find the name and access counts of all documents, in alphabetic order of the document name.\nAdditional table information: table: document_management"} +{"question": "SELECT customer_id FROM customers WHERE customer_name LIKE '%Diana%'", "answer": "Find the IDs of customers whose name contains 'Diana'.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT T2.Lname FROM DEPARTMENT AS T1 JOIN FACULTY AS T2 ON T1.DNO = T3.DNO JOIN MEMBER_OF AS T3 ON T2.FacID = T3.FacID WHERE T1.DName = 'Computer Science'", "answer": "Find the last names of faculties who are members of computer science department.\nAdditional table information: table: college_3"} +{"question": "SELECT email FROM user_profiles WHERE name = 'Mary'", "answer": "Find the emails of the user named 'Mary'.\nAdditional table information: table: twitter_1"} +{"question": "SELECT cust_name FROM customer WHERE acc_type = 'saving' INTERSECT SELECT cust_name FROM customer WHERE acc_type = 'checking'", "answer": "Find the name of customers who have both saving and checking account types.\nAdditional table information: table: loan_1"} +{"question": "SELECT name FROM races WHERE YEAR = 2017", "answer": "What are the names of all the races that occurred in the year 2017?\nAdditional table information: table: formula_1"} +{"question": "SELECT name FROM media_types", "answer": "What are the names of all the media types?\nAdditional table information: table: store_1"} +{"question": "SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most common role for the staff?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 3", "answer": "Find the names of the top 3 departments that provide the largest amount of courses?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(*), t1.name FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id GROUP BY t1.manufacturer_id", "answer": "Find the number of funiture types produced by each manufacturer as well as the company names.\nAdditional table information: table: manufacturer"} +{"question": "SELECT player FROM match_season ORDER BY College ASC NULLS FIRST", "answer": "What are all the players who played in match season, sorted by college in ascending alphabetical order?\nAdditional table information: table: match_season"} +{"question": "SELECT LName FROM STUDENT WHERE Sex = 'F' ORDER BY Age DESC", "answer": "Find the last name of female (sex is F) students in the descending order of age.\nAdditional table information: table: college_3"} +{"question": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY SUM(credits) DESC LIMIT 1", "answer": "What is the name of the department with the most credits?\nAdditional table information: table: college_2"} +{"question": "SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name HAVING AVG(Product_Price) < 1000000", "answer": "Find the product names whose average product price is below 1000000.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC", "answer": "List the total points of gymnasts in descending order of floor exercise points.\nAdditional table information: table: gymnast"} +{"question": "SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*) > 1", "answer": "What are the official names of cities that have hosted more than one competition?\nAdditional table information: table: farm"} +{"question": "SELECT SUM(total) FROM invoices WHERE billing_city = 'Chicago' AND billing_state = 'IL'", "answer": "List total amount of invoice from Chicago, IL.\nAdditional table information: table: store_1"} +{"question": "SELECT name FROM Reviewer UNION SELECT title FROM Movie", "answer": "What are the names of all the reviewers and movie names?\nAdditional table information: table: movie_1"} +{"question": "SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code JOIN Projects AS T3 ON T2.project_id = T3.project_id WHERE T3.project_details = 'sint'", "answer": "What are the result description of the project whose detail is 'sint'?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T3.Number_of_hosts > 20", "answer": "Show the host names for parties with number of hosts greater than 20.\nAdditional table information: table: party_host"} +{"question": "SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed", "answer": "Show the ids of all employees who have authorized destruction.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = 'Deputy'", "answer": "Which customers have an insurance policy with the type code 'Deputy'? Give me the customer details.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT AVG(age), job FROM Person WHERE gender = 'male' GROUP BY job", "answer": "What is the average age for a male in each job?\nAdditional table information: table: network_2"} +{"question": "SELECT Party FROM party WHERE NOT Party_ID IN (SELECT Party FROM election)", "answer": "Which parties did not have any delegates in elections?\nAdditional table information: table: election"} +{"question": "SELECT COUNT(*) FROM customers", "answer": "Find the number of customers in total.\nAdditional table information: table: customer_deliveries"} +{"question": "SELECT * FROM College ORDER BY enr NULLS FIRST", "answer": "What information do you have on colleges sorted by increasing enrollment numbers?\nAdditional table information: table: soccer_2"} +{"question": "SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE '%court%'", "answer": "What are the building full names that contain the word 'court'?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT name FROM buildings WHERE NOT id IN (SELECT building_id FROM Office_locations)", "answer": "List the names of buildings that have no company office.\nAdditional table information: table: company_office"} +{"question": "SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'researcher'", "answer": "When did researchers start and stop working?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_from LIKE '2016%'", "answer": "What are the names and genders of staff who were assigned in 2016?\nAdditional table information: table: department_store"} +{"question": "SELECT MIN(seating), MAX(seating), AVG(seating) FROM track", "answer": "Return the minimum, maximum, and average seating across all tracks.\nAdditional table information: table: race_track"} +{"question": "SELECT T1.account_id, T1.date_account_opened, T1.account_name, T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan'", "answer": "Show the id, the account name, and other account details for all accounts by the customer with first name 'Meaghan'.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT firstname FROM teachers WHERE classroom = 110", "answer": "Which teachers teach in classroom 110? Give me their first names.\nAdditional table information: table: student_1"} +{"question": "SELECT cName, enr FROM College WHERE enr > 10000 AND state = 'LA'", "answer": "What are the names and enrollment numbers for colleges that have more than 10000 enrolled and are located in Louisiana?\nAdditional table information: table: soccer_2"} +{"question": "SELECT COUNT(*), major FROM student GROUP BY major", "answer": "Find the number of students in each major.\nAdditional table information: table: dorm_1"} +{"question": "SELECT COUNT order_year FROM \"vehicles\".\"cars\" WHERE fleet_series_quantity = '468-473 (6)'", "answer": "how many times is the fleet series (quantity) is 468-473 (6)? \nAdditional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion"} +{"question": "SELECT DISTINCT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.name = 'Thesisin'", "answer": "What is the names of the physicians who prescribe medication Thesisin?\nAdditional table information: table: hospital_1"} +{"question": "SELECT name FROM people WHERE height < (SELECT AVG(height) FROM people)", "answer": "What are the names of people who are shorter than average?\nAdditional table information: table: candidate_poll"} +{"question": "SELECT T2.name, T2.position FROM department AS T1 JOIN physician AS T2 ON T1.head = T2.EmployeeID GROUP BY departmentID ORDER BY COUNT(departmentID) NULLS FIRST LIMIT 1", "answer": "what is the name and position of the head whose department has least number of employees?\nAdditional table information: table: hospital_1"} +{"question": "SELECT AVG(Profits_billion) FROM Companies", "answer": "Compute the average profits companies make.\nAdditional table information: table: company_office"} +{"question": "SELECT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = 'Nameless , Painless'", "answer": "What are the first and last name of the author who published the paper titled 'Nameless, Painless'?\nAdditional table information: table: icfp_1"} +{"question": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = 'keyboard'", "answer": "What are the distinct names of customers who have purchased a keyboard?\nAdditional table information: table: department_store"} +{"question": "SELECT card_id, customer_id, card_type_code, card_number FROM Customers_cards", "answer": "What are card ids, customer ids, card types, and card numbers for each customer card?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT Name FROM phone WHERE Carrier = 'Sprint' OR Carrier = 'TMobile'", "answer": "Show the names of phones with carrier either 'Sprint' or 'TMobile'.\nAdditional table information: table: phone_market"} +{"question": "SELECT country, COUNT(*) FROM airlines GROUP BY country ORDER BY COUNT(*) DESC", "answer": "How many airlines operate out of each country in descending order?\nAdditional table information: table: flight_4"} +{"question": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id", "answer": "Find distinct cities of addresses of people?\nAdditional table information: table: student_assessment"} +{"question": "SELECT MIN(distance), AVG(distance), MAX(distance) FROM Aircraft", "answer": "What is the minimum, average, and maximum distance of all aircrafts.\nAdditional table information: table: flight_1"} +{"question": "SELECT MAX(t1.low_temperature), AVG(t1.precipitation) FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id WHERE t2.network_name = 'Amersham'", "answer": "Give me the maximum low temperature and average precipitation at the Amersham station.\nAdditional table information: table: station_weather"} +{"question": "SELECT COUNT(*) FROM company", "answer": "What is the total number of companies?\nAdditional table information: table: gas_company"} +{"question": "SELECT donator_name, SUM(amount) FROM endowment GROUP BY donator_name ORDER BY SUM(amount) DESC", "answer": "List each donator name and the amount of endowment in descending order of the amount of endowment.\nAdditional table information: table: school_finance"} +{"question": "SELECT COUNT(DISTINCT Company) FROM entrepreneur", "answer": "Count the number of different companies.\nAdditional table information: table: entrepreneur"} +{"question": "SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer'", "answer": "When are the birthdays of customer who are classified as 'Good Customer' status?\nAdditional table information: table: driving_school"} +{"question": "SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC", "answer": "List names of all pilot aged 30 or younger in descending alphabetical order.\nAdditional table information: table: aircraft"} +{"question": "SELECT party, COUNT(*) FROM driver GROUP BY party", "answer": "Show the party and the number of drivers in each party.\nAdditional table information: table: school_bus"} +{"question": "SELECT problem_id FROM problems WHERE date_problem_reported < '1978-06-26'", "answer": "What are the ids of the problems which are reported before 1978-06-26?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = 'white'", "answer": "List all the product names with the color description 'white'.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT payment_date FROM payment ORDER BY payment_date ASC NULLS FIRST LIMIT 1", "answer": "What was the date of the earliest payment?\nAdditional table information: table: sakila_1"} +{"question": "SELECT T1.name_first, T1.name_last, T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 3", "answer": "Find the first name, last name and id for the top three players won the most player awards.\nAdditional table information: table: baseball_1"} +{"question": "SELECT T1.duration, T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = 'pop' ORDER BY T2.song_name NULLS FIRST", "answer": "What is the duration, file size, and song format for every pop song, ordered by title alphabetically?\nAdditional table information: table: music_1"} +{"question": "SELECT COUNT(*) FROM customer_orders WHERE order_details = 'Second time'", "answer": "Tell me the number of orders with 'Second time' as order detail.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T1.first_name, T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total NULLS FIRST LIMIT 10", "answer": "What are the first and last names of the customers with the 10 cheapest invoices?\nAdditional table information: table: store_1"} +{"question": "SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID = T2.nurse", "answer": "What are the distinct names of nurses on call?\nAdditional table information: table: hospital_1"} +{"question": "SELECT T1.department_id, T1.name, COUNT(*) FROM management AS T2 JOIN department AS T1 ON T1.department_id = T2.department_id GROUP BY T1.department_id HAVING COUNT(*) > 1", "answer": "Which department has more than 1 head at a time? List the id, name and the number of heads.\nAdditional table information: table: department_management"} +{"question": "SELECT Name FROM pilot ORDER BY Name ASC NULLS FIRST", "answer": "What are the names of the pilots in alphabetical order?\nAdditional table information: table: aircraft"} +{"question": "SELECT COUNT(*) FROM Apartments WHERE NOT apt_id IN (SELECT apt_id FROM Apartment_Facilities)", "answer": "How many apartments do not have any facility?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.region_name = 'Denmark'", "answer": "Show all storm names affecting region 'Denmark'.\nAdditional table information: table: storm_record"} +{"question": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num GROUP BY T2.stu_num HAVING COUNT(*) = 1", "answer": "Find the first names of students who took exactly one class.\nAdditional table information: table: college_1"} +{"question": "SELECT T2.title, T1.stars, T2.director, MAX(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE director <> 'null' GROUP BY director", "answer": "For each director, return the director's name together with the title of the movie they directed that received the highest rating among all of their movies, and the value of that rating. Ignore movies whose director is NULL.\nAdditional table information: table: movie_1"} +{"question": "SELECT first_name FROM people ORDER BY first_name NULLS FIRST", "answer": "List the first names of people in alphabetical order?\nAdditional table information: table: student_assessment"} +{"question": "SELECT Police_force, COUNT(*) FROM county_public_safety GROUP BY Police_force", "answer": "How many counties correspond to each police force?\nAdditional table information: table: county_public_safety"} +{"question": "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 NULLS FIRST, T1.Name NULLS FIRST", "answer": "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.\nAdditional table information: table: scientist_1"} +{"question": "SELECT T1.account_id, T2.account_name FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id HAVING COUNT(*) >= 4", "answer": "Show the account id and name with at least 4 transactions.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT AVG(pages_per_minute_color) FROM product", "answer": "What is the average number of pages per minute color?\nAdditional table information: table: store_product"} +{"question": "SELECT Name FROM artwork ORDER BY Name ASC NULLS FIRST", "answer": "List the name of artworks in ascending alphabetical order.\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT employee_name FROM Employees WHERE role_code = 'HR'", "answer": "Show the names of all the employees with role 'HR'.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT AVG(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.city_code = 'NYC' AND T2.Election_Cycle = 'Spring'", "answer": "Find the average age of students who live in the city with code 'NYC' and have secretary votes in the spring election cycle.\nAdditional table information: table: voter_2"} +{"question": "SELECT COUNT(*) FROM list", "answer": "How many students are there?\nAdditional table information: table: student_1"} +{"question": "SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId GROUP BY T2.MediaTypeId ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What is the name of the media type that is least common across all tracks?\nAdditional table information: table: chinook_1"} +{"question": "SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts", "answer": "What are the customer ids for customers who do not have an account?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT COUNT(*) FROM products WHERE product_category_code = 'Spices' AND typical_buying_price > 1000", "answer": "Find the number of products with category 'Spices' and typically sold above 1000.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT T1.Name FROM Tourist_Attractions AS T1, VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Alison' EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1, VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Rosalind'", "answer": "Find the the names of the tourist attractions that the tourist named Alison visited but Rosalind did not visit.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T2.FirstName, T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.FirstName = 'Leonie'", "answer": "Find the full names of employees who help customers with the first name Leonie.\nAdditional table information: table: chinook_1"} +{"question": "SELECT Zip_code FROM county WHERE County_name = 'Howard'", "answer": "Show the zip code of the county with name 'Howard'.\nAdditional table information: table: election"} +{"question": "SELECT title FROM course WHERE dept_name = 'Statistics' INTERSECT SELECT title FROM course WHERE dept_name = 'Psychology'", "answer": "What is the title of a course that is listed in both the Statistics and Psychology departments?\nAdditional table information: table: college_2"} +{"question": "SELECT T1.subject_id, T2.subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) ASC NULLS FIRST", "answer": "List the subject ID, name of subject and the number of courses available for each subject in ascending order of the course counts.\nAdditional table information: table: e_learning"} +{"question": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t3.order_quantity = (SELECT MAX(order_quantity) FROM order_items)", "answer": "What is the name of the customer that made the order with the largest quantity?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND faculty > (SELECT MAX(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = 'Orange')", "answer": "What are the names of the campus that have more faculties in 2002 than the maximum number in Orange county?\nAdditional table information: table: csu_1"} +{"question": "SELECT Name FROM climber ORDER BY Points DESC", "answer": "What are the names of the climbers, ordered by points descending?\nAdditional table information: table: climbing"} +{"question": "SELECT Support_rate, Consider_rate, Oppose_rate FROM candidate ORDER BY unsure_rate NULLS FIRST", "answer": "What are the support, consider, and oppose rates of each candidate, ordered ascending by their unsure rate?\nAdditional table information: table: candidate_poll"} +{"question": "SELECT AVG(Price), AVG(Score), Appelation FROM WINE GROUP BY Appelation", "answer": "What are the average price and score of wines for each appelation?\nAdditional table information: table: wine_1"} +{"question": "SELECT DISTINCT city_code FROM Student", "answer": "Show all cities where students live.\nAdditional table information: table: allergy_1"} +{"question": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent'", "answer": "What are the details of the project that is producing both patents and papers as outcomes?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals'", "answer": "List players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007.\nAdditional table information: table: baseball_1"} +{"question": "SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = 'Professor'", "answer": "Which students have professors as their advisors? Find their student ids.\nAdditional table information: table: activity_1"} +{"question": "SELECT theme, YEAR FROM exhibition ORDER BY ticket_price DESC", "answer": "What are the themes and years for exhibitions, sorted by ticket price descending?\nAdditional table information: table: theme_gallery"} +{"question": "SELECT T4.dept_name FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code GROUP BY T3.dept_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the department with the most students enrolled?\nAdditional table information: table: college_1"} +{"question": "SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name HAVING AVG(T1.price) >= 150", "answer": "Select the names of manufacturer whose products have an average price higher than or equal to $150.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT COUNT(*) FROM papers", "answer": "Count the number of total papers.\nAdditional table information: table: icfp_1"} +{"question": "SELECT COUNT(DISTINCT Governor) FROM party", "answer": "How many distinct governors are there?\nAdditional table information: table: election"} +{"question": "SELECT Name FROM ship ORDER BY Tonnage ASC NULLS FIRST", "answer": "what are the names of the ships ordered by ascending tonnage?\nAdditional table information: table: ship_mission"} +{"question": "SELECT date, zip_code FROM weather WHERE min_dew_point_f < (SELECT MIN(min_dew_point_f) FROM weather WHERE zip_code = 94107)", "answer": "Which days had a minimum dew point smaller than any day in zip code 94107, and in which zip codes were those measurements taken?\nAdditional table information: table: bike_1"} +{"question": "SELECT name FROM club ORDER BY Start_year ASC NULLS FIRST", "answer": "List all club names in ascending order of start year.\nAdditional table information: table: sports_competition"} +{"question": "SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID", "answer": "List the name of physicians who never took any appointment.\nAdditional table information: table: hospital_1"} +{"question": "SELECT date_became_customer FROM Customers WHERE first_name = 'Carole' AND last_name = 'Bernhard'", "answer": "When did Carole Bernhard first become a customer?\nAdditional table information: table: driving_school"} +{"question": "SELECT date, cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5", "answer": "What are the dates that had the top 5 cloud cover rates? Also tell me the cloud cover rate.\nAdditional table information: table: bike_1"} +{"question": "SELECT COUNT(*) FROM Projects", "answer": "How many projects are there?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT COUNT(*) FROM country WHERE NOT country_id IN (SELECT country_id FROM roller_coaster WHERE LENGTH > 3000)", "answer": "How many countries do not have an roller coaster longer than 3000?\nAdditional table information: table: roller_coaster"} +{"question": "SELECT product_name FROM products WHERE product_category_code = 'Spices'", "answer": "Return the names of products in the category 'Spices'.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = 'Heilo' AND T3.title = 'Badlands'", "answer": "What instrument did the musician with last name 'Heilo' use in the song 'Badlands'?\nAdditional table information: table: music_2"} +{"question": "SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10", "answer": "What are the department ids for which more than 10 employees had a commission?\nAdditional table information: table: hr_1"} +{"question": "SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T1.Total_Points > 57.5", "answer": "What are the distinct hometowns of gymnasts with total points more than 57.5?\nAdditional table information: table: gymnast"} +{"question": "SELECT customer_id, customer_first_name, customer_last_name, customer_phone FROM Customers", "answer": "Show ids, first names, last names, and phones for all customers.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT Fname FROM Student WHERE Major = 600", "answer": "What are the first names for all students who are from the major numbered 600?\nAdditional table information: table: game_1"} +{"question": "SELECT Major FROM STUDENT GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the major that is studied by the largest number of students.\nAdditional table information: table: voter_2"} +{"question": "SELECT Lname FROM FACULTY WHERE Building = 'Barton' ORDER BY Lname NULLS FIRST", "answer": "What are the last names of faculty in building Barton, sorted by last name?\nAdditional table information: table: college_3"} +{"question": "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'", "answer": "Which customers have both 'On Road' and 'Shipped' as order status? List the customer names.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT MAX(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'", "answer": "List the maximum scores of the team Boston Red Stockings when the team won in postseason?\nAdditional table information: table: baseball_1"} +{"question": "SELECT school_name, LOCATION, mascot FROM school", "answer": "List the name, location, mascot for all schools.\nAdditional table information: table: school_finance"} +{"question": "SELECT Allergy, COUNT(*) FROM Has_allergy GROUP BY Allergy", "answer": "How many students have each different allergy?\nAdditional table information: table: allergy_1"} +{"question": "SELECT COUNT(*) FROM Band", "answer": "How many bands are there?\nAdditional table information: table: music_2"} +{"question": "SELECT g_name, rating FROM genre ORDER BY g_name NULLS FIRST", "answer": "List the names of all genres in alphabetical oder, together with its ratings.\nAdditional table information: table: music_1"} +{"question": "SELECT title FROM course WHERE dept_name = 'Statistics' EXCEPT SELECT title FROM course WHERE dept_name = 'Psychology'", "answer": "Find the title of course that is provided by Statistics but not Psychology departments.\nAdditional table information: table: college_2"} +{"question": "SELECT name FROM PersonFriend WHERE friend = 'Alice' AND YEAR = (SELECT MIN(YEAR) FROM PersonFriend WHERE friend = 'Alice')", "answer": "Find the name of persons who are friends with Alice for the shortest years.\nAdditional table information: table: network_2"} +{"question": "SELECT gtype, COUNT(*) FROM Video_games GROUP BY gtype", "answer": "What are the types of video games and how many are in each type?\nAdditional table information: table: game_1"} +{"question": "SELECT rID FROM Reviewer WHERE name LIKE '%Mike%'", "answer": "What is the id of the reviewer whose name has substring \u201cMike\u201d?\nAdditional table information: table: movie_1"} +{"question": "SELECT apt_number, room_count FROM Apartments", "answer": "What are the apartment number and the room count of each apartment?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT name FROM people ORDER BY date_of_birth NULLS FIRST", "answer": "List all people names in the order of their date of birth from old to young.\nAdditional table information: table: candidate_poll"} +{"question": "SELECT T2.name, AVG(T1.age) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend GROUP BY T2.name ORDER BY AVG(T1.age) DESC LIMIT 1", "answer": "What is the name of the person who has the oldest average age for their friends, and what is that average age?\nAdditional table information: table: network_2"} +{"question": "SELECT COUNT(*), nationality FROM constructors GROUP BY nationality", "answer": "What are the numbers of constructors for different nationalities?\nAdditional table information: table: formula_1"} +{"question": "SELECT Fname, Lname, Age FROM Student WHERE Sex = 'F'", "answer": "Show first name, last name, age for all female students. Their sex is F.\nAdditional table information: table: allergy_1"} +{"question": "SELECT DISTINCT T2.name, T2.friend, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT AVG(age) FROM person)", "answer": "Whare the names, friends, and ages of all people who are older than the average age of a person?\nAdditional table information: table: network_2"} +{"question": "SELECT COUNT(*) FROM Activity", "answer": "How many activities do we have?\nAdditional table information: table: activity_1"} +{"question": "SELECT district_name FROM district ORDER BY city_area ASC NULLS FIRST LIMIT 1", "answer": "Which district has the least area?\nAdditional table information: table: store_product"} +{"question": "SELECT COUNT(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Art' AND T2.customer_last_name = 'Turcotte'", "answer": "How many cards does customer Art Turcotte have?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT T1.first_name, T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the full name of the employee who has the most customers?\nAdditional table information: table: store_1"} +{"question": "SELECT classroom, COUNT(*) FROM list WHERE grade = '4' GROUP BY classroom", "answer": "For each fourth-grade classroom, show the classroom number and the total number of students using it.\nAdditional table information: table: student_1"} +{"question": "SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id", "answer": "How many accounts are there for each customer id?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT TIME FROM elimination WHERE Eliminated_By = 'Punk' OR Eliminated_By = 'Orton'", "answer": "What are the times of elimination for any instances in which the elimination was done by Punk or Orton?\nAdditional table information: table: wrestler"} +{"question": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte'", "answer": "What are names of customers who never ordered product Latte.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT state FROM customers GROUP BY state ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Which state has the most customers?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT name, price FROM products", "answer": "What are the names and prices of all products in the store?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT T1.campus, SUM(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T1.county = 'Orange' AND T2.year >= 2000 GROUP BY T1.campus", "answer": "For each Orange county campus, report the number of degrees granted after 2000.\nAdditional table information: table: csu_1"} +{"question": "SELECT Player_name FROM player ORDER BY Votes DESC LIMIT 1", "answer": "What is the name of the player with the largest number of votes?\nAdditional table information: table: riding_club"} +{"question": "SELECT AVG(price) FROM products", "answer": "What is the average price across all products?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT document_id FROM Documents WHERE document_type_code = 'CV' EXCEPT SELECT document_id FROM Documents_with_expenses", "answer": "Show ids for all documents in type CV without expense budgets.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT COUNT(DISTINCT source_system_code) FROM CMI_cross_references", "answer": "How many different source system code for the cmi cross references are there?\nAdditional table information: table: local_govt_mdm"} +{"question": "SELECT MIN(salary), dept_name FROM instructor GROUP BY dept_name HAVING AVG(salary) > (SELECT AVG(salary) FROM instructor)", "answer": "What is the lowest salary in departments with average salary greater than the overall average.\nAdditional table information: table: college_2"} +{"question": "SELECT DISTINCT title FROM Movie EXCEPT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Chris Jackson'", "answer": "Find the titles of all movies not reviewed by Chris Jackson.\nAdditional table information: table: movie_1"} +{"question": "SELECT T1.customer_name FROM customers AS T1, orders AS T2, 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", "answer": "List the names of the customers who have once bought product 'food'.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t2.customer_details = 'Dayana Robel'", "answer": "Find all the policy type codes associated with the customer 'Dayana Robel'\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = 'Japan' AND t2.authorder = 1 AND t1.lname = 'Ohori'", "answer": "Which papers' first author is affiliated with an institution in the country 'Japan' and has last name 'Ohori'? Give me the titles of the papers.\nAdditional table information: table: icfp_1"} +{"question": "SELECT Election_Cycle, COUNT(*) FROM VOTING_RECORD GROUP BY Election_Cycle", "answer": "For each election cycle, report the number of voting records.\nAdditional table information: table: voter_2"} +{"question": "SELECT Issue_Date FROM volume ORDER BY Weeks_on_Top ASC NULLS FIRST LIMIT 1", "answer": "What is the issue date of the volume with the minimum weeks on top?\nAdditional table information: table: music_4"} +{"question": "SELECT Headquarters FROM company GROUP BY Headquarters ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common headquarter for companies.\nAdditional table information: table: company_employee"} +{"question": "SELECT name, CLASS FROM ship WHERE NOT ship_id IN (SELECT ship_id FROM captain)", "answer": "Return the names and classes of ships that do not have a captain?\nAdditional table information: table: ship_1"} +{"question": "SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Tokohu University'", "answer": "How many papers are published by the institution 'Tokohu University'?\nAdditional table information: table: icfp_1"} +{"question": "SELECT T1.transaction_type_description FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code GROUP BY T1.transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the description of the transaction type that occurs most frequently.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT shipping_agent_name FROM Ref_Shipping_Agents", "answer": "What are the shipping agent names?\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1", "answer": "What is the song in the volume with the maximum weeks on top?\nAdditional table information: table: music_4"} +{"question": "SELECT origin FROM program ORDER BY origin NULLS FIRST", "answer": "List all program origins in the alphabetical order.\nAdditional table information: table: program_share"} +{"question": "SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Please show the nominee who has been nominated the greatest number of times.\nAdditional table information: table: musical"} +{"question": "SELECT AVG(Price), manufacturer FROM Products GROUP BY manufacturer", "answer": "What are the average prices of products, grouped by manufacturer code?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT address FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards'", "answer": "What is the address of employee Nancy Edwards?\nAdditional table information: table: store_1"} +{"question": "SELECT cust_name FROM customer ORDER BY credit_score NULLS FIRST LIMIT 1", "answer": "Find the name of customer who has the lowest credit score.\nAdditional table information: table: loan_1"} +{"question": "SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name HAVING AVG(Product_Price) < 1000000", "answer": "What are the product names with average product price smaller than 1000000?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN Prescribes AS T3 ON T3.Patient = T2.SSN JOIN Medication AS T4 ON T3.Medication = T4.Code WHERE room = 111", "answer": "Find the name of medication used on the patient who stays in room 111?\nAdditional table information: table: hospital_1"} +{"question": "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", "answer": "Find the maximum price of wins from the appelations in Central Coast area and produced before the year of 2005.\nAdditional table information: table: wine_1"} +{"question": "SELECT player_api_id FROM Player WHERE height >= 180 AND height <= 190 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE preferred_foot = 'left'", "answer": "List all of the ids for left-footed players with a height between 180cm and 190cm.\nAdditional table information: table: soccer_1"} +{"question": "SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid HAVING SUM(hours_played) >= 1000", "answer": "Show all game names played by at least 1000 hours.\nAdditional table information: table: game_1"} +{"question": "SELECT COUNT(*) FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid WHERE T3.Title = 'Flash'", "answer": "How many musicians play in the song 'Flash'?\nAdditional table information: table: music_2"} +{"question": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' AND t3.sex = 'M'", "answer": "What are the first name and last name of each male member in club 'Hopkins Student Enterprises'?\nAdditional table information: table: club_1"} +{"question": "SELECT T2.Store_Name FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.City_Town = 'Feliciaberg'", "answer": "Return the the names of the drama workshop groups that are located in Feliciaberg city.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT T3.location, T3.Representative_Name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id ORDER BY T2.Assets_billion DESC LIMIT 3", "answer": "What are the locations and representatives' names of the gas stations owned by the companies with the 3 largest amounts of assets?\nAdditional table information: table: gas_company"} +{"question": "SELECT T1.title, T3.name FROM course AS T1 JOIN teaches AS T2 ON T1.course_id = T2.course_id JOIN instructor AS T3 ON T2.id = T3.id WHERE YEAR = 2008 ORDER BY T1.title NULLS FIRST", "answer": "Show all titles and their instructors' names for courses in 2008, in alphabetical order by title.\nAdditional table information: table: college_2"} +{"question": "SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'Red' AND T2.price > 50", "answer": "What are the names of wines made from red grapes and with prices above 50?\nAdditional table information: table: wine_1"} +{"question": "SELECT T1.name, T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the salaray and name of the employee that is certified to fly the most planes?\nAdditional table information: table: flight_1"} +{"question": "SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1", "answer": "Which authors have submitted to more than one workshop?\nAdditional table information: table: workshop_paper"} +{"question": "SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS'", "answer": "What are the names of the channels owned by CCTV or HBS?\nAdditional table information: table: program_share"} +{"question": "SELECT role_description FROM ROLES WHERE role_name = 'Proof Reader'", "answer": "Show the description for role name 'Proof Reader'.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT COUNT(*) FROM Companies", "answer": "Count the number of companies.\nAdditional table information: table: company_office"} +{"question": "SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = 'Badlands' AND T1.StagePosition = 'back'", "answer": "What are the first and last names of the performer who was in the back stage position for the song 'Badlands'?\nAdditional table information: table: music_2"} +{"question": "SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4", "answer": "What are the facility codes of the apartments with more than four bedrooms?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT transaction_id FROM TRANSACTIONS WHERE transaction_type_code = 'PUR'", "answer": "Show all transaction ids with transaction code 'PUR'.\nAdditional table information: table: tracking_share_transactions"} +{"question": "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'", "answer": "What is zip code of customer with first name as Carole and last name as Bernhard?\nAdditional table information: table: driving_school"} +{"question": "SELECT name, flag FROM ship WHERE NOT ship_id IN (SELECT ship_id FROM captain WHERE rank = 'Midshipman')", "answer": "What are the names and flags of ships that do not have a captain with the rank of Midshipman?\nAdditional table information: table: ship_1"} +{"question": "SELECT DISTINCT characteristic_name FROM CHARACTERISTICS", "answer": "What are the different names of the product characteristics?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT T1.City_Town, COUNT(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T1.City_Town", "answer": "Show all cities along with the number of drama workshop groups in each city.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT Name FROM member WHERE NOT Member_ID IN (SELECT Member_ID FROM member_attendance)", "answer": "List the names of members who did not attend any performance.\nAdditional table information: table: performance_attendance"} +{"question": "SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester = 'Fall' AND YEAR = 2003)", "answer": "Find the names of students who have taken any course in the fall semester of year 2003.\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(DISTINCT T2.camera_lens_id) FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.country = 'Ethiopia'", "answer": "How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'?\nAdditional table information: table: mountain_photos"} +{"question": "SELECT T2.Name, T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID ORDER BY T2.Name ASC NULLS FIRST", "answer": "Show the names of members and the location of performances they attended in ascending alphabetical order of their names.\nAdditional table information: table: performance_attendance"} +{"question": "SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T2.first_name = 'Lyla'", "answer": "What is the zip code of the address where the teacher with first name 'Lyla' lives?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT COUNT(*), city FROM airports WHERE country = 'United States' GROUP BY city ORDER BY COUNT(*) DESC", "answer": "How many airports are there per city in the United States? Order the cities by decreasing number of airports.\nAdditional table information: table: flight_4"} +{"question": "SELECT LOCATION, COUNT(*) FROM performance GROUP BY LOCATION", "answer": "Show different locations and the number of performances at each location.\nAdditional table information: table: performance_attendance"} +{"question": "SELECT DISTINCT T1.Major FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote", "answer": "What are the distinct majors that students with treasurer votes are studying?\nAdditional table information: table: voter_2"} +{"question": "SELECT T3.Fname, T3.LName, T2.gradepoint FROM ENROLLED_IN AS T1, GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID", "answer": "What are the full names and gradepoints for all enrollments?\nAdditional table information: table: college_3"} +{"question": "SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1", "answer": "Return the duration of the actor with the greatest age.\nAdditional table information: table: musical"} +{"question": "SELECT COUNT(*) FROM inventory WHERE store_id = 1", "answer": "How many items in inventory does store 1 have?\nAdditional table information: table: sakila_1"} +{"question": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) EXCEPT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30)", "answer": "Find the name of the person who has friends with age above 40 but not under age 30?\nAdditional table information: table: network_2"} +{"question": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT AVG(balance) FROM checking) INTERSECT SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM savings)", "answer": "Find the names of accounts whose checking balance is above the average checking balance, but savings balance is below the average savings balance.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT job_id FROM job_history WHERE end_date - start_date > 300 GROUP BY job_id HAVING COUNT(*) >= 2", "answer": "display job ID for those jobs that were done by two or more for more than 300 days.\nAdditional table information: table: hr_1"} +{"question": "SELECT organized_by, name FROM church WHERE open_date BETWEEN 1830 AND 1840", "answer": "Show the organizer and name for churches that opened between 1830 and 1840.\nAdditional table information: table: wedding"} +{"question": "SELECT Name, Party FROM representative", "answer": "What are the names and parties of representatives?\nAdditional table information: table: election_representative"} +{"question": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%'", "answer": "Find the name of rooms booked by some customers whose first name contains ROY.\nAdditional table information: table: inn_1"} +{"question": "SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid", "answer": "How many players enter hall of fame each year?\nAdditional table information: table: baseball_1"} +{"question": "SELECT AVG(Order_Quantity) FROM Invoices WHERE payment_method_code = 'MasterCard'", "answer": "Check the invoices record and compute the average quantities ordered with the payment method 'MasterCard'.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT COUNT(DISTINCT Country) FROM climber", "answer": "How many distinct countries are the climbers from?\nAdditional table information: table: climbing"} +{"question": "SELECT store_id FROM inventory GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the id of the store that has the most items in inventory?\nAdditional table information: table: sakila_1"} +{"question": "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'", "answer": "Find the names of the customers who have order status both 'On Road' and 'Shipped'.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name HAVING COUNT(*) >= 1", "answer": "What is the name and country of origin for each artist who has released a song with a resolution higher than 900?\nAdditional table information: table: music_1"} +{"question": "SELECT DISTINCT T1.EMP_FNAME, T1.EMP_DOB FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE CRS_CODE = 'ACCT-211'", "answer": "What are the first names and date of birth of professors teaching course ACCT-211?\nAdditional table information: table: college_1"} +{"question": "SELECT dept_name FROM department ORDER BY budget NULLS FIRST LIMIT 1", "answer": "Which department has the lowest budget?\nAdditional table information: table: college_2"} +{"question": "SELECT T1.first_name, T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY T2.invoice_date DESC LIMIT 5", "answer": "Find out 5 customers who most recently purchased something. List customers' first and last name.\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(*) FROM users WHERE user_login = 1", "answer": "Count the number of users that are logged in.\nAdditional table information: table: document_management"} +{"question": "SELECT AVG(age), gender FROM Person GROUP BY gender", "answer": "How old is each gender, on average?\nAdditional table information: table: network_2"} +{"question": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte'", "answer": "Find the names of customers who never ordered product Latte.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > 3000", "answer": "What are the names of customers who have a loan of more than 3000 in amount?\nAdditional table information: table: loan_1"} +{"question": "SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1", "answer": "Return the highest acc percent across all basketball matches.\nAdditional table information: table: university_basketball"} +{"question": "SELECT COUNT(*) FROM tryout WHERE decision = 'yes'", "answer": "How many students got accepted after the tryout?\nAdditional table information: table: soccer_2"} +{"question": "SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the hometown that is most common among gymnasts.\nAdditional table information: table: gymnast"} +{"question": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown <> 'Santo Domingo'", "answer": "What are the names of gymnasts whose hometown is not 'Santo Domingo'?\nAdditional table information: table: gymnast"} +{"question": "SELECT billing_country, AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10", "answer": "A list of the top 10 countries by average invoice size. List country name and average invoice size.\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.level = 6", "answer": "What are the total purchases for members rated at level 6?\nAdditional table information: table: shop_membership"} +{"question": "SELECT customer_id, customer_name FROM customers ORDER BY customer_id ASC NULLS FIRST", "answer": "What is the ordered list of customer ids?\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT COUNT(*) FROM book_club", "answer": "Count the number of book clubs.\nAdditional table information: table: culture_company"} +{"question": "SELECT T2.Pilot_name, COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name HAVING COUNT(*) > 1", "answer": "Show names of pilots that have more than one record.\nAdditional table information: table: pilot_record"} +{"question": "SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%'", "answer": "Find the category descriptions of the products whose descriptions include letter 't'.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT f_id FROM files WHERE formats = 'mp4' INTERSECT SELECT f_id FROM song WHERE resolution < 1000", "answer": "Find the id of songs that are available in mp4 format and have resolution lower than 1000.\nAdditional table information: table: music_1"} +{"question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy", "answer": "Which students are unaffected by allergies?\nAdditional table information: table: allergy_1"} +{"question": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = 'warm'", "answer": "List the all the distinct names of the products with the characteristic name 'warm'.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1", "answer": "What is the name of the ship with the largest tonnage?\nAdditional table information: table: ship_mission"} +{"question": "SELECT MIN(age), job FROM Person GROUP BY job", "answer": "How old is the youngest person for each job?\nAdditional table information: table: network_2"} +{"question": "SELECT T1.supplier_name, T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id = T2.supplier_id JOIN addresses AS T3 ON T2.address_id = T3.address_id ORDER BY T3.address_details NULLS FIRST", "answer": "List the name and phone number of all suppliers in the alphabetical order of their addresses.\nAdditional table information: table: department_store"} +{"question": "SELECT COUNT(DISTINCT customer_id) FROM customer_orders WHERE order_status = 'Cancelled'", "answer": "How many customers have at least one order with status 'Cancelled'?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT AVG(UnitPrice) FROM TRACK", "answer": "What is the average unit price of all the tracks?\nAdditional table information: table: chinook_1"} +{"question": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Boeing 737-800' INTERSECT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Airbus A340-300'", "answer": "Show names for all employees who have certificates on both Boeing 737-800 and Airbus A340-300.\nAdditional table information: table: flight_1"} +{"question": "SELECT Name FROM pilot WHERE Age >= 25", "answer": "What are the name of pilots aged 25 or older?\nAdditional table information: table: aircraft"} +{"question": "SELECT COUNT(DISTINCT claim_outcome_code) FROM claims_processing", "answer": "Count the number of distinct claim outcome codes.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING COUNT(*) < 3", "answer": "What are the codes corresponding to document types for which there are less than 3 documents?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1", "answer": "Which park had most attendances in 2008?\nAdditional table information: table: baseball_1"} +{"question": "SELECT name, price FROM products WHERE price >= 180 ORDER BY price DESC, name ASC NULLS FIRST", "answer": "Select the name and price of all products with a price larger than or equal to $180, and sort first by price (in descending order), and then by name (in ascending order).\nAdditional table information: table: manufactory_1"} +{"question": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Which allergy type has least number of allergies?\nAdditional table information: table: allergy_1"} +{"question": "SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park'", "answer": "Count the number of games taken place in park 'Columbia Park' in 1907.\nAdditional table information: table: baseball_1"} +{"question": "SELECT Pilot_name FROM pilot ORDER BY Rank ASC NULLS FIRST", "answer": "List the names of pilots in ascending order of rank.\nAdditional table information: table: pilot_record"} +{"question": "SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995", "answer": "What are the types of film market estimations in year 1995?\nAdditional table information: table: film_rank"} +{"question": "SELECT T2.Name, T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested NULLS FIRST", "answer": "List the names of entrepreneurs and their companies in descending order of money requested?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the name of the building that has the most company offices.\nAdditional table information: table: company_office"} +{"question": "SELECT bedType, COUNT(*) FROM Rooms GROUP BY bedType", "answer": "What are the number of rooms for each bed type?\nAdditional table information: table: inn_1"} +{"question": "SELECT COUNT(*) FROM user_profiles", "answer": "How many users are there?\nAdditional table information: table: twitter_1"} +{"question": "SELECT player, number_of_matches, SOURCE FROM injury_accident WHERE injury <> 'Knee problem'", "answer": "What are the player name, number of matches, and information source for players who do not suffer from injury of 'Knee problem'?\nAdditional table information: table: game_injury"} +{"question": "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", "answer": "What is the name of the customer who has the most orders?\nAdditional table information: table: tracking_orders"} +{"question": "SELECT Name FROM WINE WHERE Price > (SELECT MAX(Price) FROM WINE WHERE YEAR = 2006)", "answer": "What are the names of wines that are more expensive then all wines made in the year 2006?\nAdditional table information: table: wine_1"} +{"question": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%'", "answer": "What are the name of rooms booked by customers whose first name has 'ROY' in part?\nAdditional table information: table: inn_1"} +{"question": "SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested DESC", "answer": "What are the weights of entrepreneurs in descending order of money requested?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 300", "answer": "What are the names of body builders whose total score is higher than 300?\nAdditional table information: table: body_builder"} +{"question": "SELECT name FROM camera_lens WHERE name LIKE '%Digital%'", "answer": "List the camera lens names containing substring 'Digital'.\nAdditional table information: table: mountain_photos"} +{"question": "SELECT COUNT(DISTINCT course_id) FROM course WHERE dept_name = 'Physics'", "answer": "How many different courses offered by Physics department?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(DISTINCT Hometown) FROM people", "answer": "Count the number of different hometowns of these people.\nAdditional table information: table: gymnast"} +{"question": "SELECT name, salary FROM Employee WHERE eid = 242518965", "answer": "What is the name and salary for employee with id 242518965?\nAdditional table information: table: flight_1"} +{"question": "SELECT MAX(home_games), MIN(home_games), AVG(home_games) FROM stadium", "answer": "What are the maximum, minimum and average home games each stadium held?\nAdditional table information: table: game_injury"} +{"question": "SELECT SUM(revenue) FROM manufacturers WHERE revenue > (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin')", "answer": "Find the total revenue of companies whose revenue is larger than the revenue of some companies based in Austin.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Accounts)", "answer": "Count the number of customers who do not have an account.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT Country FROM mountain WHERE Height > 5000", "answer": "Return the countries of the mountains that have a height larger than 5000.\nAdditional table information: table: climbing"} +{"question": "SELECT COUNT(*) FROM products WHERE price >= 180", "answer": "Compute the number of products with a price larger than or equal to $180.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT campus FROM campuses WHERE LOCATION = 'Chico'", "answer": "What campuses are located in Chico?\nAdditional table information: table: csu_1"} +{"question": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which game type has most number of games?\nAdditional table information: table: game_1"} +{"question": "SELECT COUNT(*), cName FROM tryout GROUP BY cName ORDER BY COUNT(*) DESC", "answer": "Find the number of students who participate in the tryout for each college ordered by descending count.\nAdditional table information: table: soccer_2"} +{"question": "SELECT location_code, COUNT(*) FROM Document_locations GROUP BY location_code", "answer": "What is the code of each location and the number of documents in that location?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT first_name, last_name FROM employees WHERE department_id = 70 OR department_id = 90", "answer": "What are the full names of employees who with in department 70 or 90?\nAdditional table information: table: hr_1"} +{"question": "SELECT T1.name, T1.id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING AVG(T2.bikes_available) > 14 UNION SELECT name, id FROM station WHERE installation_date LIKE '12/%'", "answer": "What are the names and ids of all stations that have more than 14 bikes available on average or had bikes installed in December?\nAdditional table information: table: bike_1"} +{"question": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = 'catnip'", "answer": "Give the color description for the product 'catnip'.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT SUM(settlement_amount), AVG(settlement_amount) FROM settlements", "answer": "Find the total and average amount of settlements.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT name FROM people WHERE height < (SELECT AVG(height) FROM people)", "answer": "find the name of people whose height is lower than the average.\nAdditional table information: table: candidate_poll"} +{"question": "SELECT T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance DESC LIMIT 1", "answer": "What is the savings balance of the account belonging to the customer with the highest checking balance?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Aaron' AND t1.lname = 'Turon'", "answer": "Find the titles of all the papers written by 'Aaron Turon'.\nAdditional table information: table: icfp_1"} +{"question": "SELECT T1.driverid, T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the id and surname of the driver who participated the most number of races?\nAdditional table information: table: formula_1"} +{"question": "SELECT COUNT(*), SUM(student_capacity), gender FROM dorm GROUP BY gender", "answer": "Find the number of dorms and total capacity for each gender.\nAdditional table information: table: dorm_1"} +{"question": "SELECT * FROM chip_model", "answer": "Find the details for all chip models.\nAdditional table information: table: phone_1"} +{"question": "SELECT * FROM student_course_registrations WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance)", "answer": "What are all info of students who registered courses but not attended courses?\nAdditional table information: table: student_assessment"} +{"question": "SELECT COUNT(*) FROM Student WHERE sex = 'M' AND StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'food')", "answer": "Find the number of male (sex is 'M') students who have some food type allery.\nAdditional table information: table: allergy_1"} +{"question": "SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2", "answer": "List the nominees that have been nominated more than two musicals.\nAdditional table information: table: musical"} +{"question": "SELECT Name, birth_place FROM people EXCEPT SELECT T1.Name, T1.birth_place FROM people AS T1 JOIN body_builder AS T2 ON T1.people_id = T2.people_id", "answer": "List the names and origins of people who are not body builders.\nAdditional table information: table: body_builder"} +{"question": "SELECT train_number, name FROM train ORDER BY TIME NULLS FIRST", "answer": "show all train numbers and names ordered by their time from early to late.\nAdditional table information: table: station_weather"} +{"question": "SELECT T1.Aircraft, T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000", "answer": "Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000.\nAdditional table information: table: aircraft"} +{"question": "SELECT dept_name FROM instructor WHERE name LIKE '%Soisalon%'", "answer": "What is the name of the department with an instructure who has a name like 'Soisalon'?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(*) FROM student", "answer": "How many students are there?\nAdditional table information: table: dorm_1"} +{"question": "SELECT Category, COUNT(*) FROM music_festival GROUP BY Category", "answer": "Return the number of music festivals of each category.\nAdditional table information: table: music_4"} +{"question": "SELECT T1.customer_name FROM customers AS T1, orders AS T2, 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", "answer": "What are the names of the customers who bought product 'food' at least once?\nAdditional table information: table: tracking_orders"} +{"question": "SELECT order_id, customer_id FROM customer_orders WHERE order_status_code = 'Cancelled' ORDER BY order_date NULLS FIRST", "answer": "List the order id, customer id for orders in Cancelled status, ordered by their order dates.\nAdditional table information: table: department_store"} +{"question": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t1.sex = 'F' ORDER BY t1.name NULLS FIRST", "answer": "What are the names of all female candidates in alphabetical order (sex is F)?\nAdditional table information: table: candidate_poll"} +{"question": "SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id = t2.product_id JOIN store AS t3 ON t2.store_id = t3.store_id WHERE t3.store_name = 'Miramichi'", "answer": "What products are available at store named 'Miramichi'?\nAdditional table information: table: store_product"} +{"question": "SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id", "answer": "Show all product names without an order.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT AVG(damage_millions_USD), MAX(damage_millions_USD) FROM storm WHERE max_speed > 1000", "answer": "Show the average and maximum damage for all storms with max speed higher than 1000.\nAdditional table information: table: storm_record"} +{"question": "SELECT Date FROM debate WHERE Num_of_Audience > 150", "answer": "List the dates of debates with number of audience bigger than 150\nAdditional table information: table: debate"} +{"question": "SELECT T3.Name, T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID", "answer": "What are the names of technicians and the machine series that they repair?\nAdditional table information: table: machine_repair"} +{"question": "SELECT id FROM station WHERE city = 'San Francisco' INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING AVG(bikes_available) > 10", "answer": "What are the ids of stations that are located in San Francisco and have average bike availability above 10.\nAdditional table information: table: bike_1"} +{"question": "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'", "answer": "What are the first names of the faculty members playing both Canoeing and Kayaking?\nAdditional table information: table: activity_1"} +{"question": "SELECT SUM(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010", "answer": "What is the total salary paid by team Boston Red Stockings in 2010?\nAdditional table information: table: baseball_1"} +{"question": "SELECT product_name FROM products ORDER BY product_price DESC LIMIT 1", "answer": "Find the name of the most expensive product.\nAdditional table information: table: customer_deliveries"} +{"question": "SELECT COUNT(*), crs_code FROM CLASS GROUP BY crs_code", "answer": "How many sections does each course have?\nAdditional table information: table: college_1"} +{"question": "SELECT start_station_name, end_station_name FROM trip ORDER BY id NULLS FIRST LIMIT 3", "answer": "What is the station station and end station for the trips with the three smallest ids?\nAdditional table information: table: bike_1"} +{"question": "SELECT T1.id, T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id", "answer": "For each trip, return its ending station's installation date.\nAdditional table information: table: bike_1"} +{"question": "SELECT T2.directed_by FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.directed_by ORDER BY SUM(T1.show_times_per_day) DESC LIMIT 1", "answer": "Show director with the largest number of show times in total.\nAdditional table information: table: cinema"} +{"question": "SELECT DISTINCT product_color FROM Products", "answer": "What are the different product colors?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT destination FROM Flight GROUP BY destination ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Which destination has least number of flights?\nAdditional table information: table: flight_1"} +{"question": "SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "What are the names of customers using the most popular payment method?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T1.Title = 'Balls to the Wall'", "answer": "Which artist does the album 'Balls to the Wall' belong to?\nAdditional table information: table: chinook_1"} +{"question": "SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3.Lname = 'Smith' AND T3.Fname = 'Linda'", "answer": "Show all game names played by Linda Smith\nAdditional table information: table: game_1"} +{"question": "SELECT asset_id, asset_details, asset_make, asset_model FROM Assets", "answer": "List the asset id, details, make and model for every asset.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Which allergy type is the least common?\nAdditional table information: table: allergy_1"} +{"question": "SELECT cName FROM college ORDER BY enr DESC LIMIT 3", "answer": "What are the names of the schools with the top 3 largest class sizes?\nAdditional table information: table: soccer_2"} +{"question": "SELECT T2.emp_fname, T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code", "answer": "What are the first names of all teachers who have taught a course and the corresponding descriptions?\nAdditional table information: table: college_1"} +{"question": "SELECT T1.name, T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid ORDER BY COUNT(*) DESC LIMIT 1", "answer": "what is the salary and name of the employee who has the most number of aircraft certificates?\nAdditional table information: table: flight_1"} +{"question": "SELECT Name FROM mountain ORDER BY Name ASC NULLS FIRST", "answer": "What are the names of mountains in ascending alphabetical order?\nAdditional table information: table: climbing"} +{"question": "SELECT name FROM head WHERE born_state <> 'California'", "answer": "What are the names of the heads who are born outside the California state?\nAdditional table information: table: department_management"} +{"question": "SELECT first_name, last_name, salary FROM employees WHERE salary < 6000", "answer": "List the full name (first and last name), and salary for those employees who earn below 6000.\nAdditional table information: table: hr_1"} +{"question": "SELECT DISTINCT classroom, grade FROM list", "answer": "For each classroom report the grade that is taught in it. Report just the classroom number and the grade number.\nAdditional table information: table: student_1"} +{"question": "SELECT * FROM employees WHERE salary BETWEEN (SELECT MIN(salary) FROM employees) AND 2500", "answer": "display all the information of the employees whose salary if within the range of smallest salary and 2500.\nAdditional table information: table: hr_1"} +{"question": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rank > 3 INTERSECT SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id HAVING AVG(T2.rating) > 5", "answer": "Find the names of items whose rank is higher than 3 and whose average rating is above 5.\nAdditional table information: table: epinions_1"} +{"question": "SELECT T1.club_id, T1.club_name, COUNT(*) FROM club AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T1.club_id", "answer": "How many coaches does each club has? List the club id, name and the number of coaches.\nAdditional table information: table: riding_club"} +{"question": "SELECT COUNT(DISTINCT cName) FROM tryout", "answer": "How many different colleges were represented at tryouts?\nAdditional table information: table: soccer_2"} +{"question": "SELECT LOCATION, COUNT(*) FROM gas_station GROUP BY LOCATION ORDER BY COUNT(*) NULLS FIRST", "answer": "For each location, how many gas stations are there in order?\nAdditional table information: table: gas_company"} +{"question": "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'", "answer": "What is the project detail for the project with document 'King Book'?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT COUNT(*) FROM airlines", "answer": "How many airlines are there?\nAdditional table information: table: flight_4"} +{"question": "SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = 'North Coast'", "answer": "Find the names of all distinct wines that have appellations in North Coast area.\nAdditional table information: table: wine_1"} +{"question": "SELECT eid FROM Employee WHERE salary > 100000", "answer": "Show ids for all employees with at least 100000 salary.\nAdditional table information: table: flight_1"} +{"question": "SELECT COUNT(*) FROM region AS t1 JOIN party AS t2 ON t1.region_id = t2.region_id JOIN party_events AS t3 ON t2.party_id = t3.party_id WHERE t1.region_name = 'United Kingdom' AND t3.Event_Name = 'Annaual Meeting'", "answer": "How many Annual Meeting events happened in the United Kingdom region?\nAdditional table information: table: party_people"} +{"question": "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", "answer": "What is the id, name and nationality of the architect who built most mills?\nAdditional table information: table: architecture"} +{"question": "SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900", "answer": "Show the denomination shared by schools founded before 1890 and schools founded after 1900\nAdditional table information: table: school_player"} +{"question": "SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t2.acc_percent NULLS FIRST LIMIT 1", "answer": "Return the primary conference of the school with the lowest acc percentage score.\nAdditional table information: table: university_basketball"} +{"question": "SELECT Name FROM ship WHERE NOT Ship_ID IN (SELECT Ship_ID FROM mission)", "answer": "List the name of ships that are not involved in any mission\nAdditional table information: table: ship_mission"} +{"question": "SELECT name, price FROM products", "answer": "Select the names and the prices of all the products in the store.\nAdditional table information: table: manufactory_1"} +{"question": "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'", "answer": "What is the total time for all lessons taught by Janessa Sawayn?\nAdditional table information: table: driving_school"} +{"question": "SELECT gameid, SUM(hours_played) FROM Plays_games GROUP BY gameid", "answer": "What are ids and total number of hours played for each game?\nAdditional table information: table: game_1"} +{"question": "SELECT Lifespan FROM representative WHERE State = 'New York' OR State = 'Indiana'", "answer": "What are the life spans of representatives from New York state or Indiana state?\nAdditional table information: table: election_representative"} +{"question": "SELECT POSITION FROM player GROUP BY name HAVING AVG(Points) >= 20", "answer": "List the position of players with average number of points scored by players of that position bigger than 20.\nAdditional table information: table: sports_competition"} +{"question": "SELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = 'US museum'", "answer": "What is the name of the staff that is in charge of the attraction named 'US museum'?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 1", "answer": "Show the apartment numbers of apartments with unit status availability of both 0 and 1.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT POSITION, COUNT(*) FROM match_season GROUP BY POSITION", "answer": "Show the position of players and the corresponding number of players.\nAdditional table information: table: match_season"} +{"question": "SELECT DISTINCT T2.emp_fname, T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Computer Info. Systems'", "answer": "Find the first names and degree of all professors who are teaching some class in Computer Info. Systems department.\nAdditional table information: table: college_1"} +{"question": "SELECT name FROM channel WHERE OWNER <> 'CCTV'", "answer": "Which channels are not owned by CCTV? Give me the channel names.\nAdditional table information: table: program_share"} +{"question": "SELECT T1.name, T1.city, T2.dst_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid GROUP BY T2.dst_apid ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name and city of the airport which is the destination of the most number of routes.\nAdditional table information: table: flight_4"} +{"question": "SELECT date_of_notes FROM Assessment_Notes", "answer": "What are the dates of the assessment notes?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT COUNT(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id WHERE T2.account_name = '337'", "answer": "Count the number of financial transactions that the account with the name 337 has.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT T2.Name, COUNT(*) FROM debate_people AS T1 JOIN people AS T2 ON T1.Affirmative = T2.People_ID GROUP BY T2.Name", "answer": "Show the names of people and the number of times they have been on the affirmative side of debates.\nAdditional table information: table: debate"} +{"question": "SELECT DISTINCT gtype FROM Video_games", "answer": "What are the different types of video games?\nAdditional table information: table: game_1"} +{"question": "SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the airport that is the destination of the most number of routes that start in China?\nAdditional table information: table: flight_4"} +{"question": "SELECT host_city FROM hosting_city ORDER BY YEAR DESC LIMIT 1", "answer": "What is id of the city that hosted events in the most recent year?\nAdditional table information: table: city_record"} +{"question": "SELECT f_id FROM files ORDER BY duration DESC LIMIT 1", "answer": "What is the id of the longest song?\nAdditional table information: table: music_1"} +{"question": "SELECT T1.name, T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID", "answer": "Please show the names and the players of clubs.\nAdditional table information: table: sports_competition"} +{"question": "SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.'", "answer": "How many professors do have a Ph.D. degree?\nAdditional table information: table: college_1"} +{"question": "SELECT T1.Code, T1.Fate, T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID", "answer": "Show codes and fates of missions, and names of ships involved.\nAdditional table information: table: ship_mission"} +{"question": "SELECT lastname FROM teachers WHERE classroom = 109", "answer": "Which teachers teach in classroom 109? Give me their last names.\nAdditional table information: table: student_1"} +{"question": "SELECT dept_name, building FROM department ORDER BY budget DESC LIMIT 1", "answer": "What is the department name and corresponding building for the department with the greatest budget?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(*) FROM employees AS T1 JOIN customers AS T2 ON T2.support_rep_id = T1.id WHERE T1.first_name = 'Steve' AND T1.last_name = 'Johnson'", "answer": "What is the count of customers that Steve Johnson supports?\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(*) FROM Student", "answer": "What is the total number of students?\nAdditional table information: table: allergy_1"} +{"question": "SELECT cust_name, acc_type, acc_bal FROM customer ORDER BY credit_score DESC LIMIT 1", "answer": "Find the name, account type, and account balance of the customer who has the highest credit score.\nAdditional table information: table: loan_1"} +{"question": "SELECT T1.Player, T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Columbus Crew'", "answer": "Show the players and years played for players from team 'Columbus Crew'.\nAdditional table information: table: match_season"} +{"question": "SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING COUNT(*) < 3", "answer": "Show the document type code with fewer than 3 documents.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20", "answer": "What are the ids of the students who are under 20 years old and are involved in at least one activity.\nAdditional table information: table: activity_1"} +{"question": "SELECT DISTINCT source_system_code FROM cmi_cross_references WHERE source_system_code LIKE '%en%'", "answer": "Which distinct source system code includes the substring 'en'?\nAdditional table information: table: local_govt_mdm"} +{"question": "SELECT T1.claim_id, T1.date_claim_made, COUNT(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which claim incurred the most number of settlements? List the claim id, the date the claim was made, and the number.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT SUM(enrollment), MIN(enrollment) FROM university", "answer": "What is the total and minimum enrollment of all schools?\nAdditional table information: table: university_basketball"} +{"question": "SELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name = 'Green'", "answer": "Find the attribute data type for the attribute named 'Green'.\nAdditional table information: table: product_catalog"} +{"question": "SELECT customer_name FROM Customers ORDER BY date_became_customer NULLS FIRST LIMIT 5", "answer": "Find the name of the first 5 customers.\nAdditional table information: table: customer_deliveries"} +{"question": "SELECT name_first, name_last FROM player WHERE death_year = ''", "answer": "What are the first name and last name of the players whose death record is empty?\nAdditional table information: table: baseball_1"} +{"question": "SELECT daily_hire_cost FROM Products_for_hire WHERE product_name LIKE '%Book%'", "answer": "What are the daily hire costs for the products with substring 'Book' in its name?\nAdditional table information: table: products_for_hire"} +{"question": "SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which transportation method is used the most often to get to tourist attractions?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT COUNT(*) FROM customers", "answer": "Count the number of customers.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT date_of_enrolment, date_of_completion FROM Student_Course_Enrolment", "answer": "What are all the dates of enrollment and completion in record?\nAdditional table information: table: e_learning"} +{"question": "SELECT payment_method_code, COUNT(*) FROM INVOICES GROUP BY payment_method_code", "answer": "Show all payment method codes and the number of orders for each code.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT problem_id FROM problems WHERE date_problem_reported > '1978-06-26'", "answer": "What are the ids of the problems which are reported after 1978-06-26?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name LIKE '%Led%'", "answer": "What is the title of the album that was released by the artist whose name has the phrase 'Led'?\nAdditional table information: table: store_1"} +{"question": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t3.order_quantity = (SELECT MAX(order_quantity) FROM order_items)", "answer": "Find the name of the customer who made the order of the largest amount of goods.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT Fname, Lname FROM FACULTY WHERE sex = 'M' AND Building = 'NEB'", "answer": "Find the first names and last names of male (sex is M) faculties who live in building NEB.\nAdditional table information: table: college_3"} +{"question": "SELECT title FROM papers WHERE title LIKE '%Database%'", "answer": "Which papers have the substring 'Database' in their titles? Show the titles of the papers.\nAdditional table information: table: icfp_1"} +{"question": "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'", "answer": "In what city does Janessa Sawayn live?\nAdditional table information: table: driving_school"} +{"question": "SELECT T1.course_name FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_Id GROUP BY T1.course_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "which course has most number of registered students?\nAdditional table information: table: student_assessment"} +{"question": "SELECT Name, Other_Details FROM Staff", "answer": "Show the names and details of all the staff members.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT COUNT(*) FROM student", "answer": "How many students are there?\nAdditional table information: table: club_1"} +{"question": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%'", "answer": "What are the details for the project whose research has been published?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT Official_Name FROM city WHERE NOT City_ID IN (SELECT Host_city_ID FROM farm_competition)", "answer": "List the official names of cities that have not held any competition.\nAdditional table information: table: farm"} +{"question": "SELECT T2.Name, COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID", "answer": "How many actors have appeared in each musical?\nAdditional table information: table: musical"} +{"question": "SELECT COUNT(*), T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T1.date_problem_reported > '1986-11-13' GROUP BY T2.product_id", "answer": "For each product that has problems, find the number of problems reported after 1986-11-13 and the product id?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT T2.first_name, T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name = 'Nancy' AND T1.last_name = 'Edwards'", "answer": "find the full name of employees who report to Nancy Edwards?\nAdditional table information: table: store_1"} +{"question": "SELECT T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Which school has the smallest amount of professors?\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(*) FROM wrestler", "answer": "How many wrestlers are there?\nAdditional table information: table: wrestler"} +{"question": "SELECT * FROM employees WHERE hire_date > '1987-09-07'", "answer": "Which employees were hired after September 7th, 1987?\nAdditional table information: table: hr_1"} +{"question": "SELECT first_name, last_name, salary, department_id, MAX(salary) FROM employees GROUP BY department_id", "answer": "display the department ID, full name (first and last name), salary for those employees who is highest salary in every department.\nAdditional table information: table: hr_1"} +{"question": "SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3", "answer": "Give the ids of the three products purchased in the largest amounts.\nAdditional table information: table: department_store"} +{"question": "SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1", "answer": "What is the owner of the channel that has the highest rating ratio?\nAdditional table information: table: program_share"} +{"question": "SELECT T1.line_1 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.address_id INTERSECT SELECT T1.line_1 FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id", "answer": "What are the line 1 of addresses shared by some students and some teachers?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT f_id FROM song WHERE resolution > (SELECT MAX(resolution) FROM song WHERE rating < 8)", "answer": "What is the id of every song that has a resolution higher than that of a song with a rating below 8?\nAdditional table information: table: music_1"} +{"question": "SELECT COUNT(*) FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'Canada') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States')", "answer": "Find the number of routes from the United States to Canada.\nAdditional table information: table: flight_4"} +{"question": "SELECT LOCATION FROM gas_station ORDER BY open_year NULLS FIRST", "answer": "What are the locations of all the gas stations ordered by opening year?\nAdditional table information: table: gas_company"} +{"question": "SELECT YEAR FROM SECTION GROUP BY YEAR ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which year had the greatest number of courses?\nAdditional table information: table: college_2"} +{"question": "SELECT MAX(customer_code), MIN(customer_code) FROM Customers", "answer": "What is the largest and smallest customer codes?\nAdditional table information: table: department_store"} +{"question": "SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211'", "answer": "How many students enrolled in class ACCT-211?\nAdditional table information: table: college_1"} +{"question": "SELECT T2.product_description FROM products_booked AS T1 JOIN products_for_hire AS T2 ON T1.product_id = T2.product_id WHERE T1.booked_amount = 102.76", "answer": "What is the product description of the product booked with an amount of 102.76?\nAdditional table information: table: products_for_hire"} +{"question": "SELECT roomName, basePrice FROM Rooms ORDER BY basePrice ASC NULLS FIRST LIMIT 1", "answer": "Which room has cheapest base price? List the room's name and the base price.\nAdditional table information: table: inn_1"} +{"question": "SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y'", "answer": "What are the last names for all scholarship students?\nAdditional table information: table: game_1"} +{"question": "SELECT Official_Name FROM city ORDER BY Population DESC", "answer": "List official names of cities in descending order of population.\nAdditional table information: table: farm"} +{"question": "SELECT title FROM albums", "answer": "What are the titles of all the albums?\nAdditional table information: table: store_1"} +{"question": "SELECT Builder FROM railway ORDER BY Builder ASC NULLS FIRST", "answer": "List the builders of railways in ascending alphabetical order.\nAdditional table information: table: railway"} +{"question": "SELECT address_line_1 FROM Course_Authors_and_Tutors", "answer": "What is the address of each course author or tutor?\nAdditional table information: table: e_learning"} +{"question": "SELECT Market_Rate, name FROM furniture WHERE NOT Furniture_ID IN (SELECT Furniture_ID FROM furniture_manufacte)", "answer": "Find the market shares and names of furnitures which no any company is producing in our records.\nAdditional table information: table: manufacturer"} +{"question": "SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = 'Katsuhiro' AND t1.lname = 'Ueno'", "answer": "What is the name of the institution the author 'Katsuhiro Ueno' belongs to?\nAdditional table information: table: icfp_1"} +{"question": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which course is enrolled in by the most students? Give me the course name.\nAdditional table information: table: e_learning"} +{"question": "SELECT born_state FROM head GROUP BY born_state HAVING COUNT(*) >= 3", "answer": "What are the names of the states where at least 3 heads were born?\nAdditional table information: table: department_management"} +{"question": "SELECT t1.name FROM train AS t1 JOIN route AS t2 ON t1.id = t2.train_id GROUP BY t2.train_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name of the train whose route runs through greatest number of stations.\nAdditional table information: table: station_weather"} +{"question": "SELECT T1.driverid, T1.forename, COUNT(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING COUNT(*) >= 2", "answer": "Find the id, forename and number of races of all drivers who have at least participated in two races?\nAdditional table information: table: formula_1"} +{"question": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = 'red' AND t3.characteristic_name = 'slow'", "answer": "Find the number of the products that have their color described as 'red' and have a characteristic named 'slow'.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.label = 'Universal Music Group'", "answer": "What are all the songs in albums under label 'Universal Music Group'?\nAdditional table information: table: music_2"} +{"question": "SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id = t3.manufacturer_id WHERE t1.num_of_component < 6 INTERSECT SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id = t3.manufacturer_id WHERE t1.num_of_component > 10", "answer": "Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components.\nAdditional table information: table: manufacturer"} +{"question": "SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Show the transaction type code that occurs the fewest times.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT DISTINCT channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Tillman Ernser'", "answer": "Which contact channel has been used by the customer with name 'Tillman Ernser'?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name LIKE '%Led%'", "answer": "List the name of albums that are released by aritist whose name has 'Led'\nAdditional table information: table: store_1"} +{"question": "SELECT fuel_propulsion FROM \"vehicles\".\"cars\" WHERE fleet_series_quantity = '310-329 (20)'", "answer": "what is the fuel propulsion where the fleet series (quantity) is 310-329 (20)? \nAdditional table information: table: \"vehicles\".\"cars\"\ncolumns: order_year, manufacturer, model, fleet_series_quantity, powertrain, fuel_propulsion"} +{"question": "SELECT Name FROM wrestler WHERE NOT Wrestler_ID IN (SELECT Wrestler_ID FROM elimination)", "answer": "What are the names of wrestlers who have never been eliminated?\nAdditional table information: table: wrestler"} +{"question": "SELECT * FROM instructor ORDER BY salary NULLS FIRST", "answer": "Give all information regarding instructors, in order of salary from least to greatest.\nAdditional table information: table: college_2"} +{"question": "SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = 'North Coast'", "answer": "What are the distinct names of wines that have appellations in the North Coast area?\nAdditional table information: table: wine_1"} +{"question": "SELECT T1.County_name, COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id", "answer": "Show the name of each county along with the corresponding number of delegates from that county.\nAdditional table information: table: election"} +{"question": "SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which college has the most authors with submissions?\nAdditional table information: table: workshop_paper"} +{"question": "SELECT T1.name, COUNT(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid", "answer": "How many patients do each physician take care of? List their names and number of patients they take care of.\nAdditional table information: table: hospital_1"} +{"question": "SELECT Name FROM mountain ORDER BY Name ASC NULLS FIRST", "answer": "Give the names of mountains in alphabetical order.\nAdditional table information: table: climbing"} +{"question": "SELECT COUNT(*) FROM Customers", "answer": "How many customers in total?\nAdditional table information: table: driving_school"} +{"question": "SELECT product, chromosome, porphyria FROM enzyme WHERE LOCATION = 'Cytosol'", "answer": "What is the product, chromosome, and porphyria of the enzymes located at 'Cytosol'?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT T3.Name, T2.District FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID", "answer": "Show the names of phones and the districts of markets they are on.\nAdditional table information: table: phone_market"} +{"question": "SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4", "answer": "Show the facility codes of apartments with more than 4 bedrooms.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT name FROM building EXCEPT SELECT T1.name FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id WHERE T2.founded = 2003", "answer": "Show the names of buildings except for those having an institution founded in 2003.\nAdditional table information: table: protein_institute"} +{"question": "SELECT title, film_id FROM film WHERE rental_rate = 0.99 INTERSECT SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id HAVING COUNT(*) < 3", "answer": "Which film is rented at a fee of 0.99 and has less than 3 in the inventory? List the film title and id.\nAdditional table information: table: sakila_1"} +{"question": "SELECT t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex ORDER BY AVG(t2.unsure_rate) DESC LIMIT 1", "answer": "which gender got the highest average uncertain ratio.\nAdditional table information: table: candidate_poll"} +{"question": "SELECT product_category_code, typical_buying_price FROM products WHERE product_name = 'cumin'", "answer": "What is the category and typical buying price of the product with name 'cumin'?\nAdditional table information: table: products_gen_characteristics"} +{"question": "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", "answer": "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.\nAdditional table information: table: activity_1"} +{"question": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.lastname = 'Heilo' AND T2.title = 'Der Kapitan'", "answer": "What are the types of vocals that the musician with the last name 'Heilo' played in 'Der Kapitan'?\nAdditional table information: table: music_2"} +{"question": "SELECT T1.student_details FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the details of the student who registered for the most number of courses?\nAdditional table information: table: student_assessment"} +{"question": "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", "answer": "What is the first name of the staff who did not give any lesson?\nAdditional table information: table: driving_school"} +{"question": "SELECT YEAR, book_title, publisher FROM book_club ORDER BY YEAR DESC", "answer": "What are the years, titles, and publishers for all books, ordered by year descending?\nAdditional table information: table: culture_company"} +{"question": "SELECT district_name FROM district ORDER BY city_area ASC NULLS FIRST LIMIT 1", "answer": "What is the name of the district with the smallest area?\nAdditional table information: table: store_product"} +{"question": "SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000", "answer": "What are the titles of all movies that James Cameron directed after 2000?\nAdditional table information: table: movie_1"} +{"question": "SELECT COUNT(*), T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name", "answer": "Find the number of projects which each scientist is working on and scientist's name.\nAdditional table information: table: scientist_1"} +{"question": "SELECT name, lat, city FROM station ORDER BY lat NULLS FIRST LIMIT 1", "answer": "What are the name, latitude, and city of the station with the lowest latitude?\nAdditional table information: table: bike_1"} +{"question": "SELECT T3.service_id, T4.Service_Type_Code FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID JOIN EVENTS AS T3 ON T2.Event_ID = T3.Event_ID JOIN services AS T4 ON T3.service_id = T4.service_id GROUP BY T3.service_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Which service id and type has the least number of participants?\nAdditional table information: table: local_govt_in_alabama"} +{"question": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What is the payment method that were used the least often?\nAdditional table information: table: insurance_policies"} +{"question": "SELECT location_code, date_in_location_from, date_in_locaton_to FROM Document_locations", "answer": "What are each document's location code, and starting date and ending data in that location?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT cName, enr FROM College WHERE enr > 10000 AND state = 'LA'", "answer": "Find the name, enrollment of the colleges whose size is bigger than 10000 and location is in state LA.\nAdditional table information: table: soccer_2"} +{"question": "SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code = t3.color_code WHERE t3.color_description = 'white' AND t2.unit_of_measure <> 'Handful'", "answer": "What are the names of products that are not 'white' in color and are not measured by the unit 'Handful'?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT COUNT(DISTINCT Status) FROM city", "answer": "Count the number of different statuses.\nAdditional table information: table: farm"} +{"question": "SELECT MAX(market_share), MIN(market_share), AVG(market_share) FROM browser", "answer": "What is the maximum, minimum and average market share of the listed browsers?\nAdditional table information: table: browser_web"} +{"question": "SELECT date FROM weather WHERE zip_code = 94107 AND EVENTS <> 'Fog' AND EVENTS <> 'Rain'", "answer": "In zip code 94107, on which day neither Fog nor Rain was not observed?\nAdditional table information: table: bike_1"} +{"question": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1", "answer": "What is the name of the body builder with the greatest body weight?\nAdditional table information: table: body_builder"} +{"question": "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", "answer": "What are the names of the states that have 2 to 4 employees living there?\nAdditional table information: table: driving_school"} +{"question": "SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'MARROTTE' AND T2.lastname = 'KIRK'", "answer": "Find all students taught by MARROTTE KIRK. Output first and last names of students.\nAdditional table information: table: student_1"} +{"question": "SELECT SUM(enr) FROM college WHERE NOT cName IN (SELECT cName FROM tryout WHERE pPos = 'goalie')", "answer": "What is the total number of enrollment of schools that do not have any goalie player?\nAdditional table information: table: soccer_2"} +{"question": "SELECT T2.Dname, T2.Room FROM COURSE AS T1 JOIN DEPARTMENT AS T2 ON T1.DNO = T2.DNO WHERE T1.CName = 'INTRODUCTION TO COMPUTER SCIENCE'", "answer": "What are the department name and room for the course INTRODUCTION TO COMPUTER SCIENCE?\nAdditional table information: table: college_3"} +{"question": "SELECT Store_Name FROM Drama_Workshop_Groups", "answer": "What are the store names of drama workshop groups?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT name, TYPE, flag FROM ship ORDER BY built_year DESC LIMIT 1", "answer": "Find the name, type, and flag of the ship that is built in the most recent year.\nAdditional table information: table: ship_1"} +{"question": "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", "answer": "Find the name of the customer who made the most orders.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT Police_force, COUNT(*) FROM county_public_safety GROUP BY Police_force", "answer": "Please show the police forces and the number of counties with each police force.\nAdditional table information: table: county_public_safety"} +{"question": "SELECT Author FROM submission WHERE College = 'Florida' OR College = 'Temple'", "answer": "Which authors with submissions are from college 'Florida' or 'Temple'?\nAdditional table information: table: workshop_paper"} +{"question": "SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC NULLS FIRST LIMIT 1", "answer": "Which catalog content has the smallest capacity? Return the catalog entry name.\nAdditional table information: table: product_catalog"} +{"question": "SELECT allergytype, COUNT(*) FROM Allergy_type GROUP BY allergytype", "answer": "What are the allergy types and how many allergies correspond to each one?\nAdditional table information: table: allergy_1"} +{"question": "SELECT T2.role_name, T2.role_description FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T1.employee_name = 'Ebba'", "answer": "What is the role name and role description for employee called Ebba?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT COUNT(*) FROM station AS T1, trip AS T2, station AS T3 JOIN trip AS T4 ON T1.id = T2.start_station_id AND T2.id = T4.id AND T3.id = T4.end_station_id WHERE T1.city = 'Mountain View' AND T3.city = 'Palo Alto'", "answer": "How many trips started from Mountain View city and ended at Palo Alto city?\nAdditional table information: table: bike_1"} +{"question": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie'", "answer": "Find the names of states that have some college students playing in the mid position but not in the goalie position.\nAdditional table information: table: soccer_2"} +{"question": "SELECT LName FROM Student WHERE age = (SELECT MIN(age) FROM Student)", "answer": "Provide the last name of the youngest student.\nAdditional table information: table: allergy_1"} +{"question": "SELECT AVG(price_in_euros), MIN(price_in_euros) FROM catalog_contents", "answer": "Give me the average and minimum price (in Euro) of the products.\nAdditional table information: table: product_catalog"} +{"question": "SELECT clublocation FROM club WHERE clubname = 'Hopkins Student Enterprises'", "answer": "Where is the club 'Hopkins Student Enterprises' located?\nAdditional table information: table: club_1"} +{"question": "SELECT campus FROM campuses WHERE county = 'Los Angeles'", "answer": "What campuses are located in the county of Los Angeles?\nAdditional table information: table: csu_1"} +{"question": "SELECT f_id FROM files WHERE formats = 'mp3'", "answer": "What are the id of all the files in mp3 format?\nAdditional table information: table: music_1"} +{"question": "SELECT creation, name, budget_in_billions FROM department", "answer": "List the creation year, name and budget of each department.\nAdditional table information: table: department_management"} +{"question": "SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = 'game1'", "answer": "Which tourist attraction is associated with the photo 'game1'? Return its name.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT DISTINCT classroom FROM list WHERE grade = 5", "answer": "Which classrooms are used by grade 5?\nAdditional table information: table: student_1"} +{"question": "SELECT Author FROM submission WHERE NOT Submission_ID IN (SELECT Submission_ID FROM acceptance)", "answer": "Which authors did not submit to any workshop?\nAdditional table information: table: workshop_paper"} +{"question": "SELECT Event_ID FROM Participants_in_Events GROUP BY Event_ID ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the id of the event with the most participants?\nAdditional table information: table: local_govt_in_alabama"} +{"question": "SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING COUNT(*) > 3", "answer": "Return complaint status codes have more than 3 corresponding complaints?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT player FROM match_season ORDER BY College ASC NULLS FIRST", "answer": "Return all players sorted by college in ascending alphabetical order.\nAdditional table information: table: match_season"} +{"question": "SELECT dorm_name FROM dorm EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge'", "answer": "What are the names of the dorm that does not have a TV Lounge?\nAdditional table information: table: dorm_1"} +{"question": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'Mobile Computing')", "answer": "What is the title of the course that is a prerequisite for Mobile Computing?\nAdditional table information: table: college_2"} +{"question": "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", "answer": "Find the name of the customers who have at most two orders.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT region_name FROM region ORDER BY region_name NULLS FIRST", "answer": "List all region names in alphabetical order.\nAdditional table information: table: storm_record"} +{"question": "SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM entrepreneur)", "answer": "What are the names of people who are not entrepreneurs?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT COUNT(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005", "answer": "How many gas station are opened between 2000 and 2005?\nAdditional table information: table: gas_company"} +{"question": "SELECT COUNT(*) FROM club_rank WHERE Total < 10", "answer": "How many clubs have total medals less than 10?\nAdditional table information: table: sports_competition"} +{"question": "SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid", "answer": "Count the number of players who enter hall of fame for each year.\nAdditional table information: table: baseball_1"} +{"question": "SELECT RoomId, roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3", "answer": "Find the name and id of the top 3 expensive rooms.\nAdditional table information: table: inn_1"} +{"question": "SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = 'Dublin'", "answer": "What are the distinct positions of the players from a country whose capital is Dublin?\nAdditional table information: table: match_season"} +{"question": "SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Customer_Payments)", "answer": "How many customers have no payment histories?\nAdditional table information: table: driving_school"} +{"question": "SELECT COUNT(*) FROM park WHERE city = 'Atlanta'", "answer": "How many parks does Atlanta city have?\nAdditional table information: table: baseball_1"} +{"question": "SELECT COUNT(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Atsushi' AND t1.lname = 'Ohori'", "answer": "How many papers are 'Atsushi Ohori' the author of?\nAdditional table information: table: icfp_1"} +{"question": "SELECT YEAR, AVG(attendance) FROM home_game GROUP BY YEAR", "answer": "For each year, return the year and the average number of attendance at home games.\nAdditional table information: table: baseball_1"} +{"question": "SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = 'Cathrine'", "answer": "What are the addresses of the course authors or tutors with personal name 'Cathrine'\nAdditional table information: table: e_learning"} +{"question": "SELECT SUM(T1.Order_Quantity) FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_Name = 'photo'", "answer": "Compute the total order quantities of the product 'photo'.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT clubname FROM club WHERE clublocation = 'AKW'", "answer": "Which clubs are located at 'AKW'? Return the club names.\nAdditional table information: table: club_1"} +{"question": "SELECT Advisor FROM STUDENT WHERE city_code = 'BAL'", "answer": "Who are the advisors for students that live in a city with city code 'BAL'?\nAdditional table information: table: voter_2"} +{"question": "SELECT COUNT(*) FROM player WHERE birth_country = 'USA' AND bats = 'R'", "answer": "Count the number of players who were born in USA and have bats information 'R'.\nAdditional table information: table: baseball_1"} +{"question": "SELECT SUM(enrollment), MIN(enrollment) FROM university", "answer": "Return the total and minimum enrollments across all schools.\nAdditional table information: table: university_basketball"} +{"question": "SELECT COUNT(*), T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "How many problems does the product with the most problems have? List the number of the problems and product name.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT AVG(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen'", "answer": "Compute the mean price of procedures physician John Wen was trained in.\nAdditional table information: table: hospital_1"} +{"question": "SELECT name, headquarter, founder FROM manufacturers ORDER BY revenue DESC LIMIT 1", "answer": "What are the names, headquarters and founders of the company with the highest revenue?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT District_name, City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000", "answer": "What are the district names and city populations for all districts that between 200,000 and 2,000,000 residents?\nAdditional table information: table: store_product"} +{"question": "SELECT County_name FROM county ORDER BY County_name DESC", "answer": "Sort the names of all counties in descending alphabetical order.\nAdditional table information: table: election"} +{"question": "SELECT AVG(Gold) FROM club_rank", "answer": "What is the average number of gold medals for clubs?\nAdditional table information: table: sports_competition"} +{"question": "SELECT venue FROM MATCH ORDER BY date DESC", "answer": "List venues of all matches in the order of their dates starting from the most recent one.\nAdditional table information: table: city_record"} +{"question": "SELECT first_name, last_name FROM employees ORDER BY hire_date ASC NULLS FIRST LIMIT 10", "answer": "List top 10 employee work longest in the company. List employee's first and last name.\nAdditional table information: table: store_1"} +{"question": "SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance < 100 INTERSECT SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 500", "answer": "Show the theme for exhibitions with both records of an attendance below 100 and above 500.\nAdditional table information: table: theme_gallery"} +{"question": "SELECT COUNT(DISTINCT city) FROM bank", "answer": "Find the number of different cities which banks are located at.\nAdditional table information: table: loan_1"} +{"question": "SELECT T2.Building FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Give the building that the instructor who teaches the greatest number of courses lives in.\nAdditional table information: table: college_3"} +{"question": "SELECT COUNT(*) FROM phone WHERE Company_name = 'Nokia Corporation'", "answer": "How many phone hardware models are produced by the company named 'Nokia Corporation'?\nAdditional table information: table: phone_1"} +{"question": "SELECT Name FROM technician WHERE NOT technician_id IN (SELECT technician_id FROM repair_assignment)", "answer": "What are the names of the technicians that have not been assigned to repair machines?\nAdditional table information: table: machine_repair"} +{"question": "SELECT COUNT(DISTINCT dormid) FROM has_amenity", "answer": "Find the number of dorms that have some amenity.\nAdditional table information: table: dorm_1"} +{"question": "SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id GROUP BY t2.customer_details ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which customer have the most policies? Give me the customer details.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT Official_Name, Status FROM city ORDER BY Population DESC LIMIT 1", "answer": "List the official name and status of the city with the largest population.\nAdditional table information: table: farm"} +{"question": "SELECT name FROM building WHERE NOT building_id IN (SELECT building_id FROM institution)", "answer": "Show the name of buildings that do not have any institution.\nAdditional table information: table: protein_institute"} +{"question": "SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2001 ORDER BY t3.degrees NULLS FIRST LIMIT 1", "answer": "How many faculty members are at the university that gave the least number of degrees in 2001?\nAdditional table information: table: csu_1"} +{"question": "SELECT email_address, phone_number FROM customers ORDER BY email_address NULLS FIRST, phone_number NULLS FIRST", "answer": "Find the emails and phone numbers of all the customers, ordered by email address and phone number.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT name FROM member WHERE NOT member_id IN (SELECT member_id FROM membership_register_branch)", "answer": "What are the names of the members that have never registered at any branch?\nAdditional table information: table: shop_membership"} +{"question": "SELECT company FROM customers WHERE first_name = 'Eduardo' AND last_name = 'Martins'", "answer": "What is the company where Eduardo Martins is a customer?\nAdditional table information: table: store_1"} +{"question": "SELECT T1.first_name, T1.last_name, SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY SUM(T2.total) DESC LIMIT 10", "answer": "List the top 10 customers by total gross sales. List customers' first and last name and total gross sales.\nAdditional table information: table: store_1"} +{"question": "SELECT Product_Name FROM Products WHERE NOT Product_ID IN (SELECT Product_ID FROM Products_in_Events)", "answer": "List the names of products that are not in any event.\nAdditional table information: table: solvency_ii"} +{"question": "SELECT investor_id, COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code = 'SALE' GROUP BY investor_id", "answer": "Show the number of transactions with transaction type code 'SALE' for different investors if it is larger than 0.\nAdditional table information: table: tracking_share_transactions"} +{"question": "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", "answer": "Which cities have lower temperature in March than in July and have been once host cities?\nAdditional table information: table: city_record"} +{"question": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 UNION SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010", "answer": "What are the ids for courses in the Fall of 2009 or the Spring of 2010?\nAdditional table information: table: college_2"} +{"question": "SELECT MAX(settlement_amount), MIN(settlement_amount) FROM settlements", "answer": "What are the maximum and minimum settlement amount on record?\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT name FROM manufacturers EXCEPT SELECT T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T1.name = 'DVD drive'", "answer": "What are the names of companies that do not make DVD drives?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT MIN(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = 'PUR' AND share_count > 50", "answer": "Show the minimum amount of transactions whose type code is 'PUR' and whose share count is bigger than 50.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT T2.order_id, T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id GROUP BY T2.order_id HAVING COUNT(*) > 2", "answer": "What is the order id and order details for the order more than two invoices.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_name = 'UPS'", "answer": "What is the shipping agent code of shipping agent UPS?\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT T1.Date_of_ceremony FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T2.Weeks_on_Top > 2", "answer": "What are the dates of ceremony at music festivals corresponding to volumes that lasted more than 2 weeks on top?\nAdditional table information: table: music_4"} +{"question": "SELECT T1.Name, T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID", "answer": "What are the names of actors and the musicals that they are in?\nAdditional table information: table: musical"} +{"question": "SELECT T1.member_name, T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id", "answer": "What are the names of members and their corresponding parties?\nAdditional table information: table: party_people"} +{"question": "SELECT transaction_type, COUNT(*) FROM Financial_transactions GROUP BY transaction_type", "answer": "What are the different transaction types, and how many transactions of each have taken place?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT COUNT(*) FROM Ref_calendar", "answer": "Count the number of all the calendar items.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T1.id, T1.Name, T1.FDA_approved FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC", "answer": "What are the ids, names, and FDA approval status for medicines ordered by descending number of possible enzyme interactions?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT COUNT(*) FROM branch WHERE membership_amount > (SELECT AVG(membership_amount) FROM branch)", "answer": "How many branches where have more than average number of memberships are there?\nAdditional table information: table: shop_membership"} +{"question": "SELECT Name FROM WINE WHERE YEAR = '2008'", "answer": "Find the names of all wines produced in 2008.\nAdditional table information: table: wine_1"} +{"question": "SELECT T2.title, T1.rID, T1.stars, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.rID", "answer": "Find the title and star rating of the movie that got the least rating star for each reviewer.\nAdditional table information: table: movie_1"} +{"question": "SELECT dorm_name, gender FROM dorm WHERE student_capacity > 300 OR student_capacity < 100", "answer": "Find the name and gender type of the dorms whose capacity is greater than 300 or less than 100.\nAdditional table information: table: dorm_1"} +{"question": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall'", "answer": "Find the name of amenities Smith Hall dorm have.\nAdditional table information: table: dorm_1"} +{"question": "SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100", "answer": "What are the distinct wineries which produce wines costing between 50 and 100?\nAdditional table information: table: wine_1"} +{"question": "SELECT COUNT(*) FROM region", "answer": "Count the number of regions.\nAdditional table information: table: storm_record"} +{"question": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the city with the most number of flagship stores?\nAdditional table information: table: store_product"} +{"question": "SELECT Name FROM musical WHERE NOT Musical_ID IN (SELECT Musical_ID FROM actor)", "answer": "List the name of musicals that do not have actors.\nAdditional table information: table: musical"} +{"question": "SELECT COUNT(*) FROM address WHERE district = 'California'", "answer": "Count the number of addressed in the California district.\nAdditional table information: table: sakila_1"} +{"question": "SELECT country FROM competition WHERE competition_type = 'Tournament' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1", "answer": "which country did participated in the most number of Tournament competitions?\nAdditional table information: table: sports_competition"} +{"question": "SELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = 'stanley.monahan@example.org'", "answer": "What is the id of the candidate whose email is stanley.monahan@example.org?\nAdditional table information: table: student_assessment"} +{"question": "SELECT Character, Duration FROM actor", "answer": "What are the characters and duration of actors?\nAdditional table information: table: musical"} +{"question": "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)", "answer": "Find name of the project that needs the least amount of time to finish and the name of scientists who worked on it.\nAdditional table information: table: scientist_1"} +{"question": "SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament'", "answer": "What are the countries that participated in both friendly and tournament type competitions?\nAdditional table information: table: sports_competition"} +{"question": "SELECT COUNT(*), project_id FROM Documents WHERE document_type_code = 'BK' GROUP BY project_id", "answer": "Count the number of documents with the type code BK that correspond to each product id.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT name FROM procedures WHERE cost > 1000 EXCEPT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen'", "answer": "Find the names of all procedures which cost more than 1000 but which physician John Wen was not trained in?\nAdditional table information: table: hospital_1"} +{"question": "SELECT COUNT(*) FROM Ref_document_types", "answer": "Show the number of document types.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT product_id FROM order_items GROUP BY product_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the id of the product that was ordered the most often?\nAdditional table information: table: department_store"} +{"question": "SELECT COUNT(*) FROM film WHERE title LIKE '%Dummy%'", "answer": "How many films have the word 'Dummy' in their titles?\nAdditional table information: table: cinema"} +{"question": "SELECT DISTINCT District_name FROM district ORDER BY city_area DESC", "answer": "Find all the distinct district names ordered by city area in descending.\nAdditional table information: table: store_product"} +{"question": "SELECT grade, COUNT(DISTINCT classroom), COUNT(*) FROM list GROUP BY grade", "answer": "For each grade, report the grade, the number of classrooms in which it is taught and the total number of students in the grade.\nAdditional table information: table: student_1"} +{"question": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the software platform that is most common amongst all devices?\nAdditional table information: table: device"} +{"question": "SELECT cust_name FROM customer EXCEPT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE T2.loan_type = 'Mortgages'", "answer": "Find the name of customers who do not have a loan with a type of Mortgages.\nAdditional table information: table: loan_1"} +{"question": "SELECT COUNT(*) FROM wedding WHERE YEAR = 2016", "answer": "How many weddings are there in year 2016?\nAdditional table information: table: wedding"} +{"question": "SELECT name FROM channel ORDER BY rating_in_percent DESC", "answer": "List all channel names ordered by their rating in percent from big to small.\nAdditional table information: table: program_share"} +{"question": "SELECT cust_name, acc_bal FROM customer WHERE cust_name LIKE '%a%'", "answer": "Find the name and account balance of the customer whose name includes the letter \u2018a\u2019.\nAdditional table information: table: loan_1"} +{"question": "SELECT T1.fname, T1.lname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge')", "answer": "Find the first and last name of students who are living in the dorms that have amenity TV Lounge.\nAdditional table information: table: dorm_1"} +{"question": "SELECT name FROM club ORDER BY Start_year ASC NULLS FIRST", "answer": "What are the names of all the clubs starting with the oldest?\nAdditional table information: table: sports_competition"} +{"question": "SELECT premises_type, premise_details FROM premises ORDER BY premises_type NULLS FIRST", "answer": "Find the types and details for all premises and order by the premise type.\nAdditional table information: table: customers_campaigns_ecommerce"} +{"question": "SELECT location_code FROM Ref_locations WHERE location_name = 'Canada'", "answer": "What is the location code for the country 'Canada'?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = 'Rock'", "answer": "What is the name of all tracks in the Rock genre?\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(*) FROM phone", "answer": "How many phones are there?\nAdditional table information: table: phone_market"} +{"question": "SELECT T1.customer_name, T1.customer_phone, T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the name, phone number and email address for the customer with the most orders.\nAdditional table information: table: department_store"} +{"question": "SELECT Publication_Date FROM publication GROUP BY Publication_Date ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Please show the most common publication date.\nAdditional table information: table: book_2"} +{"question": "SELECT AVG(Price), YEAR FROM WINE GROUP BY YEAR", "answer": "What are the average prices of wines for different years?\nAdditional table information: table: wine_1"} +{"question": "SELECT T2.name, T3.name FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id = T3.id ORDER BY T1.compatible_since_year DESC", "answer": "give me names of all compatible browsers and accelerators in the descending order of compatible year\nAdditional table information: table: browser_web"} +{"question": "SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen'", "answer": "What are the names of procedures physician John Wen was trained in?\nAdditional table information: table: hospital_1"} +{"question": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T1.flno = 99", "answer": "What is the name of the aircraft that was on flight number 99?\nAdditional table information: table: flight_1"} +{"question": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id ORDER BY t2.age NULLS FIRST LIMIT 1", "answer": "Find the name of the ship that is steered by the youngest captain.\nAdditional table information: table: ship_1"} +{"question": "SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_status = 'Cancelled'", "answer": "Find the total quantity of products associated with the orders in the 'Cancelled' status.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT DISTINCT Major FROM Student", "answer": "What are the different majors?\nAdditional table information: table: allergy_1"} +{"question": "SELECT star_rating_code, AVG(price_range) FROM HOTELS GROUP BY star_rating_code", "answer": "Show the average price of hotels for each star rating code.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT Product_Name FROM Products ORDER BY Product_Price ASC NULLS FIRST", "answer": "List the name of products in ascending order of price.\nAdditional table information: table: solvency_ii"} +{"question": "SELECT DISTINCT T1.customer_first_name, T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id", "answer": "What are the full names of customers who have accounts?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT * FROM COURSE ORDER BY Credits NULLS FIRST", "answer": "What is all the information about courses, ordered by credits ascending?\nAdditional table information: table: college_3"} +{"question": "SELECT AVG(Number_of_hosts) FROM party", "answer": "What is the average number of hosts for parties?\nAdditional table information: table: party_host"} +{"question": "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%'", "answer": "List lesson id of all lessons taught by staff with first name as Janessa, last name as Sawayn and nickname containing letter 's'.\nAdditional table information: table: driving_school"} +{"question": "SELECT T1.name, T2.name FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id", "answer": "List all country and league names.\nAdditional table information: table: soccer_1"} +{"question": "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", "answer": "What is the county that produces the most wines scoring higher than 90?\nAdditional table information: table: wine_1"} +{"question": "SELECT Store_Name FROM Drama_Workshop_Groups", "answer": "Show all the Store_Name of drama workshop groups.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT project_id, project_details FROM Projects", "answer": "List ids and details for all projects.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT Country FROM market ORDER BY Number_cities DESC", "answer": "List all countries of markets in descending order of number of cities.\nAdditional table information: table: film_rank"} +{"question": "SELECT T1.Writer FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID WHERE T2.Price > 4000000", "answer": "Show writers who have published a book with price more than 4000000.\nAdditional table information: table: book_2"} +{"question": "SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS = 'Third-rate ship of the line'", "answer": "What are the ranks of captains that have no captain that are in the Third-rate ship of the line class?\nAdditional table information: table: ship_1"} +{"question": "SELECT SUM(Rating_in_percent), OWNER FROM channel GROUP BY OWNER", "answer": "Find the total rating ratio for each channel owner.\nAdditional table information: table: program_share"} +{"question": "SELECT COUNT(*) FROM bank", "answer": "Count the number of bank branches.\nAdditional table information: table: loan_1"} +{"question": "SELECT COUNT(DISTINCT advisor) FROM Student", "answer": "How many different advisors are listed?\nAdditional table information: table: allergy_1"} +{"question": "SELECT document_type_code, document_name, document_description FROM Documents WHERE document_name = 'Noel CV' OR document_name = 'King Book'", "answer": "List the document type code, document name, and document description for the document with name 'Noel CV' or name 'King Book'.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT COUNT(*) FROM College", "answer": "How many different colleges are there?\nAdditional table information: table: soccer_2"} +{"question": "SELECT built_year FROM ship GROUP BY built_year ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the year in which most ships were built?\nAdditional table information: table: ship_1"} +{"question": "SELECT COUNT(*) FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = 'USPS'", "answer": "How many documents were shipped by USPS?\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT COUNT(*) FROM university WHERE LOCATION LIKE '%NY%'", "answer": "How many universities have a location that contains NY?\nAdditional table information: table: university_basketball"} +{"question": "SELECT account_id, account_details FROM Accounts", "answer": "What are the ids and details of all accounts?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT name FROM instructor WHERE salary > (SELECT MAX(salary) FROM instructor WHERE dept_name = 'Biology')", "answer": "Find the names of all instructors whose salary is greater than the salary of all instructors in the Biology department.\nAdditional table information: table: college_2"} +{"question": "SELECT DISTINCT T1.supplier_name, T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id = T2.supplier_id JOIN products AS T3 ON T2.product_id = T3.product_id WHERE T3.product_name = 'red jeans'", "answer": "What are the distinct names and phone numbers for suppliers who have red jeans?\nAdditional table information: table: department_store"} +{"question": "SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = 'saving'", "answer": "What are the names of customers who do not have saving accounts?\nAdditional table information: table: loan_1"} +{"question": "SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = '660 Shea Crescent' OR T2.How_to_Get_There = 'walk'", "answer": "Find the names of the tourist attractions that is either accessible by walk or at address 660 Shea Crescent.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT SUM(settlement_amount), AVG(settlement_amount) FROM settlements", "answer": "Return the sum and average of all settlement amounts.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT COUNT(*) FROM country", "answer": "Count the number of countries.\nAdditional table information: table: match_season"} +{"question": "SELECT document_type_code, document_name, document_description FROM Documents WHERE document_name = 'Noel CV' OR document_name = 'King Book'", "answer": "What are the type come, name, and description of the document that has either the name 'Noel CV' or 'King Book'?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211'", "answer": "What are the first names of all students in course ACCT-211?\nAdditional table information: table: college_1"} +{"question": "SELECT SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = 'Lucas' AND T1.last_name = 'Mancini'", "answer": "How much money did Lucas Mancini spend?\nAdditional table information: table: store_1"} +{"question": "SELECT Date_Claim_Made, Date_Claim_Settled FROM Claims WHERE Amount_Claimed > (SELECT AVG(Amount_Claimed) FROM Claims)", "answer": "Give me the claim date, settlement date for all the claims whose claimed amount is larger than the average.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT T3.Player_name, T3.gender FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T1.Starting_year > 2011", "answer": "Show the names and genders of players with a coach starting after 2011.\nAdditional table information: table: riding_club"} +{"question": "SELECT DISTINCT start_station_name FROM trip WHERE duration < 100", "answer": "List all the distinct stations from which a trip of duration below 100 started.\nAdditional table information: table: bike_1"} +{"question": "SELECT Status FROM roller_coaster WHERE LENGTH > 3300 OR Height > 100", "answer": "Show the statuses of roller coasters longer than 3300 or higher than 100.\nAdditional table information: table: roller_coaster"} +{"question": "SELECT COUNT(*), T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code", "answer": "How many different professors are there for the different schools?\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE = 'ACCT-211'", "answer": "How many professors are teaching class with code ACCT-211?\nAdditional table information: table: college_1"} +{"question": "SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'OTHA' AND T2.lastname = 'MOYER'", "answer": "Find all students taught by OTHA MOYER. Output the first and last names of the students.\nAdditional table information: table: student_1"} +{"question": "SELECT dept_name FROM instructor WHERE name LIKE '%Soisalon%'", "answer": "Find the department name of the instructor whose name contains 'Soisalon'.\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(*) FROM invoices WHERE billing_city = 'Chicago' AND billing_state = 'IL'", "answer": "How many invoices were billed from Chicago, IL?\nAdditional table information: table: store_1"} +{"question": "SELECT fname, lname FROM Faculty WHERE Rank = 'Instructor'", "answer": "What are the first name and last name of all the instructors?\nAdditional table information: table: activity_1"} +{"question": "SELECT Company_name FROM phone GROUP BY Company_name HAVING COUNT(*) > 1", "answer": "List the name of the company that produced more than one phone model.\nAdditional table information: table: phone_1"} +{"question": "SELECT apt_type_code, bathroom_count, bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY SUM(room_count) DESC LIMIT 1", "answer": "Which apartment type has the largest number of total rooms? Return the apartment type code, its number of bathrooms and number of bedrooms.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which building has the largest number of company offices? Give me the building name.\nAdditional table information: table: company_office"} +{"question": "SELECT first_name FROM customer WHERE NOT customer_id IN (SELECT customer_id FROM rental WHERE rental_date > '2005-08-23 02:06:01')", "answer": "What are the first names of customers who have not rented any films after '2005-08-23 02:06:01'?\nAdditional table information: table: sakila_1"} +{"question": "SELECT AVG(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T1.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211'", "answer": "What is the average GPA of students taking ACCT-211?\nAdditional table information: table: college_1"} +{"question": "SELECT AVG(Gross_in_dollar) FROM film", "answer": "Return the average gross sales in dollars across all films.\nAdditional table information: table: film_rank"} +{"question": "SELECT T1.driverid, COUNT(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING COUNT(*) <= 30", "answer": "For each id of a driver who participated in at most 30 races, how many races did they participate in?\nAdditional table information: table: formula_1"} +{"question": "SELECT problem_log_id, problem_id FROM problem_log ORDER BY log_entry_date NULLS FIRST LIMIT 1", "answer": "What is the oldest log id and its corresponding problem id?\nAdditional table information: table: tracking_software_problems"} +{"question": "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'", "answer": "Give me the names of customers who have placed orders between 2009-01-01 and 2010-01-01.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT Low_Estimate, High_Estimate FROM film_market_estimation", "answer": "What are the low and high estimates of film markets?\nAdditional table information: table: film_rank"} +{"question": "SELECT COUNT(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009", "answer": "Count the number of times the team 'Boston Red Stockings' lost in 2009 postseason.\nAdditional table information: table: baseball_1"} +{"question": "SELECT dname FROM department ORDER BY mgr_start_date NULLS FIRST", "answer": "List all department names ordered by their starting date.\nAdditional table information: table: company_1"} +{"question": "SELECT AVG(salary), MAX(salary) FROM Employee", "answer": "What is average and maximum salary of all employees.\nAdditional table information: table: flight_1"} +{"question": "SELECT fname, sex FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = 'Milk' EXCEPT SELECT StuID FROM Has_allergy WHERE Allergy = 'Cat')", "answer": "Find the first name and gender of the student who has allergy to milk but not cat.\nAdditional table information: table: allergy_1"} +{"question": "SELECT T1.id, T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id JOIN injury_accident AS T3 ON T2.id = T3.game_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the id and name of the stadium where the largest number of injury accidents occurred.\nAdditional table information: table: game_injury"} +{"question": "SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'English'", "answer": "How many students attend course English?\nAdditional table information: table: student_assessment"} +{"question": "SELECT SUM(amount), T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname", "answer": "What are the names of the different bank branches, and what are their total loan amounts?\nAdditional table information: table: loan_1"} +{"question": "SELECT DISTINCT T1.id, T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12", "answer": "What are the different ids and names of the stations that have had more than 12 bikes available?\nAdditional table information: table: bike_1"} +{"question": "SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa NULLS FIRST LIMIT 1", "answer": "What is the name of the department with the student that has the lowest GPA?\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(*), AVG(age), city_code FROM student GROUP BY city_code", "answer": "How many students live in each city and what are their average ages?\nAdditional table information: table: dorm_1"} +{"question": "SELECT COUNT(*) FROM Staff WHERE first_name = 'Ludie'", "answer": "How many employees have a first name of Ludie?\nAdditional table information: table: driving_school"} +{"question": "SELECT title FROM Movie WHERE YEAR = (SELECT MAX(YEAR) FROM Movie)", "answer": "What is the name of the most recent movie?\nAdditional table information: table: movie_1"} +{"question": "SELECT email_address, date_of_birth FROM Customers WHERE first_name = 'Carole'", "answer": "List email address and birthday of customer whose first name as Carole.\nAdditional table information: table: driving_school"} +{"question": "SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING COUNT(*) >= 2", "answer": "What are the names of storms that did not affect two or more regions?\nAdditional table information: table: storm_record"} +{"question": "SELECT T1.FacID, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID", "answer": "What are the faculty id and the number of students each faculty has?\nAdditional table information: table: activity_1"} +{"question": "SELECT DISTINCT city FROM branch WHERE membership_amount >= 100", "answer": "What are the different cities that have more than 100 memberships?\nAdditional table information: table: shop_membership"} +{"question": "SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code", "answer": "Show the booking status code and the corresponding number of bookings.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT DISTINCT firstname FROM list WHERE classroom = 107", "answer": "What are the first names of students studying in room 107?\nAdditional table information: table: student_1"} +{"question": "SELECT T3.Party_Theme, T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID", "answer": "Show the themes of parties and the names of the party hosts.\nAdditional table information: table: party_host"} +{"question": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = 'Movies'", "answer": "List the name of all tracks in the playlists of Movies.\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(*) FROM Addresses WHERE state_province_county = 'Georgia'", "answer": "How many staff live in state Georgia?\nAdditional table information: table: driving_school"} +{"question": "SELECT Title FROM book ORDER BY Issues ASC NULLS FIRST", "answer": "List the titles of the books in ascending order of issues.\nAdditional table information: table: book_2"} +{"question": "SELECT t2.product_details FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which product has been ordered most number of times?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT title, director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1", "answer": "Return the title and director of the movie released in the year 2000 or earlier that had the highest worldwide gross.\nAdditional table information: table: culture_company"} +{"question": "SELECT T2.company, COUNT(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id", "answer": "Show the company name with the number of gas station.\nAdditional table information: table: gas_company"} +{"question": "SELECT name FROM enzyme WHERE product <> 'Heme'", "answer": "What are the names of enzymes who does not produce 'Heme'?\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT account_id, customer_id, account_name FROM Accounts", "answer": "Show ids, customer ids, names for all accounts.\nAdditional table information: table: customers_card_transactions"} +{"question": "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'", "answer": "Give the ids for documents that have the budget description 'Government'.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE shipping_method_code = 'FedEx' AND order_status_code = 'Paid'", "answer": "Show the names of customers having an order with shipping method FedEx and order status Paid.\nAdditional table information: table: customers_campaigns_ecommerce"} +{"question": "SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = 'USA' GROUP BY billing_state", "answer": "List the number of invoices from the US, grouped by state.\nAdditional table information: table: store_1"} +{"question": "SELECT AVG(T1.age) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.student_capacity = (SELECT MAX(student_capacity) FROM dorm)", "answer": "What is the average age of students who are living in the dorm with the largest capacity?\nAdditional table information: table: dorm_1"} +{"question": "SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.Customer_id GROUP BY T1.customer_id HAVING COUNT(*) > 1", "answer": "Who are the customers that had more than 1 policy? List the customer details and id.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT Lieutenant_Governor, Comptroller FROM party WHERE Party = 'Democratic'", "answer": "Who are the lieutenant governor and comptroller from the democratic party?\nAdditional table information: table: election"} +{"question": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid JOIN lives_in AS T4 ON T4.dormid = T1.dormid JOIN student AS T5 ON T5.stuid = T4.stuid WHERE T5.lname = 'Smith'", "answer": "Find the name of amenities of the dorm where the student with last name Smith is living in.\nAdditional table information: table: dorm_1"} +{"question": "SELECT origin, COUNT(*) FROM Flight GROUP BY origin", "answer": "Show all origins and the number of flights from each origin.\nAdditional table information: table: flight_1"} +{"question": "SELECT DISTINCT grade FROM list WHERE classroom = 103", "answer": "Find the grade taught in classroom 103.\nAdditional table information: table: student_1"} +{"question": "SELECT sex, COUNT(*) FROM Faculty WHERE rank = 'AsstProf' GROUP BY sex", "answer": "How many male and female assistant professors do we have?\nAdditional table information: table: activity_1"} +{"question": "SELECT T1.FacID, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID", "answer": "Show the faculty id of each faculty member, along with the number of students he or she advises.\nAdditional table information: table: activity_1"} +{"question": "SELECT T1.Team, T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID", "answer": "For each player, show the team and the location of school they belong to.\nAdditional table information: table: school_player"} +{"question": "SELECT DISTINCT T1.Director FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID WHERE T2.Year = 1995", "answer": "Who are the different directors of films which had market estimation in 1995?\nAdditional table information: table: film_rank"} +{"question": "SELECT apt_number FROM Apartments ORDER BY room_count ASC NULLS FIRST", "answer": "Return all the apartment numbers sorted by the room count in ascending order.\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT DISTINCT cName FROM tryout ORDER BY cName NULLS FIRST", "answer": "What are the different names of the colleges involved in the tryout in alphabetical order?\nAdditional table information: table: soccer_2"} +{"question": "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 NULLS FIRST LIMIT 1", "answer": "What is the last name of the first individual contacted from the organization with the maximum UK Vat number across all organizations?\nAdditional table information: table: e_government"} +{"question": "SELECT AVG(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.Sex = 'F' AND T2.Election_Cycle = 'Spring'", "answer": "Find the average age of female (sex is F) students who have secretary votes in the spring election cycle.\nAdditional table information: table: voter_2"} +{"question": "SELECT Name FROM county_public_safety WHERE NOT County_ID IN (SELECT County_ID FROM city)", "answer": "List the names of counties that do not have any cities.\nAdditional table information: table: county_public_safety"} +{"question": "SELECT bname FROM bank ORDER BY no_of_customers DESC LIMIT 1", "answer": "Find the branch name of the bank that has the most number of customers.\nAdditional table information: table: loan_1"} +{"question": "SELECT budget_type_code, COUNT(*) FROM Documents_with_expenses GROUP BY budget_type_code", "answer": "What are the different budget type codes, and how many documents are there for each?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT COUNT(*) FROM country", "answer": "How many countries are there in total?\nAdditional table information: table: match_season"} +{"question": "SELECT SUM(total_pounds) FROM purchase AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T2.city = 'London' AND T1.year = 2018", "answer": "What is the sum of total pounds of purchase in year 2018 for all branches in London?\nAdditional table information: table: shop_membership"} +{"question": "SELECT employee_id, first_name, last_name FROM employees WHERE department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%T%')", "answer": "What are the ids and full names for employees who work in a department that has someone with a first name that contains the letter T?\nAdditional table information: table: hr_1"} +{"question": "SELECT T1.first_name, T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id", "answer": "Display the first name and department name for each employee.\nAdditional table information: table: hr_1"} +{"question": "SELECT dept_name, AVG(salary) FROM instructor GROUP BY dept_name HAVING AVG(salary) > 42000", "answer": "Find the names and average salaries of all departments whose average salary is greater than 42000.\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(*) FROM (SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings')", "answer": "What is the total number of postseason games that team Boston Red Stockings participated in?\nAdditional table information: table: baseball_1"} +{"question": "SELECT origin, destination FROM Flight WHERE price > 300", "answer": "What is the origin and destination for all flights whose price is higher than 300?\nAdditional table information: table: flight_1"} +{"question": "SELECT product_name, typical_buying_price FROM products", "answer": "Return the names and typical buying prices for all products.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT Accreditation_type, COUNT(*) FROM phone GROUP BY Accreditation_type", "answer": "How many phones belongs to each accreditation type?\nAdditional table information: table: phone_1"} +{"question": "SELECT Age FROM artist", "answer": "List the age of all music artists.\nAdditional table information: table: music_4"} +{"question": "SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park'", "answer": "How many games were played in park 'Columbia Park' in 1907?\nAdditional table information: table: baseball_1"} +{"question": "SELECT name FROM building ORDER BY height_feet DESC LIMIT 1", "answer": "What is the name of the tallest building?\nAdditional table information: table: protein_institute"} +{"question": "SELECT MAX(Age), MIN(Age) FROM STUDENT WHERE Major = 600", "answer": "Tell me the ages of the oldest and youngest students studying major 600.\nAdditional table information: table: voter_2"} +{"question": "SELECT name, email FROM user_profiles ORDER BY followers NULLS FIRST LIMIT 1", "answer": "Find the name and email of the user followed by the least number of people.\nAdditional table information: table: twitter_1"} +{"question": "SELECT Country FROM member GROUP BY Country HAVING COUNT(*) > 2", "answer": "Which countries have more than two members?\nAdditional table information: table: decoration_competition"} +{"question": "SELECT name, height, prominence FROM mountain WHERE range <> 'Aberdare Range'", "answer": "What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'?\nAdditional table information: table: mountain_photos"} +{"question": "SELECT receipt_date FROM Documents WHERE document_id = 3", "answer": "What is the receipt date of the document with id 3?\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT classroom, COUNT(*) FROM list WHERE grade = '4' GROUP BY classroom", "answer": "Report the total number of students for each fourth-grade classroom.\nAdditional table information: table: student_1"} +{"question": "SELECT T2.Year, T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID", "answer": "Give the years and official names of the cities of each competition.\nAdditional table information: table: farm"} +{"question": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_Senator_VOTE", "answer": "Find the distinct first names of the students who have class senator votes.\nAdditional table information: table: voter_2"} +{"question": "SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid GROUP BY T1.aid ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What are the names of the aircraft that the least people are certified to fly?\nAdditional table information: table: flight_1"} +{"question": "SELECT COUNT(*) FROM ship", "answer": "What is the number of ships?\nAdditional table information: table: ship_mission"} +{"question": "SELECT t1.product_name, t1.typical_buying_price, t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = 'yellow'", "answer": "What are the name and typical buying and selling prices of the products that have color described as 'yellow'?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode = t2.screen_mode WHERE t2.Accreditation_type = 'Provisional' INTERSECT SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode = t2.screen_mode WHERE t2.Accreditation_type = 'Full'", "answer": "Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types.\nAdditional table information: table: phone_1"} +{"question": "SELECT COUNT(*) FROM Documents", "answer": "Count the number of documents.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Boeing 737-800'", "answer": "Show names for all employees who have certificate of Boeing 737-800.\nAdditional table information: table: flight_1"} +{"question": "SELECT T1.name, T2.balance + T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance > (SELECT AVG(balance) FROM savings)", "answer": "Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance.\nAdditional table information: table: small_bank_1"} +{"question": "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'", "answer": "Show the document name and the document date for all documents on project with details 'Graph Database project'.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T2.Store_Name FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T1.Status_Code = 'stop'", "answer": "What are the names of the workshop groups that have bookings with status code 'stop'?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT theme, YEAR FROM exhibition WHERE ticket_price < 15", "answer": "What are the theme and year for all exhibitions that have a ticket price under 15?\nAdditional table information: table: theme_gallery"} +{"question": "SELECT MAX(support_rate), MIN(consider_rate), MIN(oppose_rate) FROM candidate", "answer": "find the highest support percentage, lowest consider rate and oppose rate of all candidates.\nAdditional table information: table: candidate_poll"} +{"question": "SELECT T1.address_line_1, T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id HAVING COUNT(*) >= 2", "answer": "Which course authors teach two or more courses? Give me their addresses and author IDs.\nAdditional table information: table: e_learning"} +{"question": "SELECT T2.customer_first_name, T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = '900'", "answer": "What are the full names of customers with the account name 900?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT COUNT(*) FROM student", "answer": "How many students exist?\nAdditional table information: table: dorm_1"} +{"question": "SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.sex = 'F' GROUP BY t1.clubname ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name of the club that has the most female students.\nAdditional table information: table: club_1"} +{"question": "SELECT COUNT(*) FROM station AS T1, trip AS T2, station AS T3 JOIN trip AS T4 ON T1.id = T2.start_station_id AND T2.id = T4.id AND T3.id = T4.end_station_id WHERE T1.city = 'Mountain View' AND T3.city = 'Palo Alto'", "answer": "How many trips stated from a station in Mountain View and ended at one in Palo Alto?\nAdditional table information: table: bike_1"} +{"question": "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'", "answer": "Which city does staff with first name as Janessa and last name as Sawayn live?\nAdditional table information: table: driving_school"} +{"question": "SELECT COUNT(DISTINCT last_name) FROM actor", "answer": "Count the number of different last names actors have.\nAdditional table information: table: sakila_1"} +{"question": "SELECT DISTINCT name FROM instructor ORDER BY name NULLS FIRST", "answer": "List the distinct names of the instructors, ordered by name.\nAdditional table information: table: college_2"} +{"question": "SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees)", "answer": "What are the employee ids for employees who make more than the average?\nAdditional table information: table: hr_1"} +{"question": "SELECT T3.Name, T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID", "answer": "Show the names of companies and of employees.\nAdditional table information: table: company_employee"} +{"question": "SELECT TYPE, Nationality FROM ship", "answer": "What are the type and nationality of ships?\nAdditional table information: table: ship_mission"} +{"question": "SELECT date_incident_start, date_incident_end FROM Behavior_Incident WHERE incident_type_code = 'NOISE'", "answer": "What are the start and end dates for incidents with incident type code 'NOISE'?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT Name FROM ARTIST WHERE Name LIKE '%a%'", "answer": "Find the names of all artists that have 'a' in their names.\nAdditional table information: table: chinook_1"} +{"question": "SELECT * FROM employees WHERE NOT department_id IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200)", "answer": "Find the ids of the employees who does not work in those departments where some employees works whose manager id within the range 100 and 200.\nAdditional table information: table: hr_1"} +{"question": "SELECT name FROM artist ORDER BY year_join DESC LIMIT 1", "answer": "Return the name of the artist who has the latest join year.\nAdditional table information: table: theme_gallery"} +{"question": "SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.song_name LIKE '%love%'", "answer": "What are the names of the artists who released a song that has the word love in its title, and where are the artists from?\nAdditional table information: table: music_1"} +{"question": "SELECT T1.name, COUNT(*) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id", "answer": "For each user, find their name and the number of reviews written by them.\nAdditional table information: table: epinions_1"} +{"question": "SELECT state_province_county, country FROM addresses WHERE zip_postcode LIKE '4%'", "answer": "What are the state and country of all the cities that have post codes starting with 4.\\\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T2.investor_id FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id HAVING COUNT(*) >= 2", "answer": "Show the ids of the investors who have at least two transactions.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT HOST FROM performance ORDER BY Attendance ASC NULLS FIRST", "answer": "List the hosts of performances in ascending order of attendance.\nAdditional table information: table: performance_attendance"} +{"question": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = 'Democratic'", "answer": "Which committees have delegates from the Democratic party?\nAdditional table information: table: election"} +{"question": "SELECT AVG(transaction_amount), MIN(transaction_amount), MAX(transaction_amount), SUM(transaction_amount) FROM Financial_transactions", "answer": "Return the average, minimum, maximum, and total transaction amounts.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT COUNT(*) FROM entrepreneur", "answer": "How many entrepreneurs are there?\nAdditional table information: table: entrepreneur"} +{"question": "SELECT COUNT(*), T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year", "answer": "For each year, return the year and the number of times the team Boston Red Stockings won in the postseasons.\nAdditional table information: table: baseball_1"} +{"question": "SELECT COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Art' AND T2.customer_last_name = 'Turcotte'", "answer": "How many accounts does the customer with first name Art and last name Turcotte have?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT employee_name, role_code, date_of_birth FROM Employees WHERE employee_Name = 'Armani'", "answer": "Show the name, role code, and date of birth for the employee with name 'Armani'.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id = T2.course_id JOIN student AS T3 ON T2.id = T3.id WHERE T1.dept_name = 'Statistics'", "answer": "What are the names of students who have taken Statistics courses?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(*) FROM tryout WHERE decision = 'yes'", "answer": "How many students received a yes from tryouts?\nAdditional table information: table: soccer_2"} +{"question": "SELECT card_number FROM member WHERE Hometown LIKE '%Kentucky%'", "answer": "list the card number of all members whose hometown address includes word 'Kentucky'.\nAdditional table information: table: shop_membership"} +{"question": "SELECT T1.firstname, T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0", "answer": "What are the first and last names of people who payed more than the rooms' base prices?\nAdditional table information: table: inn_1"} +{"question": "SELECT Status FROM roller_coaster GROUP BY Status HAVING COUNT(*) > 2", "answer": "List the status shared by more than two roller coaster.\nAdditional table information: table: roller_coaster"} +{"question": "SELECT bike_id FROM trip WHERE zip_code = 94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the id of the bike that traveled the most in 94002?\nAdditional table information: table: bike_1"} +{"question": "SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC", "answer": "What are the name of the players who received a card in descending order of the hours of training?\nAdditional table information: table: soccer_2"} +{"question": "SELECT COUNT(*) FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM customer_events)", "answer": "How many customers did not have any event?\nAdditional table information: table: local_govt_and_lot"} +{"question": "SELECT Publisher, COUNT(*) FROM publication GROUP BY Publisher", "answer": "Show different publishers together with the number of publications they have.\nAdditional table information: table: book_2"} +{"question": "SELECT T3.dept_name, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T1.emp_lname = 'Heffington'", "answer": "What is department name and office for the professor whose last name is Heffington?\nAdditional table information: table: college_1"} +{"question": "SELECT T1.service_id, T1.service_details, COUNT(*) FROM Services AS T1 JOIN Residents_Services AS T2 ON T1.service_id = T2.service_id GROUP BY T1.service_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the maximum number that a certain service is provided? List the service id, details and number.\nAdditional table information: table: local_govt_and_lot"} +{"question": "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", "answer": "When was the order placed whose shipment tracking number is 3452? Give me the date.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT city FROM city WHERE regional_population > 10000000", "answer": "Please give me a list of cities whose regional population is over 10000000.\nAdditional table information: table: city_record"} +{"question": "SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 5", "answer": "Which catalog contents have length below 3 or above 5? Find the catalog entry names.\nAdditional table information: table: product_catalog"} +{"question": "SELECT dept_name, building FROM department ORDER BY budget DESC", "answer": "List the names and buildings of all departments sorted by the budget from large to small.\nAdditional table information: table: college_2"} +{"question": "SELECT building FROM Faculty GROUP BY building ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the building that has the largest number of faculty members.\nAdditional table information: table: activity_1"} +{"question": "SELECT name FROM airports WHERE country = 'Cuba' OR country = 'Argentina'", "answer": "What are the names of all airports in Cuba or Argentina?\nAdditional table information: table: flight_4"} +{"question": "SELECT T2.customer_first_name, T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 2", "answer": "What are the first names and ids for customers who have two or more accounts?\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT name, dept_name FROM student ORDER BY tot_cred NULLS FIRST", "answer": "What are the names of students and their respective departments, ordered by number of credits from least to greatest?\nAdditional table information: table: college_2"} +{"question": "SELECT T1.name_full, T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "what is the full name and id of the college with the largest number of baseball players?\nAdditional table information: table: baseball_1"} +{"question": "SELECT rank, Fname, Lname FROM Faculty", "answer": "Show the rank, first name, and last name for all the faculty.\nAdditional table information: table: activity_1"} +{"question": "SELECT COUNT(*), Grape FROM WINE GROUP BY Grape", "answer": "What are the numbers of wines for different grapes?\nAdditional table information: table: wine_1"} +{"question": "SELECT T1.name, T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID", "answer": "What are the names and players of all the clubs?\nAdditional table information: table: sports_competition"} +{"question": "SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA'", "answer": "How many professors who has a either Ph.D. or MA degree?\nAdditional table information: table: college_1"} +{"question": "SELECT name FROM projects ORDER BY hours DESC LIMIT 1", "answer": "What is the name of the project with the most hours?\nAdditional table information: table: scientist_1"} +{"question": "SELECT T1.first_name, T1.last_name, COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 10", "answer": "Find out the top 10 customers by total number of orders. List customers' first and last name and the number of total orders.\nAdditional table information: table: store_1"} +{"question": "SELECT classroom, COUNT(*) FROM list WHERE grade = '0' GROUP BY classroom", "answer": "For each grade 0 classroom, report the total number of students.\nAdditional table information: table: student_1"} +{"question": "SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.label = 'Universal Music Group'", "answer": "What are the names of all the songs whose album is under the label of 'Universal Music Group'?\nAdditional table information: table: music_2"} +{"question": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE '%Monadic%'", "answer": "Which authors have written a paper with title containing the word 'Monadic'? Return their last names.\nAdditional table information: table: icfp_1"} +{"question": "SELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner'", "answer": "Find the captain rank that has some captains in both Cutter and Armed schooner classes.\nAdditional table information: table: ship_1"} +{"question": "SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900", "answer": "What are the denominations used by both schools founded before 1890 and schools founded after 1900?\nAdditional table information: table: school_player"} +{"question": "SELECT name, country FROM people WHERE age < (SELECT AVG(age) FROM people)", "answer": "Show the name and country for all people whose age is smaller than the average.\nAdditional table information: table: wedding"} +{"question": "SELECT product_type_code, product_name FROM products WHERE product_price > 1000 OR product_price < 500", "answer": "Show the product type and name for the products with price higher than 1000 or lower than 500.\nAdditional table information: table: customers_and_products_contacts"} +{"question": "SELECT T2.FirstName, T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.FirstName = 'Leonie'", "answer": "What is the first name and last name employee helps the customer with first name Leonie?\nAdditional table information: table: chinook_1"} +{"question": "SELECT name, trade_name FROM medicine EXCEPT SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id JOIN enzyme AS T3 ON T3.id = T2.enzyme_id WHERE T3.product = 'Protoporphyrinogen IX'", "answer": "Show the medicine names and trade names that cannot interact with the enzyme with product 'Heme'.\nAdditional table information: table: medicine_enzyme_interaction"} +{"question": "SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = 'San Jose State University' AND t2.year = 2000", "answer": "How many degrees were conferred at San Jose State University in 2000?\nAdditional table information: table: csu_1"} +{"question": "SELECT calendar_date, day_Number FROM Ref_calendar", "answer": "What are all the calendar dates and day Numbers?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT Name FROM WINE ORDER BY Score NULLS FIRST LIMIT 1", "answer": "Give the name of the wine with the highest score.\nAdditional table information: table: wine_1"} +{"question": "SELECT name FROM buildings WHERE Status = 'on-hold' ORDER BY Stories ASC NULLS FIRST", "answer": "Find the names of the buildings in 'on-hold' status, and sort them in ascending order of building stories.\nAdditional table information: table: company_office"} +{"question": "SELECT customer_id, SUM(amount_paid) FROM Payments GROUP BY customer_id ORDER BY SUM(amount_paid) DESC LIMIT 1", "answer": "What is the maximum total amount paid by a customer? List the customer id and amount.\nAdditional table information: table: products_for_hire"} +{"question": "SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Louisville , Kentucky' INTERSECT SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Hiram , Georgia'", "answer": "Find the name of branches where have some members whose hometown is in Louisville, Kentucky and some in Hiram, Georgia.\nAdditional table information: table: shop_membership"} +{"question": "SELECT COUNT(DISTINCT POSITION) FROM player", "answer": "How many different positions of players are there?\nAdditional table information: table: school_player"} +{"question": "SELECT DISTINCT fname FROM student", "answer": "What are the first names of all the students?\nAdditional table information: table: club_1"} +{"question": "SELECT crs_credit, crs_description FROM course WHERE crs_code = 'QM-261'", "answer": "Find the description and credit for the course QM-261?\nAdditional table information: table: college_1"} +{"question": "SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 3 AND T2.firstname <> 'COVIN' AND T2.lastname <> 'JEROME'", "answer": "Which students in third grade are not taught by teacher COVIN JEROME? Give me the last names of the students.\nAdditional table information: table: student_1"} +{"question": "SELECT eid, salary FROM Employee WHERE name = 'Mark Young'", "answer": "What is the id and salary of the employee named Mark Young?\nAdditional table information: table: flight_1"} +{"question": "SELECT Join_Year FROM pilot ORDER BY Rank ASC NULLS FIRST LIMIT 1", "answer": "What is the joined year of the pilot of the highest rank?\nAdditional table information: table: pilot_record"} +{"question": "SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1", "answer": "What is the id of the most recent order?\nAdditional table information: table: tracking_orders"} +{"question": "SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T2.amenid = T1.amenid JOIN dorm AS T3 ON T2.dormid = T3.dormid WHERE T3.dorm_name = 'Anonymous Donor Hall' ORDER BY T1.amenity_name NULLS FIRST", "answer": "List name of all amenities which Anonymous Donor Hall has, and sort the results in alphabetic order.\nAdditional table information: table: dorm_1"} +{"question": "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", "answer": "What is the name of the customer who has the largest number of orders?\nAdditional table information: table: tracking_orders"} +{"question": "SELECT department_id, SUM(salary) FROM employees GROUP BY department_id HAVING COUNT(*) >= 2", "answer": "display the department id and the total salary for those departments which contains at least two employees.\nAdditional table information: table: hr_1"} +{"question": "SELECT document_type_code FROM Ref_Document_Types", "answer": "What document type codes do we have?\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT COUNT(*) FROM team_franchise WHERE active = 'Y'", "answer": "How many team franchises are active, with active value 'Y'?\nAdditional table information: table: baseball_1"} +{"question": "SELECT name FROM program EXCEPT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = 'Morning'", "answer": "Which programs are never broadcasted in the morning? Give me the names of the programs.\nAdditional table information: table: program_share"} +{"question": "SELECT COUNT(*) FROM driver", "answer": "How many drivers are there?\nAdditional table information: table: school_bus"} +{"question": "SELECT MAX(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = 'Monaco Grand Prix'", "answer": "What is the maximum fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?\nAdditional table information: table: formula_1"} +{"question": "SELECT employee_name, role_code, date_of_birth FROM Employees WHERE employee_Name = 'Armani'", "answer": "What are the name, role code, and date of birth of the employee named 'Armani'?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT Name FROM WINE WHERE score > 90", "answer": "List the names of all distinct wines that have scores higher than 90.\nAdditional table information: table: wine_1"} +{"question": "SELECT T1.name, T1.age, T1.job FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice' AND T2.year = (SELECT MAX(YEAR) FROM PersonFriend WHERE friend = 'Alice')", "answer": "What are the names, ages, and jobs of all people who are friends with Alice for the longest amount of time?\nAdditional table information: table: network_2"} +{"question": "SELECT lname FROM authors ORDER BY lname NULLS FIRST", "answer": "Give me a list of all the last names of authors sorted in alphabetical order\nAdditional table information: table: icfp_1"} +{"question": "SELECT T1.title, T1.i_id FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY AVG(T2.rank) DESC LIMIT 1", "answer": "Find the name and id of the good with the highest average rank.\nAdditional table information: table: epinions_1"} +{"question": "SELECT T3.dept_name FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T1.dept_code = T3.dept_code GROUP BY T1.dept_code ORDER BY SUM(T1.crs_credit) DESC LIMIT 1", "answer": "Find the name of the department that offers the largest number of credits of all classes.\nAdditional table information: table: college_1"} +{"question": "SELECT DISTINCT grade FROM list WHERE classroom = 105", "answer": "Which grade is studying in room 105?\nAdditional table information: table: student_1"} +{"question": "SELECT mID FROM Rating EXCEPT SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = 'Brittany Harris'", "answer": "What are the ids of the movies that are not reviewed by Brittany Harris.\nAdditional table information: table: movie_1"} +{"question": "SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id = T2.id ORDER BY T2.dock_count DESC LIMIT 1", "answer": "What is the id of the trip that started from the station with the highest dock count?\nAdditional table information: table: bike_1"} +{"question": "SELECT T1.name, COUNT(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid", "answer": "Return the name of each physician and the number of patients he or she treats.\nAdditional table information: table: hospital_1"} +{"question": "SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType", "answer": "For each bed type, find the average room price.\nAdditional table information: table: inn_1"} +{"question": "SELECT book_title, author_or_editor FROM book_club WHERE YEAR > 1989", "answer": "show the titles, and authors or editors for all books made after the year 1989.\nAdditional table information: table: culture_company"} +{"question": "SELECT COUNT(DISTINCT class_code) FROM CLASS", "answer": "How many unique classes are offered?\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.level = 6", "answer": "What is the total number of purchases for members with level 6?\nAdditional table information: table: shop_membership"} +{"question": "SELECT birth_country FROM player GROUP BY birth_country ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 3", "answer": "What are the three countries that the least players are from?\nAdditional table information: table: baseball_1"} +{"question": "SELECT investor_id, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY investor_id", "answer": "Show the average amount of transactions for different investors.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT MAX(stu_gpa), AVG(stu_gpa), MIN(stu_gpa), dept_code FROM student GROUP BY dept_code", "answer": "What is the highest, lowest, and average student GPA for every department?\nAdditional table information: table: college_1"} +{"question": "SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = 'saving'", "answer": "Find the name of customers who do not have an saving account.\nAdditional table information: table: loan_1"} +{"question": "SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3", "answer": "Report all majors that have less than 3 students.\nAdditional table information: table: voter_2"} +{"question": "SELECT Nominee FROM musical WHERE Award = 'Tony Award' INTERSECT SELECT Nominee FROM musical WHERE Award = 'Drama Desk Award'", "answer": "Show the nominees that have nominated musicals for both 'Tony Award' and 'Drama Desk Award'.\nAdditional table information: table: musical"} +{"question": "SELECT COUNT(DISTINCT T2.Location_Code) FROM Things AS T1 JOIN Timed_Locations_of_Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.service_details = 'Unsatisfied'", "answer": "How many distinct locations have the things with service detail 'Unsatisfied' been located in?\nAdditional table information: table: local_govt_and_lot"} +{"question": "SELECT city FROM city WHERE regional_population > 10000000", "answer": "Which cities have regional population above 10000000?\nAdditional table information: table: city_record"} +{"question": "SELECT DISTINCT title FROM Movie EXCEPT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Chris Jackson'", "answer": "What are the titles of all movies that were not reviewed by Chris Jackson?\nAdditional table information: table: movie_1"} +{"question": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = 'Marianne' GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which vocal type has the band mate with first name 'Marianne' played the most?\nAdditional table information: table: music_2"} +{"question": "SELECT role_description FROM Staff_Roles WHERE role_code = 'researcher'", "answer": "What is the complete description of the job of a researcher?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT other_account_details FROM Accounts WHERE account_name = '338'", "answer": "Show other account details for account with name 338.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Stephanie' AND t1.lname = 'Weirich'", "answer": "Which papers have 'Stephanie Weirich' as an author?\nAdditional table information: table: icfp_1"} +{"question": "SELECT Builder FROM railway GROUP BY Builder ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the most common builder of railways.\nAdditional table information: table: railway"} +{"question": "SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING COUNT(*) >= 2", "answer": "Show the ids for all the faculty members who have at least 2 students.\nAdditional table information: table: activity_1"} +{"question": "SELECT Status FROM roller_coaster GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Please show the most common status of roller coasters.\nAdditional table information: table: roller_coaster"} +{"question": "SELECT T2.Name, T1.College_Location FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID ORDER BY T2.Name ASC NULLS FIRST", "answer": "Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names.\nAdditional table information: table: decoration_competition"} +{"question": "SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000", "answer": "What are the themes of competitions that have corresponding host cities with more than 1000 residents?\nAdditional table information: table: farm"} +{"question": "SELECT dorm_name FROM dorm WHERE gender = 'F'", "answer": "What are the names of the all-female dorms?\nAdditional table information: table: dorm_1"} +{"question": "SELECT T1.name_full, T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the full name and id of the college that has the most baseball players.\nAdditional table information: table: baseball_1"} +{"question": "SELECT AVG(price_in_euros), MIN(price_in_euros) FROM catalog_contents", "answer": "What are the average and minimum price (in Euro) of all products?\nAdditional table information: table: product_catalog"} +{"question": "SELECT T1.pName, T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'", "answer": "What are the names and hours spent practicing of every student who received a yes at tryouts?\nAdditional table information: table: soccer_2"} +{"question": "SELECT T3.EMP_FNAME, T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM = T3.EMP_NUM WHERE DEPT_NAME = 'Biology'", "answer": "What are the first and last name of all biology professors?\nAdditional table information: table: college_1"} +{"question": "SELECT name, LOCATION FROM track", "answer": "What are the names and locations of all tracks?\nAdditional table information: table: race_track"} +{"question": "SELECT event_name FROM party_events GROUP BY event_name HAVING COUNT(*) > 2", "answer": "find the event names that have more than 2 records.\nAdditional table information: table: party_people"} +{"question": "SELECT T2.Name, T1.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID", "answer": "Show the names of roller coasters and names of country they are in.\nAdditional table information: table: roller_coaster"} +{"question": "SELECT document_type_code, document_type_name, document_type_description FROM Ref_document_types", "answer": "Show all document type codes, document type names, document type descriptions.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T1.driverid, T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid WHERE T3.year > 2010 GROUP BY T1.driverid ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the id and last name of the driver who participated in the most races after 2010?\nAdditional table information: table: formula_1"} +{"question": "SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC NULLS FIRST", "answer": "What are the crime rates of counties sorted by number of offices ascending?\nAdditional table information: table: county_public_safety"} +{"question": "SELECT StuID FROM Has_allergy GROUP BY StuID HAVING COUNT(*) >= 2", "answer": "Show all student IDs who have at least two allergies.\nAdditional table information: table: allergy_1"} +{"question": "SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the country that has the most perpetrators?\nAdditional table information: table: perpetrator"} +{"question": "SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = 'walk' OR T2.How_to_Get_There = 'bus'", "answer": "Find the details of all the markets that are accessible by walk or bus.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'", "answer": "What are the vocal types used in song 'Le Pop'?\nAdditional table information: table: music_2"} +{"question": "SELECT T2.name, T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math'", "answer": "Find the name and salary of instructors who are advisors of the students from the Math department.\nAdditional table information: table: college_2"} +{"question": "SELECT document_type_description FROM Ref_document_types WHERE document_type_name = 'Film'", "answer": "What is the document type description for document type named Film?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id = T2.category_id JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'HUNGER ROOF'", "answer": "What is the genre name of the film HUNGER ROOF?\nAdditional table information: table: sakila_1"} +{"question": "SELECT T1.name FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 GROUP BY T2.f1 HAVING COUNT(*) > (SELECT COUNT(*) FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 WHERE T1.name = 'Tyler Swift')", "answer": "Find the names of the users whose number of followers is greater than that of the user named 'Tyler Swift'.\nAdditional table information: table: twitter_1"} +{"question": "SELECT Birth_Place FROM people GROUP BY Birth_Place HAVING COUNT(*) >= 2", "answer": "What are the birth places that are shared by at least two people?\nAdditional table information: table: body_builder"} +{"question": "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", "answer": "Give me the the first and last name of the faculty who advises the most students.\nAdditional table information: table: activity_1"} +{"question": "SELECT stu_fname, stu_gpa FROM student WHERE stu_gpa < (SELECT AVG(stu_gpa) FROM student)", "answer": "What is the first name and GPA of every student that has a GPA lower than average?\nAdditional table information: table: college_1"} +{"question": "SELECT AVG(t1.access_count) FROM documents AS t1 JOIN document_functional_areas AS t2 ON t1.document_code = t2.document_code JOIN functional_areas AS t3 ON t2.functional_area_code = t3.functional_area_code WHERE t3.functional_area_description = 'Acknowledgement'", "answer": "What are the average access counts of documents that have the functional area description 'Acknowledgement'?\nAdditional table information: table: document_management"} +{"question": "SELECT COUNT(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000", "answer": "How many employees have salary between 100000 and 200000?\nAdditional table information: table: flight_1"} +{"question": "SELECT fname, lname FROM student WHERE age < (SELECT AVG(age) FROM student)", "answer": "What is the first and last name of all students who are younger than average?\nAdditional table information: table: dorm_1"} +{"question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'KAWA' AND T2.lastname = 'GORDON'", "answer": "How many students does KAWA GORDON teaches?\nAdditional table information: table: student_1"} +{"question": "SELECT t1.color_code, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = 'chervil'", "answer": "Return the color code and description for the product with the name 'chervil'.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT AVG(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = 'John Wen'", "answer": "What is the average cost of procedures that physician John Wen was trained in?\nAdditional table information: table: hospital_1"} +{"question": "SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID", "answer": "Show the names of climbers and the heights of mountains they climb.\nAdditional table information: table: climbing"} +{"question": "SELECT location_code, location_name FROM Ref_locations", "answer": "What are all the location codes and location names?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT MAX(Age) FROM STUDENT", "answer": "Find the maximum age of all the students.\nAdditional table information: table: voter_2"} +{"question": "SELECT * FROM employees WHERE department_id = 'null'", "answer": "Return all the information for all employees without any department number.\nAdditional table information: table: hr_1"} +{"question": "SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = 'Pass'", "answer": "Find the enrollment date for all the tests that have 'Pass' result.\nAdditional table information: table: e_learning"} +{"question": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised NULLS FIRST LIMIT 1", "answer": "What is the last name of the staff who has handled the first ever complaint?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT Destroyed_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID", "answer": "What are the id of each employee and the number of document destroyed by that employee?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T2.emp_fname, T4.prof_office, T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num", "answer": "What are the first names, office locations of all lecturers who have taught some course?\nAdditional table information: table: college_1"} +{"question": "SELECT SUM(amount_piad), AVG(amount_piad) FROM claim_headers", "answer": "Find the total and average amount paid in claim headers.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT COUNT(*) FROM submission", "answer": "How many submissions are there?\nAdditional table information: table: workshop_paper"} +{"question": "SELECT name, operating_system FROM web_client_accelerator WHERE CONNECTION <> 'Broadband'", "answer": "What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection?\nAdditional table information: table: browser_web"} +{"question": "SELECT T1.pName, T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'", "answer": "Find the name and hours of the students whose tryout decision is yes.\nAdditional table information: table: soccer_2"} +{"question": "SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY COUNT(*) DESC LIMIT 1", "answer": "find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30.\nAdditional table information: table: aircraft"} +{"question": "SELECT COUNT(DISTINCT rank) FROM captain", "answer": "Count the number of different ranks of captain.\nAdditional table information: table: ship_1"} +{"question": "SELECT title FROM papers WHERE title LIKE '%ML%'", "answer": "Find the titles of the papers that contain the word 'ML'.\nAdditional table information: table: icfp_1"} +{"question": "SELECT COUNT(DISTINCT customer_id) FROM Accounts", "answer": "Count the number of customers who have an account.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT T1.Name, MAX(T1.Price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name", "answer": "Select the name of each manufacturer along with the name and price of its most expensive product.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT * FROM COURSE ORDER BY Credits NULLS FIRST", "answer": "List all information about courses sorted by credits in the ascending order.\nAdditional table information: table: college_3"} +{"question": "SELECT apt_number FROM Apartments WHERE apt_type_code = 'Flat'", "answer": "Which apartments have type code 'Flat'? Give me their apartment numbers.\nAdditional table information: table: apartment_rentals"} +{"question": "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'", "answer": "Give the dates of creation for documents that have both budget type codes 'GV' and 'SF'.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_details = 'quo'", "answer": "Find the organisation type description of the organisation detailed as 'quo'.\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT T1.name FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name of airline which runs the most number of routes.\nAdditional table information: table: flight_4"} +{"question": "SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which apartment type code is the most common among apartments with more than one bathroom?\nAdditional table information: table: apartment_rentals"} +{"question": "SELECT DISTINCT home_city FROM driver", "answer": "Show all different home cities.\nAdditional table information: table: school_bus"} +{"question": "SELECT nickname FROM Staff WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "answer": "What is the nickname of staff with first name as Janessa and last name as Sawayn?\nAdditional table information: table: driving_school"} +{"question": "SELECT DISTINCT premises_type FROM premises", "answer": "What are all the distinct premise types?\nAdditional table information: table: customers_campaigns_ecommerce"} +{"question": "SELECT Name FROM musical WHERE Nominee = 'Bob Fosse'", "answer": "What are the names of musicals with nominee 'Bob Fosse'?\nAdditional table information: table: musical"} +{"question": "SELECT order_id, customer_id FROM orders ORDER BY date_order_placed NULLS FIRST LIMIT 1", "answer": "Find the order id and customer id associated with the oldest order.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT T1.Service_Type_Description, T2.Service_Type_Code, COUNT(*) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T2.Service_Type_Code", "answer": "List the description, code and the number of services for each service type.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT t1.customer_name, t2.active_from_date FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t2.channel_code = 'Email'", "answer": "Find the name and active date of the customer that use email as the contact channel.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT COUNT(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = 'Australian Grand Prix' AND YEAR = 2009", "answer": "How many drivers were in the Australian Grand Prix held in 2009?\nAdditional table information: table: formula_1"} +{"question": "SELECT DISTINCT product_color FROM Products", "answer": "Show all product colors.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT LOCATION FROM station EXCEPT SELECT LOCATION FROM station WHERE number_of_platforms >= 15", "answer": "Show all locations which don't have a train station with at least 15 platforms.\nAdditional table information: table: train_station"} +{"question": "SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = 'Central Coast'", "answer": "What are the appelations for wines produced after 2008 but not in the Central Coast area?\nAdditional table information: table: wine_1"} +{"question": "SELECT document_name, access_count FROM documents ORDER BY document_name NULLS FIRST", "answer": "What are the names of all the documents, as well as the access counts of each, ordered alphabetically?\nAdditional table information: table: document_management"} +{"question": "SELECT Country, COUNT(*) FROM climber GROUP BY Country", "answer": "How many climbers are from each country?\nAdditional table information: table: climbing"} +{"question": "SELECT MAX(product_price), MIN(product_price), product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code NULLS FIRST", "answer": "What are the highest and lowest prices of products, grouped by and alphabetically ordered by product type?\nAdditional table information: table: department_store"} +{"question": "SELECT COUNT(*) FROM body_builder", "answer": "How many body builders are there?\nAdditional table information: table: body_builder"} +{"question": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Year DESC", "answer": "List the names of perpetrators in descending order of the year.\nAdditional table information: table: perpetrator"} +{"question": "SELECT T1.Aircraft, T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000", "answer": "What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000?\nAdditional table information: table: aircraft"} +{"question": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC LIMIT 1", "answer": "List the industry shared by the most companies.\nAdditional table information: table: company_office"} +{"question": "SELECT COUNT(*) FROM Students WHERE personal_name LIKE '%son%'", "answer": "Find the number of students who have the word 'son' in their personal names.\nAdditional table information: table: e_learning"} +{"question": "SELECT T2.Name, T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID", "answer": "For each nomination, show the name of the artwork and name of the festival where it is nominated.\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT T3.name, T2.title, T1.date, T1.price FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id JOIN cinema AS T3 ON T1.cinema_id = T3.cinema_id", "answer": "Show cinema name, film title, date, and price for each record in schedule.\nAdditional table information: table: cinema"} +{"question": "SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'", "answer": "Which college has any student who is a goalie and succeeded in the tryout.\nAdditional table information: table: soccer_2"} +{"question": "SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Rock'", "answer": "What is the average unit price of rock tracks?\nAdditional table information: table: chinook_1"} +{"question": "SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Reggae' INTERSECT SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Rock'", "answer": "Find the titles of albums that contain tracks of both the Reggae and Rock genres.\nAdditional table information: table: chinook_1"} +{"question": "SELECT name FROM station WHERE city = 'Palo Alto' EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING COUNT(*) > 100", "answer": "What are the names of the stations that are located in Palo Alto but have never been the ending point of the trips\nAdditional table information: table: bike_1"} +{"question": "SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = 'Dayana Robel'", "answer": "What are all the policy types of the customer named 'Dayana Robel'?\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT t1.customer_name, t2.order_date FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = 'Delivered'", "answer": "What are the customer name and date of the orders whose status is 'Delivered'.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T3.name, T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id ORDER BY T1.register_year NULLS FIRST", "answer": "Show all member names and registered branch names sorted by register year.\nAdditional table information: table: shop_membership"} +{"question": "SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType", "answer": "What is the average base price of rooms, for each bed type?\nAdditional table information: table: inn_1"} +{"question": "SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING COUNT(T1.id) > 10", "answer": "List title of albums have the number of tracks greater than 10.\nAdditional table information: table: store_1"} +{"question": "SELECT T1.part_name, COUNT(*) FROM Parts AS T1 JOIN Asset_Parts AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name", "answer": "How many assets can each parts be used in? List the part name and the number.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses", "answer": "Find the name of all the cities and states.\nAdditional table information: table: e_government"} +{"question": "SELECT product FROM product WHERE max_page_size = 'A4' OR pages_per_minute_color < 5", "answer": "Find products with max page size as 'A4' or pages per minute color smaller than 5.\nAdditional table information: table: store_product"} +{"question": "SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA'", "answer": "How many professors attained either Ph.D. or Masters degrees?\nAdditional table information: table: college_1"} +{"question": "SELECT company, main_industry FROM company WHERE NOT company_id IN (SELECT company_id FROM station_company)", "answer": "Show company name and main industry without a gas station.\nAdditional table information: table: gas_company"} +{"question": "SELECT city, COUNT(*) FROM airports GROUP BY city HAVING COUNT(*) > 1", "answer": "List the cities which have more than one airport and number of airports.\nAdditional table information: table: flight_4"} +{"question": "SELECT Country FROM market ORDER BY Country ASC NULLS FIRST", "answer": "List all countries of markets in ascending alphabetical order.\nAdditional table information: table: film_rank"} +{"question": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "answer": "Return the names of the gymnasts.\nAdditional table information: table: gymnast"} +{"question": "SELECT name, MAX(revenue), Headquarter FROM manufacturers GROUP BY Headquarter", "answer": "Find the name and revenue of the company that earns the highest revenue in each city.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT T1.Name, T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING COUNT(*) >= 2", "answer": "Show the names and ids of tourist attractions that are visited at least two times.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT gameid, SUM(hours_played) FROM Plays_games GROUP BY gameid", "answer": "Show all game ids and the number of hours played.\nAdditional table information: table: game_1"} +{"question": "SELECT DISTINCT T1.stageposition FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE Firstname = 'Solveig'", "answer": "What are the different stage positions for all musicians whose first name is 'Solveig'?\nAdditional table information: table: music_2"} +{"question": "SELECT T2.dept_store_id, T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = 'marketing' INTERSECT SELECT T2.dept_store_id, T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = 'managing'", "answer": "What is the id and name of the department store that has both marketing and managing department?\nAdditional table information: table: department_store"} +{"question": "SELECT LOCATION FROM cinema EXCEPT SELECT LOCATION FROM cinema WHERE capacity > 800", "answer": "Show all the locations where no cinema has capacity over 800.\nAdditional table information: table: cinema"} +{"question": "SELECT T1.first_name, T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total NULLS FIRST LIMIT 10", "answer": "List the customers first and last name of 10 least expensive invoices.\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(*) FROM budget WHERE budgeted < invested", "answer": "How many budget record has a budget amount smaller than the invested amount?\nAdditional table information: table: school_finance"} +{"question": "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'", "answer": "How many activities does Mark Giuliano participate in?\nAdditional table information: table: activity_1"} +{"question": "SELECT COUNT(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = 'Defender'", "answer": "Count the number of different official languages corresponding to countries that players who play Defender are from.\nAdditional table information: table: match_season"} +{"question": "SELECT COUNT(*), rank FROM captain WHERE age < 50 GROUP BY rank", "answer": "Count the number of captains younger than 50 of each rank.\nAdditional table information: table: ship_1"} +{"question": "SELECT Advisor FROM Student WHERE StuID = 1004", "answer": "Who is the advisor of student with ID 1004?\nAdditional table information: table: allergy_1"} +{"question": "SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = 'CHRISSY' AND T1.lastname = 'NABOZNY'", "answer": "How many teachers does the student named CHRISSY NABOZNY have?\nAdditional table information: table: student_1"} +{"question": "SELECT t2.claim_status_name FROM claims_processing AS t1 JOIN claims_processing_stages AS t2 ON t1.claim_stage_id = t2.claim_stage_id GROUP BY t1.claim_stage_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the name of the claim processing stage that most of the claims are on?\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which people severed as governor most frequently?\nAdditional table information: table: election"} +{"question": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the most popular payment method?\nAdditional table information: table: insurance_policies"} +{"question": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid JOIN lives_in AS T4 ON T4.dormid = T1.dormid JOIN student AS T5 ON T5.stuid = T4.stuid WHERE T5.lname = 'Smith'", "answer": "What are the amenities in the dorm that a student who has the last name of Smith lives in?\nAdditional table information: table: dorm_1"} +{"question": "SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.player = 'Walter Samuel' INTERSECT SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.player = 'Thiago Motta'", "answer": "List the name of the stadium where both the player 'Walter Samuel' and the player 'Thiago Motta' got injured.\nAdditional table information: table: game_injury"} +{"question": "SELECT name_first, name_last FROM player WHERE weight > 220 OR height < 75", "answer": "List players' first name and last name who have weight greater than 220 or height shorter than 75.\nAdditional table information: table: baseball_1"} +{"question": "SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID", "answer": "What are the names of climbers and the corresponding heights of the mountains that they climb?\nAdditional table information: table: climbing"} +{"question": "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", "answer": "show the train name and station name for each train.\nAdditional table information: table: train_station"} +{"question": "SELECT Name FROM People ORDER BY Height ASC NULLS FIRST", "answer": "What are the names of people in ascending order of height?\nAdditional table information: table: perpetrator"} +{"question": "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", "answer": "How many companies operates airlines in each airport?\nAdditional table information: table: flight_company"} +{"question": "SELECT T1.Store_Phone, T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID", "answer": "Give me all the phone numbers and email addresses of the workshop groups where services are performed.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MEMBER_OF AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What is the name of the department with the fewest members?\nAdditional table information: table: college_3"} +{"question": "SELECT COUNT(*) FROM APPELLATIONS WHERE County = 'Napa'", "answer": "How many appelations are in Napa Country?\nAdditional table information: table: wine_1"} +{"question": "SELECT * FROM election", "answer": "Show all the information about election.\nAdditional table information: table: election"} +{"question": "SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code WHERE T1.document_name = 'How to read a book'", "answer": "What is the document type name for the document with name 'How to read a book'?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "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'", "answer": "What are the details for statements with the details 'Private Project', and what are the names of the corresponding documents?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T1.custid, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT MAX(balance) FROM checking)", "answer": "What are the customer id and name corresponding to accounts with a checking balance less than the largest checking balance?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT AVG(long) FROM station WHERE NOT id IN (SELECT station_id FROM status GROUP BY station_id HAVING MAX(bikes_available) > 10)", "answer": "What is the mean longitude for all stations that have never had more than 10 bikes available?\nAdditional table information: table: bike_1"} +{"question": "SELECT T3.name, T2.title, T1.stars, T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID ORDER BY T3.name NULLS FIRST, T2.title NULLS FIRST, T1.stars NULLS FIRST", "answer": "Return reviewer name, movie title, stars, and ratingDate. And sort the data first by reviewer name, then by movie title, and lastly by number of stars.\nAdditional table information: table: movie_1"} +{"question": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = 'London Gatwick'", "answer": "What are the names of all the aircrafts associated with London Gatwick airport?\nAdditional table information: table: aircraft"} +{"question": "SELECT COUNT(DISTINCT gender) FROM dorm", "answer": "How many different genders are there in the dorms?\nAdditional table information: table: dorm_1"} +{"question": "SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = 'Indonesia'", "answer": "Who are the players from Indonesia?\nAdditional table information: table: match_season"} +{"question": "SELECT COUNT(*) FROM game WHERE NOT id IN (SELECT game_id FROM injury_accident)", "answer": "How many games are free of injury accidents?\nAdditional table information: table: game_injury"} +{"question": "SELECT aid, name FROM Aircraft ORDER BY distance DESC LIMIT 1", "answer": "Show the id and name of the aircraft with the maximum distance.\nAdditional table information: table: flight_1"} +{"question": "SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id", "answer": "Show all customer ids and the number of accounts for each customer.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT fname, lname FROM employee WHERE salary > 30000", "answer": "Return the first names and last names of employees who earn more than 30000 in salary.\nAdditional table information: table: company_1"} +{"question": "SELECT cloud_cover FROM weather WHERE zip_code = 94107 GROUP BY cloud_cover ORDER BY COUNT(*) DESC LIMIT 3", "answer": "What is the 3 most common cloud cover rates in the region of zip code 94107?\nAdditional table information: table: bike_1"} +{"question": "SELECT COUNT(*) FROM products", "answer": "How many products are there?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT emp_fname, emp_lname FROM employee ORDER BY emp_dob NULLS FIRST LIMIT 1", "answer": "What are the first and last names of the employee with the earliest date of birth?\nAdditional table information: table: college_1"} +{"question": "SELECT name, TYPE, flag FROM ship ORDER BY built_year DESC LIMIT 1", "answer": "What is the name, type, and flag of the ship that was built in the most recent year?\nAdditional table information: table: ship_1"} +{"question": "SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade = 'B'", "answer": "How many students have had at least one 'B' grade?\nAdditional table information: table: college_3"} +{"question": "SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown HAVING COUNT(*) >= 2", "answer": "Give the hometowns from which two or more gymnasts are from.\nAdditional table information: table: gymnast"} +{"question": "SELECT player_api_id FROM Player WHERE height >= 180 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE overall_rating > 85", "answer": "List all of the player ids with a height of at least 180cm and an overall rating higher than 85.\nAdditional table information: table: soccer_1"} +{"question": "SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008", "answer": "Which locations contains both shops that opened after the year 2012 and shops that opened before 2008?\nAdditional table information: table: device"} +{"question": "SELECT COUNT(DISTINCT job) FROM Person", "answer": "How many type of jobs do they have?\nAdditional table information: table: network_2"} +{"question": "SELECT T1.role_description FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code WHERE T2.employee_name = 'Koby'", "answer": "What is the role of the employee named Koby?\nAdditional table information: table: cre_Doc_Control_Systems"} +{"question": "SELECT COUNT(*) FROM Student WHERE Advisor = 1121", "answer": "Advisor 1121 has how many students?\nAdditional table information: table: restaurant_1"} +{"question": "SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id", "answer": "find the name of all departments that do actually have one or more employees assigned to them.\nAdditional table information: table: hr_1"} +{"question": "SELECT COUNT(*) FROM follows", "answer": "How many followers does each user have?\nAdditional table information: table: twitter_1"} +{"question": "SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student", "answer": "Show the ids of all the faculty members who participate in an activity and advise a student.\nAdditional table information: table: activity_1"} +{"question": "SELECT AVG(velocity) FROM flight WHERE pilot = 'Thompson'", "answer": "What is the velocity of the pilot named 'Thompson'?\nAdditional table information: table: flight_company"} +{"question": "SELECT DISTINCT T3.name, T2.title, T1.stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.director = T3.name", "answer": "What are the different reviewer names, movie titles, and stars for every rating where the reviewer had the same name as the director?\nAdditional table information: table: movie_1"} +{"question": "SELECT Restaurant.ResName, SUM(Visits_Restaurant.Spent) FROM Visits_Restaurant JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID GROUP BY Restaurant.ResID ORDER BY SUM(Visits_Restaurant.Spent) ASC NULLS FIRST LIMIT 1", "answer": "At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total.\nAdditional table information: table: restaurant_1"} +{"question": "SELECT T2.name FROM train_station AS T1 JOIN train AS T2 ON T1.train_id = T2.train_id WHERE NOT T1.station_id 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')", "answer": "Find the names of the trains that do not pass any station located in London.\nAdditional table information: table: train_station"} +{"question": "SELECT name FROM captain ORDER BY age NULLS FIRST LIMIT 1", "answer": "What is the name of the youngest captain?\nAdditional table information: table: ship_1"} +{"question": "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'", "answer": "Show the names of all the activities Mark Giuliano participates in.\nAdditional table information: table: activity_1"} +{"question": "SELECT T1.emp_fname, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T3.dept_code = T2.dept_code WHERE T3.dept_name = 'History' AND T2.prof_high_degree = 'Ph.D.'", "answer": "Find the first name and office of the professor who is in the history department and has a Ph.D. degree.\nAdditional table information: table: college_1"} +{"question": "SELECT name FROM airports WHERE city = 'Goroka'", "answer": "What are the names of the airports in the city of Goroka?\nAdditional table information: table: flight_4"} +{"question": "SELECT T2.dept_name, T2.dept_address, COUNT(*) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 3", "answer": "Find the name, address, number of students in the departments that have the top 3 highest number of students.\nAdditional table information: table: college_1"} +{"question": "SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1", "answer": "What is the id of the appointment that started most recently?\nAdditional table information: table: hospital_1"} +{"question": "SELECT DISTINCT firstname FROM list WHERE classroom = 107", "answer": "List the first names of all the students in room 107.\nAdditional table information: table: student_1"} +{"question": "SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date = '08/30/2015'", "answer": "Show all the distinct president votes made on 08/30/2015.\nAdditional table information: table: voter_2"} +{"question": "SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC NULLS FIRST LIMIT 1", "answer": "Find the name of the product that has the smallest capacity.\nAdditional table information: table: product_catalog"} +{"question": "SELECT T1.course_description, T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) > 2", "answer": "What are the descriptions and names of the courses that have student enrollment bigger than 2?\nAdditional table information: table: e_learning"} +{"question": "SELECT Author FROM submission WHERE NOT Submission_ID IN (SELECT Submission_ID FROM acceptance)", "answer": "List the authors who do not have submission to any workshop.\nAdditional table information: table: workshop_paper"} +{"question": "SELECT SUM(city_population) FROM district WHERE city_area > (SELECT AVG(city_area) FROM district)", "answer": "Find the total population of the districts where the area is bigger than the average city area.\nAdditional table information: table: store_product"} +{"question": "SELECT AVG(age), city_code FROM student GROUP BY city_code", "answer": "What is the average age for each city and what are those cities?\nAdditional table information: table: dorm_1"} +{"question": "SELECT SUM(duration), MAX(duration) FROM trip WHERE bike_id = 636", "answer": "What is the total and maximum duration for all trips with the bike id 636?\nAdditional table information: table: bike_1"} +{"question": "SELECT document_type_name, document_type_description FROM Ref_document_types WHERE document_type_code = 'RV'", "answer": "What is the name and description for document type code RV?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT job_id, hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05'", "answer": "What are the job ids and dates of hire for employees hired after November 5th, 2007 and before July 5th, 2009?\nAdditional table information: table: hr_1"} +{"question": "SELECT COUNT(*) FROM Rooms WHERE bedType = 'King'", "answer": "Find the number of rooms with a king bed.\nAdditional table information: table: inn_1"} +{"question": "SELECT title FROM albums ORDER BY title NULLS FIRST", "answer": "List every album ordered by album title in ascending order.\nAdditional table information: table: store_1"} +{"question": "SELECT test_result, COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC", "answer": "For each distinct test result, find the number of students who got the result.\nAdditional table information: table: e_learning"} +{"question": "SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1", "answer": "What are the names of the physician who prescribed the highest dose?\nAdditional table information: table: hospital_1"} +{"question": "SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2002 AND T2.campus = 'Long Beach State University'", "answer": "What is the number of faculty at Long Beach State University in 2002?\nAdditional table information: table: csu_1"} +{"question": "SELECT T2.Name, SUM(T1.Num_of_stock) FROM phone_market AS T1 JOIN phone AS T2 ON T1.Phone_ID = T2.Phone_ID GROUP BY T2.Name", "answer": "For each phone, show its names and total number of stocks.\nAdditional table information: table: phone_market"} +{"question": "SELECT T1.first_name, T1.last_name FROM customer AS T1 JOIN rental AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.rental_date ASC NULLS FIRST LIMIT 1", "answer": "What is the first name and the last name of the customer who made the earliest rental?\nAdditional table information: table: sakila_1"} +{"question": "SELECT T1.City_Town, COUNT(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T1.City_Town", "answer": "How many drama workshop groups are there in each city? Return both the city and the count.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT name FROM stadium WHERE NOT id IN (SELECT stadium_id FROM event)", "answer": "Find the names of stadiums which have never had any event.\nAdditional table information: table: swimming"} +{"question": "SELECT COUNT(*), T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name", "answer": "What are the names of the scientists, and how many projects are each of them working on?\nAdditional table information: table: scientist_1"} +{"question": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC", "answer": "Sort all the industries in descending order of the count of companies in each industry\nAdditional table information: table: company_office"} +{"question": "SELECT COUNT(*) FROM Customers_cards", "answer": "How many customer cards are there?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT COUNT(*), T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.age > 20 GROUP BY T3.dorm_name", "answer": "Find the number of students who is older than 20 in each dorm.\nAdditional table information: table: dorm_1"} +{"question": "SELECT COUNT(*) FROM Allergy_type WHERE allergytype = 'animal'", "answer": "How many allergies have type animal?\nAdditional table information: table: allergy_1"} +{"question": "SELECT campus FROM campuses WHERE YEAR >= 1935 AND YEAR <= 1939", "answer": "What campuses opened between 1935 and 1939?\nAdditional table information: table: csu_1"} +{"question": "SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the location shared by most counties?\nAdditional table information: table: county_public_safety"} +{"question": "SELECT city FROM station GROUP BY city ORDER BY MAX(lat) DESC", "answer": "For each city, list their names in decreasing order by their highest station latitude.\nAdditional table information: table: bike_1"} +{"question": "SELECT name, home_city, age FROM driver", "answer": "Show the name, home city, and age for all drivers.\nAdditional table information: table: school_bus"} +{"question": "SELECT SUM(enr) FROM College", "answer": "What is the total enrollment number of all colleges?\nAdditional table information: table: soccer_2"} +{"question": "SELECT name, headquarter FROM manufacturers ORDER BY revenue DESC", "answer": "Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT customer_id, customer_first_name FROM Customers EXCEPT SELECT T1.customer_id, T2.customer_first_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE card_type_code = 'Credit'", "answer": "What are the ids and first names of customers who do not hold a credit card?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT T3.title, T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building = T2.building AND T1.room_number = T2.room_number JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.capacity = (SELECT MAX(capacity) FROM classroom)", "answer": "What is the title and credits of the course that is taught in the largest classroom (with the highest capacity)?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(DISTINCT payment_method) FROM customers", "answer": "How many different payment methods are there?\nAdditional table information: table: customer_deliveries"} +{"question": "SELECT account_id, date_account_opened, account_name, other_account_details FROM Accounts", "answer": "Show the id, the date of account opened, the account name, and other account detail for all accounts.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2", "answer": "Show the name of colleges that have at least two players.\nAdditional table information: table: match_season"} +{"question": "SELECT city_code FROM Student WHERE LName = 'Kim'", "answer": "Which city does the student whose last name is 'Kim' live in?\nAdditional table information: table: allergy_1"} +{"question": "SELECT T1.name, T1.partitionid FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING COUNT(*) < 2", "answer": "Find the name and partition id for users who tweeted less than twice.\nAdditional table information: table: twitter_1"} +{"question": "SELECT Team FROM player ORDER BY Team ASC NULLS FIRST", "answer": "What are the teams of the players, sorted in ascending alphabetical order?\nAdditional table information: table: school_player"} +{"question": "SELECT CLASS FROM race GROUP BY CLASS HAVING COUNT(*) >= 2", "answer": "List the race class with at least two races.\nAdditional table information: table: race_track"} +{"question": "SELECT Date_Claim_Made, Date_Claim_Settled FROM Claims WHERE Amount_Claimed > (SELECT AVG(Amount_Claimed) FROM Claims)", "answer": "Among all the claims, which claims have a claimed amount larger than the average? List the date the claim was made and the date it was settled.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT COUNT(DISTINCT temporary_acting) FROM management", "answer": "How many acting statuses are there?\nAdditional table information: table: department_management"} +{"question": "SELECT AVG(rating), AVG(resolution) FROM song WHERE languages = 'bangla'", "answer": "What are the average rating and resolution of songs that are in Bangla?\nAdditional table information: table: music_1"} +{"question": "SELECT T1.stu_fname, T1.stu_lname, T4.crs_description FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code", "answer": "Find names of all students who took some course and the course description.\nAdditional table information: table: college_1"} +{"question": "SELECT T2.school_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T1.school_id HAVING SUM(T1.amount) <= 10", "answer": "List all the names of schools with an endowment amount smaller than or equal to 10.\nAdditional table information: table: school_finance"} +{"question": "SELECT Customer_Phone, Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = 'Harold'", "answer": "Find the phone number and email address of customer 'Harold'.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the customer id, first and last name with most number of accounts.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "Which game type has least number of games?\nAdditional table information: table: game_1"} +{"question": "SELECT COUNT(*) FROM College WHERE enr > 15000", "answer": "What is the number of colleges with a student population greater than 15000?\nAdditional table information: table: soccer_2"} +{"question": "SELECT Player, Years_Played FROM player", "answer": "Show the players and the years played.\nAdditional table information: table: match_season"} +{"question": "SELECT T1.Title FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID ORDER BY T2.Price DESC", "answer": "Show the titles of books in descending order of publication price.\nAdditional table information: table: book_2"} +{"question": "SELECT name FROM department GROUP BY departmentID ORDER BY COUNT(departmentID) DESC LIMIT 1", "answer": "Which department has the largest number of employees?\nAdditional table information: table: hospital_1"} +{"question": "SELECT COUNT(DISTINCT StuID) FROM Sportsinfo", "answer": "How many students play sports?\nAdditional table information: table: game_1"} +{"question": "SELECT COUNT(*) FROM student WHERE sex = 'F' AND age < 25", "answer": "How many girl students who are younger than 25?\nAdditional table information: table: dorm_1"} +{"question": "SELECT SUM(acc_bal) FROM customer WHERE state = 'Utah' OR state = 'Texas'", "answer": "What are the total account balances for each customer from Utah or Texas?\nAdditional table information: table: loan_1"} +{"question": "SELECT origin FROM Flight GROUP BY origin ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which origin has most number of flights?\nAdditional table information: table: flight_1"} +{"question": "SELECT T1.director, T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars = 5", "answer": "What are the names of the directors who created a movie with a 5 star rating, and what was the name of those movies?\nAdditional table information: table: movie_1"} +{"question": "SELECT dorm_name FROM dorm ORDER BY student_capacity DESC LIMIT 1", "answer": "What are the names of the dorm with the largest capacity?\nAdditional table information: table: dorm_1"} +{"question": "SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = 'SALE' GROUP BY T2.investor_id HAVING COUNT(*) >= 2", "answer": "Show the ids and details of the investors who have at least two transactions with type code 'SALE'.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT DISTINCT last_name FROM Maintenance_Engineers", "answer": "What are all the distinct last names of all the engineers?\nAdditional table information: table: assets_maintenance"} +{"question": "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", "answer": "Show the station name and number of trains in each station.\nAdditional table information: table: train_station"} +{"question": "SELECT T1.first_name, T1.last_name, T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY SUM(amount) ASC NULLS FIRST LIMIT 1", "answer": "Which customer, who has made at least one payment, has spent the least money? List his or her first name, last name, and the id.\nAdditional table information: table: sakila_1"} +{"question": "SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2 ORDER BY College DESC", "answer": "Show the name of colleges that have at least two players in descending alphabetical order.\nAdditional table information: table: match_season"} +{"question": "SELECT T2.customer_name FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Show the names of customers who have the most mailshots.\nAdditional table information: table: customers_campaigns_ecommerce"} +{"question": "SELECT AVG(rating), AVG(resolution) FROM song WHERE languages = 'bangla'", "answer": "What is the average rating and resolution of all bangla songs?\nAdditional table information: table: music_1"} +{"question": "SELECT director FROM Movie WHERE title = 'Avatar'", "answer": "Who directed Avatar?\nAdditional table information: table: movie_1"} +{"question": "SELECT city, COUNT(*) FROM airports GROUP BY city HAVING COUNT(*) > 1", "answer": "What are the names of all cities with more than one airport and how many airports do they have?\nAdditional table information: table: flight_4"} +{"question": "SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = '660 Shea Crescent' OR T2.How_to_Get_There = 'walk'", "answer": "What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT COUNT(*) FROM aircraft", "answer": "What is the number of aircraft?\nAdditional table information: table: aircraft"} +{"question": "SELECT DISTINCT (catalog_entry_name) FROM catalog_contents", "answer": "Find the names of all the catalog entries.\nAdditional table information: table: product_catalog"} +{"question": "SELECT AVG(UnitPrice) FROM TRACK", "answer": "Find the average unit price for a track.\nAdditional table information: table: chinook_1"} +{"question": "SELECT T2.name, COUNT(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year > 2015 GROUP BY T2.branch_id", "answer": "Show all branch names with the number of members in each branch registered after 2015.\nAdditional table information: table: shop_membership"} +{"question": "SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform", "answer": "What are the different software platforms for devices, and how many devices have each?\nAdditional table information: table: device"} +{"question": "SELECT T1.Name FROM Tourist_Attractions AS T1, VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Vincent' INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1, VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Marcelle'", "answer": "What are the names of the tourist attractions Vincent and Marcelle visit?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T1.name, T1.max_speed FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the name and max speed of the storm that affected the most regions.\nAdditional table information: table: storm_record"} +{"question": "SELECT Issue_Date FROM volume ORDER BY Weeks_on_Top ASC NULLS FIRST LIMIT 1", "answer": "Return the issue date of the volume that has spent the fewest weeks on top.\nAdditional table information: table: music_4"} +{"question": "SELECT DISTINCT Registration_Date, Election_Cycle FROM VOTING_RECORD", "answer": "Report the distinct registration date and the election cycle.\nAdditional table information: table: voter_2"} +{"question": "SELECT birth_country FROM player GROUP BY birth_country ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 3", "answer": "List three countries which are the origins of the least players.\nAdditional table information: table: baseball_1"} +{"question": "SELECT SUM(gamesplayed) FROM Sportsinfo WHERE sportname = 'Football' AND onscholarship = 'Y'", "answer": "How many games are played for all football games by students on scholarship?\nAdditional table information: table: game_1"} +{"question": "SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20", "answer": "From which hometowns did both people older than 23 and younger than 20 come from?\nAdditional table information: table: gymnast"} +{"question": "SELECT COUNT(*) FROM Ref_locations", "answer": "Show the number of locations.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T1.Title = 'Balls to the Wall'", "answer": "Find the name of the artist who made the album 'Balls to the Wall'.\nAdditional table information: table: chinook_1"} +{"question": "SELECT name FROM program ORDER BY launch NULLS FIRST", "answer": "list all the names of programs, ordering by launch time.\nAdditional table information: table: program_share"} +{"question": "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'", "answer": "What are the names of ships that are commanded by both captains with the rank of Midshipman and captains with the rank of Lieutenant?\nAdditional table information: table: ship_1"} +{"question": "SELECT document_name, document_id FROM Documents WHERE document_type_code = 'BK'", "answer": "What are the names and ids of documents that have the type code BK?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT Chair_Name FROM festival_detail ORDER BY YEAR ASC NULLS FIRST", "answer": "What are the names of the chairs of festivals, sorted in ascending order of the year held?\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT fname, lname FROM student WHERE city_code <> 'HKG' ORDER BY age NULLS FIRST", "answer": "List the first and last name of students who are not living in the city with code HKG, and sorted the results by their ages.\nAdditional table information: table: dorm_1"} +{"question": "SELECT mID, AVG(stars) FROM Rating WHERE NOT mID IN (SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = 'Brittany Harris') GROUP BY mID", "answer": "Find the average rating star for each movie that are not reviewed by Brittany Harris.\nAdditional table information: table: movie_1"} +{"question": "SELECT COUNT(DISTINCT party_name) FROM party", "answer": "How many parties do we have?\nAdditional table information: table: party_people"} +{"question": "SELECT Date_of_ceremony, RESULT FROM music_festival", "answer": "Return the dates of ceremony and the results of all music festivals\nAdditional table information: table: music_4"} +{"question": "SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'", "answer": "What are the names of all schools that have students trying out for the position of goal and 'mid'-field.\nAdditional table information: table: soccer_2"} +{"question": "SELECT Customer_Phone, Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = 'Harold'", "answer": "What are the phone and email for customer Harold?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance < 100 INTERSECT SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 500", "answer": "Which themes have had corresponding exhibitions that have had attendance both below 100 and above 500?\nAdditional table information: table: theme_gallery"} +{"question": "SELECT LOCATION, COUNT(*) FROM railway GROUP BY LOCATION", "answer": "Show different locations of railways along with the corresponding number of railways at each location.\nAdditional table information: table: railway"} +{"question": "SELECT AVG(lat), AVG(long) FROM station WHERE city = 'San Jose'", "answer": "What is the average latitude and longitude in San Jose?\nAdditional table information: table: bike_1"} +{"question": "SELECT t3.characteristic_name, t3.characteristic_data_type FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'cumin'", "answer": "List all the characteristic names and data types of product 'cumin'.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Please show the most common type of ships.\nAdditional table information: table: ship_mission"} +{"question": "SELECT train_number, TIME FROM train WHERE origin = 'Chennai' AND destination = 'Guruvayur'", "answer": "Find the number and time of the train that goes from Chennai to Guruvayur.\nAdditional table information: table: station_weather"} +{"question": "SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000", "answer": "What is the name of the movie produced after 2000 and directed by James Cameron?\nAdditional table information: table: movie_1"} +{"question": "SELECT T1.resident_id, T1.other_details, COUNT(*) FROM Residents AS T1 JOIN Residents_Services AS T2 ON T1.resident_id = T2.resident_id GROUP BY T1.resident_id ORDER BY COUNT(*) DESC", "answer": "How many services has each resident requested? List the resident id, details, and the count in descending order of the count.\nAdditional table information: table: local_govt_and_lot"} +{"question": "SELECT name, LOCATION, number_of_platforms FROM station", "answer": "Show the name, location, and number of platforms for all stations.\nAdditional table information: table: train_station"} +{"question": "SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code WHERE T4.dept_name = 'Accounting'", "answer": "How many students are enrolled in the class taught by some professor from the accounting department?\nAdditional table information: table: college_1"} +{"question": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Bob'", "answer": "Who are the friends of Bob?\nAdditional table information: table: network_2"} +{"question": "SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.major = '600' GROUP BY t1.clubname ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the club which has the largest number of members majoring in '600'.\nAdditional table information: table: club_1"} +{"question": "SELECT investor_id, AVG(share_count) FROM TRANSACTIONS GROUP BY investor_id", "answer": "Show the average share count of transactions for different investors.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT AVG(T1.duration) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = 'mp3' AND T2.resolution < 800", "answer": "What is the average duration of songs that have mp3 format and resolution below 800?\nAdditional table information: table: music_1"} +{"question": "SELECT t2.firstname FROM Performance AS t1 JOIN Band AS t2 ON t1.bandmate = t2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY firstname ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the first name of the band mate who perfomed in the most songs?\nAdditional table information: table: music_2"} +{"question": "SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN nurse AS T2 ON T1.AssistingNurse = T2.EmployeeID", "answer": "Find the names of nurses who are nursing an undergoing treatment.\nAdditional table information: table: hospital_1"} +{"question": "SELECT name FROM track EXCEPT SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id WHERE T1.class = 'GT'", "answer": "Give the names of tracks that do not have a race in the class 'GT'.\nAdditional table information: table: race_track"} +{"question": "SELECT asset_make, asset_model, asset_details FROM Assets ORDER BY asset_disposed_date ASC NULLS FIRST", "answer": "List the all the assets make, model, details by the disposed date ascendingly.\nAdditional table information: table: assets_maintenance"} +{"question": "SELECT COUNT(*) FROM member WHERE Membership_card = 'Black'", "answer": "How many members have the black membership card?\nAdditional table information: table: coffee_shop"} +{"question": "SELECT name FROM projects WHERE hours > (SELECT AVG(hours) FROM projects)", "answer": "List the name of all projects that are operated longer than the average working hours of all projects.\nAdditional table information: table: scientist_1"} +{"question": "SELECT T1.teacher_id, T2.last_name FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T1.detention_type_code = 'AFTER' GROUP BY T1.teacher_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the id and last name of the teacher that has the most detentions with detention type code 'AFTER'?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'", "answer": "Return the titles of films that include 'Deleted Scenes' in their special feature section.\nAdditional table information: table: sakila_1"} +{"question": "SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'english' GROUP BY T2.artist_name HAVING COUNT(*) >= 1", "answer": "What are the names and number of works for all artists who have sung at least one song in English?\nAdditional table information: table: music_1"} +{"question": "SELECT T2.Location, T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft", "answer": "What is the location and name of the winning aircraft?\nAdditional table information: table: aircraft"} +{"question": "SELECT title FROM Movie WHERE YEAR > (SELECT MAX(YEAR) FROM Movie WHERE director = 'Steven Spielberg')", "answer": "What are the names of all movies that were created after the most recent Steven Spielberg film?\nAdditional table information: table: movie_1"} +{"question": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2", "answer": "Report the distinct advisors who have more than 2 students.\nAdditional table information: table: voter_2"} +{"question": "SELECT T1.Title, T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 GROUP BY T2.AlbumID", "answer": "What are the titles and ids for albums containing tracks with unit price greater than 1?\nAdditional table information: table: chinook_1"} +{"question": "SELECT * FROM CUSTOMER WHERE State = 'NY'", "answer": "What is all the customer information for customers in NY state?\nAdditional table information: table: chinook_1"} +{"question": "SELECT DISTINCT allergytype FROM Allergy_type", "answer": "Show all allergy types.\nAdditional table information: table: allergy_1"} +{"question": "SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1", "answer": "What is the id of the problem log that is created most recently?\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT Product_Price FROM Products WHERE Product_Name = 'Dining' OR Product_Name = 'Trading Policy'", "answer": "Show the prices of the products named 'Dining' or 'Trading Policy'.\nAdditional table information: table: solvency_ii"} +{"question": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010", "answer": "Which cities served as a host city after 2010?\nAdditional table information: table: city_record"} +{"question": "SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Monterey' AND T2.price < 50", "answer": "What are the wines that have prices lower than 50 and have appelations in Monterey county?\nAdditional table information: table: wine_1"} +{"question": "SELECT COUNT(DISTINCT bedType) FROM Rooms", "answer": "Find the number of distinct bed types available in this inn.\nAdditional table information: table: inn_1"} +{"question": "SELECT T2.customer_first_name, T2.customer_last_name, T2.customer_phone FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_number = '4560596484842'", "answer": "What is the first name, last name, and phone of the customer with card 4560596484842.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT T2.title, T2.film_id, T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which film has the most number of actors or actresses? List the film name, film id and description.\nAdditional table information: table: sakila_1"} +{"question": "SELECT product_type_code, AVG(product_price) FROM products GROUP BY product_type_code", "answer": "What is the average price for each type of product?\nAdditional table information: table: department_store"} +{"question": "SELECT DISTINCT transaction_type FROM Financial_Transactions", "answer": "What are the different types of transactions?\nAdditional table information: table: customers_card_transactions"} +{"question": "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)", "answer": "Find the SSN and name of scientists who are assigned to the project with the longest hours.\nAdditional table information: table: scientist_1"} +{"question": "SELECT COUNT(*), country FROM airport GROUP BY country", "answer": "how many airports are there in each country?\nAdditional table information: table: flight_company"} +{"question": "SELECT COUNT(*) FROM university WHERE NOT school_id IN (SELECT school_id FROM basketball_match)", "answer": "How many schools do not participate in the basketball match?\nAdditional table information: table: university_basketball"} +{"question": "SELECT Competition_type, Country FROM competition", "answer": "What are the types of every competition and in which countries are they located?\nAdditional table information: table: sports_competition"} +{"question": "SELECT T1.country, T1.name, COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.country, T1.name", "answer": "For each country and airline name, how many routes are there?\nAdditional table information: table: flight_4"} +{"question": "SELECT Team FROM player ORDER BY Age DESC LIMIT 5", "answer": "List the teams of the players with the top 5 largest ages.\nAdditional table information: table: school_player"} +{"question": "SELECT name FROM company WHERE Sales_in_Billion > 200 ORDER BY Sales_in_Billion NULLS FIRST, Profits_in_Billion DESC", "answer": "list the names of the companies with more than 200 sales in the descending order of sales and profits.\nAdditional table information: table: company_employee"} +{"question": "SELECT start_station_id, start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*) >= 200", "answer": "What are the ids and names of all start stations that were the beginning of at least 200 trips?\nAdditional table information: table: bike_1"} +{"question": "SELECT color_description FROM ref_colors", "answer": "List the description of all the colors.\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT T2.emp_fname FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num GROUP BY T1.prof_num HAVING COUNT(*) > 1", "answer": "What are the first names of all professors who teach more than one class?\nAdditional table information: table: college_1"} +{"question": "SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1", "answer": "What is the name of the room that can accommodate the most people?\nAdditional table information: table: inn_1"} +{"question": "SELECT COUNT(*) FROM rent_arrears", "answer": "How many council taxes are collected for renting arrears ?\nAdditional table information: table: local_govt_mdm"} +{"question": "SELECT name, salary FROM Employee ORDER BY salary NULLS FIRST", "answer": "Show name and salary for all employees sorted by salary.\nAdditional table information: table: flight_1"} +{"question": "SELECT T2.building, T2.room_number, T2.semester, T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = 'Psychology' ORDER BY T1.title NULLS FIRST", "answer": "Find the building, room number, semester and year of all courses offered by Psychology department sorted by course titles.\nAdditional table information: table: college_2"} +{"question": "SELECT DISTINCT card_type_code FROM Customers_Cards", "answer": "What are the different card type codes?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT date_of_transaction FROM TRANSACTIONS WHERE transaction_type_code = 'SALE'", "answer": "Show all dates of transactions whose type code is 'SALE'.\nAdditional table information: table: tracking_share_transactions"} +{"question": "SELECT name, headquarter, founder FROM manufacturers ORDER BY revenue DESC LIMIT 1", "answer": "Find the name, headquarter and founder of the manufacturer that has the highest revenue.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT Industry FROM Companies WHERE Headquarters = 'USA' INTERSECT SELECT Industry FROM Companies WHERE Headquarters = 'China'", "answer": "Which industries have both companies with headquarter in 'USA' and companies with headquarter in 'China'?\nAdditional table information: table: company_office"} +{"question": "SELECT COUNT(*) FROM ALBUM", "answer": "Find the number of albums.\nAdditional table information: table: chinook_1"} +{"question": "SELECT name, LOCATION, year_opened FROM track WHERE seating > (SELECT AVG(seating) FROM track)", "answer": "Show the name, location, open year for all tracks with a seating higher than the average.\nAdditional table information: table: race_track"} +{"question": "SELECT rID FROM Rating WHERE stars <> 4", "answer": "Find the ids of reviewers who didn't only give 4 star.\nAdditional table information: table: movie_1"} +{"question": "SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students", "answer": "Find the common personal name of course authors and students.\nAdditional table information: table: e_learning"} +{"question": "SELECT MAX(cost), MIN(cost), AVG(cost) FROM procedures", "answer": "What are the highest cost, lowest cost and average cost of procedures?\nAdditional table information: table: hospital_1"} +{"question": "SELECT Name FROM pilot ORDER BY Age DESC", "answer": "List names of all pilot in descending order of age.\nAdditional table information: table: aircraft"} +{"question": "SELECT building FROM Faculty WHERE rank = 'Professor' GROUP BY building HAVING COUNT(*) >= 10", "answer": "Show all the buildings that have at least 10 professors.\nAdditional table information: table: activity_1"} +{"question": "SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = 'operating system' OR T2.course_name = 'data structure'", "answer": "Find the addresses of the course authors who teach the course with name 'operating system' or 'data structure'.\nAdditional table information: table: e_learning"} +{"question": "SELECT Date_Claim_Made, Date_Claim_Settled FROM Settlements", "answer": "Tell me the the claim date and settlement date for each settlement case.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT T1.Name, T3.Visit_Date FROM Tourist_Attractions AS T1, VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = 'Vincent' OR T2.Tourist_Details = 'Vivian'", "answer": "For each tourist attraction, return its name and the date when the tourists named Vincent or Vivian visited there.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT T1.department_name, T2.city, T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id", "answer": "What are the department names, cities, and state provinces for each department?\nAdditional table information: table: hr_1"} +{"question": "SELECT dept_name FROM student GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the name of department has the highest amount of students?\nAdditional table information: table: college_2"} +{"question": "SELECT product FROM product WHERE product LIKE '%Scanner%'", "answer": "Find all the product whose name contains the word 'Scanner'.\nAdditional table information: table: store_product"} +{"question": "SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid ORDER BY SUM(hours_played) DESC LIMIT 1", "answer": "Show the game name that has most number of hours played.\nAdditional table information: table: game_1"} +{"question": "SELECT user_name, password FROM users GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "List all the username and passwords of users with the most popular role.\nAdditional table information: table: document_management"} +{"question": "SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 5", "answer": "List the names of 5 users followed by the largest number of other users.\nAdditional table information: table: twitter_1"} +{"question": "SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3", "answer": "Show teams that have suffered more than three eliminations.\nAdditional table information: table: wrestler"} +{"question": "SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = 'Heilo'", "answer": "What are all the instruments used by the musician with the last name 'Heilo'?\nAdditional table information: table: music_2"} +{"question": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'", "answer": "How many instruments does the song 'Le Pop' use?\nAdditional table information: table: music_2"} +{"question": "SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN nurse AS T2 ON T1.AssistingNurse = T2.EmployeeID", "answer": "Which nurses are in charge of patients undergoing treatments?\nAdditional table information: table: hospital_1"} +{"question": "SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE = 'Fall'", "answer": "What are the distinct secretary votes in the fall election cycle?\nAdditional table information: table: voter_2"} +{"question": "SELECT name FROM patient EXCEPT SELECT T1.name FROM patient AS T1 JOIN Prescribes AS T2 ON T2.Patient = T1.SSN JOIN Medication AS T3 ON T2.Medication = T3.Code WHERE T3.name = 'Procrastin-X'", "answer": "What are the names of patients who are not taking the medication of Procrastin-X.\nAdditional table information: table: hospital_1"} +{"question": "SELECT name FROM projects WHERE hours > (SELECT AVG(hours) FROM projects)", "answer": "What are the names of projects that have taken longer than the average number of hours for all projects?\nAdditional table information: table: scientist_1"} +{"question": "SELECT date_of_latest_logon FROM Students WHERE family_name = 'Jaskolski' OR family_name = 'Langosh'", "answer": "Find the latest logon date of the students whose family name is 'Jaskolski' or 'Langosh'.\nAdditional table information: table: e_learning"} +{"question": "SELECT city FROM park GROUP BY city HAVING COUNT(*) BETWEEN 2 AND 4", "answer": "Find all the cities that have 2 to 4 parks.\nAdditional table information: table: baseball_1"} +{"question": "SELECT RoomId, roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1", "answer": "Find the id and name of the most expensive base price room.\nAdditional table information: table: inn_1"} +{"question": "SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3", "answer": "How much salary did the top 3 well-paid players get in 2001?\nAdditional table information: table: baseball_1"} +{"question": "SELECT cust_name FROM customer ORDER BY acc_bal NULLS FIRST", "answer": "List the name of all customers sorted by their account balance in ascending order.\nAdditional table information: table: loan_1"} +{"question": "SELECT COUNT(*) FROM Customers", "answer": "How many customers do we have?\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = 'Rock'", "answer": "How many tracks belong to rock genre?\nAdditional table information: table: chinook_1"} +{"question": "SELECT fname, lname FROM authors ORDER BY lname NULLS FIRST", "answer": "Retrieve all the first and last names of authors in the alphabetical order of last names.\nAdditional table information: table: icfp_1"} +{"question": "SELECT DISTINCT name FROM races ORDER BY name DESC", "answer": "What are the different names of all the races in reverse alphabetical order?\nAdditional table information: table: formula_1"} +{"question": "SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id = T2.category_id JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'HUNGER ROOF'", "answer": "Return the name of the category to which the film 'HUNGER ROOF' belongs.\nAdditional table information: table: sakila_1"} +{"question": "SELECT forename, surname FROM drivers WHERE nationality = 'German'", "answer": "Find the forename and surname of drivers whose nationality is German?\nAdditional table information: table: formula_1"} +{"question": "SELECT roomName, RoomId FROM Rooms WHERE basePrice > 160 AND maxOccupancy > 2", "answer": "What are the room names and ids of all the rooms that cost more than 160 and can accommodate more than two people.\nAdditional table information: table: inn_1"} +{"question": "SELECT T2.address, T1.email FROM customer AS T1 JOIN address AS T2 ON T2.address_id = T1.address_id WHERE T1.first_name = 'LINDA'", "answer": "Return the address and email of the customer with the first name Linda.\nAdditional table information: table: sakila_1"} +{"question": "SELECT COUNT(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE '%a%'", "answer": "How many lessons were taught by a staff member whose first name has the letter 'a' in it?\nAdditional table information: table: driving_school"} +{"question": "SELECT T1.theme, T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.ticket_price > (SELECT AVG(ticket_price) FROM exhibition)", "answer": "What is the theme and artist name for the exhibition with a ticket price higher than the average?\nAdditional table information: table: theme_gallery"} +{"question": "SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID WHERE T2.value_points > 70", "answer": "What are the names of the technicians that are assigned to repair machines with more point values than 70?\nAdditional table information: table: machine_repair"} +{"question": "SELECT COUNT(DISTINCT course_id) FROM course WHERE dept_name = 'Physics'", "answer": "Count the number of courses in the Physics department.\nAdditional table information: table: college_2"} +{"question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in", "answer": "Show the ids of the students who don't participate in any activity.\nAdditional table information: table: activity_1"} +{"question": "SELECT COUNT(DISTINCT school_id) FROM basketball_match", "answer": "How many schools are in the basketball match?\nAdditional table information: table: university_basketball"} +{"question": "SELECT T2.theme, T1.date, T1.attendance FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T2.year = 2004", "answer": "What is the theme, date, and attendance for the exhibition in year 2004?\nAdditional table information: table: theme_gallery"} +{"question": "SELECT rID FROM Rating WHERE stars <> 4", "answer": "What are the ids of all reviewers who have not given 4 stars at least once?\nAdditional table information: table: movie_1"} +{"question": "SELECT * FROM Albums WHERE YEAR = 2012", "answer": "Find all the albums in 2012.\nAdditional table information: table: music_2"} +{"question": "SELECT Room FROM FACULTY WHERE Rank = 'Professor' AND Building = 'NEB'", "answer": "What are the rooms for members of the faculty who are professors and who live in building NEB?\nAdditional table information: table: college_3"} +{"question": "SELECT MAX(T1.RAM_MiB), MIN(T1.RAM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = 'Nokia Corporation'", "answer": "What is maximum and minimum RAM size of phone produced by company named 'Nokia Corporation'?\nAdditional table information: table: phone_1"} +{"question": "SELECT Name FROM people WHERE NOT People_id IN (SELECT Affirmative FROM debate_people)", "answer": "List the names of people that have not been on the affirmative side of debates.\nAdditional table information: table: debate"} +{"question": "SELECT SUM(Share_in_percent) FROM channel WHERE OWNER = 'CCTV'", "answer": "find the total percentage share of all channels owned by CCTV.\nAdditional table information: table: program_share"} +{"question": "SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id = T4.course_id WHERE T3.title = 'International Finance')", "answer": "What are the names of students who have taken the prerequisite for the course International Finance?\nAdditional table information: table: college_2"} +{"question": "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)", "answer": "What are the party emails associated with parties that used the party form that is the most common?\nAdditional table information: table: e_government"} +{"question": "SELECT COUNT(*), T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand", "answer": "How many medications are prescribed for each brand?\nAdditional table information: table: hospital_1"} +{"question": "SELECT name, CLASS, date FROM race", "answer": "What are the names, classes, and dates for all races?\nAdditional table information: table: race_track"} +{"question": "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", "answer": "Find the city that hosted the most events.\nAdditional table information: table: city_record"} +{"question": "SELECT COUNT(*) FROM Vehicles", "answer": "How many vehicles exist?\nAdditional table information: table: driving_school"} +{"question": "SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE '2%'", "answer": "Which catalog contents have a product stock number that starts from '2'? Show the catalog entry names.\nAdditional table information: table: product_catalog"} +{"question": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T1.flno = 99", "answer": "What is the aircraft name for the flight with number 99\nAdditional table information: table: flight_1"} +{"question": "SELECT Festival_Name, LOCATION FROM festival_detail", "answer": "What are the names and locations of festivals?\nAdditional table information: table: entertainment_awards"} +{"question": "SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.family_name = 'Zieme' AND T2.personal_name = 'Bernie'", "answer": "On what dates did the student with family name 'Zieme' and personal name 'Bernie' enroll in and complete the courses?\nAdditional table information: table: e_learning"} +{"question": "SELECT station_id, LOCATION, manager_name FROM gas_station ORDER BY open_year NULLS FIRST", "answer": "What are the gas station ids, locations, and manager names for the gas stations ordered by opening year?\nAdditional table information: table: gas_company"} +{"question": "SELECT name FROM event ORDER BY YEAR DESC", "answer": "List all the event names by year from the most recent to the oldest.\nAdditional table information: table: swimming"} +{"question": "SELECT Name, Country FROM member", "answer": "What are the names and countries of members?\nAdditional table information: table: decoration_competition"} +{"question": "SELECT T1.Actual_Delivery_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID WHERE T2.Order_Quantity = 1", "answer": "List the actual delivery date for all the orders with quantity 1\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = 'Spain' AND T1.year > 2017", "answer": "What are the names of races that were held after 2017 and the circuits were in the country of Spain?\nAdditional table information: table: formula_1"} +{"question": "SELECT name FROM city WHERE county_ID = (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1)", "answer": "Show the name of cities in the county that has the largest number of police officers.\nAdditional table information: table: county_public_safety"} +{"question": "SELECT DISTINCT building FROM classroom WHERE capacity > 50", "answer": "Find the buildings which have rooms with capacity more than 50.\nAdditional table information: table: college_2"} +{"question": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.order_date DESC LIMIT 1", "answer": "Find the name of the customer who made an order most recently.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT AVG(price) FROM products WHERE manufacturer = 2", "answer": "What is the average price of products with manufacturer codes equal to 2?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT AVG(t1.age), AVG(Years_working), t2.work_type FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_id = t2.journalist_id GROUP BY t2.work_type", "answer": "Find the average age and experience working length of journalists working on different role type.\nAdditional table information: table: news_report"} +{"question": "SELECT Advisor, COUNT(*) FROM Student GROUP BY Advisor ORDER BY COUNT(Advisor) DESC LIMIT 1", "answer": "Which Advisor has most of students? List advisor and the number of students.\nAdditional table information: table: restaurant_1"} +{"question": "SELECT Name FROM TRACK WHERE Name LIKE '%you%'", "answer": "Find the names of all the tracks that contain the word 'you'.\nAdditional table information: table: chinook_1"} +{"question": "SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math' ORDER BY T3.tot_cred NULLS FIRST", "answer": "What are the names of all instructors who advise students in the math depart sorted by total credits of the student.\nAdditional table information: table: college_2"} +{"question": "SELECT AVG(access_count) FROM documents", "answer": "Find the average access count across all documents?\nAdditional table information: table: document_management"} +{"question": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which industry has the most companies?\nAdditional table information: table: company_office"} +{"question": "SELECT first_name FROM actor GROUP BY first_name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the most common first name among all actors.\nAdditional table information: table: sakila_1"} +{"question": "SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t2.customer_details = 'Dayana Robel'", "answer": "What are the type codes of the policies used by the customer 'Dayana Robel'?\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' INTERSECT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'", "answer": "What are the names of all the tracks that are in both the Movies and music playlists?\nAdditional table information: table: store_1"} +{"question": "SELECT T1.Delegate, T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID", "answer": "Show the delegates and the names of the party they belong to.\nAdditional table information: table: election"} +{"question": "SELECT first_name, last_name, salary FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T3.city = 'London'", "answer": "display the full name (first and last name), and salary of those employees who working in any department located in London.\nAdditional table information: table: hr_1"} +{"question": "SELECT SUM(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990", "answer": "Compute the total salary that the player with first name Len and last name Barker received between 1985 to 1990.\nAdditional table information: table: baseball_1"} +{"question": "SELECT T1.Name, T2.Tourist_Attraction_ID, COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID", "answer": "What are the name, id and the corresponding number of visits for each tourist attraction?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT Payment_Method_Code, Date_Payment_Made, Amount_Payment FROM Payments ORDER BY Date_Payment_Made ASC NULLS FIRST", "answer": "What are the method, date and amount of each payment? Sort the list in ascending order of date.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT first_name, last_name FROM Customers", "answer": "List the first name and last name of all customers.\nAdditional table information: table: driving_school"} +{"question": "SELECT name, LOCATION FROM track", "answer": "Show the name and location for all tracks.\nAdditional table information: table: race_track"} +{"question": "SELECT name, born_state, age FROM head ORDER BY age NULLS FIRST", "answer": "List the name, born state and age of the heads of departments ordered by age.\nAdditional table information: table: department_management"} +{"question": "SELECT T1.title, T1.credits, T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING COUNT(*) > 1", "answer": "Find the title, credit, and department name of courses that have more than one prerequisites?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(*), city FROM airports WHERE country = 'United States' GROUP BY city ORDER BY COUNT(*) DESC", "answer": "How many airports are there per city in the US ordered from most to least?\nAdditional table information: table: flight_4"} +{"question": "SELECT role_code, COUNT(*) FROM Employees GROUP BY role_code", "answer": "Show all role codes and the number of employees in each role.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "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", "answer": "What is the id and detail of the vehicle used in lessons for most of the times?\nAdditional table information: table: driving_school"} +{"question": "SELECT Date, Vote_Percent FROM election", "answer": "List the dates and vote percents of elections.\nAdditional table information: table: election_representative"} +{"question": "SELECT Name FROM mountain WHERE NOT Mountain_ID IN (SELECT Mountain_ID FROM climber)", "answer": "List the names of mountains that do not have any climber.\nAdditional table information: table: climbing"} +{"question": "SELECT AVG(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = 'Robinson R-22'", "answer": "What is the average total number of passengers of airports that are associated with aircraft 'Robinson R-22'?\nAdditional table information: table: aircraft"} +{"question": "SELECT name FROM instructor WHERE NOT id IN (SELECT id FROM teaches)", "answer": "Find the name of instructors who didn't teach any courses?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = 'Defender'", "answer": "How many distinct official languages are there among countries of players whose positions are defenders.\nAdditional table information: table: match_season"} +{"question": "SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Retrieve the country that has published the most papers.\nAdditional table information: table: icfp_1"} +{"question": "SELECT destination FROM Flight GROUP BY destination ORDER BY COUNT(*) NULLS FIRST LIMIT 1", "answer": "What destination has the fewest number of flights?\nAdditional table information: table: flight_1"} +{"question": "SELECT channel_code, contact_number FROM customer_contact_channels WHERE active_to_date - active_from_date = (SELECT active_to_date - active_from_date FROM customer_contact_channels ORDER BY (active_to_date - active_from_date) DESC LIMIT 1)", "answer": "Return the channel code and contact number of the customer contact channel whose active duration was the longest.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT AVG(high_temperature), day_of_week FROM weekly_weather GROUP BY day_of_week", "answer": "What is the average high temperature for each day of week?\nAdditional table information: table: station_weather"} +{"question": "SELECT COUNT(DISTINCT Publication_Date) FROM publication", "answer": "How many distinct publication dates are there in our record?\nAdditional table information: table: book_2"} +{"question": "SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'", "answer": "What are the payment dates for any payments that have an amount greater than 10 or were handled by a staff member with the first name Elsa?\nAdditional table information: table: sakila_1"} +{"question": "SELECT T2.name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name", "answer": "What is the average number of stars that each reviewer awards for a movie?\nAdditional table information: table: movie_1"} +{"question": "SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T2.Country = 'Japan' ORDER BY T1.Year DESC", "answer": "Please list the years of film market estimations when the market is in country 'Japan' in descending order.\nAdditional table information: table: film_rank"} +{"question": "SELECT COUNT(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.city_code = 'NYC' AND T2.Election_Cycle = 'Spring'", "answer": "Find the number of students whose city code is NYC and who have class senator votes in the spring election cycle.\nAdditional table information: table: voter_2"} +{"question": "SELECT address_content FROM addresses WHERE city = 'East Julianaside' AND state_province_county = 'Texas' UNION SELECT address_content FROM addresses WHERE city = 'Gleasonmouth' AND state_province_county = 'Arizona'", "answer": "What are all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT T2.Fname, T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY COUNT(*) DESC LIMIT 3", "answer": "What are the first and last names of the instructors who teach the top 3 number of courses?\nAdditional table information: table: college_3"} +{"question": "SELECT product_id FROM Order_Items GROUP BY product_id HAVING COUNT(*) > 3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING SUM(total_amount_purchased) > 80000", "answer": "Return the ids of all products that were ordered more than three times or supplied more than 80000.\nAdditional table information: table: department_store"} +{"question": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.distance > 5000 GROUP BY T1.eid ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the salaray and name of the employee with the most certificates to fly planes more than 5000?\nAdditional table information: table: flight_1"} +{"question": "SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2003 ORDER BY T2.faculty DESC LIMIT 1", "answer": "Which campus has the most faculties in year 2003?\nAdditional table information: table: csu_1"} +{"question": "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", "answer": "Which is the email of the party that has used the services the most number of times?\nAdditional table information: table: e_government"} +{"question": "SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = 'United States'", "answer": "Show the distinct fate of missions that involve ships with nationality 'United States'\nAdditional table information: table: ship_mission"} +{"question": "SELECT SUM(stu_hrs), dept_code FROM student GROUP BY dept_code", "answer": "How many hours do the students spend studying in each department?\nAdditional table information: table: college_1"} +{"question": "SELECT Age FROM people ORDER BY Height DESC LIMIT 1", "answer": "Return the age of the person with the greatest height.\nAdditional table information: table: gymnast"} +{"question": "SELECT T1.cust_name, T1.acc_type FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING SUM(T2.amount) > 5000", "answer": "Find the name and account balance of the customers who have loans with a total amount of more than 5000.\nAdditional table information: table: loan_1"} +{"question": "SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton' AND capacity < 50", "answer": "How many rooms whose capacity is less than 50 does the Lamberton building have?\nAdditional table information: table: college_2"} +{"question": "SELECT StuID FROM Student WHERE city_code = 'CHI'", "answer": "Show ids for all students who live in CHI.\nAdditional table information: table: game_1"} +{"question": "SELECT LName FROM STUDENT WHERE Major = 50", "answer": "Find the last names of students with major 50.\nAdditional table information: table: voter_2"} +{"question": "SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = 'cumin'", "answer": "What is the unit of measurement of product named 'cumin'?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT Num_of_Component, name FROM furniture WHERE Num_of_Component > 10", "answer": "Find the component amounts and names of all furnitures that have more than 10 components.\nAdditional table information: table: manufacturer"} +{"question": "SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_outcomes)", "answer": "What are the details of the project with no outcomes?\nAdditional table information: table: tracking_grants_for_research"} +{"question": "SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = 'Clara')", "answer": "display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara.\nAdditional table information: table: hr_1"} +{"question": "SELECT name FROM mill WHERE name LIKE '%Moulin%'", "answer": "Which of the mill names contains the french word 'Moulin'?\nAdditional table information: table: architecture"} +{"question": "SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall'", "answer": "What are the first names of all students in Smith Hall?\nAdditional table information: table: dorm_1"} +{"question": "SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*) <= 5", "answer": "List the types of competition that have at most five competitions of that type.\nAdditional table information: table: sports_competition"} +{"question": "SELECT dept_name FROM department ORDER BY dept_name NULLS FIRST", "answer": "list names of all departments ordered by their names.\nAdditional table information: table: college_1"} +{"question": "SELECT T1.FirstName, T1.SupportRepId FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) >= 10", "answer": "Please show the employee first names and ids of employees who serve at least 10 customers.\nAdditional table information: table: chinook_1"} +{"question": "SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = 'City Mall' INTERSECT SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = 'Village Store'", "answer": "What are the names of the districts that have both mall and village store style shops?\nAdditional table information: table: store_product"} +{"question": "SELECT Open_Date, Open_Year FROM shop WHERE Shop_Name = 'Apple'", "answer": "List the open date of open year of the shop named 'Apple'.\nAdditional table information: table: device"} +{"question": "SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25'", "answer": "Find the distinct details of invoices which are created before 1989-09-03 or after 2007-12-25.\nAdditional table information: table: tracking_orders"} +{"question": "SELECT name FROM useracct WHERE NOT u_id IN (SELECT u_id FROM review)", "answer": "Find the names of users who did not leave any review.\nAdditional table information: table: epinions_1"} +{"question": "SELECT first_name, last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163)", "answer": "Provide the full names of employees earning more than the employee with id 163.\nAdditional table information: table: hr_1"} +{"question": "SELECT text FROM tweets WHERE text LIKE '%intern%'", "answer": "Return the text of tweets about the topic 'intern'.\nAdditional table information: table: twitter_1"} +{"question": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'Colorado'", "answer": "Find the name of customers who are living in Colorado?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Return the result that is most frequent at music festivals.\nAdditional table information: table: music_4"} +{"question": "SELECT COUNT(DISTINCT T3.title) FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.type = 'Studio'", "answer": "Find the number of songs in all the studio albums.\nAdditional table information: table: music_2"} +{"question": "SELECT name, salary FROM instructor WHERE salary < (SELECT AVG(salary) FROM instructor WHERE dept_name = 'Physics')", "answer": "What are the names and salaries for instructors who earn less than the average salary of instructors in the Physics department?\nAdditional table information: table: college_2"} +{"question": "SELECT DISTINCT T1.first_name, T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS'", "answer": "What is the full name of the staff member who has rented a film to a customer with the first name April and the last name Burns?\nAdditional table information: table: sakila_1"} +{"question": "SELECT t1.product_name, COUNT(*) FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name", "answer": "List the name of all products along with the number of complaints that they have received.\nAdditional table information: table: customer_complaints"} +{"question": "SELECT Price FROM WINE WHERE YEAR < 2010", "answer": "Return the prices of wines produced before 2010.\nAdditional table information: table: wine_1"} +{"question": "SELECT Carrier, COUNT(*) FROM phone GROUP BY Carrier", "answer": "Show different carriers of phones together with the number of phones with each carrier.\nAdditional table information: table: phone_market"} +{"question": "SELECT customer_name FROM customers WHERE payment_method = 'Cash'", "answer": "Which customers use 'Cash' for payment method? Return the customer names.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT COUNT(*) FROM scientists WHERE NOT ssn IN (SELECT scientist FROM AssignedTo)", "answer": "Find the number of scientists who are not assigned to any project.\nAdditional table information: table: scientist_1"} +{"question": "SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = 'english' GROUP BY T2.artist_name HAVING COUNT(*) >= 1", "answer": "Find the names and number of works of all artists who have at least one English songs.\nAdditional table information: table: music_1"} +{"question": "SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 INTERSECT SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top < 2", "answer": "What are the famous titles of artists who have not only had volumes that spent more than 2 weeks on top but also volumes that spent less than 2 weeks on top?\nAdditional table information: table: music_4"} +{"question": "SELECT SUM(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name <> 'Brown'", "answer": "What is the total balance of savings accounts not belonging to someone with the name Brown?\nAdditional table information: table: small_bank_1"} +{"question": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 4", "answer": "Find the types of documents with more than 4 documents.\nAdditional table information: table: document_management"} +{"question": "SELECT fname FROM authors ORDER BY fname NULLS FIRST", "answer": "Find the first names of all the authors ordered in alphabetical order.\nAdditional table information: table: icfp_1"} +{"question": "SELECT COUNT(*) FROM Person WHERE age > 30 AND job = 'engineer'", "answer": "How many people whose age is greater 30 and job is engineer?\nAdditional table information: table: network_2"} +{"question": "SELECT product_category_description FROM ref_product_categories WHERE product_category_code = 'Spices'", "answer": "What is the description of the product category with the code 'Spices'?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) INTERSECT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30)", "answer": "What are the names of every person who has a friend over 40 and under 30?\nAdditional table information: table: network_2"} +{"question": "SELECT SUM(Amount_Payment) FROM Payments", "answer": "What is the total amount of payment?\nAdditional table information: table: insurance_policies"} +{"question": "SELECT DISTINCT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 1 EXCEPT SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = 'OTHA' AND T2.lastname = 'MOYER'", "answer": "What are the first and last names of the first-grade students who are NOT taught by teacher OTHA MOYER?\nAdditional table information: table: student_1"} +{"question": "SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' INTERSECT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room'", "answer": "Find the name of dorms which have both TV Lounge and Study Room as amenities.\nAdditional table information: table: dorm_1"} +{"question": "SELECT COUNT(DISTINCT last_name) FROM actor", "answer": "How many different last names do the actors and actresses have?\nAdditional table information: table: sakila_1"} +{"question": "SELECT T2.customer_first_name, T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = '900'", "answer": "Show the first name and last name for the customer with account name 900.\nAdditional table information: table: customers_and_invoices"} +{"question": "SELECT T1.name, T1.lat, MIN(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.end_station_id GROUP BY T2.end_station_id", "answer": "For each station, find its latitude and the minimum duration of trips that ended at the station.\nAdditional table information: table: bike_1"} +{"question": "SELECT COUNT(DISTINCT customer_id) FROM customer_orders WHERE order_status = 'Cancelled'", "answer": "Return the number of customers who have at least one order with 'Cancelled' status.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT director FROM Movie GROUP BY director HAVING COUNT(*) = 1", "answer": "What are the names of the directors who made exactly one movie?\nAdditional table information: table: movie_1"} +{"question": "SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.rating DESC LIMIT 3", "answer": "What are the names of the singers who sang the top 3 most highly rated songs and what countries do they hail from?\nAdditional table information: table: music_1"} +{"question": "SELECT COUNT(*), city FROM employees WHERE title = 'IT Staff' GROUP BY city", "answer": "Find the number of employees whose title is IT Staff from each city?\nAdditional table information: table: store_1"} +{"question": "SELECT pets_allowed_yn, AVG(price_range) FROM HOTELS GROUP BY pets_allowed_yn", "answer": "What are the average prices of hotels grouped by their pet policy.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT salary, manager_id FROM employees WHERE manager_id <> 'null'", "answer": "Find the salary and manager number for those employees who is working under a manager.\nAdditional table information: table: hr_1"} +{"question": "SELECT name FROM procedures ORDER BY cost NULLS FIRST LIMIT 3", "answer": "What are the three most costly procedures?\nAdditional table information: table: hospital_1"} +{"question": "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", "answer": "Find the the grape whose white color grapes are used to produce wines with scores higher than 90.\nAdditional table information: table: wine_1"} +{"question": "SELECT COUNT(DISTINCT T1.donator_name) FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn'", "answer": "How many donors have endowment for school named 'Glenn'?\nAdditional table information: table: school_finance"} +{"question": "SELECT t2.date_opened, t2.date_closed FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name LIKE '%Diana%'", "answer": "What are the open and close dates of all the policies used by the customer who have 'Diana' in part of their names?\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT COUNT(*) FROM Ref_budget_codes", "answer": "Count the number of budget codes.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT document_type_code, document_type_name FROM Ref_document_types", "answer": "List all document type codes and document type names.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT name FROM scientists ORDER BY name NULLS FIRST", "answer": "What are the names of all the scientists in alphabetical order?\nAdditional table information: table: scientist_1"} +{"question": "SELECT TYPE, COUNT(*) FROM store GROUP BY TYPE", "answer": "Find all types of store and number of them.\nAdditional table information: table: store_product"} +{"question": "SELECT name FROM player WHERE points > (SELECT AVG(points) FROM player)", "answer": "what are the name of players who get more than the average points.\nAdditional table information: table: sports_competition"} +{"question": "SELECT milliseconds FROM tracks WHERE name = 'Fast As a Shark'", "answer": "How many milliseconds long is Fast As a Shark?\nAdditional table information: table: store_1"} +{"question": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING COUNT(*) > 60", "answer": "Find the names of rooms that have been reserved for more than 60 times.\nAdditional table information: table: inn_1"} +{"question": "SELECT T3.title, T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building = T2.building AND T1.room_number = T2.room_number JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.capacity = (SELECT MAX(capacity) FROM classroom)", "answer": "Give the title and credits for the course that is taught in the classroom with the greatest capacity.\nAdditional table information: table: college_2"} +{"question": "SELECT patient FROM stay WHERE room = 111 ORDER BY staystart DESC LIMIT 1", "answer": "What is the id of the patient who stayed in room 111 most recently?\nAdditional table information: table: hospital_1"} +{"question": "SELECT COUNT(*) FROM address WHERE district = 'California'", "answer": "How many addresses are in the district of California?\nAdditional table information: table: sakila_1"} +{"question": "SELECT document_id, document_name FROM Documents", "answer": "Show the ids and names of all documents.\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId GROUP BY T2.Name ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which artist has the most albums?\nAdditional table information: table: chinook_1"} +{"question": "SELECT title, phone, hire_date FROM employees WHERE first_name = 'Nancy' AND last_name = 'Edwards'", "answer": "What is the title, phone and hire date of Nancy Edwards?\nAdditional table information: table: store_1"} +{"question": "SELECT AVG(weight) FROM Player", "answer": "What is the average weight of all players?\nAdditional table information: table: soccer_1"} +{"question": "SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the marketing region code that has the most drama workshop groups?\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT Delegate, Committee FROM election", "answer": "What are the delegate and committee information for each election record?\nAdditional table information: table: election"} +{"question": "SELECT product_price FROM products WHERE NOT product_id IN (SELECT product_id FROM complaints)", "answer": "What are the prices of products that have never gotten a complaint?\nAdditional table information: table: customer_complaints"} +{"question": "SELECT Other_Details FROM LOCATIONS WHERE Location_Name = 'UK Gallery'", "answer": "Return the detail of the location named 'UK Gallery'.\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT country_id, COUNT(*) FROM locations GROUP BY country_id", "answer": "Give the country id and corresponding count of cities in each country.\nAdditional table information: table: hr_1"} +{"question": "SELECT AVG(balance) FROM checking", "answer": "Find the average checking balance.\nAdditional table information: table: small_bank_1"} +{"question": "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", "answer": "Show the station name with greatest number of trains.\nAdditional table information: table: train_station"} +{"question": "SELECT CName FROM COURSE ORDER BY Credits NULLS FIRST", "answer": "What are the course names, ordered by credits?\nAdditional table information: table: college_3"} +{"question": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) INTERSECT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30)", "answer": "Find the name of the person who has friends with age above 40 and under age 30?\nAdditional table information: table: network_2"} +{"question": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id GROUP BY t2.ship_id HAVING COUNT(*) > 1", "answer": "Find the name of the ships that have more than one captain.\nAdditional table information: table: ship_1"} +{"question": "SELECT COUNT(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = 'Dayana Robel'", "answer": "Count the total number of policies used by the customer named 'Dayana Robel'.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT COUNT(*) FROM airports WHERE name LIKE '%International%'", "answer": "Find the number of airports whose name contain the word 'International'.\nAdditional table information: table: flight_4"} +{"question": "SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id = T2.i_id GROUP BY T2.i_id HAVING COUNT(*) > 1", "answer": "Find the name of instructors who are advising more than one student.\nAdditional table information: table: college_2"} +{"question": "SELECT payment_method_code, COUNT(*) FROM customers GROUP BY payment_method_code", "answer": "For each payment method, return how many customers use it.\nAdditional table information: table: department_store"} +{"question": "SELECT channel_code FROM customer_contact_channels GROUP BY channel_code HAVING COUNT(customer_id) < 5", "answer": "List all the contact channel codes that were used less than 5 times.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT International_Passengers, Domestic_Passengers FROM airport WHERE Airport_Name = 'London Heathrow'", "answer": "What are the number of international and domestic passengers of the airport named London 'Heathrow'?\nAdditional table information: table: aircraft"} +{"question": "SELECT T2.first_name, T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name = 'Nancy' AND T1.last_name = 'Edwards'", "answer": "What is the first and last name of the employee who reports to Nancy Edwards?\nAdditional table information: table: store_1"} +{"question": "SELECT COUNT(DISTINCT u_id) FROM review", "answer": "How many different users wrote some reviews?\nAdditional table information: table: epinions_1"} +{"question": "SELECT T2.name, T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T1.register_year = 2016", "answer": "What are the member names and hometowns of those who registered at a branch in 2016?\nAdditional table information: table: shop_membership"} +{"question": "SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70", "answer": "Find all the zip codes in which the max dew point have never reached 70.\nAdditional table information: table: bike_1"} +{"question": "SELECT Song FROM volume ORDER BY Song NULLS FIRST", "answer": "What are the the songs in volumes, listed in ascending order?\nAdditional table information: table: music_4"} +{"question": "SELECT T1.Date_Claim_Made, T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id HAVING COUNT(*) > 2 UNION SELECT T1.Date_Claim_Made, T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id WHERE T1.Amount_Claimed = (SELECT MAX(Amount_Claimed) FROM Claims)", "answer": "Find the claims that led to more than two settlements or have the maximum claim value. For each of them, return the date the claim was made and the id of the claim.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id = T2.id WHERE T2.dept_name = 'History'", "answer": "Give id of the instructor who advises students in the History department.\nAdditional table information: table: college_2"} +{"question": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 3 INTERSECT SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 4", "answer": "What are the names of all reviewers that have given 3 or 4 stars for reviews?\nAdditional table information: table: movie_1"} +{"question": "SELECT T3.born_state FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T1.name = 'Treasury' INTERSECT SELECT T3.born_state FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T1.name = 'Homeland Security'", "answer": "List the states where both the secretary of 'Treasury' department and the secretary of 'Homeland Security' were born.\nAdditional table information: table: department_management"} +{"question": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = 'lead'", "answer": "Find all the songs that do not have a lead vocal.\nAdditional table information: table: music_2"} +{"question": "SELECT T2.customer_first_name, T2.customer_last_name, T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "What is the customer first, last name and id with least number of accounts.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT COUNT(*) FROM WINE WHERE Winery = 'Robert Biale'", "answer": "Count the number of wines produced at Robert Biale winery.\nAdditional table information: table: wine_1"} +{"question": "SELECT location_code, date_in_location_from, date_in_locaton_to FROM Document_locations", "answer": "Show the location code, the starting date and ending data in that location for all the documents.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "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'", "answer": "Find the first names of professors who are not playing Canoeing or Kayaking.\nAdditional table information: table: activity_1"} +{"question": "SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer'", "answer": "What is the date of birth of every customer whose status code is 'Good Customer'?\nAdditional table information: table: driving_school"} +{"question": "SELECT AVG(T1.duration) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = 'mp3' AND T2.resolution < 800", "answer": "What is the average song duration for the songs that are in mp3 format and whose resolution below 800?\nAdditional table information: table: music_1"} +{"question": "SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE T1.title = 'A Kiss Before You Go: Live in Hamburg'", "answer": "What are the songs in album 'A Kiss Before You Go: Live in Hamburg'?\nAdditional table information: table: music_2"} +{"question": "SELECT image_name, image_url FROM images ORDER BY image_name NULLS FIRST", "answer": "What are the names and urls of images, sorted alphabetically?\nAdditional table information: table: document_management"} +{"question": "SELECT COUNT(DISTINCT job) FROM Person", "answer": "How many different jobs are listed?\nAdditional table information: table: network_2"} +{"question": "SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20", "answer": "Find the 'date became customers' of the customers whose ID is between 10 and 20.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the code of the role that have the most employees.\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT main_industry, SUM(market_value) FROM company GROUP BY main_industry", "answer": "What are the main indstries and total market value for each industry?\nAdditional table information: table: gas_company"} +{"question": "SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' ORDER BY emp_dob NULLS FIRST", "answer": "List the first name of all employees with job code PROF ordered by their date of birth.\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(*), dept_name FROM student GROUP BY dept_name", "answer": "How many students are in each department?\nAdditional table information: table: college_2"} +{"question": "SELECT name FROM instructor WHERE dept_name = 'Statistics' ORDER BY salary NULLS FIRST LIMIT 1", "answer": "what is the name of the instructor who is in Statistics department and earns the lowest salary?\nAdditional table information: table: college_2"} +{"question": "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", "answer": "What is the first and last name of the faculty participating in the most activities?\nAdditional table information: table: activity_1"} +{"question": "SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Tokohu University'", "answer": "Find the number of papers published by authors from the institution 'Tokohu University'.\nAdditional table information: table: icfp_1"} +{"question": "SELECT T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance DESC LIMIT 1", "answer": "Find the saving balance of the account with the highest checking balance.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT T1.title FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE building = 'Chandler' AND semester = 'Fall' AND YEAR = 2010", "answer": "What is the title of the course that was offered at building Chandler during the fall semester in the year of 2010?\nAdditional table information: table: college_2"} +{"question": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = 'Le Pop'", "answer": "How many different instruments are used in the song 'Le Pop'?\nAdditional table information: table: music_2"} +{"question": "SELECT name FROM projects WHERE hours BETWEEN 100 AND 300", "answer": "What are the names of projects that require between 100 and 300 hours?\nAdditional table information: table: scientist_1"} +{"question": "SELECT card_type_code, COUNT(DISTINCT customer_id) FROM Customers_cards GROUP BY card_type_code", "answer": "Show all card type codes and the number of customers holding cards in each type.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT MONTH FROM happy_hour GROUP BY MONTH HAVING COUNT(*) > 2", "answer": "Which months have more than 2 happy hours?\nAdditional table information: table: coffee_shop"} +{"question": "SELECT outcome_code, COUNT(*) FROM mailshot_customers GROUP BY outcome_code", "answer": "Show the outcome code of mailshots along with the number of mailshots in each outcome code.\nAdditional table information: table: customers_campaigns_ecommerce"} +{"question": "SELECT AVG(rating), languages FROM song GROUP BY languages", "answer": "What is the average rating of songs for each language?\nAdditional table information: table: music_1"} +{"question": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo", "answer": "Show student ids who don't have any sports.\nAdditional table information: table: game_1"} +{"question": "SELECT AVG(Enrollment) FROM school", "answer": "Take the average of the school enrollment.\nAdditional table information: table: school_player"} +{"question": "SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID HAVING COUNT(*) >= 3", "answer": "What are the names of musicals who have at 3 or more actors?\nAdditional table information: table: musical"} +{"question": "SELECT COUNT(*) FROM Player WHERE HS > 1000", "answer": "How many players have more than 1000 hours of training?\nAdditional table information: table: soccer_2"} +{"question": "SELECT T1.name, T1.id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING AVG(T2.bikes_available) > 14 UNION SELECT name, id FROM station WHERE installation_date LIKE '12/%'", "answer": "What are the names and ids of stations that had more than 14 bikes available on average or were installed in December?\nAdditional table information: table: bike_1"} +{"question": "SELECT role_name, role_description FROM ROLES WHERE role_code = 'MG'", "answer": "What are the name and description for role code 'MG'?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT Tourist_Details FROM VISITORS", "answer": "Show details of all visitors.\nAdditional table information: table: cre_Theme_park"} +{"question": "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'", "answer": "How many lessons did the customer Ryan Goodwin complete?\nAdditional table information: table: driving_school"} +{"question": "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'", "answer": "Find the name of the ships that are steered by both a captain with Midshipman rank and a captain with Lieutenant rank.\nAdditional table information: table: ship_1"} +{"question": "SELECT station_id, LOCATION, manager_name FROM gas_station ORDER BY open_year NULLS FIRST", "answer": "Show gas station id, location, and manager_name for all gas stations ordered by open year.\nAdditional table information: table: gas_company"} +{"question": "SELECT COUNT(*) FROM roller_coaster", "answer": "How many roller coasters are there?\nAdditional table information: table: roller_coaster"} +{"question": "SELECT first_name, last_name, department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id)", "answer": "Find the first name and last name and department id for those employees who earn such amount of salary which is the smallest salary of any of the departments.\nAdditional table information: table: hr_1"} +{"question": "SELECT AVG(salary), MAX(salary) FROM Employee", "answer": "What is the average and largest salary of all employees?\nAdditional table information: table: flight_1"} +{"question": "SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = (SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY COUNT(*) DESC LIMIT 1)", "answer": "What are all the policy types of the customer that has the most policies listed?\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT AVG(T1.sales) FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID WHERE T2.work_type = 'Photo'", "answer": "What is the average sales of the journals that have an editor whose work type is 'Photo'?\nAdditional table information: table: journal_committee"} +{"question": "SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'Close a policy' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'New policy application'", "answer": "Find the names of customers who have used both the service 'Close a policy' and the service 'New policy application'.\nAdditional table information: table: insurance_fnol"} +{"question": "SELECT local_authority, services FROM station", "answer": "list the local authorities and services provided by all stations.\nAdditional table information: table: station_weather"} +{"question": "SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the payment method that is used most frequently.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT first_name, last_name, salary FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T3.city = 'London'", "answer": "What are full names and salaries of employees working in the city of London?\nAdditional table information: table: hr_1"} +{"question": "SELECT MAX(Market_Value_in_Billion), MIN(Market_Value_in_Billion) FROM company", "answer": "What is the maximum and minimum market value of companies?\nAdditional table information: table: company_employee"} +{"question": "SELECT problem_log_id, log_entry_date FROM problem_log WHERE problem_id = 10", "answer": "Find all the ids and dates of the logs for the problem whose id is 10.\nAdditional table information: table: tracking_software_problems"} +{"question": "SELECT Theme FROM farm_competition ORDER BY YEAR ASC NULLS FIRST", "answer": "What are the themes of farm competitions sorted by year in ascending order?\nAdditional table information: table: farm"} +{"question": "SELECT t2.team_name FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE enrollment < (SELECT AVG(enrollment) FROM university)", "answer": "What are the names of teams from universities that have a below average enrollment?\nAdditional table information: table: university_basketball"} +{"question": "SELECT rank FROM Faculty GROUP BY rank ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1", "answer": "Which rank has the smallest number of faculty members?\nAdditional table information: table: activity_1"} +{"question": "SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1", "answer": "What is the name of the county with the greatest population?\nAdditional table information: table: county_public_safety"} +{"question": "SELECT DISTINCT Location_Name FROM LOCATIONS", "answer": "What are the distinct location names?\nAdditional table information: table: cre_Theme_park"} +{"question": "SELECT city, COUNT(*) FROM branch WHERE open_year < 2010 GROUP BY city", "answer": "For each city, how many branches opened before 2010?\nAdditional table information: table: shop_membership"} +{"question": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id GROUP BY t2.ship_id HAVING COUNT(*) > 1", "answer": "What are the names of ships that have more than one captain?\nAdditional table information: table: ship_1"} +{"question": "SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the type code of the most frequently used policy.\nAdditional table information: table: insurance_and_eClaims"} +{"question": "SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY COUNT(*) DESC LIMIT 1", "answer": "What is the membership level with the most people?\nAdditional table information: table: shop_membership"} +{"question": "SELECT DISTINCT form_type_code FROM forms", "answer": "What are the different types of forms?\nAdditional table information: table: e_government"} +{"question": "SELECT COUNT(*) FROM tweets", "answer": "Find the number of tweets in record.\nAdditional table information: table: twitter_1"} +{"question": "SELECT T1.council_tax_id FROM Rent_Arrears AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id JOIN Customer_Master_Index AS T3 ON T3.master_customer_id = T2.master_customer_id WHERE T3.cmi_details <> 'Schmidt , Kertzmann and Lubowitz'", "answer": "What are the renting arrears tax ids related to the customer master index whose detail is not 'Schmidt, Kertzmann and Lubowitz'?\nAdditional table information: table: local_govt_mdm"} +{"question": "SELECT T2.school_name, T1.budgeted, T1.invested FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T1.year >= 2002", "answer": "Show each school name, its budgeted amount, and invested amount in year 2002 or after.\nAdditional table information: table: school_finance"} +{"question": "SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) <= 20", "answer": "Please show the employee last names that serves no more than 20 customers.\nAdditional table information: table: chinook_1"} +{"question": "SELECT T1.Season, T1.Player, T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id", "answer": "Show the season, the player, and the name of the team that players belong to.\nAdditional table information: table: match_season"} +{"question": "SELECT COUNT(*) FROM customers WHERE city = 'Prague'", "answer": "How many customers live in Prague city?\nAdditional table information: table: store_1"} +{"question": "SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1", "answer": "What is the height of the mountain climbined by the climbing who had the most points?\nAdditional table information: table: climbing"} +{"question": "SELECT name FROM manufacturers EXCEPT SELECT T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T1.name = 'DVD drive'", "answer": "Find the name of companies that do not make DVD drive.\nAdditional table information: table: manufactory_1"} +{"question": "SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = 'Forward' INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = 'Defender'", "answer": "What are the names of countries that have both players with position forward and players with position defender?\nAdditional table information: table: match_season"} +{"question": "SELECT SUM(Points) FROM player", "answer": "What is the total number of points for all players?\nAdditional table information: table: sports_competition"} +{"question": "SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3", "answer": "Find the names and number of works of the three artists who have produced the most songs.\nAdditional table information: table: music_1"} +{"question": "SELECT T3.name, T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id", "answer": "For each company, return the company name and the name of the building its office is located in.\nAdditional table information: table: company_office"} +{"question": "SELECT cust_name FROM customer ORDER BY credit_score NULLS FIRST LIMIT 1", "answer": "What is the name of the customer with the worst credit score?\nAdditional table information: table: loan_1"} +{"question": "SELECT COUNT(*) FROM ADDRESSES WHERE zip_postcode = '197'", "answer": "How many addresses have zip code 197?\nAdditional table information: table: behavior_monitoring"} +{"question": "SELECT Order_Date FROM BOOKINGS", "answer": "List the order dates of all the bookings.\nAdditional table information: table: cre_Drama_Workshop_Groups"} +{"question": "SELECT COUNT(DISTINCT Hometown) FROM people", "answer": "How many distinct hometowns did these people have?\nAdditional table information: table: gymnast"} +{"question": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Zach' AND T1.gender = 'female'", "answer": "What are the names of all females who are friends with Zach?\nAdditional table information: table: network_2"} +{"question": "SELECT T1.Delegate, T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID", "answer": "For each delegate, find the names of the party they are part of.\nAdditional table information: table: election"} +{"question": "SELECT AVG(capacity), MIN(capacity), MAX(capacity) FROM cinema WHERE openning_year >= 2011", "answer": "Show the average, minimum, and maximum capacity for all the cinemas opened in year 2011 or later.\nAdditional table information: table: cinema"} +{"question": "SELECT eid FROM Employee WHERE salary > 100000", "answer": "What is the id of every employee who has at least a salary of 100000?\nAdditional table information: table: flight_1"} +{"question": "SELECT COUNT(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000", "answer": "Count the number of distinct delegates who are from counties with population above 50000.\nAdditional table information: table: election"} +{"question": "SELECT COUNT(DISTINCT church_id) FROM wedding WHERE YEAR = 2016", "answer": "How many churches have a wedding in year 2016?\nAdditional table information: table: wedding"} +{"question": "SELECT country FROM airlines GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which countries has the most number of airlines?\nAdditional table information: table: flight_4"} +{"question": "SELECT COUNT(*) FROM accounts", "answer": "Count the number of accounts.\nAdditional table information: table: small_bank_1"} +{"question": "SELECT Payment_ID, Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa'", "answer": "Give me the payment Id, the date and the amount for all the payments processed with Visa.\nAdditional table information: table: insurance_policies"} +{"question": "SELECT AVG(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan)", "answer": "What is the average credit score for customers who have taken a loan?\nAdditional table information: table: loan_1"} +{"question": "SELECT t3.address_content FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t1.customer_name = 'Maudie Kertzmann'", "answer": "What is the address content of the customer named 'Maudie Kertzmann'?\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT Name FROM musical WHERE NOT Musical_ID IN (SELECT Musical_ID FROM actor)", "answer": "What are the names of musicals who have no actors?\nAdditional table information: table: musical"} +{"question": "SELECT COUNT(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE = 'ACCT-211'", "answer": "How many professors teach a class with the code ACCT-211?\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(*) FROM Person WHERE gender = 'female'", "answer": "How many females are in the network?\nAdditional table information: table: network_2"} +{"question": "SELECT T1.name, COUNT(*) FROM camera_lens AS T1 JOIN photos AS T2 ON T1.id = T2.camera_lens_id GROUP BY T1.id ORDER BY COUNT(*) NULLS FIRST", "answer": "What is the name of each camera lens and the number of photos taken by it? Order the result by the count of photos.\nAdditional table information: table: mountain_photos"} +{"question": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1", "answer": "What is the starting year of the oldest technicians?\nAdditional table information: table: machine_repair"} +{"question": "SELECT school_code FROM department WHERE dept_name = 'Accounting'", "answer": "What is the code of the school where the accounting department belongs to?\nAdditional table information: table: college_1"} +{"question": "SELECT COUNT(DISTINCT t3.characteristic_name) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame'", "answer": "How many distinct characteristic names does the product 'cumin' have?\nAdditional table information: table: products_gen_characteristics"} +{"question": "SELECT COUNT(DISTINCT team) FROM elimination", "answer": "What is the number of distinct teams that suffer elimination?\nAdditional table information: table: wrestler"} +{"question": "SELECT location_code FROM Document_locations GROUP BY location_code HAVING COUNT(*) >= 3", "answer": "What are the codes of the locations with at least three documents?\nAdditional table information: table: cre_Doc_Tracking_DB"} +{"question": "SELECT building FROM Faculty GROUP BY building ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Which building has most faculty members?\nAdditional table information: table: activity_1"} +{"question": "SELECT T2.emp_fname FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num GROUP BY T1.prof_num HAVING COUNT(*) > 1", "answer": "Find the first names of professors who are teaching more than one class.\nAdditional table information: table: college_1"} +{"question": "SELECT T2.party_name, COUNT(*) FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id", "answer": "Show party names and the number of events for each party.\nAdditional table information: table: party_people"} +{"question": "SELECT COUNT(DISTINCT acc_type) FROM customer", "answer": "Count the number of different account types.\nAdditional table information: table: loan_1"} +{"question": "SELECT COUNT(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8", "answer": "How many days had both mean humidity above 50 and mean visibility above 8?\nAdditional table information: table: bike_1"} +{"question": "SELECT budget_type_code, budget_type_description FROM Ref_budget_codes", "answer": "What are the type codes and descriptions of each budget type?\nAdditional table information: table: cre_Docs_and_Epenses"} +{"question": "SELECT name FROM Person WHERE gender = 'male' AND age = (SELECT MIN(age) FROM person WHERE gender = 'male')", "answer": "What is the name of the youngest male?\nAdditional table information: table: network_2"} +{"question": "SELECT MIN(salary), dept_name FROM instructor GROUP BY dept_name HAVING AVG(salary) > (SELECT AVG(salary) FROM instructor)", "answer": "Find the minimum salary for the departments whose average salary is above the average payment of all instructors.\nAdditional table information: table: college_2"} +{"question": "SELECT Hosts FROM farm_competition WHERE Theme <> 'Aliens'", "answer": "Return the hosts of competitions for which the theme is not Aliens?\nAdditional table information: table: farm"} +{"question": "SELECT LOCATION FROM perpetrator ORDER BY Killed DESC LIMIT 1", "answer": "What is the location of the perpetrator with the largest kills.\nAdditional table information: table: perpetrator"} +{"question": "SELECT hire_date FROM employees WHERE NOT first_name LIKE '%M%'", "answer": "when is the hire date for those employees whose first name does not containing the letter M?\nAdditional table information: table: hr_1"} +{"question": "SELECT name_first, name_last FROM player WHERE death_year = ''", "answer": "Find all the players' first name and last name who have empty death record.\nAdditional table information: table: baseball_1"} +{"question": "SELECT AVG(Working_Horses) FROM farm WHERE Total_Horses > 5000", "answer": "What is the average number of working horses of farms with more than 5000 total number of horses?\nAdditional table information: table: farm"} +{"question": "SELECT T2.Name, T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID ORDER BY T3.Attendance DESC", "answer": "Show the names of members and the dates of performances they attended in descending order of attendance of the performances.\nAdditional table information: table: performance_attendance"} +{"question": "SELECT MAX(Price), MAX(Score), YEAR FROM WINE GROUP BY YEAR", "answer": "What are the maximum price and score of wines for each year?\nAdditional table information: table: wine_1"} +{"question": "SELECT COUNT(DISTINCT card_type_code) FROM Customers_Cards", "answer": "Show the number of card types.\nAdditional table information: table: customers_card_transactions"} +{"question": "SELECT COUNT(*) FROM airports WHERE name LIKE '%International%'", "answer": "How many airports' names have the word Interanation in them?\nAdditional table information: table: flight_4"} +{"question": "SELECT AVG(damage_millions_USD), MAX(damage_millions_USD) FROM storm WHERE max_speed > 1000", "answer": "What is the average and maximum damage in millions for storms that had a max speed over 1000?\nAdditional table information: table: storm_record"} +{"question": "SELECT AVG(order_quantity) FROM order_items", "answer": "Find the average order quantity per order.\nAdditional table information: table: customers_and_addresses"} +{"question": "SELECT Name FROM city ORDER BY Name ASC NULLS FIRST", "answer": "Return the names of cities, ordered alphabetically.\nAdditional table information: table: county_public_safety"} +{"question": "SELECT DISTINCT POSITION FROM pilot WHERE Age > 30", "answer": "List the distinct positions of pilots older than 30.\nAdditional table information: table: pilot_record"} +{"question": "SELECT T1.personal_name, T1.family_name, T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1", "answer": "Find the personal name, family name, and author ID of the course author that teaches the most courses.\nAdditional table information: table: e_learning"} +{"question": "SELECT AVG(t1.access_count) FROM documents AS t1 JOIN document_functional_areas AS t2 ON t1.document_code = t2.document_code JOIN functional_areas AS t3 ON t2.functional_area_code = t3.functional_area_code WHERE t3.functional_area_description = 'Acknowledgement'", "answer": "Find the average access counts of documents with functional area 'Acknowledgement'.\nAdditional table information: table: document_management"} +{"question": "SELECT name, phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn GROUP BY T1.patient HAVING COUNT(*) > 1", "answer": "Which patients made more than one appointment? Tell me the name and phone number of these patients.\nAdditional table information: table: hospital_1"} +{"question": "SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code", "answer": "How many departments are in each school?\nAdditional table information: table: college_1"} +{"question": "SELECT age FROM Person WHERE job = 'doctor' AND name = 'Zach'", "answer": "How old is the doctor named Zach?\nAdditional table information: table: network_2"} +{"question": "SELECT Name, LOCATION FROM wrestler", "answer": "Give the names and locations of all wrestlers.\nAdditional table information: table: wrestler"} +{"question": "SELECT SUM(revenue), founder FROM manufacturers GROUP BY founder", "answer": "What is the total revenue of companies started by founder?\nAdditional table information: table: manufactory_1"} +{"question": "SELECT AVG(Enrollment) FROM school", "answer": "What is the average enrollment of schools?\nAdditional table information: table: school_player"} +{"question": "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", "answer": "What is the id, name and IATA code of the airport that had most number of flights?\nAdditional table information: table: flight_company"} +{"question": "SELECT T1.subject_id, T2.subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id", "answer": "What are the subject ID, subject name, and the number of available courses for each subject?\nAdditional table information: table: e_learning"} +{"question": "SELECT T1.customer_name, T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'New' INTERSECT SELECT T1.customer_name, T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Pending'", "answer": "What are the names and addressed of customers who have both New and Pending orders?\nAdditional table information: table: department_store"} +{"question": "SELECT DISTINCT country FROM artist", "answer": "What are all distinct country for artists?\nAdditional table information: table: theme_gallery"} +{"question": "SELECT T1.pName, T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'", "answer": "What are the names of all the players who received a yes during tryouts, and also what are the names of their colleges?\nAdditional table information: table: soccer_2"} +{"question": "SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171", "answer": "How many courses does the student with id 171 actually attend?\nAdditional table information: table: student_assessment"} +{"question": "SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990", "answer": "What are the publishers who have published a book in both 1989 and 1990?\nAdditional table information: table: culture_company"} +{"question": "SELECT nurse FROM on_call WHERE blockfloor = 1 AND blockcode = 1", "answer": "What nurses are on call with block floor 1 and block code 1? Tell me their names.\nAdditional table information: table: hospital_1"}