[{"table_id": "member", "query": "SELECT COUNT(*) AS \"count of member\", address \n FROM member \n GROUP BY address", "table_name": "member", "query_description": "Find the number of members living in each address.", "results_description": "There is one member in Bridgeport.", "result": ",Address,count of member\n0,Bridgeport,1\n", "difficulty": "aggregate_group_by"}, {"table_id": "acceptance, submission", "query": "SELECT T2.Author AS \"submission Author\", T1.Result AS \"acceptance Result\" \n FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID", "table_name": "acceptance, submission", "query_description": "Show the authors of submissions and the acceptance results of their submissions.", "results_description": "The paper of Sammy Green was accepted", "result": ",acceptance Result,submission Author\n0,Accepted,Sammy Green\n", "difficulty": "join"}, {"table_id": "Projects, Documents", "query": "SELECT T1.project_details AS \"Projects project_details\", T2.document_name AS \"Documents document_name\" \n FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id \n WHERE T2.document_name = 'King Book'", "table_name": "Projects, Documents", "query_description": "What is the project detail for the project with document \"King Book\"?", "results_description": "The document named \"King Book\" has the project details \"Human Resource project\".", "result": ",Documents document_name,Projects project_details\n0,King Book,Human Resource project\n", "difficulty": "join"}, {"table_id": "Rating, Movie", "query": "SELECT T2.title AS \"Movie title\", T1.stars AS \"Rating stars\", T2.director AS \"Movie director\", MAX(T1.stars) AS \"maximum stars\", director \n FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID \n WHERE director <> 'null' \n GROUP BY director", "table_name": "Rating, Movie", "query_description": "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.", "results_description": "The movie Avatar was directed by James Cameron, with rating of 5 out of the 5 maximum stars", "result": ",director,Movie title,Rating stars,maximum stars,Movie director\n0,James Cameron,Avatar,5,5,James Cameron\n", "difficulty": "join_aggregate"}, {"table_id": "railway", "query": "SELECT Wheels, LOCATION \n FROM railway", "table_name": "railway", "query_description": "List the wheels and locations of the railways.", "results_description": "The wheel 4-4-0 are located in York.", "result": ",Wheels,Location\n0,4-4-0,York\n", "difficulty": "small_select"}, {"table_id": "Suppliers, supplier_addresses, addresses", "query": "SELECT T1.supplier_name AS \"Suppliers supplier_name\", T1.supplier_phone AS \"Suppliers supplier_phone\", T3.address_details AS \"addresses address_details\" \n 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", "table_name": "Suppliers, supplier_addresses, addresses", "query_description": "List the name and phone number of all suppliers in the alphabetical order of their addresses.", "results_description": "Supplier \"AB Store\" is located in 0258 Kessler Mountains Suite 688 Mooreside, ME 41586-5022. Their phone no. is 1-483-283-4742.", "result": ",Suppliers supplier_name,Suppliers supplier_phone,addresses address_details\n0,AB Store,1-483-283-4742,\"0258 Kessler Mountains Suite 688\nMooreside, ME 41586-5022\"\n", "difficulty": "join"}, {"table_id": "airports", "query": "SELECT name, city, country, elevation \n FROM airports \n WHERE city = 'New York'", "table_name": "airports", "query_description": "Find the name, city, country, and altitude (or elevation) of the airports in the city of New York.", "results_description": "The airport La Guardia Airport is in New York in the United States and has an elevation of 21.", "result": ",city,name,country,elevation\n0,New York,La Guardia Airport,United States,21\n", "difficulty": "large_select"}, {"table_id": "products", "query": "SELECT product_type_code, AVG(product_price) AS \"average product_price\" \n FROM products \n GROUP BY product_type_code", "table_name": "products", "query_description": "Return the average price for each product type.", "results_description": "The average price of clothes is 715.53", "result": ",product_type_code,average product_price\n0,Clothes,715.5366666666666\n", "difficulty": "aggregate_group_by"}, {"table_id": "STUDENT, VOTING_RECORD", "query": "SELECT AVG(T1.Age) AS \"average Age\", T1.city_code AS \"STUDENT city_code\", T2.Election_Cycle AS \"VOTING_RECORD Election_Cycle\" \n FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote \n WHERE T1.city_code = 'NYC' AND T2.Election_Cycle = 'Spring'", "table_name": "STUDENT, VOTING_RECORD", "query_description": "What is the average age of students who have city code \"NYC\" and have secretary votes for the spring election cycle?", "results_description": "The average age is 22 for the students in NYC city and their election cycle is Spring.", "result": ",average Age,STUDENT city_code,VOTING_RECORD Election_Cycle\n0,22.0,NYC,Spring\n", "difficulty": "join_aggregate"}, {"table_id": "Apartment_Buildings, Apartments", "query": "SELECT SUM(T2.room_count) AS \"sum of room_count\", T1.building_short_name AS \"Apartment_Buildings building_short_name\" \n FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id \n WHERE T1.building_short_name = 'Columbus Square'", "table_name": "Apartment_Buildings, Apartments", "query_description": "Show the total number of rooms of the apartments in the building with short name \"Columbus Square\".", "results_description": "There are 29 rooms in the building with short name Columbus Square.", "result": ",sum of room_count,Apartment_Buildings building_short_name\n0,29,Columbus Square\n", "difficulty": "join_aggregate"}, {"table_id": "Flight", "query": "SELECT departure_date, arrival_date, origin, destination \n FROM Flight \n WHERE origin = 'Los Angeles' AND destination = 'Honolulu'", "table_name": "Flight", "query_description": "What are the departure and arrival dates of all flights from LA to Honolulu?", "results_description": "The flight from Los Angeles to Honolulu has the departure date of 04/12/2005 09:15 and the arrival date of 04/12/2005 11:15.", "result": ",origin,destination,arrival_date,departure_date\n0,Los Angeles,Honolulu,04/12/2005 11:15,04/12/2005 09:15\n", "difficulty": "small_select"}, {"table_id": "STUDENT", "query": "SELECT MAX(Age) AS \"maximum Age\", MIN(Age) AS \"minimum Age\", Major \n FROM STUDENT \n WHERE Major = 600", "table_name": "STUDENT", "query_description": "What are the maximum and minimum age of students with major 600?", "results_description": "The maximum age of students with a major of 600 is 27, while the minimum age is 16", "result": ",Major,maximum Age,minimum Age\n0,600,27,16\n", "difficulty": "aggregate"}, {"table_id": "station", "query": "SELECT COUNT(*) AS \"count of station\", city \n FROM station \n WHERE city = 'Mountain View'", "table_name": "station", "query_description": "How many stations are in Mountain View?", "results_description": "There are 7 stations in Mountain View.", "result": ",city,count of station\n0,Mountain View,7\n", "difficulty": "aggregate"}, {"table_id": "dependent", "query": "SELECT COUNT(*) AS \"count of dependent\", sex \n FROM dependent \n WHERE sex = 'F'", "table_name": "dependent", "query_description": "how many female dependents are there?", "results_description": "The number of female dependents is 4", "result": ",Sex,count of dependent\n0,F,4\n", "difficulty": "aggregate"}, {"table_id": "journalist", "query": "SELECT COUNT(*) AS \"count of journalist\" \n FROM journalist", "table_name": "journalist", "query_description": "How many journalists are there?", "results_description": "There are 11 journalists", "result": ",count of journalist\n0,11\n", "difficulty": "aggregate"}, {"table_id": "company", "query": "SELECT company, main_industry, headquarters \n FROM company \n WHERE headquarters <> 'USA'", "table_name": "company", "query_description": "What are the companies and main industries of all companies that are not headquartered in the United States?", "results_description": "The Royal Dutch Shell has its headquarters in the Netherlands and specialises in the oil and gas industry", "result": ",Company,Headquarters,Main_Industry\n0,Royal Dutch Shell,Netherlands,Oil and gas\n", "difficulty": "small_select"}, {"table_id": "storm", "query": "SELECT name, dates_active, number_deaths \n FROM storm \n WHERE number_deaths >= 1", "table_name": "storm", "query_description": "What are the names, dates active, and number of deaths for storms that had 1 or more death?", "results_description": "The storm named Two which was active from August 3 - August 10, caused 7 deaths.", "result": ",Name,Dates_active,Number_Deaths\n0,Two,August3\u2013August10,7\n", "difficulty": "large_select"}, {"table_id": "accounts, savings", "query": "SELECT SUM(T2.balance) AS \"sum of balance\", T1.name AS \"accounts name\" \n FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid \n WHERE T1.name <> 'Brown'", "table_name": "accounts, savings", "query_description": "Find the total savings balance of all accounts except the account with name \u2018Brown\u2019.", "results_description": "The accounts under the name \"Wang\" have a total balance of 1000310299", "result": ",accounts name,sum of balance\n0,Wang,1000310299.0\n", "difficulty": "join_aggregate"}, {"table_id": "debate_people, debate, people", "query": "SELECT T3.Name AS \"people Name\", T2.Date AS \"debate Date\", T2.Venue AS \"debate Venue\" \n 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", "table_name": "debate_people, debate, people", "query_description": "Show the names of people, and dates and venues of debates they are on the negative side, ordered in ascending alphabetical order of name.", "results_description": "The debate in October 21, 2011 had a person named Charles Van Wyck and the venue was in Manama, Bahrain.", "result": ",debate Date,people Name,debate Venue\n0,\"October 21, 2011\",Charles Van Wyck,\"Manama , Bahrain\"\n", "difficulty": "join"}, {"table_id": "Part_Faults, Skills_Required_To_Fix, Skills", "query": "SELECT T1.fault_short_name AS \"Part_Faults fault_short_name\", T3.skill_description AS \"Skills skill_description\" \n 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", "table_name": "Part_Faults, Skills_Required_To_Fix, Skills", "query_description": "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.", "results_description": "A mechanical skill is needed in order to fix a TW part fault", "result": ",Skills skill_description,Part_Faults fault_short_name\n0,Mechanical,TW\n", "difficulty": "join"}, {"table_id": "editor", "query": "SELECT Age, COUNT(*) AS \"count of editor\" \n FROM editor \n GROUP BY Age", "table_name": "editor", "query_description": "What are the different ages of editors? Show each age along with the number of editors of that age.", "results_description": "There is 1 editor at the age of 20.", "result": ",Age,count of editor\n0,20.0,1.0\n", "difficulty": "aggregate_group_by"}, {"table_id": "enzyme", "query": "SELECT COUNT(*) AS \"count of enzyme\" \n FROM enzyme", "table_name": "enzyme", "query_description": "What is the total count of enzymes?", "results_description": "The total number of enzymes is 8", "result": ",count of enzyme\n0,8\n", "difficulty": "aggregate"}, {"table_id": "STUDENT", "query": "SELECT Advisor \n FROM STUDENT \n GROUP BY Advisor \n HAVING COUNT(*) > 2", "table_name": "STUDENT", "query_description": "Report the distinct advisors who have more than 2 students.", "results_description": "The advisor 1121 has more than 2 students.", "result": ",Advisor\n0,1121\n", "difficulty": "aggregate_group_by"}, {"table_id": "EMPLOYEE", "query": "SELECT BirthDate, City \n FROM EMPLOYEE \n WHERE City = 'Edmonton'", "table_name": "EMPLOYEE", "query_description": "Find the birth dates corresponding to employees who live in the city of Edmonton.", "results_description": "The employee who lives in the city of Edmonton has a birth date of 1962-02-18 00:00:00", "result": ",City,BirthDate\n0,Edmonton,1962-02-18 00:00:00\n", "difficulty": "small_select"}, {"table_id": "student", "query": "SELECT SUM(stu_hrs) AS \"sum of stu_hrs\", dept_code \n FROM student \n GROUP BY dept_code", "table_name": "student", "query_description": "How many hours do the students spend studying in each department?", "results_description": "Students spent a total of 165 hours studying in the dept. with code \"ACCT\"", "result": ",DEPT_CODE,sum of stu_hrs\n0,ACCT,165\n", "difficulty": "aggregate_group_by"}, {"table_id": "Staff", "query": "SELECT first_name, middle_name, last_name \n FROM Staff", "table_name": "Staff", "query_description": "List the first name middle name and last name of all staff.", "results_description": "The first name is Janessa the middle name is Amara and last name is Sawayn", "result": ",last_name,first_name,middle_name\n0,Sawayn,Janessa,Amara\n", "difficulty": "large_select"}, {"table_id": "Student", "query": "SELECT Fname, Lname, Age, Sex \n FROM Student \n WHERE Sex = 'F'", "table_name": "Student", "query_description": "Show first name, last name, age for all female students. Their sex is F.", "results_description": "Linda Smith is a 18 years old female.", "result": ",Age,Sex,Fname,LName\n0,18,F,Linda,Smith\n", "difficulty": "large_select"}, {"table_id": "COURSES", "query": "SELECT course_description, course_name \n FROM COURSES \n WHERE course_name = 'database'", "table_name": "COURSES", "query_description": "What are the descriptions of the courses with name \"database\"?", "results_description": "The description of the course database is database.", "result": ",course_name,course_description\n0,database,database\n", "difficulty": "small_select"}, {"table_id": "Students", "query": "SELECT COUNT(*) AS \"count of Students\", personal_name \n FROM Students \n WHERE personal_name LIKE '%son%'", "table_name": "Students", "query_description": "Find the number of students who have the word \"son\" in their personal names.", "results_description": "There are 2 students with the word \"son\" in their personal names.", "result": ",personal_name,count of Students\n0,Wilson,2\n", "difficulty": "aggregate"}, {"table_id": "CLASS, employee, course, professor, department", "query": "SELECT T2.emp_fname AS \"employee emp_fname\", T4.prof_office AS \"professor prof_office\", T3.crs_description AS \"course crs_description\", T5.dept_name AS \"department dept_name\" \n 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", "table_name": "CLASS, employee, course, professor, department", "query_description": "Find the first names and offices of all instructors who have taught some course and the course description and the department name.", "results_description": "Arnelle is from the Accounting department and has taught the course KLR 229D with course description Accounting I", "result": ",employee emp_fname,department dept_name,professor prof_office,course crs_description\n0,Arnelle,Accounting,KLR 229D,Accounting I\n", "difficulty": "join"}, {"table_id": "accounts, checking, savings", "query": "SELECT T2.balance AS \"checking balance\", T3.balance AS \"savings balance\", T1.name AS \"accounts name\" \n 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", "table_name": "accounts, checking, savings", "query_description": "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.", "results_description": "The account with name Wang has a savings balance of 999999999 and a checking balance of 2000.", "result": ",accounts name,savings balance,checking balance\n0,Wang,999999999.0,2000.0\n", "difficulty": "join"}, {"table_id": "Addresses", "query": "SELECT COUNT(*) AS \"count of Addresses\", state_province_county \n FROM Addresses \n WHERE state_province_county = 'Georgia'", "table_name": "Addresses", "query_description": "How many employees live in Georgia?", "results_description": "There are 2 addresses in the county of Georgia.", "result": ",count of Addresses,state_province_county\n0,2,Georgia\n", "difficulty": "aggregate"}, {"table_id": "song", "query": "SELECT song_name, languages \n FROM song \n WHERE languages = 'english'", "table_name": "song", "query_description": "Find the names of all English songs.", "results_description": "The song My love is in English.", "result": ",languages,song_name\n0,english,My love\n", "difficulty": "small_select"}, {"table_id": "manufacturers", "query": "SELECT name, revenue \n FROM manufacturers \n WHERE revenue BETWEEN 100 AND 150", "table_name": "manufacturers", "query_description": "Find the name of companies whose revenue is between 100 and 150.", "results_description": "Sony has a revenue of 120", "result": ",Name,Revenue\n0,Sony,120.0\n", "difficulty": "small_select"}, {"table_id": "campuses", "query": "SELECT COUNT(*) AS \"count of campuses\" \n FROM campuses", "table_name": "campuses", "query_description": "What is the total number of campuses?", "results_description": "There are 23 campuses.", "result": ",count of campuses\n0,23\n", "difficulty": "aggregate"}, {"table_id": "Course_Authors_and_Tutors", "query": "SELECT address_line_1, personal_name \n FROM Course_Authors_and_Tutors \n WHERE personal_name = 'Cathrine'", "table_name": "Course_Authors_and_Tutors", "query_description": "Return the addresses of the course authors or tutors whose personal name is \"Cathrine\".", "results_description": "The tutor Cathrine live in 756 Monahan Mews Spinkashire, NJ 64230-5098.", "result": ",personal_name,address_line_1\n0,Cathrine,\"756 Monahan Mews\nSpinkashire, NJ 64230-5098\"\n", "difficulty": "small_select"}, {"table_id": "Video_games", "query": "SELECT COUNT(*) AS \"count of Video_games\", gtype \n FROM Video_games \n WHERE gtype = 'Massively multiplayer online game'", "table_name": "Video_games", "query_description": "How many video games have type Massively multiplayer online game?", "results_description": "There is 1 vide fame of type Massively multiplayer online game.", "result": ",GType,count of Video_games\n0,Massively multiplayer online game,1\n", "difficulty": "aggregate"}, {"table_id": "club, member_of_club, student", "query": "SELECT t3.fname AS \"student fname\", t3.lname AS \"student lname\", t2.position AS \"member_of_club position\", t1.clubname AS \"club clubname\" \n FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid \n WHERE t1.clubname = 'Hopkins Student Enterprises' AND t2.position = 'CTO'", "table_name": "club, member_of_club, student", "query_description": "Who is the \"CTO\" of club \"Hopkins Student Enterprises\"? Show the first name and last name.", "results_description": "Jandy Nelson is the CTO of Hopkins Student Enterprises", "result": ",club clubname,student fname,student lname,member_of_club position\n0,Hopkins Student Enterprises,Jandy,Nelson,CTO\n", "difficulty": "join"}, {"table_id": "body_builder, people", "query": "SELECT T2.weight AS \"people weight\", T2.height AS \"people height\", T1.snatch AS \"body_builder snatch\" \n FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id \n WHERE T1.snatch > 140 OR T2.height > 200", "table_name": "body_builder, people", "query_description": "List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200.", "results_description": "The bodybuilder with a height of 182 and weight equal to 80 has a snatch score of 142.5", "result": ",people height,people weight,body_builder snatch\n0,182.0,80.0,142.5\n", "difficulty": "join"}, {"table_id": "ROLES", "query": "SELECT role_description, role_name \n FROM ROLES \n WHERE role_name = 'Proof Reader'", "table_name": "ROLES", "query_description": "Show the description for role name \"Proof Reader\".", "results_description": "The description for role name Proof Reader is Ut sed quae eaque mollitia qui hic. Natus ea expedita et odio illum fugiat qui natus. Consequatur velit ut dolorem cum ullam esse deserunt dignissimos. Enim non non rem officiis quis.", "result": ",Role_Name,Role_Description\n0,Proof Reader,Ut sed quae eaque mollitia qui hic. Natus ea expedita et odio illum fugiat qui natus. Consequatur velit ut dolorem cum ullam esse deserunt dignissimos. Enim non non rem officiis quis.\n", "difficulty": "small_select"}, {"table_id": "assignedto, scientists", "query": "SELECT T2.name AS \"scientists name\" \n FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn", "table_name": "assignedto, scientists", "query_description": "Find the name of scientists who are assigned to some project.", "results_description": "The scientist who is assigned to some project is Michael Rogers", "result": ",scientists name\n0,Michael Rogers\n", "difficulty": "join"}, {"table_id": "city", "query": "SELECT Official_Name, Population \n FROM city \n WHERE Population > 1500 OR Population < 500", "table_name": "city", "query_description": "Find the official names of cities with population bigger than 1500 or smaller than 500.", "results_description": "The city named Grand Falls/Grand-Sault has a population of 5706", "result": ",Population,Official_Name\n0,5706.0,Grand Falls/Grand-Sault\n", "difficulty": "small_select"}, {"table_id": "club, player", "query": "SELECT T1.name AS \"club name\", T2.Position AS \"player Position\" \n FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID \n WHERE T2.Position = 'Right Wing'", "table_name": "club, player", "query_description": "What are the names of the clubs that have players in the position of \"Right Wing\"?", "results_description": "The club BK Slide has a player at the position Right Wing.", "result": ",club name,player Position\n0,BK Slide,Right Wing\n", "difficulty": "join"}, {"table_id": "Ref_Shipping_Agents, Documents", "query": "SELECT Ref_Shipping_Agents.shipping_agent_name AS \"Ref_Shipping_Agents shipping_agent_name\", COUNT(Documents.document_id) AS \"count of Documents\", Ref_Shipping_Agents.shipping_agent_code AS \"Ref_Shipping_Agents shipping_agent_code\" \n FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code \n GROUP BY Ref_Shipping_Agents.shipping_agent_code ORDER BY COUNT(Documents.document_id) DESC", "table_name": "Ref_Shipping_Agents, Documents", "query_description": "Which shipping agent shipped the most documents? List the shipping agent name and the number of documents.", "results_description": "The shipping agent named UPS with shipping agent code UP has shipped 6 documents", "result": ",count of Documents,Ref_Shipping_Agents shipping_agent_code,Ref_Shipping_Agents shipping_agent_name\n0,6,UP,UPS\n", "difficulty": "join_aggregate"}, {"table_id": "employees", "query": "SELECT department_id \n FROM employees \n GROUP BY department_id \n HAVING COUNT(commission_pct) > 10", "table_name": "employees", "query_description": "display those departments where more than ten employees work who got a commission percentage.", "results_description": "The department with id 50 has more than ten employees work who got a commission percentage.", "result": ",DEPARTMENT_ID\n0,50\n", "difficulty": "aggregate_group_by"}, {"table_id": "HOTELS", "query": "SELECT price_range \n FROM HOTELS", "table_name": "HOTELS", "query_description": "Tell me the price ranges for all the hotels.", "results_description": "The price range is 2914989.571.", "result": ",price_range\n0,2914989.571\n", "difficulty": "small_select"}, {"table_id": "song", "query": "SELECT artist_name, resolution, languages \n FROM song \n WHERE resolution > 500 \n GROUP BY languages ORDER BY COUNT(*) DESC", "table_name": "song", "query_description": "What is the language that was used most often in songs with resolution above 500?", "results_description": "Enrique has a song in english with a resolution of 1080", "result": ",languages,resolution,artist_name\n0,english,1080,Enrique\n", "difficulty": "aggregate_group_by"}, {"table_id": "club_rank", "query": "SELECT AVG(Gold) AS \"average Gold\" \n FROM club_rank", "table_name": "club_rank", "query_description": "What is the average number of gold medals for clubs?", "results_description": "The average number of gold medals for clubs is 5.833333333333333", "result": ",average Gold\n0,5.833333333333333\n", "difficulty": "aggregate"}, {"table_id": "club", "query": "SELECT clubdesc, clubname \n FROM club \n WHERE clubname = 'Pen and Paper Gaming'", "table_name": "club", "query_description": "Find the description of the club \"Pen and Paper Gaming\".", "results_description": "The description of the club with name Pen and Paper Gaming is Play pen and paper games on campus", "result": ",ClubDesc,ClubName\n0,Play pen and paper games on campus.,Pen and Paper Gaming\n", "difficulty": "small_select"}, {"table_id": "Invoices", "query": "SELECT COUNT(*) AS \"count of Invoices\" \n FROM Invoices", "table_name": "Invoices", "query_description": "Count the number of invoices.", "results_description": "There are 15 invoices.", "result": ",count of Invoices\n0,15\n", "difficulty": "aggregate"}, {"table_id": "roller_coaster", "query": "SELECT COUNT(*) AS \"count of roller_coaster\" \n FROM roller_coaster", "table_name": "roller_coaster", "query_description": "How many roller coasters are there?", "results_description": "There are 6 roller coasters.", "result": ",count of roller_coaster\n0,6\n", "difficulty": "aggregate"}, {"table_id": "film", "query": "SELECT title, special_features \n FROM film \n WHERE special_features LIKE '%Deleted Scenes%'", "table_name": "film", "query_description": "Return the titles of films that include 'Deleted Scenes' in their special feature section.", "results_description": "The film ACADEMY DINOSAUR includes 'Deleted Scenes' in its special feature section", "result": ",title,special_features\n0,ACADEMY DINOSAUR,\"Deleted Scenes,Behind the Scenes\"\n", "difficulty": "small_select"}, {"table_id": "HOTELS, Ref_Hotel_Star_Ratings", "query": "SELECT T2.star_rating_description AS \"Ref_Hotel_Star_Ratings star_rating_description\", T1.price_range AS \"HOTELS price_range\" \n FROM HOTELS AS T1 JOIN Ref_Hotel_Star_Ratings AS T2 ON T1.star_rating_code = T2.star_rating_code \n WHERE T1.price_range > 10000", "table_name": "HOTELS, Ref_Hotel_Star_Ratings", "query_description": "What are the star rating descriptions of the hotels with price above 10000?", "results_description": "The hotels with star rating descriptions have a price range of 2914989.571", "result": ",HOTELS price_range,Ref_Hotel_Star_Ratings star_rating_description\n0,2914989.571,star\n", "difficulty": "join"}, {"table_id": "customer", "query": "SELECT state, acc_type, credit_score, no_of_loans \n FROM customer \n WHERE no_of_loans = 0", "table_name": "customer", "query_description": "Find the state, account type, and credit score of the customer whose number of loan is 0.", "results_description": "The customer with number of loan 0 is in the state of New York, has an account type saving and his credit score is 210.", "result": ",state,acc_type,no_of_loans,credit_score\n0,New York,saving,0,210\n", "difficulty": "large_select"}, {"table_id": "music_festival, volume", "query": "SELECT T2.Song AS \"volume Song\", T1.Result AS \"music_festival Result\" \n FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID \n WHERE T1.Result = 'Nominated'", "table_name": "music_festival, volume", "query_description": "What are the songs in volumes that have resulted in a nomination at music festivals?", "results_description": "The song The Way was nominated in a festival.", "result": ",volume Song,music_festival Result\n0, The Way,Nominated\n", "difficulty": "join"}, {"table_id": "Ref_calendar", "query": "SELECT COUNT(*) AS \"count of Ref_calendar\" \n FROM Ref_calendar", "table_name": "Ref_calendar", "query_description": "Count the number of all the calendar items.", "results_description": "There are 15 calendar items.", "result": ",count of Ref_calendar\n0,15\n", "difficulty": "aggregate"}, {"table_id": "Student", "query": "SELECT Advisor, StuID \n FROM Student \n WHERE StuID = 1004", "table_name": "Student", "query_description": "Who advises student 1004?", "results_description": "The student with id 1004 has the advisor 8423.", "result": ",StuID,Advisor\n0,1004,8423\n", "difficulty": "small_select"}, {"table_id": "party", "query": "SELECT minister, took_office \n FROM party \n WHERE took_office > 1961 OR took_office < 1959", "table_name": "party", "query_description": "Who are the ministers who took office after 1961 or before 1959?", "results_description": "The minister Dr. Kwame Nkrumah (MP) took office at 1957", "result": ",Minister,Took_office\n0,Dr. Kwame Nkrumah (MP),1957\n", "difficulty": "small_select"}, {"table_id": "tracks", "query": "SELECT milliseconds, name \n FROM tracks \n WHERE name = 'Fast As a Shark'", "table_name": "tracks", "query_description": "How many milliseconds long is Fast As a Shark?", "results_description": "The Fast As a Shark has a duration of 230619 milliseconds.", "result": ",name,milliseconds\n0,Fast As a Shark,230619\n", "difficulty": "small_select"}, {"table_id": "authors, authorship, papers", "query": "SELECT t1.fname AS \"authors fname\", t3.title AS \"papers title\" \n FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid \n WHERE t3.title LIKE '%Functional%'", "table_name": "authors, authorship, papers", "query_description": "Find the first names of all the authors who have written a paper with title containing the word \"Functional\".", "results_description": "The author with first name Olin has written the paper Functional Pearl: Modular Rollback through Control Logging.", "result": ",papers title,authors fname\n0,Functional Pearl: Modular Rollback through Control Logging,Olin\n", "difficulty": "join"}, {"table_id": "products, Ref_colors", "query": "SELECT T1.product_name AS \"products product_name\", T2.color_description AS \"Ref_colors color_description\", T1.product_description AS \"products product_description\", product_category_code \n FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code = T2.color_code \n WHERE product_category_code = 'Herbs'", "table_name": "products, Ref_colors", "query_description": "List the names, color descriptions and product descriptions of products with category \"Herbs\".", "results_description": "The product basil has the category code Herbs, has the red color and its description is officia.", "result": ",product_category_code,products product_name,Ref_colors color_description,products product_description\n0,Herbs,basil,red,officia\n", "difficulty": "join"}, {"table_id": "instructor", "query": "SELECT dept_name, name \n FROM instructor \n WHERE name LIKE '%Soisalon%'", "table_name": "instructor", "query_description": "What is the name of the department with an instructure who has a name like 'Soisalon'?", "results_description": "Soisalon-Soininen is an instructor at the department of Psychology.", "result": ",name,dept_name\n0,Soisalon-Soininen,Psychology\n", "difficulty": "small_select"}, {"table_id": "appointment, physician", "query": "SELECT T2.name AS \"physician name\" \n FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID", "table_name": "appointment, physician", "query_description": "List the name of physicians who took some appointment.", "results_description": "Physician John Dorian had an appointment", "result": ",physician name\n0,John Dorian\n", "difficulty": "join"}, {"table_id": "Companies", "query": "SELECT AVG(Profits_billion) AS \"average Profits_billion\" \n FROM Companies", "table_name": "Companies", "query_description": "What are the average profits of companies?", "results_description": "The average profits of companies are 17.063157894736843.", "result": ",average Profits_billion\n0,17.063157894736843\n", "difficulty": "aggregate"}, {"table_id": "Rooms", "query": "SELECT decor, roomName \n FROM Rooms \n WHERE roomName = 'Recluse and defiance'", "table_name": "Rooms", "query_description": "What is the decor of room Recluse and defiance?", "results_description": "The decor of room \"Recluse and defiance\" is modern.", "result": ",decor,roomName\n0,modern,Recluse and defiance\n", "difficulty": "small_select"}, {"table_id": "film", "query": "SELECT COUNT(*) AS \"count of film\" \n FROM film", "table_name": "film", "query_description": "Count the number of films.", "results_description": "The count of films is 13.", "result": ",count of film\n0,13\n", "difficulty": "aggregate"}, {"table_id": "club", "query": "SELECT clubname \n FROM club", "table_name": "club", "query_description": "Give me the name of each club.", "results_description": "The club name is Bootup Baltimore.", "result": ",ClubName\n0,Bootup Baltimore\n", "difficulty": "small_select"}, {"table_id": "Employee, Certificate, Aircraft", "query": "SELECT T3.name AS \"Aircraft name\", T1.name AS \"Employee name\" \n FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid \n WHERE T1.name = 'John Williams'", "table_name": "Employee, Certificate, Aircraft", "query_description": "Show names for all aircrafts of which John Williams has certificates.", "results_description": "The employee named John Williams flies the aircraft Boeing 737-800.", "result": ",Aircraft name,Employee name\n0,Boeing 737-800,John Williams\n", "difficulty": "join"}, {"table_id": "Guests", "query": "SELECT date_of_birth, gender_code \n FROM Guests \n WHERE gender_code = 'Male'", "table_name": "Guests", "query_description": "Return the date of birth for all the guests with gender code \"Male\".", "results_description": "The male guest was born in 1995-11-04 07:09:57.", "result": ",gender_code,date_of_birth\n0,Male,1995-11-04 07:09:57\n", "difficulty": "small_select"}, {"table_id": "gymnast, people", "query": "SELECT T2.Name AS \"people Name\", T2.Height AS \"people Height\" \n FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height ASC", "table_name": "gymnast, people", "query_description": "What are the names of gymnasts, ordered by their heights ascending?", "results_description": "Paul Hamm has a height of 1.71", "result": ",people Name,people Height\n0,Paul Hamm,1.71\n", "difficulty": "join"}, {"table_id": "branch", "query": "SELECT city, COUNT(*) AS \"count of branch\", open_year \n FROM branch \n WHERE open_year < 2010 \n GROUP BY city", "table_name": "branch", "query_description": "Show the city and the number of branches opened before 2010 for each city.", "results_description": "London city has 2 branches opened before 2010.", "result": ",City,Open_year,count of branch\n0,London,2001,2\n", "difficulty": "aggregate_group_by"}, {"table_id": "train", "query": "SELECT origin \n FROM train \n GROUP BY origin \n HAVING COUNT(*) > 1", "table_name": "train", "query_description": "Find the origins from which more than 1 train starts.", "results_description": "Chennai is the origin of more than 1 trains.", "result": ",origin\n0,Chennai\n", "difficulty": "aggregate_group_by"}, {"table_id": "CUSTOMERS", "query": "SELECT COUNT(*) AS \"count of CUSTOMERS\" \n FROM CUSTOMERS", "table_name": "CUSTOMERS", "query_description": "Count the number of customers recorded.", "results_description": "There are 15 customers.", "result": ",count of CUSTOMERS\n0,15\n", "difficulty": "aggregate"}, {"table_id": "Sportsinfo, Student", "query": "SELECT SUM(hoursperweek) AS \"sum of hoursperweek\", SUM(gamesplayed) AS \"sum of gamesplayed\", T2.age AS \"Student age\" \n FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID \n WHERE T2.age < 20", "table_name": "Sportsinfo, Student", "query_description": "What is the total number of hours per week and number of games played by students under 20?", "results_description": "There are 257 games played by students under 20, with 158 total hours per week.", "result": ",Student age,sum of gamesplayed,sum of hoursperweek\n0,18,257,158\n", "difficulty": "join_aggregate"}, {"table_id": "authors, authorship, papers", "query": "SELECT t3.title AS \"papers title\", t1.lname AS \"authors lname\", t1.fname AS \"authors fname\" \n FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid \n WHERE t1.fname = 'Olin' AND t1.lname = 'Shivers'", "table_name": "authors, authorship, papers", "query_description": "Which papers did the author \"Olin Shivers\" write? Give me the paper titles.", "results_description": "The paper \"Functional Pearl: Modular Rollback through Control Logging\" was written by Olin Shivers", "result": ",papers title,authors fname,authors lname\n0,Functional Pearl: Modular Rollback through Control Logging,Olin,Shivers\n", "difficulty": "join"}, {"table_id": "checking", "query": "SELECT AVG(balance) AS \"average balance\" \n FROM checking", "table_name": "checking", "query_description": "Find the average checking balance.", "results_description": "The average checking balance is 4583.428571428572", "result": ",average balance\n0,4583.428571428572\n", "difficulty": "aggregate"}, {"table_id": "Student", "query": "SELECT COUNT(*) AS \"count of Student\", Advisor \n FROM Student \n WHERE Advisor = 1121", "table_name": "Student", "query_description": "Advisor 1121 has how many students?", "results_description": "The number of students with advisor 1121 is 3.", "result": ",Advisor,count of Student\n0,1121,3\n", "difficulty": "aggregate"}, {"table_id": "customer", "query": "SELECT cust_name, acc_bal \n FROM customer \n WHERE cust_name LIKE '%a%'", "table_name": "customer", "query_description": "Find the name and account balance of the customer whose name includes the letter \u2018a\u2019.", "results_description": "The customer named Mary has an account balance of 2000", "result": ",acc_bal,cust_name\n0,2000,Mary\n", "difficulty": "small_select"}, {"table_id": "match_season", "query": "SELECT POSITION \n FROM match_season \n GROUP BY POSITION ORDER BY COUNT(*) DESC", "table_name": "match_season", "query_description": "What is the position that is most common among players in match seasons?", "results_description": "The position Defender is the most common among players in match seasons.", "result": ",Position\n0,Defender\n", "difficulty": "aggregate_group_by"}, {"table_id": "customers, invoices", "query": "SELECT T1.first_name AS \"customers first_name\", T1.last_name AS \"customers last_name\", T2.invoice_date AS \"invoices invoice_date\" \n FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY T2.invoice_date DESC", "table_name": "customers, invoices", "query_description": "Find out 5 customers who most recently purchased something. List customers' first and last name.", "results_description": "The customer named Pareek Manoj made a purchase on 2011-12-22 00:00:00", "result": ",customers last_name,customers first_name,invoices invoice_date\n0,Pareek,Manoj,2011-12-22 00:00:00\n", "difficulty": "join"}, {"table_id": "aircraft", "query": "SELECT Description \n FROM aircraft", "table_name": "aircraft", "query_description": "List the description of all aircrafts.", "results_description": "The aircraft's description is \"Light utility helicopter\".", "result": ",Description\n0,Light utility helicopter\n", "difficulty": "small_select"}, {"table_id": "Customers_cards", "query": "SELECT date_valid_from, date_valid_to, card_number \n FROM Customers_cards \n WHERE card_number = '4560596484842'", "table_name": "Customers_cards", "query_description": "Show the date valid from and the date valid to for the card with card number '4560596484842'.", "results_description": "The card with card number 4560596484842 has a date valid from 2011-04-17 09:05:28 and a date valid to 2018-03-07 17:06:19", "result": ",card_number,date_valid_to,date_valid_from\n0,4560596484842,2018-03-07 17:06:19,2011-04-17 09:05:28\n", "difficulty": "small_select"}, {"table_id": "STUDENT", "query": "SELECT COUNT(*) AS \"count of STUDENT\" \n FROM STUDENT", "table_name": "STUDENT", "query_description": "How many students are there in total?", "results_description": "There are 34 students in total.", "result": ",count of STUDENT\n0,34\n", "difficulty": "aggregate"}, {"table_id": "INVOICES", "query": "SELECT MIN(Order_Quantity) AS \"minimum Order_Quantity\", AVG(Order_Quantity) AS \"average Order_Quantity\", MAX(Order_Quantity) AS \"maximum Order_Quantity\" \n FROM INVOICES", "table_name": "INVOICES", "query_description": "What are the minimum, average, and maximum quantities ordered? Check all the invoices.", "results_description": "The average quantity ordered is 1.6, the maximum is 2 and the minimum is 1.", "result": ",average Order_Quantity,maximum Order_Quantity,minimum Order_Quantity\n0,1.6,2,1\n", "difficulty": "aggregate"}, {"table_id": "TRANSACTIONS", "query": "SELECT date_of_transaction, transaction_type_code \n FROM TRANSACTIONS \n WHERE transaction_type_code = 'SALE'", "table_name": "TRANSACTIONS", "query_description": "Show all dates of transactions whose type code is \"SALE\".", "results_description": "The date of transaction with type code SALE is 1988-09-16 19:02:51.", "result": ",date_of_transaction,transaction_type_code\n0,1988-09-16 19:02:51,SALE\n", "difficulty": "small_select"}, {"table_id": "SECTION", "query": "SELECT COUNT(*) AS \"count of SECTION\", semester, YEAR \n FROM SECTION \n GROUP BY semester, YEAR", "table_name": "SECTION", "query_description": "How many courses are provided in each semester and year?", "results_description": "For the year 2001 in the fall semester there were 2 sections.", "result": ",year,semester,count of SECTION\n0,2001,Fall,2\n", "difficulty": "aggregate_group_by"}, {"table_id": "match_season", "query": "SELECT College \n FROM match_season \n GROUP BY College ORDER BY COUNT(*) DESC", "table_name": "match_season", "query_description": "Show the top 3 most common colleges of players in match seasons.", "results_description": "Virginia is the most common college of players in match seasons", "result": ",College\n0,Virginia\n", "difficulty": "aggregate_group_by"}, {"table_id": "Rooms", "query": "SELECT SUM(maxOccupancy) AS \"sum of maxOccupancy\", decor \n FROM Rooms \n WHERE decor = 'modern'", "table_name": "Rooms", "query_description": "What is the total number of people who could stay in the modern rooms in this inn?", "results_description": "The modern decorated rooms have a total occupancy of 10.", "result": ",decor,sum of maxOccupancy\n0,modern,10\n", "difficulty": "aggregate"}, {"table_id": "tryout", "query": "SELECT COUNT(*) AS \"count of tryout\", pPos \n FROM tryout \n WHERE pPos = 'goalie'", "table_name": "tryout", "query_description": "What is the number of students playing as a goalie?", "results_description": "There were 3 tryouts for the goalie position.", "result": ",pPos,count of tryout\n0,goalie,3\n", "difficulty": "aggregate"}, {"table_id": "manufacturers", "query": "SELECT headquarter, founder \n FROM manufacturers \n WHERE founder = 'James'", "table_name": "manufacturers", "query_description": "What is the headquarter of the company whose founder is James?", "results_description": "The headquarter in Los Angeles was found by James.", "result": ",Founder,Headquarter\n0,James,Los Angeles\n", "difficulty": "small_select"}, {"table_id": "airlines", "query": "SELECT country, COUNT(*) AS \"count of airlines\" \n FROM airlines \n GROUP BY country ORDER BY COUNT(*) DESC", "table_name": "airlines", "query_description": "How many airlines operate out of each country in descending order?", "results_description": "There are 1099 airlines operating in the US", "result": ",country,count of airlines\n0,United States,1099\n", "difficulty": "aggregate_group_by"}, {"table_id": "files, song", "query": "SELECT MIN(T1.duration) AS \"minimum duration\", MIN(T2.rating) AS \"minimum rating\", T2.genre_is AS \"song genre_is\" \n FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id \n GROUP BY T2.genre_is ORDER BY T2.genre_is", "table_name": "files, song", "query_description": "What is the shortest and most poorly rated song for each genre, ordered alphabetically by genre?", "results_description": "The song was of blues genre, had a minimum rating of 6 and a minimum duration 5:23.", "result": ",song genre_is,minimum rating,minimum duration\n0,blues,6,5:23\n", "difficulty": "join_aggregate"}, {"table_id": "professor", "query": "SELECT COUNT(*) AS \"count of professor\", prof_high_degree \n FROM professor \n WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA'", "table_name": "professor", "query_description": "How many professors attained either Ph.D. or Masters degrees?", "results_description": "There are 20 professors with a high degree of a Ph.D.", "result": ",PROF_HIGH_DEGREE,count of professor\n0,Ph.D.,20\n", "difficulty": "aggregate"}, {"table_id": "classroom", "query": "SELECT MAX(capacity) AS \"maximum capacity\", AVG(capacity) AS \"average capacity\", building \n FROM classroom \n GROUP BY building", "table_name": "classroom", "query_description": "What are the greatest and average capacity for rooms in each building?", "results_description": "In the Alumni building, the average capacity is 36.5, while the maximum capacity is 47", "result": ",building,average capacity,maximum capacity\n0,Alumni,36.5,47\n", "difficulty": "aggregate_group_by"}, {"table_id": "services", "query": "SELECT COUNT(*) AS \"count of services\" \n FROM services", "table_name": "services", "query_description": "How many services are there?", "results_description": "There are 15 services", "result": ",count of services\n0,15\n", "difficulty": "aggregate"}, {"table_id": "staff, staff_department_assignments", "query": "SELECT T1.staff_name AS \"staff staff_name\", T1.staff_gender AS \"staff staff_gender\", T2.date_assigned_from AS \"staff_department_assignments date_assigned_from\" \n FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id \n WHERE T2.date_assigned_from LIKE '2016%'", "table_name": "staff, staff_department_assignments", "query_description": "What are the names and genders of staff who were assigned in 2016?", "results_description": "The staff named Zakary has gender of 1 and was assigned on 2016-09-20 02:59:15", "result": ",staff staff_name,staff staff_gender,staff_department_assignments date_assigned_from\n0,Zakary,1,2016-09-20 02:59:15\n", "difficulty": "join"}, {"table_id": "addresses", "query": "SELECT state_province_county, country, zip_postcode \n FROM addresses \n WHERE zip_postcode LIKE '4%'", "table_name": "addresses", "query_description": "What are the state and country of all the cities that have post codes starting with 4.\\", "results_description": "The Colorado state of the USA country has the post code 416.", "result": ",country,zip_postcode,state_province_county\n0,USA,416,Colorado\n", "difficulty": "small_select"}, {"table_id": "Person", "query": "SELECT AVG(age) AS \"average age\" \n FROM Person", "table_name": "Person", "query_description": "What is the average age for all person?", "results_description": "The average size is 32.75.", "result": ",average age\n0,32.75\n", "difficulty": "aggregate"}, {"table_id": "gymnast, people", "query": "SELECT T2.Name AS \"people Name\", T2.Hometown AS \"people Hometown\" \n FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID \n WHERE T2.Hometown <> 'Santo Domingo'", "table_name": "gymnast, people", "query_description": "Return the names of gymnasts who did not grow up in Santo Domingo.", "results_description": "Lorraine S\u00faarez Carmona grew up in Bonao", "result": ",people Name,people Hometown\n0,Lorraine S\u00faarez Carmona,Bonao\n", "difficulty": "join"}, {"table_id": "stay", "query": "SELECT COUNT(patient) AS \"count of stay\", room \n FROM stay \n WHERE room = 112", "table_name": "stay", "query_description": "How many patients stay in room 112?", "results_description": "In room 112 there is 1 patient.", "result": ",Room,count of stay\n0,112,1\n", "difficulty": "aggregate"}, {"table_id": "player, tryout", "query": "SELECT MAX(T1.HS) AS \"maximum HS\", pPos, T2.pPos AS \"tryout pPos\" \n FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID \n WHERE T1.HS > 1000 \n GROUP BY T2.pPos", "table_name": "player, tryout", "query_description": "What is the maximum training hours for the students whose training hours is greater than 1000 in different positions?", "results_description": "For the goalie position, the maximum training hours are 1600", "result": ",pPos,maximum HS,tryout pPos\n0,goalie,1600,goalie\n", "difficulty": "join_aggregate"}, {"table_id": "club_rank", "query": "SELECT MAX(Silver) AS \"maximum Silver\", MIN(Silver) AS \"minimum Silver\" \n FROM club_rank", "table_name": "club_rank", "query_description": "What are the maximum and minimum number of silver medals for all the clubs?", "results_description": "The maximum number of silver medals for all clubs is 11 and the minimum is 1", "result": ",maximum Silver,minimum Silver\n0,11.0,1.0\n", "difficulty": "aggregate"}, {"table_id": "club, member_of_club, student", "query": "SELECT AVG(t3.age) AS \"average age\", t1.clubname AS \"club clubname\" \n FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid \n WHERE t1.clubname = 'Hopkins Student Enterprises'", "table_name": "club, member_of_club, student", "query_description": "Find the average age of members of the club \"Hopkins Student Enterprises\".", "results_description": "The average age in the club named Hopkins Student Enterprises is 20.", "result": ",average age,club clubname\n0,20.0,Hopkins Student Enterprises\n", "difficulty": "join_aggregate"}, {"table_id": "market", "query": "SELECT COUNT(*) AS \"count of market\", Number_cities \n FROM market \n WHERE Number_cities < 300", "table_name": "market", "query_description": "Count the number of markets that have a number of cities lower than 300.", "results_description": "The number of cities which their markets count to 3 are 209", "result": ",Number_cities,count of market\n0,209,3\n", "difficulty": "aggregate"}, {"table_id": "Rooms", "query": "SELECT roomName, bedType, decor \n FROM Rooms \n WHERE decor = 'traditional'", "table_name": "Rooms", "query_description": "List the type of bed and name of all traditional rooms.", "results_description": "The room named Interim but salutary has a King bed type and its decor is traditional.", "result": ",decor,bedType,roomName\n0,traditional,King,Interim but salutary\n", "difficulty": "small_select"}, {"table_id": "Reservations", "query": "SELECT kids, FirstName, LastName \n FROM Reservations \n WHERE FirstName = 'ROY' AND LastName = 'SWEAZY'", "table_name": "Reservations", "query_description": "Find the number of kids staying in the rooms reserved by a person called ROY SWEAZ.", "results_description": "There is 1 kid staying in rooms reserved by ROY SWEAZ.", "result": ",Kids,LastName,FirstName\n0,1,SWEAZY,ROY\n", "difficulty": "small_select"}, {"table_id": "editor", "query": "SELECT COUNT(*) AS \"count of editor\" \n FROM editor", "table_name": "editor", "query_description": "How many editors are there?", "results_description": "The total count of editors is 9.", "result": ",count of editor\n0,9\n", "difficulty": "aggregate"}, {"table_id": "dorm_amenity, has_amenity, dorm", "query": "SELECT T1.amenity_name AS \"dorm_amenity amenity_name\", T3.dorm_name AS \"dorm dorm_name\" \n FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T2.amenid = T1.amenid JOIN dorm AS T3 ON T2.dormid = T3.dormid \n WHERE T3.dorm_name = 'Anonymous Donor Hall' ORDER BY T1.amenity_name", "table_name": "dorm_amenity, has_amenity, dorm", "query_description": "What are the amenities in alphabetical order that Anonymous Donor Hall has?", "results_description": "The Anonymous Donor Hall dorm has amenity name 4 Walls.", "result": ",dorm dorm_name,dorm_amenity amenity_name\n0,Anonymous Donor Hall,4 Walls\n", "difficulty": "join"}, {"table_id": "player", "query": "SELECT name_first, name_last, height, weight \n FROM player \n WHERE weight > 220 OR height < 75", "table_name": "player", "query_description": "List players' first name and last name who have weight greater than 220 or height shorter than 75.", "results_description": "Hank Aaron weighs 180 and has a height of 72", "result": ",height,weight,name_last,name_first\n0,72,180,Aaron,Hank\n", "difficulty": "small_select"}, {"table_id": "Accounts, Customers", "query": "SELECT T2.customer_first_name AS \"Customers customer_first_name\", T2.customer_last_name AS \"Customers customer_last_name\", T2.customer_phone AS \"Customers customer_phone\", T1.account_name AS \"Accounts account_name\" \n FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id \n WHERE T1.account_name = '162'", "table_name": "Accounts, Customers", "query_description": "Give the full name and phone of the customer who has the account name 162.", "results_description": "The customer Faustino Langworth, with phone 284.749.0453, has account name 162.", "result": ",Accounts account_name,Customers customer_phone,Customers customer_last_name,Customers customer_first_name\n0,162,284.749.0453,Langworth,Faustino\n", "difficulty": "join"}, {"table_id": "stadium", "query": "SELECT AVG(capacity) AS \"average capacity\", opening_year \n FROM stadium \n WHERE opening_year = 2005", "table_name": "stadium", "query_description": "What is the average capacity of the stadiums that were opened in year 2005?", "results_description": "The stadiums that were opened in year 2005 have and average capacity of 62504", "result": ",Opening_year,average capacity\n0,2005.0,62504.0\n", "difficulty": "aggregate"}, {"table_id": "salary, team", "query": "SELECT SUM(T1.salary) AS \"sum of salary\", T2.name AS \"team name\", T1.year AS \"salary year\" \n FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br \n WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010", "table_name": "salary, team", "query_description": "What is the total salary expenses of team Boston Red Stockings in 2010?", "results_description": "The total salary expenses of the team Boston Red Stockings in the year 2010 is 812236665.", "result": ",team name,salary year,sum of salary\n0,Boston Red Stockings,2010,812236665\n", "difficulty": "join_aggregate"}, {"table_id": "match_season", "query": "SELECT Draft_Pick_Number, Draft_Class, POSITION \n FROM match_season \n WHERE POSITION = 'Defender'", "table_name": "match_season", "query_description": "What are the draft pick numbers and draft classes for players who play the Defender position?", "results_description": "The draft class 1996 MLS Inaugural Player Draft with pick number 87 has position Defender.", "result": ",Position,Draft_Class,Draft_Pick_Number\n0,Defender,1996 MLS Inaugural Player Draft,87\n", "difficulty": "small_select"}, {"table_id": "ship", "query": "SELECT Name, Nationality \n FROM ship \n WHERE Nationality <> 'United States'", "table_name": "ship", "query_description": "What are the names of the ships that are not from the United States?", "results_description": "The ships named Corbridge are from the United Kingdom", "result": ",Name,Nationality\n0,Corbridge,United Kingdom\n", "difficulty": "small_select"}, {"table_id": "Products", "query": "SELECT COUNT(*) AS \"count of Products\" \n FROM Products", "table_name": "Products", "query_description": "How many products are there?", "results_description": "There are 15 products", "result": ",count of Products\n0,15\n", "difficulty": "aggregate"}, {"table_id": "home_game", "query": "SELECT YEAR, AVG(attendance) AS \"average attendance\" \n FROM home_game \n GROUP BY YEAR", "table_name": "home_game", "query_description": "What is the average number of attendance at home games for each year?", "results_description": "The average attendance of 1871 was 17125", "result": ",year,average attendance\n0,1871.0,17125.0\n", "difficulty": "aggregate_group_by"}, {"table_id": "authors, authorship, papers, inst", "query": "SELECT t3.title AS \"papers title\", t2.authorder AS \"authorship authorder\", t1.lname AS \"authors lname\", t4.country AS \"inst country\" \n 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 \n WHERE t4.country = 'Japan' AND t2.authorder = 1 AND t1.lname = 'Ohori'", "table_name": "authors, authorship, papers, inst", "query_description": "Find the titles of papers whose first author is affiliated with an institution in the country \"Japan\" and has last name \"Ohori\"?", "results_description": "The paper 'Making Standard ML a Practical Database Programming Language' was authored by Ohori in a Japanese instituition.", "result": ",inst country,papers title,authors lname,authorship authorder\n0,Japan,Making Standard ML a Practical Database Programming Language,Ohori,1\n", "difficulty": "join"}, {"table_id": "Project_Staff", "query": "SELECT date_from, date_to, role_code \n FROM Project_Staff \n WHERE role_code = 'researcher'", "table_name": "Project_Staff", "query_description": "When do all the researcher role staff start to work, and when do they stop working?", "results_description": "A staff member with role code researcher started to work at 1981-10-09 21:32:53 and stop working at 1981-10-09 21:32:53.", "result": ",date_to,date_from,role_code\n0,2004-12-16 13:03:36,1981-10-09 21:32:53,researcher\n", "difficulty": "small_select"}, {"table_id": "Flight, Aircraft", "query": "SELECT T2.name AS \"Aircraft name\", T1.flno AS \"Flight flno\" \n FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid \n WHERE T1.flno = 99", "table_name": "Flight, Aircraft", "query_description": "What is the aircraft name for the flight with number 99", "results_description": "The aircraft of the flight with number 99 is the Boeing 747-400.", "result": ",Flight flno,Aircraft name\n0,99,Boeing 747-400\n", "difficulty": "join"}, {"table_id": "player", "query": "SELECT Player, Years_Played \n FROM player", "table_name": "player", "query_description": "Who are the different players and how many years has each played?", "results_description": "Cho Soong-Jae played for 1 year", "result": ",Player,Years_Played\n0,Cho Soong-Jae (630),1 (2011)\n", "difficulty": "small_select"}, {"table_id": "premises", "query": "SELECT COUNT(*) AS \"count of premises\" \n FROM premises", "table_name": "premises", "query_description": "How many premises are there?", "results_description": "There are 15 premises", "result": ",count of premises\n0,15\n", "difficulty": "aggregate"}, {"table_id": "music_festival", "query": "SELECT Date_of_ceremony, RESULT \n FROM music_festival", "table_name": "music_festival", "query_description": "Return the dates of ceremony and the results of all music festivals", "results_description": "The music festival with a date of ceremony 18 February 2011 had the result Nominated.", "result": ",Result,Date_of_ceremony\n0,Nominated,18 February 2011\n", "difficulty": "small_select"}, {"table_id": "catalog_contents", "query": "SELECT catalog_entry_name, width, LENGTH \n FROM catalog_contents \n WHERE LENGTH < 3 OR width > 5", "table_name": "catalog_contents", "query_description": "Which catalog contents have length below 3 or above 5? Find the catalog entry names.", "results_description": "The catalog with entry name Root beer has a length of 6 and width of 6", "result": ",width,length,catalog_entry_name\n0,6,6,Root beer\n", "difficulty": "small_select"}, {"table_id": "Apartment_Buildings, Apartments", "query": "SELECT SUM(T2.room_count) AS \"sum of room_count\", T1.building_short_name AS \"Apartment_Buildings building_short_name\" \n FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id \n WHERE T1.building_short_name = 'Columbus Square'", "table_name": "Apartment_Buildings, Apartments", "query_description": "How many rooms in total are there in the apartments in the building with short name \"Columbus Square\"?", "results_description": "There are 29 rooms in the building with short name Columbus Square.", "result": ",sum of room_count,Apartment_Buildings building_short_name\n0,29,Columbus Square\n", "difficulty": "join_aggregate"}, {"table_id": "Faculty", "query": "SELECT building \n FROM Faculty \n GROUP BY building ORDER BY COUNT(*) DESC", "table_name": "Faculty", "query_description": "Which building has most faculty members?", "results_description": "The building is Krieger.", "result": ",Building\n0,Krieger\n", "difficulty": "aggregate_group_by"}, {"table_id": "member_attendance, member, performance", "query": "SELECT T2.Name AS \"member Name\", T3.Date AS \"performance Date\", T3.Attendance AS \"performance Attendance\" \n 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", "table_name": "member_attendance, member, performance", "query_description": "Show the names of members and the dates of performances they attended in descending order of attendance of the performances.", "results_description": "H\u00e9ctor Campana attended a performance on the 11th of February 1982.", "result": ",member Name,performance Date,performance Attendance\n0,H\u00e9ctor Campana,February 11,1982\n", "difficulty": "join"}, {"table_id": "competition", "query": "SELECT Competition_type \n FROM competition \n GROUP BY Competition_type \n HAVING COUNT(*) <= 5", "table_name": "competition", "query_description": "What are the types of competition that have most 5 competitions for that type?", "results_description": "The tournament competition type has at most 5 competitions.", "result": ",Competition_type\n0,Tournament\n", "difficulty": "aggregate_group_by"}, {"table_id": "useracct, review", "query": "SELECT T1.name AS \"useracct name\", AVG(T2.rating) AS \"average rating\", T2.u_id AS \"review u_id\" \n FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id \n GROUP BY T2.u_id", "table_name": "useracct, review", "query_description": "For each user, return the name and the average rating of reviews given by them.", "results_description": "User \"helen\" has an average rating of 7.3 in their reviews", "result": ",review u_id,useracct name,average rating\n0,1,Helen,7.333333333333333\n", "difficulty": "join_aggregate"}, {"table_id": "documents", "query": "SELECT document_name \n FROM documents \n WHERE document_name LIKE '%CV%'", "table_name": "documents", "query_description": "List all the document names which contains \"CV\".", "results_description": "The document name is David CV.", "result": ",document_name\n0,David CV\n", "difficulty": "small_select"}, {"table_id": "tryout", "query": "SELECT COUNT(*) AS \"count of tryout\", pPos \n FROM tryout \n WHERE pPos = 'goalie'", "table_name": "tryout", "query_description": "How many students whose are playing the role of goalie?", "results_description": "The role of goalie is played by 3 students", "result": ",pPos,count of tryout\n0,goalie,3\n", "difficulty": "aggregate"}, {"table_id": "bank", "query": "SELECT SUM(no_of_customers) AS \"sum of no_of_customers\", city \n FROM bank \n WHERE city = 'New York City'", "table_name": "bank", "query_description": "What is the total number of customers who use banks in New York City?", "results_description": "In New York City there are 656 customers.", "result": ",city,sum of no_of_customers\n0,New York City,656\n", "difficulty": "aggregate"}, {"table_id": "Customers_cards", "query": "SELECT COUNT(*) AS \"count of Customers_cards\", card_type_code \n FROM Customers_cards \n WHERE card_type_code = 'Debit'", "table_name": "Customers_cards", "query_description": "How many debit cards do we have?", "results_description": "There are 8 Debit cards.", "result": ",card_type_code,count of Customers_cards\n0,Debit,8\n", "difficulty": "aggregate"}, {"table_id": "HOTELS", "query": "SELECT price_range, star_rating_code \n FROM HOTELS \n WHERE star_rating_code = '5'", "table_name": "HOTELS", "query_description": "What are the price ranges of five star hotels?", "results_description": "The hotels with 5 star rating have a price range of 2914989.571.", "result": ",price_range,star_rating_code\n0,2914989.571,5\n", "difficulty": "small_select"}, {"table_id": "Allergy_type", "query": "SELECT allergy, allergytype \n FROM Allergy_type", "table_name": "Allergy_type", "query_description": "Show all allergies and their types.", "results_description": "The allergy on eggs is of type food.", "result": ",Allergy,AllergyType\n0,Eggs,food\n", "difficulty": "small_select"}, {"table_id": "member", "query": "SELECT COUNT(*) AS \"count of member\", address \n FROM member \n WHERE address <> 'Hartford'", "table_name": "member", "query_description": "How many members are not living in Hartford?", "results_description": "There are 7 members with address Waterbury.", "result": ",Address,count of member\n0,Waterbury,7\n", "difficulty": "aggregate"}, {"table_id": "dorm", "query": "SELECT AVG(student_capacity) AS \"average student_capacity\", SUM(student_capacity) AS \"sum of student_capacity\", gender \n FROM dorm \n WHERE gender = 'X'", "table_name": "dorm", "query_description": "What is the average and total capacity for all dorms who are of gender X?", "results_description": "The average capacity is 227.2 and the total capacity is 1136 for all dorms who are of gender X", "result": ",gender,sum of student_capacity,average student_capacity\n0,X,1136,227.2\n", "difficulty": "aggregate"}, {"table_id": "furniture", "query": "SELECT Num_of_Component, name \n FROM furniture \n WHERE Num_of_Component > 10", "table_name": "furniture", "query_description": "Find the component amounts and names of all furnitures that have more than 10 components.", "results_description": "Billiard table is consisted of 14 components", "result": ",Name,Num_of_Component\n0,Billiard table,14\n", "difficulty": "small_select"}, {"table_id": "party_host, HOST, party", "query": "SELECT T3.Location AS \"party Location\", T2.Age AS \"HOST Age\" \n 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 \n WHERE T2.Age > 50", "table_name": "party_host, HOST, party", "query_description": "Which parties have hosts of age above 50? Give me the party locations.", "results_description": "The party located at the Heineken Music Hall Amsterdam has a host aged 60", "result": ",HOST Age,party Location\n0,60,Heineken Music Hall Amsterdam\n", "difficulty": "join"}, {"table_id": "Apartment_Buildings", "query": "SELECT building_address, building_phone, building_manager \n FROM Apartment_Buildings \n WHERE building_manager = 'Brenden'", "table_name": "Apartment_Buildings", "query_description": "Show the addresses and phones of all the buildings managed by \"Brenden\".", "results_description": "The building in 354 Otto Villages Charliefort, VT 71664 has the phone 915-617-2408x832 and the manager is Brenden.", "result": ",building_phone,building_address,building_manager\n0,915-617-2408x832,\"354 Otto Villages\nCharliefort, VT 71664\",Brenden\n", "difficulty": "small_select"}, {"table_id": "HOTELS", "query": "SELECT AVG(price_range) AS \"average price_range\", pets_allowed_yn, star_rating_code \n FROM HOTELS \n WHERE star_rating_code = '5' AND pets_allowed_yn = 1", "table_name": "HOTELS", "query_description": "What is the average price range of five star hotels that allow pets?", "results_description": "170031784.62282422 is the average price range of five star hotels that allow pets.", "result": ",pets_allowed_yn,star_rating_code,average price_range\n0,1,5,170031784.62282422\n", "difficulty": "aggregate"}, {"table_id": "book", "query": "SELECT COUNT(*) AS \"count of book\" \n FROM book", "table_name": "book", "query_description": "How many books are there?", "results_description": "There are 10 books.", "result": ",count of book\n0,10\n", "difficulty": "aggregate"}, {"table_id": "ref_product_categories", "query": "SELECT product_category_description, unit_of_measure, product_category_code \n FROM ref_product_categories \n WHERE product_category_code = 'Herbs'", "table_name": "ref_product_categories", "query_description": "Return the description and unit of measurement for products in the 'Herbs' category.", "results_description": "The description for products in the Herbs category is Herbs and the unit of measurement is Handful", "result": ",unit_of_measure,product_category_code,product_category_description\n0,Handful ,Herbs,Herbs\n", "difficulty": "small_select"}, {"table_id": "Customers", "query": "SELECT COUNT(*) AS \"count of Customers\" \n FROM Customers", "table_name": "Customers", "query_description": "How many customers are there?", "results_description": "There are 15 customers", "result": ",count of Customers\n0,15\n", "difficulty": "aggregate"}, {"table_id": "people", "query": "SELECT Name, Age \n FROM people \n WHERE Age = 35 OR Age = 36", "table_name": "people", "query_description": "Show the names of people aged either 35 or 36.", "results_description": "Luther C. Carter is 35 years old", "result": ",Age,Name\n0,35,Luther C. Carter\n", "difficulty": "small_select"}, {"table_id": "channel, broadcast", "query": "SELECT t1.name AS \"channel name\", t2.time_of_day AS \"broadcast time_of_day\" \n FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id \n WHERE t2.time_of_day = 'Morning'", "table_name": "channel, broadcast", "query_description": "Which channels are broadcast in the morning? Give me the channel names.", "results_description": "Channel CCTV-1 is broadcast in the morning", "result": ",channel name,broadcast time_of_day\n0,CCTV-1,Morning\n", "difficulty": "join"}, {"table_id": "products", "query": "SELECT product_category_code, product_name \n FROM products \n WHERE product_name = 'flax'", "table_name": "products", "query_description": "Which category does the product named \"flax\" belong to?", "results_description": "The product named flax is in the seeds category.", "result": ",product_name,product_category_code\n0,flax,Seeds\n", "difficulty": "small_select"}, {"table_id": "dorm", "query": "SELECT SUM(student_capacity) AS \"sum of student_capacity\" \n FROM dorm", "table_name": "dorm", "query_description": "Find the total capacity of all dorms.", "results_description": "The total capacity of the dorms is 1380.", "result": ",sum of student_capacity\n0,1380\n", "difficulty": "aggregate"}, {"table_id": "Flight", "query": "SELECT COUNT(*) AS \"count of Flight\" \n FROM Flight", "table_name": "Flight", "query_description": "How many flights do we have?", "results_description": "There are 10 flights", "result": ",count of Flight\n0,10\n", "difficulty": "aggregate"}, {"table_id": "train", "query": "SELECT COUNT(*) AS \"count of train\", name \n FROM train \n WHERE name LIKE '%Express%'", "table_name": "train", "query_description": "How many trains have 'Express' in their names?", "results_description": "There are 9 trains with Express in their names.", "result": ",name,count of train\n0,Ananthapuri Express,9\n", "difficulty": "aggregate"}, {"table_id": "Movie", "query": "SELECT director, title \n FROM Movie \n WHERE title = 'Avatar'", "table_name": "Movie", "query_description": "Who directed Avatar?", "results_description": "The movie Avatar was directed by James Cameron", "result": ",title,director\n0,Avatar,James Cameron\n", "difficulty": "small_select"}, {"table_id": "movie", "query": "SELECT AVG(budget_million) AS \"average budget_million\", MAX(budget_million) AS \"maximum budget_million\", MIN(budget_million) AS \"minimum budget_million\", YEAR \n FROM movie \n WHERE YEAR < 2000", "table_name": "movie", "query_description": "Return the average, maximum, and minimum budgets in millions for movies made before the year 2000.", "results_description": "Movies made before the year 2000 have 6 million average budget, 7 millions maximum budget and 5 millions minimum budget.", "result": ",Year,average budget_million,maximum budget_million,minimum budget_million\n0,1999.0,6.0,7.0,5.0\n", "difficulty": "aggregate"}, {"table_id": "appointment", "query": "SELECT COUNT(*) AS \"count of appointment\" \n FROM appointment", "table_name": "appointment", "query_description": "How many appointments are there?", "results_description": "There are 9 appointments.", "result": ",count of appointment\n0,9\n", "difficulty": "aggregate"}, {"table_id": "shop", "query": "SELECT Open_Date, Open_Year, Shop_Name \n FROM shop \n WHERE Shop_Name = 'Apple'", "table_name": "shop", "query_description": "What are the open dates and years for the shop named Apple?", "results_description": "The shop named Apple had an open date in 10 June 2009.", "result": ",Open_Date,Open_Year,Shop_Name\n0,10 June,2009,Apple\n", "difficulty": "small_select"}, {"table_id": "branch", "query": "SELECT city, open_year, membership_amount \n FROM branch \n WHERE open_year = 2001 AND membership_amount > 100", "table_name": "branch", "query_description": "What are the cities that have a branch that opened in 2001 and a branch with more than 100 members?", "results_description": "The branch in London opened in 2001 and has 112 members", "result": ",City,Open_year,membership_amount\n0,London,2001,112\n", "difficulty": "small_select"}, {"table_id": "procedures", "query": "SELECT MAX(cost) AS \"maximum cost\", MIN(cost) AS \"minimum cost\", AVG(cost) AS \"average cost\" \n FROM procedures", "table_name": "procedures", "query_description": "What are the highest cost, lowest cost and average cost of procedures?", "results_description": "The procedures have maximum cost 10000, minimum cost 25 and average cost 4324.857142857143", "result": ",average cost,maximum cost,minimum cost\n0,4324.857142857143,10000.0,25.0\n", "difficulty": "aggregate"}, {"table_id": "CUSTOMERS", "query": "SELECT COUNT(*) AS \"count of CUSTOMERS\" \n FROM CUSTOMERS", "table_name": "CUSTOMERS", "query_description": "How many customers do we have?", "results_description": "We have 15 customers.", "result": ",count of CUSTOMERS\n0,15\n", "difficulty": "aggregate"}, {"table_id": "program", "query": "SELECT COUNT(*) AS \"count of program\" \n FROM program", "table_name": "program", "query_description": "how many programs are there?", "results_description": "There are 5 programs", "result": ",count of program\n0,5\n", "difficulty": "aggregate"}, {"table_id": "hall_of_fame", "query": "SELECT yearid \n FROM hall_of_fame \n GROUP BY yearid ORDER BY COUNT(*) ASC", "table_name": "hall_of_fame", "query_description": "In which year did the least people enter hall of fame?", "results_description": "The year is 1944.", "result": ",yearid\n0,1944\n", "difficulty": "aggregate_group_by"}, {"table_id": "club", "query": "SELECT clubdesc, clubname \n FROM club \n WHERE clubname = 'Pen and Paper Gaming'", "table_name": "club", "query_description": "What is the description of the club \"Pen and Paper Gaming\"?", "results_description": "The club named Pen and Paper Gaming has the description play pen and paper games on campus.", "result": ",ClubDesc,ClubName\n0,Play pen and paper games on campus.,Pen and Paper Gaming\n", "difficulty": "small_select"}, {"table_id": "products", "query": "SELECT AVG(product_price) AS \"average product_price\", product_category_code \n FROM products \n GROUP BY product_category_code", "table_name": "products", "query_description": "Return the average price of products that have each category code.", "results_description": "The products with category code Book have an average price of 35.", "result": ",average product_price,product_category_code\n0,35.0,Book\n", "difficulty": "aggregate_group_by"}, {"table_id": "song", "query": "SELECT AVG(rating) AS \"average rating\", AVG(resolution) AS \"average resolution\", languages \n FROM song \n WHERE languages = 'bangla'", "table_name": "song", "query_description": "What are the average rating and resolution of songs that are in Bangla?", "results_description": "The songs in Bangla language have an average rating of 7.5 and an average resolution of 558.", "result": ",languages,average rating,average resolution\n0,bangla,7.5,558.0\n", "difficulty": "aggregate"}, {"table_id": "Flight", "query": "SELECT origin, destination \n FROM Flight \n WHERE destination = 'Honolulu'", "table_name": "Flight", "query_description": "What are the origins of all flights that are headed to Honolulu?", "results_description": "The flight originates from Los Angeles and its destination is Honolulu.", "result": ",origin,destination\n0,Los Angeles,Honolulu\n", "difficulty": "small_select"}, {"table_id": "Faculty, Student", "query": "SELECT T2.fname AS \"Student fname\", T2.lname AS \"Student lname\", T1.fname AS \"Faculty fname\", T1.lname AS \"Faculty lname\" \n FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor \n WHERE T1.fname = 'Michael' AND T1.lname = 'Goodrich'", "table_name": "Faculty, Student", "query_description": "Which students are advised by Michael Goodrich? Give me their first and last names.", "results_description": "The faculty Michael Goodrich is advising the student Linda Smith.", "result": ",Faculty fname,Faculty lname,Student fname,Student lname\n0,Michael,Goodrich,Linda,Smith\n", "difficulty": "join"}, {"table_id": "products", "query": "SELECT MIN(product_price) AS \"minimum product_price\", MAX(product_price) AS \"maximum product_price\", AVG(product_price) AS \"average product_price\" \n FROM products", "table_name": "products", "query_description": "Show the minimum, maximum, average price for all products.", "results_description": "The average price is 28612946.784182724, the maximum price is 310488248.48788 and the minimum price is 77.109961147471.", "result": ",average product_price,maximum product_price,minimum product_price\n0,28612946.784182724,310488248.48788,77.109961147471\n", "difficulty": "aggregate"}, {"table_id": "Customers", "query": "SELECT COUNT(*) AS \"count of Customers\" \n FROM Customers", "table_name": "Customers", "query_description": "Count the number of customers.", "results_description": "There are 15 customers", "result": ",count of Customers\n0,15\n", "difficulty": "aggregate"}, {"table_id": "Ref_Transaction_Types", "query": "SELECT transaction_type_description, transaction_type_code \n FROM Ref_Transaction_Types \n WHERE transaction_type_code = 'PUR'", "table_name": "Ref_Transaction_Types", "query_description": "Show the description of transaction type with code \"PUR\".", "results_description": "Transaction type with code \"PUR\" has the description Purchase.", "result": ",transaction_type_code,transaction_type_description\n0,PUR,Purchase\n", "difficulty": "small_select"}, {"table_id": "Customers", "query": "SELECT email_address, date_of_birth, first_name \n FROM Customers \n WHERE first_name = 'Carole'", "table_name": "Customers", "query_description": "List email address and birthday of customer whose first name as Carole.", "results_description": "The customer named Carole has birthdate in 1998-12-15 13:24:40 and her email is everette.goyette@example.org.", "result": ",first_name,date_of_birth,email_address\n0,Carole,1998-12-15 13:24:40,everette.goyette@example.org\n", "difficulty": "small_select"}, {"table_id": "Documents, Document_Types, Grants", "query": "SELECT T1.response_received_date AS \"Documents response_received_date\", T2.document_description AS \"Document_Types document_description\", T3.grant_amount AS \"Grants grant_amount\" \n 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 \n WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100", "table_name": "Documents, Document_Types, Grants", "query_description": "What is the response received date for the document described as Regular that was granted more than 100 dollars?", "results_description": "The document with the description Initial Application has the response received date of 1977-12-01 02:18:53 and is was granted 608413.3291 dollars.", "result": ",Grants grant_amount,Documents response_received_date,Document_Types document_description\n0,608413.3291,1977-12-01 02:18:53,Initial Application\n", "difficulty": "join"}, {"table_id": "county, election", "query": "SELECT T1.County_name AS \"county County_name\", T2.Committee AS \"election Committee\" \n FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District \n WHERE T2.Committee = 'Appropriations'", "table_name": "county, election", "query_description": "Which county do the delegates on \"Appropriations\" committee belong to? Give me the county names.", "results_description": "The county of Howard has the election committee of appropriations.", "result": ",county County_name,election Committee\n0,Howard,Appropriations\n", "difficulty": "join"}, {"table_id": "county", "query": "SELECT County_name, Population \n FROM county", "table_name": "county", "query_description": "Show the county name and population of all counties.", "results_description": "The county named Howard has a population of 21000", "result": ",Population,County_name\n0,21000.0,Howard\n", "difficulty": "small_select"}, {"table_id": "products", "query": "SELECT product_description, product_name \n FROM products \n WHERE product_name = 'Chocolate'", "table_name": "products", "query_description": "What is the description of the product named \"Chocolate\"?", "results_description": "The product named chocolate has the description \"Handmade Chocolate\".", "result": ",product_name,product_description\n0,Chocolate,Handmade chocolate\n", "difficulty": "small_select"}, {"table_id": "Employees", "query": "SELECT role_code \n FROM Employees \n GROUP BY role_code ORDER BY COUNT(*) DESC", "table_name": "Employees", "query_description": "Find the code of the role that have the most employees.", "results_description": "The code of the role that most employees have is ED.", "result": ",Role_Code\n0,ED\n", "difficulty": "aggregate_group_by"}, {"table_id": "enzyme", "query": "SELECT name, product \n FROM enzyme \n WHERE product <> 'Heme'", "table_name": "enzyme", "query_description": "What are the names of enzymes whose product is not 'Heme'?", "results_description": "The enzyme ALA synthase produces the \u03b4-Aminolevulinic acid.", "result": ",name,Product\n0,ALA synthase,\u03b4-Aminolevulinic acid\n", "difficulty": "small_select"}, {"table_id": "storm", "query": "SELECT AVG(damage_millions_USD) AS \"average damage_millions_USD\", MAX(damage_millions_USD) AS \"maximum damage_millions_USD\", max_speed \n FROM storm \n WHERE max_speed > 1000", "table_name": "storm", "query_description": "Show the average and maximum damage for all storms with max speed higher than 1000.", "results_description": "storms with max speed 1007 have an average damage of 6.5195 million dollars and a maximum damage of 13 million dollars", "result": ",Max_speed,average damage_millions_USD,maximum damage_millions_USD\n0,1007.0,6.5195,13.0\n", "difficulty": "aggregate"}, {"table_id": "Customer_Master_Index, CMI_Cross_References", "query": "SELECT T1.cmi_details AS \"Customer_Master_Index cmi_details\", T2.source_system_code AS \"CMI_Cross_References source_system_code\" \n FROM Customer_Master_Index AS T1 JOIN CMI_Cross_References AS T2 ON T1.master_customer_id = T2.master_customer_id \n WHERE T2.source_system_code = 'Tax'", "table_name": "Customer_Master_Index, CMI_Cross_References", "query_description": "what are the details of the cmi masters that have the cross reference code 'Tax'?", "results_description": "The customer master index details that have the cross reference system code Tax are Volkman, Mills and Ferry.", "result": ",Customer_Master_Index cmi_details,CMI_Cross_References source_system_code\n0,\"Volkman, Mills and Ferry\",Tax\n", "difficulty": "join"}, {"table_id": "products", "query": "SELECT * \n FROM products \n WHERE price BETWEEN 60 AND 120", "table_name": "products", "query_description": "Find all information of all the products with a price between $60 and $120.", "results_description": "The product with code 2 and name Memory has a price of 120 and is manufactured by 6", "result": ",Code,Name,Price,Manufacturer\n0,2,Memory,120,6\n", "difficulty": "large_select"}, {"table_id": "COURSES", "query": "SELECT course_description, course_name \n FROM COURSES \n WHERE course_name = 'database'", "table_name": "COURSES", "query_description": "Return the description for the courses named \"database\".", "results_description": "The database course has description database.", "result": ",course_name,course_description\n0,database,database\n", "difficulty": "small_select"}, {"table_id": "Project_Staff", "query": "SELECT role_code, date_to, date_from \n FROM Project_Staff \n WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18'", "table_name": "Project_Staff", "query_description": "What are the staff roles of the staff who", "results_description": "A staff with the role leader worked on the project from 1988-03-04 19:30:05 to 2004-11-01 23:52:38", "result": ",date_to,date_from,role_code\n0,1988-03-04 19:30:05,2004-11-01 23:52:38,leader\n", "difficulty": "small_select"}, {"table_id": "Customers, Addresses", "query": "SELECT T2.country AS \"Addresses country\", T1.first_name AS \"Customers first_name\", T1.last_name AS \"Customers last_name\" \n FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id \n WHERE T1.first_name = 'Carole' AND T1.last_name = 'Bernhard'", "table_name": "Customers, Addresses", "query_description": "Which country does customer with first name as Carole and last name as Bernhard lived in?", "results_description": "The customer Carole Bernhard is in the country of USA.", "result": ",Addresses country,Customers last_name,Customers first_name\n0,USA,Bernhard,Carole\n", "difficulty": "join"}, {"table_id": "STUDENT", "query": "SELECT MAX(Age) AS \"maximum Age\" \n FROM STUDENT", "table_name": "STUDENT", "query_description": "What is the oldest age among the students?", "results_description": "The oldest student is 27 years old.", "result": ",maximum Age\n0,27\n", "difficulty": "aggregate"}, {"table_id": "tryout, player", "query": "SELECT T1.cName AS \"tryout cName\", T2.pName AS \"player pName\" \n FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID \n WHERE T2.pName LIKE 'D%'", "table_name": "tryout, player", "query_description": "Which colleges do the tryout players whose name starts with letter D go to?", "results_description": "The college of David is ASU.", "result": ",player pName,tryout cName\n0,David,ASU\n", "difficulty": "join"}, {"table_id": "instructor", "query": "SELECT name, dept_name, salary \n FROM instructor \n WHERE dept_name = 'Comp. Sci.' AND salary > 80000", "table_name": "instructor", "query_description": "What are the names of the instructors in the Comp. Sci. department who earn more than 80000?", "results_description": "The instructor named Bondi has a salary of 115469.11 and belongs in the Computer Science department.", "result": ",name,salary,dept_name\n0,Bondi,115469.11,Comp. Sci.\n", "difficulty": "small_select"}, {"table_id": "products", "query": "SELECT AVG(price) AS \"average price\", Manufacturer \n FROM products \n WHERE Manufacturer = 2", "table_name": "products", "query_description": "Compute the average price of all products with manufacturer code equal to 2.", "results_description": "The manufacturer with code 2 has an average price of 150.", "result": ",Manufacturer,average price\n0,2.0,150.0\n", "difficulty": "aggregate"}, {"table_id": "student", "query": "SELECT COUNT(*) AS \"count of student\" \n FROM student", "table_name": "student", "query_description": "How many students are there?", "results_description": "There are 34 students", "result": ",count of student\n0,34\n", "difficulty": "aggregate"}, {"table_id": "products, product_characteristics, CHARACTERISTICS", "query": "SELECT t3.characteristic_name AS \"CHARACTERISTICS characteristic_name\", t1.product_name AS \"products product_name\", t3.characteristic_type_code AS \"CHARACTERISTICS characteristic_type_code\" \n 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 \n WHERE t1.product_name = 'sesame' AND t3.characteristic_type_code = 'Grade'", "table_name": "products, product_characteristics, CHARACTERISTICS", "query_description": "What are the names of the characteristics of the product 'sesame' that have the characteristic type code 'Grade'?", "results_description": "Product \"sesame\" has characteristic type \"error\" and code \"Grade\".", "result": ",products product_name,CHARACTERISTICS characteristic_name,CHARACTERISTICS characteristic_type_code\n0,sesame,error,Grade\n", "difficulty": "join"}, {"table_id": "accounts, savings", "query": "SELECT SUM(T2.balance) AS \"sum of balance\", T1.name AS \"accounts name\" \n FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid \n GROUP BY T1.name", "table_name": "accounts, savings", "query_description": "What are the names of customers with accounts, and what are the total savings balances for each?", "results_description": "The customer named Brown has a total savings balance of 200000", "result": ",accounts name,sum of balance\n0,Brown,200000.0\n", "difficulty": "join_aggregate"}, {"table_id": "Rooms", "query": "SELECT bedType, AVG(basePrice) AS \"average basePrice\" \n FROM Rooms \n GROUP BY bedType", "table_name": "Rooms", "query_description": "What is the average base price of different bed type? List bed type and average base price.", "results_description": "The Double bed type has an average price of 100", "result": ",bedType,average basePrice\n0,Double,100.0\n", "difficulty": "aggregate_group_by"}, {"table_id": "CUSTOMER", "query": "SELECT COUNT(*) AS \"count of CUSTOMER\", Email \n FROM CUSTOMER \n WHERE Email LIKE '%gmail.com%'", "table_name": "CUSTOMER", "query_description": "Count the number of customers that have an email containing \"gmail.com\".", "results_description": "There are 8 customers with the email ftremblay@gmail.com.", "result": ",Email,count of CUSTOMER\n0,ftremblay@gmail.com,8\n", "difficulty": "aggregate"}, {"table_id": "airport", "query": "SELECT International_Passengers, Domestic_Passengers, Airport_Name \n FROM airport \n WHERE Airport_Name = 'London Heathrow'", "table_name": "airport", "query_description": "What are the number of international and domestic passengers of the airport named London \"Heathrow\"?", "results_description": "London Heathrow airport has 5562516 domestic passengers and 61344438 international passengers.", "result": ",Airport_Name,Domestic_Passengers,International_Passengers\n0,London Heathrow,5562516.0,61344438.0\n", "difficulty": "small_select"}, {"table_id": "district", "query": "SELECT District_name, City_Population \n FROM district \n WHERE City_Population BETWEEN 200000 AND 2000000", "table_name": "district", "query_description": "What are the district names and city populations for all districts that between 200,000 and 2,000,000 residents?", "results_description": "The district of Bahawalpur has a city population of 530438", "result": ",District_name,City_Population\n0,Bahawalpur District,530438.0\n", "difficulty": "small_select"}, {"table_id": "COURSE", "query": "SELECT COUNT(*) AS \"count of COURSE\", Credits \n FROM COURSE \n WHERE Credits > 2", "table_name": "COURSE", "query_description": "Count the number of courses with more than 2 credits.", "results_description": "There are 71 courses with 3 credits.", "result": ",Credits,count of COURSE\n0,3,71\n", "difficulty": "aggregate"}, {"table_id": "Staff_Roles", "query": "SELECT role_description, role_code \n FROM Staff_Roles \n WHERE role_code = 'researcher'", "table_name": "Staff_Roles", "query_description": "What is the complete description of the researcher role.", "results_description": "The description of the role researcher is Project Researcher.", "result": ",role_code,role_description\n0,researcher,Project Researcher\n", "difficulty": "small_select"}, {"table_id": "customer_orders", "query": "SELECT COUNT(*) AS \"count of customer_orders\", order_details \n FROM customer_orders \n WHERE order_details = 'Second time'", "table_name": "customer_orders", "query_description": "How many orders have detail \"Second time\"?", "results_description": "There are 5 customer orders in total with order details Second time.", "result": ",order_details,count of customer_orders\n0,Second time,5\n", "difficulty": "aggregate"}, {"table_id": "club", "query": "SELECT COUNT(*) AS \"count of club\" \n FROM club", "table_name": "club", "query_description": "How many clubs are there?", "results_description": "There are 6 clubs in total.", "result": ",count of club\n0,6\n", "difficulty": "aggregate"}, {"table_id": "physician, trained_in, procedures", "query": "SELECT T1.name AS \"physician name\", T3.cost AS \"procedures cost\" \n 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", "table_name": "physician, trained_in, procedures", "query_description": "Which physician was trained in the procedure that costs the most.", "results_description": "Physician John Wen was trained in the procedure that costs the most, with a cost of 10000", "result": ",physician name,procedures cost\n0,John Wen,10000.0\n", "difficulty": "join"}, {"table_id": "player", "query": "SELECT Player, Years_Played \n FROM player", "table_name": "player", "query_description": "Show the players and the years played.", "results_description": "The player Cho Soong-Jae (630) has played for 1 year from 2011.", "result": ",Player,Years_Played\n0,Cho Soong-Jae (630),1 (2011)\n", "difficulty": "small_select"}, {"table_id": "customers, complaints", "query": "SELECT t1.phone_number AS \"customers phone_number\", t2.date_complaint_raised AS \"complaints date_complaint_raised\" \n FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.date_complaint_raised DESC", "table_name": "customers, complaints", "query_description": "Return the phone number of the customer who filed the complaint that was raised most recently.", "results_description": "The customer with phone number +38(3)9011433816 raised a complaint in 2007-10-14 21:50:43.", "result": ",customers phone_number,complaints date_complaint_raised\n0,+38(3)9011433816,2007-10-14 21:50:43\n", "difficulty": "join"}, {"table_id": "Employee", "query": "SELECT AVG(salary) AS \"average salary\", MAX(salary) AS \"maximum salary\" \n FROM Employee", "table_name": "Employee", "query_description": "What is average and maximum salary of all employees.", "results_description": "The average salary is 109915.3870967742 and the maximum salary is 289950.", "result": ",average salary,maximum salary\n0,109915.3870967742,289950.0\n", "difficulty": "aggregate"}, {"table_id": "people, candidate", "query": "SELECT t1.name AS \"people name\", t1.sex AS \"people sex\" \n FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id \n WHERE t1.sex = 'F' ORDER BY t1.name", "table_name": "people, candidate", "query_description": "list all female (sex is F) candidate names in the alphabetical order.", "results_description": "St\u00e9phane Antiga is a female.", "result": ",people sex,people name\n0,F,St\u00e9phane Antiga\n", "difficulty": "join"}, {"table_id": "party", "query": "SELECT Lieutenant_Governor, Comptroller, Party \n FROM party \n WHERE Party = 'Democratic'", "table_name": "party", "query_description": "Who are the lieutenant governor and comptroller from the democratic party?", "results_description": "The lieutenant governor is Sandra Frankel and the comptroller is Carl McCall from the democratic party", "result": ",Party,Comptroller,Lieutenant_Governor\n0,Democratic,Carl McCall,Sandra Frankel\n", "difficulty": "small_select"}, {"table_id": "Movie", "query": "SELECT COUNT(*) AS \"count of Movie\", YEAR \n FROM Movie \n WHERE YEAR < 2000", "table_name": "Movie", "query_description": "How many movies were made before 2000?", "results_description": "There were 7 movies in 1939.", "result": ",year,count of Movie\n0,1939,7\n", "difficulty": "aggregate"}, {"table_id": "customer_addresses, premises", "query": "SELECT T2.premises_type AS \"premises premises_type\", T1.address_type_code AS \"customer_addresses address_type_code\" \n FROM customer_addresses AS T1 JOIN premises AS T2 ON T1.premise_id = T2.premise_id", "table_name": "customer_addresses, premises", "query_description": "Show the premise type and address type code for all customer addresses.", "results_description": "A customer address has a Warehouse premise type and a Billing address type code.", "result": ",premises premises_type,customer_addresses address_type_code\n0,Warehouse,Billing\n", "difficulty": "join"}, {"table_id": "stay, patient, Prescribes, Medication", "query": "SELECT T4.name AS \"Medication name\", room \n 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 \n WHERE room = 111", "table_name": "stay, patient, Prescribes, Medication", "query_description": "Find the name of medication used on the patient who stays in room 111?", "results_description": "Procrastin-X is the medication used on the patient of room 111.", "result": ",Room,Medication name\n0,111,Procrastin-X\n", "difficulty": "join"}, {"table_id": "party", "query": "SELECT Party_Theme, LOCATION \n FROM party", "table_name": "party", "query_description": "What are the themes and locations of parties?", "results_description": "The party with Spring party theme is located in Hemkade 48 Zaandam", "result": ",Location,Party_Theme\n0,Hemkade 48 Zaandam,Spring\n", "difficulty": "small_select"}, {"table_id": "manufacturers", "query": "SELECT founder, name \n FROM manufacturers \n WHERE name LIKE 'S%'", "table_name": "manufacturers", "query_description": "Who is the founders of companies whose first letter is S?", "results_description": "Andy is the founder of Soy.", "result": ",Name,Founder\n0,Sony,Andy\n", "difficulty": "small_select"}, {"table_id": "artist", "query": "SELECT COUNT(*) AS \"count of artist\", age, year_join \n FROM artist \n WHERE age > 46 AND year_join > 1990", "table_name": "artist", "query_description": "Count the number of artists who are older than 46 and joined after 1990.", "results_description": "There are 3 artists that joined in 1993 and are 47 years old.", "result": ",Age,Year_Join,count of artist\n0,47,1993,3\n", "difficulty": "aggregate"}, {"table_id": "journalist", "query": "SELECT AVG(Years_working) AS \"average Years_working\" \n FROM journalist", "table_name": "journalist", "query_description": "What is the average number of years spent working as a journalist?", "results_description": "The average number of years spent working as a journalist is 8", "result": ",average Years_working\n0,8.0\n", "difficulty": "aggregate"}, {"table_id": "on_call", "query": "SELECT nurse, blockcode, blockfloor \n FROM on_call \n WHERE blockfloor = 1 AND blockcode = 1", "table_name": "on_call", "query_description": "What nurses are on call with block floor 1 and block code 1? Tell me their names.", "results_description": "The nurse 101 is on call with block floor 1 and block code 1.", "result": ",Nurse,BlockCode,BlockFloor\n0,101,1,1\n", "difficulty": "small_select"}, {"table_id": "candidate", "query": "SELECT MAX(support_rate) AS \"maximum support_rate\", MIN(consider_rate) AS \"minimum consider_rate\", MIN(oppose_rate) AS \"minimum oppose_rate\" \n FROM candidate", "table_name": "candidate", "query_description": "find the highest support percentage, lowest consider rate and oppose rate of all candidates.", "results_description": " The highest support percentage is 0.33, while the lowest oppose and consider percentages are 0.32 and 0.2, respectively.", "result": ",minimum oppose_rate,maximum support_rate,minimum consider_rate\n0,0.32,0.33,0.2\n", "difficulty": "aggregate"}, {"table_id": "mountain", "query": "SELECT Country, Height \n FROM mountain \n WHERE Height > 5000", "table_name": "mountain", "query_description": "Return the countries of the mountains that have a height larger than 5000.", "results_description": "The country with a mountain that has a height larger than 5000 is Tanzania and the mountain's height is 5895", "result": ",Height,Country\n0,5895.0,Tanzania\n", "difficulty": "small_select"}, {"table_id": "farm_competition", "query": "SELECT Hosts, Theme \n FROM farm_competition \n WHERE Theme <> 'Aliens'", "table_name": "farm_competition", "query_description": "What are the hosts of competitions whose theme is not \"Aliens\"?", "results_description": "The hosts of the farm competition with theme Carnival M is back! are Miley Cyrus Jared Leto and Karen Mok.", "result": ",Hosts,Theme\n0,Miley Cyrus Jared Leto and Karen Mok,Carnival M is back!\n", "difficulty": "small_select"}, {"table_id": "campuses", "query": "SELECT COUNT(*) AS \"count of campuses\", county \n FROM campuses \n WHERE county = 'Los Angeles'", "table_name": "campuses", "query_description": "How many campuses are there in Los Angeles county?", "results_description": "The county of Los Angeles has 5 campuses.", "result": ",County,count of campuses\n0,Los Angeles,5\n", "difficulty": "aggregate"}, {"table_id": "captain", "query": "SELECT name, CLASS, rank \n FROM captain", "table_name": "captain", "query_description": "What are the names, classes, and ranks of all captains?", "results_description": "The captain named Captain Sir Henry Langford is ranked as Midshipman and has a class of Third-rate ship of the line", "result": ",Name,Rank,Class\n0,Captain Sir Henry Langford,Midshipman,Third-rate ship of the line\n", "difficulty": "large_select"}, {"table_id": "DEPARTMENT", "query": "SELECT DPhone, Room \n FROM DEPARTMENT \n WHERE Room = 268", "table_name": "DEPARTMENT", "query_description": "What are the phones of departments in Room 268?", "results_description": "Room 268 has the phone 7117.", "result": ",Room,DPhone\n0,268,7117\n", "difficulty": "small_select"}, {"table_id": "authors, authorship, papers", "query": "SELECT t1.lname AS \"authors lname\", t3.title AS \"papers title\" \n FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid \n WHERE t3.title = 'Binders Unbound'", "table_name": "authors, authorship, papers", "query_description": "Who is the author of the paper titled \"Binders Unbound\"? Give me the last name.", "results_description": "The paper Binders Unbound was authored by Weirich.", "result": ",papers title,authors lname\n0,Binders Unbound,Weirich\n", "difficulty": "join"}, {"table_id": "available_policies", "query": "SELECT policy_type_code \n FROM available_policies \n GROUP BY policy_type_code \n HAVING COUNT(*) > 4", "table_name": "available_policies", "query_description": "Find the policy type used by more than 4 customers.", "results_description": "More than 4 customers have the Mortage Insurance policy", "result": ",policy_type_code\n0,Mortgage Insurance\n", "difficulty": "aggregate_group_by"}, {"table_id": "film", "query": "SELECT title, directed_by \n FROM film", "table_name": "film", "query_description": "What are the title and director of each film?", "results_description": "The film with title The Case of the Mystery Weekend was directed by Bill Schreiner.", "result": ",Title,Directed_by\n0,The Case of the Mystery Weekend,Bill Schreiner\n", "difficulty": "small_select"}, {"table_id": "Document_locations", "query": "SELECT location_code \n FROM Document_locations \n GROUP BY location_code \n HAVING COUNT(*) >= 3", "table_name": "Document_locations", "query_description": "What are the codes of the locations with at least three documents?", "results_description": "The location with the code b has at least three documents.", "result": ",Location_Code\n0,b\n", "difficulty": "aggregate_group_by"}, {"table_id": "departments", "query": "SELECT * \n FROM departments \n WHERE department_name = 'Marketing'", "table_name": "departments", "query_description": "What is all the information about the Marketing department?", "results_description": "The Marketing department has department ID 20, location ID 1800 and manager ID 201", "result": ",MANAGER_ID,LOCATION_ID,DEPARTMENT_ID,DEPARTMENT_NAME\n0,201,1800,20,Marketing\n", "difficulty": "large_select"}, {"table_id": "Staff", "query": "SELECT date_of_birth, last_name, first_name \n FROM Staff \n WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "table_name": "Staff", "query_description": "What is the birthday of the staff member with first name as Janessa and last name as Sawayn?", "results_description": "The staff named Janessa Sawayn was born in 2010-12-08 16:55:14.", "result": ",last_name,first_name,date_of_birth\n0,Sawayn,Janessa,2010-12-08 16:55:14\n", "difficulty": "small_select"}, {"table_id": "invoices", "query": "SELECT billing_country, SUM(total) AS \"sum of total\" \n FROM invoices \n GROUP BY billing_country ORDER BY SUM(total) DESC", "table_name": "invoices", "query_description": "What are the names of the top 8 countries by total invoice size and what are those sizes?", "results_description": "USA has a total invoice of 523.0600000000003", "result": ",sum of total,billing_country\n0,523.0600000000003,USA\n", "difficulty": "aggregate_group_by"}, {"table_id": "artist", "query": "SELECT AVG(age) AS \"average age\", MIN(age) AS \"minimum age\", country \n FROM artist \n WHERE country = 'United States'", "table_name": "artist", "query_description": "Return the average and minimum ages across artists from the United States.", "results_description": "The average age of artists if the US is 49.6 and the minimum age is 46", "result": ",Country,average age,minimum age\n0,United States,49.6,46\n", "difficulty": "aggregate"}, {"table_id": "enzyme", "query": "SELECT MAX(OMIM) AS \"maximum OMIM\" \n FROM enzyme", "table_name": "enzyme", "query_description": "What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes?", "results_description": "The maximum OMIM is 606938.", "result": ",maximum OMIM\n0,606938\n", "difficulty": "aggregate"}, {"table_id": "Employees", "query": "SELECT employee_name, role_code, date_of_birth, employee_Name \n FROM Employees \n WHERE employee_Name = 'Armani'", "table_name": "Employees", "query_description": "What are the name, role code, and date of birth of the employee named 'Armani'?", "results_description": "The employee named Armani was born in 1988-12-08 06:13:33 and his role code is ED.", "result": ",Role_Code,Date_of_Birth,Employee_Name\n0,ED,1988-12-08 06:13:33,Armani\n", "difficulty": "large_select"}, {"table_id": "projects", "query": "SELECT name, hours \n FROM projects \n WHERE hours BETWEEN 100 AND 300", "table_name": "projects", "query_description": "What are the names of projects that require between 100 and 300 hours?", "results_description": "The project Winds: Studying Bernoullis Principle requires 156 hours.", "result": ",Name,Hours\n0,Winds: Studying Bernoullis Principle,156\n", "difficulty": "small_select"}, {"table_id": "products", "query": "SELECT COUNT(*) AS \"count of products\", product_category_code \n FROM products \n WHERE product_category_code = 'Seeds'", "table_name": "products", "query_description": "How many products are there under the category \"Seeds\"?", "results_description": "There are 5 products under the category \"Seeds\"", "result": ",count of products,product_category_code\n0,5,Seeds\n", "difficulty": "aggregate"}, {"table_id": "people, candidate", "query": "SELECT t1.name AS \"people name\", t1.sex AS \"people sex\", t2.support_rate AS \"candidate support_rate\" \n FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id ORDER BY t2.support_rate DESC", "table_name": "people, candidate", "query_description": "What is the name and sex of the candidate with the highest support rate?", "results_description": "The name of the candidate is Vincent Montm\u00e9at, the sex is male and and the support rate is 0.33", "result": ",people sex,people name,candidate support_rate\n0,M,Vincent Montm\u00e9at,0.33\n", "difficulty": "join"}, {"table_id": "accounts, checking, savings", "query": "SELECT T1.name AS \"accounts name\", T2.balance AS \"checking balance\", T3.balance AS \"savings balance\" \n 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", "table_name": "accounts, checking, savings", "query_description": "Find the name of account that has the lowest total checking and saving balance.", "results_description": "The account named Porter has a total checking balance of 77 and saving balance of 240", "result": ",accounts name,savings balance,checking balance\n0,Porter,240.0,77.0\n", "difficulty": "join"}, {"table_id": "Rooms", "query": "SELECT COUNT(*) AS \"count of Rooms\" \n FROM Rooms", "table_name": "Rooms", "query_description": "What is the total number of rooms available in this inn?", "results_description": "There are 10 available rooms in this inn", "result": ",count of Rooms\n0,10\n", "difficulty": "aggregate"}, {"table_id": "course, SECTION", "query": "SELECT T2.building AS \"SECTION building\", T2.room_number AS \"SECTION room_number\", T2.semester AS \"SECTION semester\", T2.year AS \"SECTION year\", T1.title AS \"course title\", T1.dept_name AS \"course dept_name\" \n FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id \n WHERE T1.dept_name = 'Psychology' ORDER BY T1.title", "table_name": "course, SECTION", "query_description": "Find the building, room number, semester and year of all courses offered by Psychology department sorted by course titles.", "results_description": "The course titled Animal Behavior was offered in 2008 in the Nassau building, room 45, in the spring semester on the department of psychology.", "result": ",SECTION year,course title,SECTION building,SECTION semester,course dept_name,SECTION room_number\n0,2008,Animal Behavior,Nassau,Spring,Psychology,45\n", "difficulty": "join"}, {"table_id": "festival_detail", "query": "SELECT AVG(Num_of_Audience) AS \"average Num_of_Audience\" \n FROM festival_detail", "table_name": "festival_detail", "query_description": "What is the average number of audience for festivals?", "results_description": "The average number of audience festivals is 157.6", "result": ",average Num_of_Audience\n0,157.6\n", "difficulty": "aggregate"}, {"table_id": "artwork", "query": "SELECT COUNT(*) AS \"count of artwork\" \n FROM artwork", "table_name": "artwork", "query_description": "How many artworks are there?", "results_description": "There are 9 artworks.", "result": ",count of artwork\n0,9\n", "difficulty": "aggregate"}, {"table_id": "WINE", "query": "SELECT Name, score \n FROM WINE \n WHERE score > 90", "table_name": "WINE", "query_description": "What are the names of wines with scores higher than 90?", "results_description": "The wine named Old Kraft Vineyard has a score of 93", "result": ",Name,Score\n0,Old Kraft Vineyard,93\n", "difficulty": "small_select"}, {"table_id": "district", "query": "SELECT SUM(city_population) AS \"sum of city_population\", city_area \n FROM district ORDER BY city_area DESC", "table_name": "district", "query_description": "What is the total number of residents for the districts with the 3 largest areas?", "results_description": "The population of the city with area 20 is 7478157.", "result": ",City_Area,sum of city_population\n0,20.0,7478157.0\n", "difficulty": "aggregate"}, {"table_id": "Customers_cards", "query": "SELECT COUNT(*) AS \"count of Customers_cards\" \n FROM Customers_cards", "table_name": "Customers_cards", "query_description": "How many customer cards are there?", "results_description": "The customer cards count to 15", "result": ",count of Customers_cards\n0,15\n", "difficulty": "aggregate"}, {"table_id": "employees", "query": "SELECT first_name, last_name, salary \n FROM employees \n WHERE salary < 6000", "table_name": "employees", "query_description": "List the full name (first and last name), and salary for those employees who earn below 6000.", "results_description": "David Austin receives a salary of 4800", "result": ",SALARY,LAST_NAME,FIRST_NAME\n0,4800,Austin,David\n", "difficulty": "large_select"}, {"table_id": "SportsInfo, Student", "query": "SELECT T2.lname AS \"Student lname\", T2.fname AS \"Student fname\", T1.SportName AS \"SportsInfo SportName\" \n FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID \n WHERE T1.SportName = 'Football' OR T1.SportName = 'Lacrosse'", "table_name": "SportsInfo, Student", "query_description": "Find the last and first name of students who are playing Football or Lacrosse.", "results_description": "The student Tracy Kim plays the sport football.", "result": ",Student fname,Student lname,SportsInfo SportName\n0,Tracy,Kim,Football\n", "difficulty": "join"}, {"table_id": "list", "query": "SELECT lastname, classroom \n FROM list \n WHERE classroom = 111", "table_name": "list", "query_description": "Find the last names of students studying in room 111.", "results_description": "Danese's studying room is classroom 111.", "result": ",LastName,Classroom\n0,DANESE,111\n", "difficulty": "small_select"}, {"table_id": "Employees", "query": "SELECT role_code \n FROM Employees \n GROUP BY role_code \n HAVING COUNT(*) >= 3", "table_name": "Employees", "query_description": "Show all role codes with at least 3 employees.", "results_description": "The role code ED has at least 3 employees.", "result": ",Role_Code\n0,ED\n", "difficulty": "aggregate_group_by"}, {"table_id": "ROLES", "query": "SELECT role_name, role_description, role_code \n FROM ROLES \n WHERE role_code = 'MG'", "table_name": "ROLES", "query_description": "Find the name and description of the role with code \"MG\".", "results_description": "The role with code \"MG\" is the role of Manager. Its description is \"Vero harum corrupti odit ipsa vero et odio. Iste et recusandae temporibus maxime. Magni aspernatur fugit quis explicabo totam esse corrupti.\"", "result": ",Role_Code,Role_Name,Role_Description\n0,MG,Manager,Vero harum corrupti odit ipsa vero et odio. Iste et recusandae temporibus maxime. Magni aspernatur fugit quis explicabo totam esse corrupti.\n", "difficulty": "small_select"}, {"table_id": "Course_Authors_and_Tutors", "query": "SELECT login_name, family_name \n FROM Course_Authors_and_Tutors", "table_name": "Course_Authors_and_Tutors", "query_description": "What are the login names and family names of course author and tutors?", "results_description": "The person with family name \"Grant\" has login name \"jmckenzie\"", "result": ",login_name,family_name\n0,jmckenzie,Grant\n", "difficulty": "small_select"}, {"table_id": "campuses", "query": "SELECT campus, YEAR, county \n FROM campuses \n WHERE county = 'Los Angeles' AND YEAR > 1950", "table_name": "campuses", "query_description": "Which university is in Los Angeles county and opened after 1950?", "results_description": "The campus California State University-Dominguez Hills in Los Angeles county opened in 1960.", "result": ",Year,Campus,County\n0,1960,California State University-Dominguez Hills,Los Angeles\n", "difficulty": "small_select"}, {"table_id": "Video_games", "query": "SELECT gtype, gname \n FROM Video_games \n WHERE gname = 'Call of Destiny'", "table_name": "Video_games", "query_description": "What type of game is Call of Destiny?", "results_description": "The game Call of Destiny has a type of Frist-person shooter.", "result": ",GName,GType\n0,Call of Destiny,Frist-person shooter\n", "difficulty": "small_select"}, {"table_id": "station", "query": "SELECT COUNT(*) AS \"count of station\", city \n FROM station \n WHERE city = 'Mountain View'", "table_name": "station", "query_description": "How many stations does Mountain View city has?", "results_description": "There are 7 stations in the Mountain View city.", "result": ",city,count of station\n0,Mountain View,7\n", "difficulty": "aggregate"}, {"table_id": "list", "query": "SELECT lastname, classroom \n FROM list \n WHERE classroom = 111", "table_name": "list", "query_description": "What are the last names of students in room 111?", "results_description": "The classroom of the student \"DANESE\" is room 111.", "result": ",LastName,Classroom\n0,DANESE,111\n", "difficulty": "small_select"}, {"table_id": "employees", "query": "SELECT COUNT(*) AS \"count of employees\", country \n FROM employees \n WHERE country = 'Canada'", "table_name": "employees", "query_description": "How many employees are living in Canada?", "results_description": "There are 8 employees that live in Canada.", "result": ",country,count of employees\n0,Canada,8\n", "difficulty": "aggregate"}, {"table_id": "Sportsinfo", "query": "SELECT SUM(gamesplayed) AS \"sum of gamesplayed\", sportname, onscholarship \n FROM Sportsinfo \n WHERE sportname = 'Football' AND onscholarship = 'Y'", "table_name": "Sportsinfo", "query_description": "What is the total number of all football games played by scholarship students?", "results_description": "There are 38 football games played by students on scholarship.", "result": ",SportName,OnScholarship,sum of gamesplayed\n0,Football,Y,38\n", "difficulty": "aggregate"}, {"table_id": "club", "query": "SELECT COUNT(*) AS \"count of club\", clublocation \n FROM club \n WHERE clublocation = 'HHH'", "table_name": "club", "query_description": "Count the number of clubs located at \"HHH\".", "results_description": "There is 1 club located at HHH.", "result": ",ClubLocation,count of club\n0,HHH,1\n", "difficulty": "aggregate"}, {"table_id": "policies", "query": "SELECT policy_type_code \n FROM policies \n GROUP BY policy_type_code \n HAVING COUNT(*) > 2", "table_name": "policies", "query_description": "Which types of policy are chosen by more than 2 customers? Give me the policy type codes.", "results_description": "The policy''s type code is Deputy.", "result": ",Policy_Type_Code\n0,Deputy\n", "difficulty": "aggregate_group_by"}, {"table_id": "products", "query": "SELECT product_type_code \n FROM products \n GROUP BY product_type_code \n HAVING COUNT(*) >= 2", "table_name": "products", "query_description": "Show the product type codes which have at least two products.", "results_description": "The product type code Clothes has at least two products.", "result": ",product_type_code\n0,Clothes\n", "difficulty": "aggregate_group_by"}, {"table_id": "Rating, Movie", "query": "SELECT T2.title AS \"Movie title\", T1.rID AS \"Rating rID\", T1.stars AS \"Rating stars\", MIN(T1.stars) AS \"minimum stars\" \n FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID \n GROUP BY T1.rID", "table_name": "Rating, Movie", "query_description": "Find the title and star rating of the movie that got the least rating star for each reviewer.", "results_description": "The movie title is Gone with the Wind, the star rating is 2 and the minimum stars are 2", "result": ",Rating rID,Movie title,Rating stars,minimum stars\n0,201,Gone with the Wind,2,2\n", "difficulty": "join_aggregate"}, {"table_id": "invoices", "query": "SELECT invoice_number, invoice_date \n FROM invoices \n WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25'", "table_name": "invoices", "query_description": "What are the invoice numbers created before 1989-09-03 or after 2007-12-25?", "results_description": "The invoice number is 4 and the invoice date is 1985-04-27 08:38:49", "result": ",invoice_date,invoice_number\n0,1985-04-27 08:38:49,4\n", "difficulty": "small_select"}, {"table_id": "settlements", "query": "SELECT MAX(settlement_amount) AS \"maximum settlement_amount\", MIN(settlement_amount) AS \"minimum settlement_amount\" \n FROM settlements", "table_name": "settlements", "query_description": "Find the maximum and minimum settlement amount.", "results_description": "The maximum settlement amount is 9814.39 and the minimum settlement amount is 1588.45.", "result": ",maximum settlement_amount,minimum settlement_amount\n0,9814.39,1588.45\n", "difficulty": "aggregate"}, {"table_id": "GENRE", "query": "SELECT Name \n FROM GENRE", "table_name": "GENRE", "query_description": "List the names of all music genres.", "results_description": "One of the music genres is Rock", "result": ",Name\n0,Rock\n", "difficulty": "small_select"}, {"table_id": "addresses", "query": "SELECT country \n FROM addresses \n GROUP BY country \n HAVING COUNT(address_id) > 4", "table_name": "addresses", "query_description": "For which countries are there more than four distinct addresses listed?", "results_description": "The USA country.", "result": ",country\n0,USA\n", "difficulty": "aggregate_group_by"}, {"table_id": "election, party", "query": "SELECT T2.Comptroller AS \"party Comptroller\", T1.District AS \"election District\" \n FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID \n WHERE T1.District = 1 OR T1.District = 2", "table_name": "election, party", "query_description": "Find the parties associated with the delegates from district 1 or 2. Who served as comptrollers of the parties?", "results_description": "For the election district 1 the party comptroller was Carl McCall.", "result": ",election District,party Comptroller\n0,1,Carl McCall\n", "difficulty": "join"}, {"table_id": "technician", "query": "SELECT COUNT(*) AS \"count of technician\" \n FROM technician", "table_name": "technician", "query_description": "How many technicians are there?", "results_description": "There are 10 technicians", "result": ",count of technician\n0,10\n", "difficulty": "aggregate"}, {"table_id": "musical", "query": "SELECT Nominee, COUNT(*) AS \"count of musical\" \n FROM musical \n GROUP BY Nominee", "table_name": "musical", "query_description": "How many musicals has each nominee been nominated for?", "results_description": "Bob Fosse was nominated for 5 musicals.", "result": ",Nominee,count of musical\n0,Bob Fosse,5\n", "difficulty": "aggregate_group_by"}, {"table_id": "Person", "query": "SELECT AVG(age) AS \"average age\", job \n FROM Person \n GROUP BY job", "table_name": "Person", "query_description": "What is average age for different job title?", "results_description": "The average age of doctors is 45", "result": ",job,average age\n0,doctor,45.0\n", "difficulty": "aggregate_group_by"}, {"table_id": "enzyme", "query": "SELECT name, LOCATION \n FROM enzyme", "table_name": "enzyme", "query_description": "List the names and the locations that the enzymes can make an effect.", "results_description": "The ALA syntase enzyme is located in the mitochondrion", "result": ",name,Location\n0,ALA synthase,Mitochondrion\n", "difficulty": "small_select"}, {"table_id": "faculty, campuses", "query": "SELECT faculty, T1.year AS \"faculty year\", T2.campus AS \"campuses campus\" \n FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id \n WHERE T1.year = 2004 AND T2.campus = 'San Francisco State University'", "table_name": "faculty, campuses", "query_description": "How many faculty lines are there in \"San Francisco State University\" in year 2004?", "results_description": "The San Francisco State University campus had 1083.3 faculty in 2004. ", "result": ",Faculty,faculty year,campuses campus\n0,1083.3,2004,San Francisco State University\n", "difficulty": "join"}, {"table_id": "Companies", "query": "SELECT COUNT(*) AS \"count of Companies\", Industry \n FROM Companies \n WHERE Industry = 'Banking' OR Industry = 'Conglomerate'", "table_name": "Companies", "query_description": "How many companies are in either \"Banking\" industry or \"Conglomerate\" industry?", "results_description": "In Banking industry there are 10 companies ", "result": ",Industry,count of Companies\n0,Banking,10\n", "difficulty": "aggregate"}, {"table_id": "Rating, Movie", "query": "SELECT T2.title AS \"Movie title\", AVG(T1.stars) AS \"average stars\", T1.mID AS \"Rating mID\" \n FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID \n GROUP BY T1.mID ORDER BY AVG(T1.stars) DESC", "table_name": "Rating, Movie", "query_description": "Find the movies with the highest average rating. Return the movie titles and average rating.", "results_description": "The title of the movie with the highest average rating is Snow White and the average rating is 4.5", "result": ",Rating mID,Movie title,average stars\n0,106,Snow White,4.5\n", "difficulty": "join_aggregate"}, {"table_id": "enzyme", "query": "SELECT product, chromosome, porphyria, LOCATION \n FROM enzyme \n WHERE LOCATION = 'Cytosol'", "table_name": "enzyme", "query_description": "What is the product, chromosome, and porphyria of the enzymes located at 'Cytosol'?", "results_description": "The enzyme located in Cytosol has product Porphobilinogen, Porphyria\tALA-Dehydratase deficiency and Chromosome\t9q34", "result": ",Product,Location,Porphyria,Chromosome\n0,Porphobilinogen,Cytosol,ALA-Dehydratase deficiency,9q34\n", "difficulty": "large_select"}, {"table_id": "STUDENT", "query": "SELECT Advisor, city_code \n FROM STUDENT \n WHERE city_code = 'BAL'", "table_name": "STUDENT", "query_description": "Show the advisors of the students whose city of residence has city code \"BAL\".", "results_description": "The advisors of the students with value 1121 have a city of residence that has city code BAL", "result": ",Advisor,city_code\n0,1121,BAL\n", "difficulty": "small_select"}, {"table_id": "Products_for_hire", "query": "SELECT daily_hire_cost, product_name \n FROM Products_for_hire \n WHERE product_name LIKE '%Book%'", "table_name": "Products_for_hire", "query_description": "What are the daily hire costs for the products with substring 'Book' in its name?", "results_description": "The product named Book collection C has a daily hire cost 26.15.", "result": ",product_name,daily_hire_cost\n0,Book collection C,26.15\n", "difficulty": "small_select"}, {"table_id": "schedule, cinema", "query": "SELECT T2.name AS \"cinema name\", SUM(T1.show_times_per_day) AS \"sum of show_times_per_day\", T1.cinema_id AS \"schedule cinema_id\" \n FROM schedule AS T1 JOIN cinema AS T2 ON T1.cinema_id = T2.cinema_id \n GROUP BY T1.cinema_id", "table_name": "schedule, cinema", "query_description": "What is total number of show times per dat for each cinema?", "results_description": "The cinema named Codling, with id 1, has a total of 10 shows per day.", "result": ",cinema name,schedule cinema_id,sum of show_times_per_day\n0,Codling,1,10\n", "difficulty": "join_aggregate"}, {"table_id": "Movie, Movie", "query": "SELECT T1.title AS \"Movie title\", T1.director AS \"Movie director\" \n FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director \n WHERE T1.title <> T2.title ORDER BY T1.director, T1.title", "table_name": "Movie, Movie", "query_description": "For all directors who have directed more than one movie, what movies have they directed and what are their names?", "results_description": "The movie Avatar was directed by James Cameron.", "result": ",Movie title,Movie director\n0,Avatar,James Cameron\n", "difficulty": "join"}, {"table_id": "Staff_Roles", "query": "SELECT role_description, role_code \n FROM Staff_Roles \n WHERE role_code = 'researcher'", "table_name": "Staff_Roles", "query_description": "What is the complete description of the job of a researcher?", "results_description": "The complete description of the job of a researcher is Project Researcher with role code equal to researcher", "result": ",role_code,role_description\n0,researcher,Project Researcher\n", "difficulty": "small_select"}, {"table_id": "election, party", "query": "SELECT T2.Governor AS \"party Governor\", T1.District AS \"election District\" \n FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID \n WHERE T1.District = 1", "table_name": "election, party", "query_description": "Who were the governors of the parties associated with delegates from district 1?", "results_description": "The governor Peter Vallone is from election district 1.", "result": ",party Governor,election District\n0,Peter Vallone,1\n", "difficulty": "join"}, {"table_id": "Accounts", "query": "SELECT COUNT(*) AS \"count of Accounts\" \n FROM Accounts", "table_name": "Accounts", "query_description": "Count the number of accounts.", "results_description": "There are 15 accounts", "result": ",count of Accounts\n0,15\n", "difficulty": "aggregate"}, {"table_id": "people, candidate", "query": "SELECT t1.name AS \"people name\", t1.sex AS \"people sex\", MIN(oppose_rate) AS \"minimum oppose_rate\" \n FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id \n GROUP BY t1.sex", "table_name": "people, candidate", "query_description": "For each sex, what is the name and sex of the candidate with the oppose rate for their sex?", "results_description": "St\u00e9phane Antiga is a female with a minimum oppose rate of 0.32.", "result": ",people sex,people name,minimum oppose_rate\n0,F,St\u00e9phane Antiga,0.32\n", "difficulty": "join_aggregate"}, {"table_id": "instructor", "query": "SELECT name, dept_name \n FROM instructor \n WHERE dept_name = 'Comp. Sci.'", "table_name": "instructor", "query_description": "What are the names of all instructors in the Comp. Sci. department?", "results_description": "Bondi is the name of an instructor of the Comp. Sci. department.", "result": ",name,dept_name\n0,Bondi,Comp. Sci.\n", "difficulty": "small_select"}, {"table_id": "Customers", "query": "SELECT gender, COUNT(*) AS \"count of Customers\" \n FROM Customers \n GROUP BY gender", "table_name": "Customers", "query_description": "Show the number of customers for each gender.", "results_description": "For the gender 0 there are 9 customers.", "result": ",gender,count of Customers\n0,0,9\n", "difficulty": "aggregate_group_by"}, {"table_id": "Lessons, Customers", "query": "SELECT SUM(T1.lesson_time) AS \"sum of lesson_time\", T2.last_name AS \"Customers last_name\", T2.first_name AS \"Customers first_name\" \n FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id \n WHERE T2.first_name = 'Rylan' AND T2.last_name = 'Goodwin'", "table_name": "Lessons, Customers", "query_description": "How long is the total lesson time took by customer with first name as Rylan and last name as Goodwin?", "results_description": "The total lesson time took by customer with first name as Rylan and last name as Goodwin is 11", "result": ",sum of lesson_time,Customers last_name,Customers first_name\n0,11,Goodwin,Rylan\n", "difficulty": "join_aggregate"}, {"table_id": "mountain", "query": "SELECT name, height, prominence, range \n FROM mountain \n WHERE range <> 'Aberdare Range'", "table_name": "mountain", "query_description": "What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'?", "results_description": "The mountain with name Abune Yosef / Guliba Amba, height 4260 and prominence 1909 belongs to the range Lasta Massif.", "result": ",name,Range,Height,Prominence\n0,Abune Yosef / Guliba Amba,Lasta Massif,4260.0,1909.0\n", "difficulty": "large_select"}, {"table_id": "Apartment_Bookings, Apartments", "query": "SELECT T1.booking_start_date AS \"Apartment_Bookings booking_start_date\", T1.booking_start_date AS \"Apartment_Bookings booking_start_date\", T2.apt_type_code AS \"Apartments apt_type_code\" \n FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id \n WHERE T2.apt_type_code = 'Duplex'", "table_name": "Apartment_Bookings, Apartments", "query_description": "What are the booking start and end dates of the apartments with type code \"Duplex\"?", "results_description": "The apartments with type code Duplex has a booking start date of 2016-09-26 17:13:49", "result": ",Apartments apt_type_code,Apartment_Bookings booking_start_date\n0,Duplex,2016-09-26 17:13:49\n", "difficulty": "join"}, {"table_id": "users", "query": "SELECT COUNT(*) AS \"count of users\", role_code \n FROM users \n GROUP BY role_code", "table_name": "users", "query_description": "Find the number of users in each role.", "results_description": "For the role code DBA there are 8 users.", "result": ",role_code,count of users\n0,DBA,8\n", "difficulty": "aggregate_group_by"}, {"table_id": "county", "query": "SELECT COUNT(*) AS \"count of county\" \n FROM county", "table_name": "county", "query_description": "Count the total number of counties.", "results_description": "The total number of countries is 5", "result": ",count of county\n0,5\n", "difficulty": "aggregate"}, {"table_id": "mountain", "query": "SELECT MAX(height) AS \"maximum height\", AVG(height) AS \"average height\" \n FROM mountain", "table_name": "mountain", "query_description": "What are the maximum and average height of the mountains?", "results_description": "The maximum height of the mountains is 4260 and the average is 4061.2608695652175", "result": ",average height,maximum height\n0,4061.2608695652175,4260.0\n", "difficulty": "aggregate"}, {"table_id": "submission", "query": "SELECT Author, College \n FROM submission", "table_name": "submission", "query_description": "What are the authors of submissions and their colleges?", "results_description": "The author Steve Niehaus is in the Notre Dame college.", "result": ",Author,College\n0,Steve Niehaus,Notre Dame\n", "difficulty": "small_select"}, {"table_id": "invoices", "query": "SELECT billing_country, AVG(total) AS \"average total\" \n FROM invoices \n GROUP BY billing_country ORDER BY AVG(total) DESC", "table_name": "invoices", "query_description": "A list of the top 10 countries by average invoice size. List country name and average invoice size.", "results_description": "Chile has an average invoice size of 6.659999999999999", "result": ",average total,billing_country\n0,6.659999999999999,Chile\n", "difficulty": "aggregate_group_by"}, {"table_id": "Activity", "query": "SELECT COUNT(*) AS \"count of Activity\" \n FROM Activity", "table_name": "Activity", "query_description": "How many activities do we have?", "results_description": "There are 16 activities.", "result": ",count of Activity\n0,16\n", "difficulty": "aggregate"}, {"table_id": "player", "query": "SELECT Sponsor_name, Residence \n FROM player \n WHERE Residence = 'Brandon' OR Residence = 'Birtle'", "table_name": "player", "query_description": "Show the names of sponsors of players whose residence is either \"Brandon\" or \"Birtle\".", "results_description": "Sponsor Brandon\u2014Souris stays in residence Brandon.", "result": ",Residence,Sponsor_name\n0,Brandon,Brandon\u2014Souris\n", "difficulty": "small_select"}, {"table_id": "Student", "query": "SELECT COUNT(*) AS \"count of Student\" \n FROM Student", "table_name": "Student", "query_description": "How many students are there?", "results_description": "The number of students is 34", "result": ",count of Student\n0,34\n", "difficulty": "aggregate"}, {"table_id": "member", "query": "SELECT COUNT(*) AS \"count of member\", Membership_card \n FROM member \n WHERE Membership_card = 'Black'", "table_name": "member", "query_description": "How many members have the black membership card?", "results_description": "There are 6 members with a black membership card", "result": ",Membership_card,count of member\n0,Black,6\n", "difficulty": "aggregate"}, {"table_id": "station", "query": "SELECT name, lat \n FROM station \n WHERE lat < 37.5", "table_name": "station", "query_description": "What are the names of all stations with a latitude smaller than 37.5?", "results_description": "San Jose Diridon Caltrain station's latitude is 37.329732", "result": ",lat,name\n0,37.329732,San Jose Diridon Caltrain Station\n", "difficulty": "small_select"}, {"table_id": "products, product_characteristics, CHARACTERISTICS", "query": "SELECT t3.characteristic_name AS \"CHARACTERISTICS characteristic_name\", t1.product_name AS \"products product_name\" \n 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 \n WHERE t1.product_name = 'sesame'", "table_name": "products, product_characteristics, CHARACTERISTICS", "query_description": "Return the characteristic names of the 'sesame' product.", "results_description": "The product \"seasame\" has the characteristics \"error\"", "result": ",products product_name,CHARACTERISTICS characteristic_name\n0,sesame,error\n", "difficulty": "join"}, {"table_id": "Reviewer", "query": "SELECT COUNT(*) AS \"count of Reviewer\" \n FROM Reviewer", "table_name": "Reviewer", "query_description": "How many reviewers are there?", "results_description": "There are 8 reviewers.", "result": ",count of Reviewer\n0,8\n", "difficulty": "aggregate"}, {"table_id": "complaints", "query": "SELECT complaint_status_code, COUNT(*) AS \"count of complaints\", complaint_type_code \n FROM complaints \n WHERE complaint_type_code = 'Product Failure' \n GROUP BY complaint_status_code", "table_name": "complaints", "query_description": "Of complaints with the type code \"Product Failure\", how many had each different status code?", "results_description": "There is 1 complaint of type \"Product Failure\" that is closed", "result": ",complaint_type_code,count of complaints,complaint_status_code\n0,Product Failure,1,Closed\n", "difficulty": "aggregate_group_by"}, {"table_id": "DEPARTMENT", "query": "SELECT DName, Building \n FROM DEPARTMENT \n WHERE Building = 'Mergenthaler'", "table_name": "DEPARTMENT", "query_description": "What is the name of the department in the Building Mergenthaler?", "results_description": "The department named History of Art is in the Building Mergenthaler", "result": ",DName,Building\n0,History of Art,Mergenthaler\n", "difficulty": "small_select"}, {"table_id": "documents", "query": "SELECT AVG(access_count) AS \"average access_count\" \n FROM documents", "table_name": "documents", "query_description": "Find the average access count across all documents?", "results_description": "The average access count is 4939.133333333333.", "result": ",average access_count\n0,4939.133333333333\n", "difficulty": "aggregate"}, {"table_id": "song", "query": "SELECT song_name, genre_is, languages \n FROM song \n WHERE genre_is = 'modern' OR languages = 'english'", "table_name": "song", "query_description": "Find the names of songs whose genre is modern or language is English.", "results_description": "The song name is My love", "result": ",genre_is,languages,song_name\n0,blues,english,My love\n", "difficulty": "small_select"}, {"table_id": "Companies", "query": "SELECT Industry \n FROM Companies \n GROUP BY Industry ORDER BY COUNT(*) DESC", "table_name": "Companies", "query_description": "List the industry shared by the most companies.", "results_description": "The industry shared by the most companies is Banking", "result": ",Industry\n0,Banking\n", "difficulty": "aggregate_group_by"}, {"table_id": "Movie", "query": "SELECT title, director, YEAR \n FROM Movie \n WHERE director = 'James Cameron' OR YEAR < 1980", "table_name": "Movie", "query_description": "What are the names of all movies made before 1980 or had James Cameron as the director?", "results_description": "Gone with the Wind was directed by Victor Fleming in 1939.", "result": ",year,title,director\n0,1939,Gone with the Wind,Victor Fleming\n", "difficulty": "small_select"}, {"table_id": "College", "query": "SELECT AVG(enr) AS \"average enr\", state \n FROM College \n WHERE state = 'FL'", "table_name": "College", "query_description": "What is average number of students enrolled in Florida colleges?", "results_description": "The average number of students enrolled in colleges located in Florida is 19000.", "result": ",state,average enr\n0,FL,19000.0\n", "difficulty": "aggregate"}, {"table_id": "exhibition", "query": "SELECT AVG(ticket_price) AS \"average ticket_price\", MIN(ticket_price) AS \"minimum ticket_price\", MAX(ticket_price) AS \"maximum ticket_price\", YEAR \n FROM exhibition \n WHERE YEAR < 2009", "table_name": "exhibition", "query_description": "What are the average, minimum, and maximum ticket prices for exhibitions that happened prior to 2009?", "results_description": "In 2008 the ticket price had an average value of 20.35, maximum value of 29.95 and minimum value of 14.95.", "result": ",Year,average ticket_price,maximum ticket_price,minimum ticket_price\n0,2008.0,20.35,29.95,14.95\n", "difficulty": "aggregate"}, {"table_id": "Rooms", "query": "SELECT COUNT(*) AS \"count of Rooms\", bedType \n FROM Rooms \n WHERE bedType = 'King'", "table_name": "Rooms", "query_description": "How many rooms have a king bed?", "results_description": "There are 4 rooms with bed type King.", "result": ",bedType,count of Rooms\n0,King,4\n", "difficulty": "aggregate"}, {"table_id": "TEACHERS", "query": "SELECT gender, last_name \n FROM TEACHERS \n WHERE last_name = 'Medhurst'", "table_name": "TEACHERS", "query_description": "What is the gender of the teacher with last name \"Medhurst\"?", "results_description": "The gender of the teacher with last name Medhurst is 1", "result": ",gender,last_name\n0,1,Medhurst\n", "difficulty": "small_select"}, {"table_id": "invoices", "query": "SELECT COUNT(*) AS \"count of invoices\", billing_state, billing_city \n FROM invoices \n WHERE billing_city = 'Chicago' AND billing_state = 'IL'", "table_name": "invoices", "query_description": "List the number of invoices from Chicago, IL.", "results_description": "There are 7 invoices from Chicago, IL.", "result": ",billing_city,billing_state,count of invoices\n0,Chicago,IL,7\n", "difficulty": "aggregate"}, {"table_id": "climber, mountain", "query": "SELECT T1.Name AS \"climber Name\", T2.Name AS \"mountain Name\" \n FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID", "table_name": "climber, mountain", "query_description": "What are the names of climbers and the corresponding names of mountains that they climb?", "results_description": "Klaus Enders climbed Kibo (Uhuru Pk)", "result": ",climber Name,mountain Name\n0,Klaus Enders,Kibo (Uhuru Pk)\n", "difficulty": "join"}, {"table_id": "payments", "query": "SELECT AVG(amount_due) AS \"average amount_due\" \n FROM payments", "table_name": "payments", "query_description": "What is the average amount due for all the payments?", "results_description": "The average amount due for all the payments is 564.3860000000001", "result": ",average amount_due\n0,564.3860000000001\n", "difficulty": "aggregate"}, {"table_id": "body_builder, people", "query": "SELECT T2.Height AS \"people Height\", T1.Total AS \"body_builder Total\" \n FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID \n WHERE T1.Total < 315", "table_name": "body_builder, people", "query_description": "What are the heights of body builders with total score smaller than 315?", "results_description": "A body builder with 312.5 total score has the height of 196.", "result": ",people Height,body_builder Total\n0,196.0,312.5\n", "difficulty": "join"}, {"table_id": "Movie", "query": "SELECT title, director, YEAR \n FROM Movie \n WHERE director = 'James Cameron' OR YEAR < 1980", "table_name": "Movie", "query_description": "What are names of the movies that are either made before 1980 or directed by James Cameron?", "results_description": "The movie titled Gone with the Wind was directed by Victor Fleming in 1939", "result": ",year,title,director\n0,1939,Gone with the Wind,Victor Fleming\n", "difficulty": "small_select"}, {"table_id": "files, song", "query": "SELECT MIN(T1.duration) AS \"minimum duration\", MIN(T2.rating) AS \"minimum rating\", T2.genre_is AS \"song genre_is\" \n FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id \n GROUP BY T2.genre_is ORDER BY T2.genre_is", "table_name": "files, song", "query_description": "What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre?", "results_description": "The minimum rating for the songs with genre blues is 6, while the minimum duration is 5:23.", "result": ",song genre_is,minimum rating,minimum duration\n0,blues,6,5:23\n", "difficulty": "join_aggregate"}, {"table_id": "customer", "query": "SELECT SUM(acc_bal) AS \"sum of acc_bal\", state \n FROM customer \n WHERE state = 'Utah' OR state = 'Texas'", "table_name": "customer", "query_description": "Find the total account balance of each customer from Utah or Texas.", "results_description": "The total account balance of customers from Utah is 3000", "result": ",state,sum of acc_bal\n0,Utah,3000\n", "difficulty": "aggregate"}, {"table_id": "stay, patient, Prescribes, Medication", "query": "SELECT T4.name AS \"Medication name\", room \n 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 \n WHERE room = 111", "table_name": "stay, patient, Prescribes, Medication", "query_description": "What is the name of the medication used for the patient staying in room 111?", "results_description": "The patient staying in room 111 uses the medication named Procrastin-X.", "result": ",Room,Medication name\n0,111,Procrastin-X\n", "difficulty": "join"}, {"table_id": "ROLES", "query": "SELECT role_name, role_description, role_code \n FROM ROLES \n WHERE role_code = 'MG'", "table_name": "ROLES", "query_description": "What are the name and description for role code \"MG\"?", "results_description": "The role with code \"MG\" has the name Manager and its description is: Vero harum corrupti odit ipsa vero et odio. Iste et recusandae temporibus maxime. Magni aspernatur fugit quis explicabo totam esse corrupti.", "result": ",Role_Code,Role_Name,Role_Description\n0,MG,Manager,Vero harum corrupti odit ipsa vero et odio. Iste et recusandae temporibus maxime. Magni aspernatur fugit quis explicabo totam esse corrupti.\n", "difficulty": "small_select"}, {"table_id": "student, enroll", "query": "SELECT T1.stu_lname AS \"student stu_lname\", T2.enroll_grade AS \"enroll enroll_grade\", T2.class_code AS \"enroll class_code\" \n FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num \n WHERE T2.enroll_grade = 'A' AND T2.class_code = 10018", "table_name": "student, enroll", "query_description": "What is the last name of the student who received an A in the class with the code 10018?", "results_description": "Student with last name Bowser was enrolled in class 10018 and received an A", "result": ",enroll class_code,student stu_lname,enroll enroll_grade\n0,10018,Bowser,A\n", "difficulty": "join"}, {"table_id": "student", "query": "SELECT fname, age \n FROM student \n WHERE age > 20", "table_name": "student", "query_description": "Find the first name of students who is older than 20.", "results_description": "Shiela is a 21 years old student.", "result": ",Age,Fname\n0,21,Shiela\n", "difficulty": "small_select"}, {"table_id": "song", "query": "SELECT artist_name, resolution, languages \n FROM song \n WHERE resolution > 500 \n GROUP BY languages ORDER BY COUNT(*) DESC", "table_name": "song", "query_description": "What is the name of the artist, for each language, that has the most songs with a higher resolution than 500?", "results_description": "Artist \"Enrique\" has songs in English with a resolution of 1080", "result": ",languages,resolution,artist_name\n0,english,1080,Enrique\n", "difficulty": "aggregate_group_by"}, {"table_id": "Customers", "query": "SELECT COUNT(*) AS \"count of Customers\" \n FROM Customers", "table_name": "Customers", "query_description": "Show the number of customers.", "results_description": "The count of customers is 15", "result": ",count of Customers\n0,15\n", "difficulty": "aggregate"}, {"table_id": "Products", "query": "SELECT Product_Type_Code \n FROM Products \n GROUP BY Product_Type_Code ORDER BY COUNT(*) DESC", "table_name": "Products", "query_description": "Show the most common type code across products.", "results_description": "The most common product type code is food", "result": ",Product_Type_Code\n0,Food\n", "difficulty": "aggregate_group_by"}, {"table_id": "bridge", "query": "SELECT AVG(length_feet) AS \"average length_feet\" \n FROM bridge", "table_name": "bridge", "query_description": "What is the average length in feet of the bridges?", "results_description": "The average length in feet of the bridges is 244.64.", "result": ",average length_feet\n0,244.64\n", "difficulty": "aggregate"}, {"table_id": "wrestler", "query": "SELECT Name, Days_held \n FROM wrestler \n WHERE Days_held < 100", "table_name": "wrestler", "query_description": "Return the names of wrestlers with fewer than 100 days held.", "results_description": "The wrestler El Samurai held 1 day.", "result": ",Name,Days_held\n0,El Samurai,1\n", "difficulty": "small_select"}, {"table_id": "city, farm_competition", "query": "SELECT T2.Theme AS \"farm_competition Theme\", T1.Population AS \"city Population\" \n FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID \n WHERE T1.Population > 1000", "table_name": "city, farm_competition", "query_description": "Please show the themes of competitions with host cities having populations larger than 1000.", "results_description": "In a city of population 5706, the farm competition theme was Carnival M is back!", "result": ",city Population,farm_competition Theme\n0,5706.0,Carnival M is back!\n", "difficulty": "join"}, {"table_id": "departments", "query": "SELECT * \n FROM departments \n WHERE department_name = 'Marketing'", "table_name": "departments", "query_description": "What is all the information about the Marketing department?", "results_description": "The marketing department's manager id is 201, location id is 1800 and departmentd id is 20", "result": ",MANAGER_ID,LOCATION_ID,DEPARTMENT_ID,DEPARTMENT_NAME\n0,201,1800,20,Marketing\n", "difficulty": "large_select"}, {"table_id": "genres, tracks", "query": "SELECT T2.name AS \"tracks name\", T1.name AS \"genres name\" \n FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id \n WHERE T1.name = 'Rock'", "table_name": "genres, tracks", "query_description": "What is the name of tracks whose genre is Rock?", "results_description": "The track \"For Those About To Rock (We Salute You)\" is of type rock.", "result": ",genres name,tracks name\n0,Rock,For Those About To Rock (We Salute You)\n", "difficulty": "join"}, {"table_id": "Rating, Reviewer", "query": "SELECT T2.name AS \"Reviewer name\", AVG(T1.stars) AS \"average stars\" \n FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID \n GROUP BY T2.name", "table_name": "Rating, Reviewer", "query_description": "What is the average number of stars that each reviewer awards for a movie?", "results_description": "The reviewer named Ashley White has 3 average stars.", "result": ",Reviewer name,average stars\n0,Ashley White,3.0\n", "difficulty": "join_aggregate"}, {"table_id": "csu_fees", "query": "SELECT AVG(campusfee) AS \"average campusfee\", YEAR \n FROM csu_fees \n WHERE YEAR = 1996", "table_name": "csu_fees", "query_description": "Find the average fee on a CSU campus in 1996", "results_description": "In 1996 the average campus fee was 1936.090909090909.", "result": ",Year,average campusfee\n0,1996.0,1936.090909090909\n", "difficulty": "aggregate"}, {"table_id": "TRANSACTIONS", "query": "SELECT MAX(share_count) AS \"maximum share_count\", amount_of_transaction \n FROM TRANSACTIONS \n WHERE amount_of_transaction < 10000", "table_name": "TRANSACTIONS", "query_description": "Show the maximum share count of transactions where the amount is smaller than 10000", "results_description": "The maximum share count of transactions with the amount of 8.9 is 93191", "result": ",maximum share_count,amount_of_transaction\n0,93191,8.9\n", "difficulty": "aggregate"}, {"table_id": "department", "query": "SELECT dept_address, dept_name \n FROM department \n WHERE dept_name = 'History'", "table_name": "department", "query_description": "what is the address of history department?", "results_description": "The department of History has address DRE 156, Box 284.", "result": ",DEPT_NAME,DEPT_ADDRESS\n0,History,\"DRE 156, Box 284\"\n", "difficulty": "small_select"}, {"table_id": "catalog_contents", "query": "SELECT catalog_entry_name, product_stock_number \n FROM catalog_contents \n WHERE product_stock_number LIKE '2%'", "table_name": "catalog_contents", "query_description": "Find the names of all the products whose stock number starts with \"2\".", "results_description": "The product named Sprite Lemo has a stock number of 24 ec", "result": ",catalog_entry_name,product_stock_number\n0,Sprite Lemo,24 ec\n", "difficulty": "small_select"}, {"table_id": "College", "query": "SELECT SUM(enr) AS \"sum of enr\" \n FROM College", "table_name": "College", "query_description": "How many students are enrolled in college?", "results_description": "There are 71000 enrolled", "result": ",sum of enr\n0,71000\n", "difficulty": "aggregate"}, {"table_id": "races, results", "query": "SELECT AVG(T2.fastestlapspeed) AS \"average fastestlapspeed\", T1.year AS \"races year\", T1.name AS \"races name\" \n FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid \n WHERE T1.year = 2008 AND T1.name = 'Monaco Grand Prix'", "table_name": "races, results", "query_description": "What is the average fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?", "results_description": "The race of the Monaco Grand Prix was held in 2008 and the average lap speed was 146.49920000000003.", "result": ",races name,races year,average fastestlapspeed\n0,Monaco Grand Prix,2008,146.49920000000003\n", "difficulty": "join_aggregate"}, {"table_id": "WINE", "query": "SELECT Name, score \n FROM WINE \n WHERE score > 90", "table_name": "WINE", "query_description": "List the names of all distinct wines that have scores higher than 90.", "results_description": "The wine with name Old Kraft Vineyard has a score of 93", "result": ",Name,Score\n0,Old Kraft Vineyard,93\n", "difficulty": "small_select"}, {"table_id": "repair_assignment, machine, technician", "query": "SELECT T3.Name AS \"technician Name\", T2.value_points AS \"machine value_points\" \n 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 \n WHERE T2.value_points > 70", "table_name": "repair_assignment, machine, technician", "query_description": "What are the names of the technicians that are assigned to repair machines with more point values than 70?", "results_description": "The technician Joe Sewell has to repair machines with more than 105 value points.", "result": ",technician Name,machine value_points\n0,Joe Sewell,105.0\n", "difficulty": "join"}, {"table_id": "CLASS, enroll, student", "query": "SELECT T1.crs_code AS \"CLASS crs_code\", T3.stu_lname AS \"student stu_lname\" \n 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 \n WHERE T3.stu_lname = 'Smithson'", "table_name": "CLASS, enroll, student", "query_description": "What are the course codes for every class that the student with the last name Smithson took?", "results_description": "The class with the course code ACCT-211 has been taken from a student with last name Smithson.", "result": ",CLASS crs_code,student stu_lname\n0,ACCT-211,Smithson\n", "difficulty": "join"}, {"table_id": "stock, device, shop", "query": "SELECT T3.Shop_Name AS \"shop Shop_Name\", T2.Carrier AS \"device Carrier\" \n 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", "table_name": "stock, device, shop", "query_description": "Show names of shops and the carriers of devices they have in stock.", "results_description": "The Dinas Device shop has devices with Bell Mobility carrier.", "result": ",device Carrier,shop Shop_Name\n0,Bell Mobility,Dinas Device\n", "difficulty": "join"}, {"table_id": "county_public_safety", "query": "SELECT COUNT(*) AS \"count of county_public_safety\" \n FROM county_public_safety", "table_name": "county_public_safety", "query_description": "How many counties are there?", "results_description": "There are 6 counties", "result": ",count of county_public_safety\n0,6\n", "difficulty": "aggregate"}, {"table_id": "FACULTY", "query": "SELECT Fname, Lname, sex, Building \n FROM FACULTY \n WHERE sex = 'M' AND Building = 'NEB'", "table_name": "FACULTY", "query_description": "Find the first names and last names of male (sex is M) faculties who live in building NEB.", "results_description": "The male faculty who lives in building NEB is named Mark Giuliano", "result": ",Sex,Fname,Lname,Building\n0,M,Mark,Giuliano,NEB\n", "difficulty": "small_select"}, {"table_id": "cinema", "query": "SELECT LOCATION, capacity \n FROM cinema \n WHERE capacity > 300 \n GROUP BY LOCATION \n HAVING COUNT(*) >= 2", "table_name": "cinema", "query_description": "Which locations have 2 or more cinemas with capacity over 300?", "results_description": "County Clare is a location with cinema capacity of 305", "result": ",Capacity,Location\n0,305,County Clare\n", "difficulty": "aggregate_group_by"}, {"table_id": "Financial_transactions", "query": "SELECT AVG(transaction_amount) AS \"average transaction_amount\", SUM(transaction_amount) AS \"sum of transaction_amount\" \n FROM Financial_transactions", "table_name": "Financial_transactions", "query_description": "What is the average and total transaction amount?", "results_description": "The average transaction amount is 1308.2933333333335 and the total transaction amount is 19624.4", "result": ",sum of transaction_amount,average transaction_amount\n0,19624.4,1308.2933333333335\n", "difficulty": "aggregate"}, {"table_id": "climber, mountain", "query": "SELECT T2.Height AS \"mountain Height\", T1.Points AS \"climber Points\" \n FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Points DESC", "table_name": "climber, mountain", "query_description": "Show the height of the mountain climbed by the climber with the maximum points.", "results_description": "The climber points are 15 and the mountain height is 5895.", "result": ",climber Points,mountain Height\n0,15.0,5895.0\n", "difficulty": "join"}, {"table_id": "elimination, wrestler", "query": "SELECT T1.Time AS \"elimination Time\", T2.Days_held AS \"wrestler Days_held\" \n FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC", "table_name": "elimination, wrestler", "query_description": "What is the time of elimination for the wrestler with the most days held?", "results_description": "The elimination time of the wrestler with 960 days held, is 10:45", "result": ",elimination Time,wrestler Days_held\n0,10:45,960\n", "difficulty": "join"}, {"table_id": "track", "query": "SELECT MIN(seating) AS \"minimum seating\", MAX(seating) AS \"maximum seating\", AVG(seating) AS \"average seating\" \n FROM track", "table_name": "track", "query_description": "Return the minimum, maximum, and average seating across all tracks.", "results_description": "The average seating is 91526.88888888889, the maximum seating is 168000 and the minimum seating is 63000 across all tracks", "result": ",average seating,maximum seating,minimum seating\n0,91526.88888888889,168000.0,63000.0\n", "difficulty": "aggregate"}, {"table_id": "Person, PersonFriend", "query": "SELECT T2.friend AS \"PersonFriend friend\", T1.name AS \"Person name\" \n FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name \n WHERE T1.name = 'Bob'", "table_name": "Person, PersonFriend", "query_description": "Who are Bob's friends?", "results_description": "Zach is Bob's friend", "result": ",Person name,PersonFriend friend\n0,Bob,Zach\n", "difficulty": "join"}, {"table_id": "Customers", "query": "SELECT date_of_birth, customer_status_code \n FROM Customers \n WHERE customer_status_code = 'Good Customer'", "table_name": "Customers", "query_description": "When are the birthdays of customer who are classified as 'Good Customer' status?", "results_description": "The person who is classified as 'Good Customer' was born in 1994-06-21 time 01:34:56", "result": ",date_of_birth,customer_status_code\n0,1994-06-21 01:34:56,Good Customer\n", "difficulty": "small_select"}, {"table_id": "product", "query": "SELECT product, max_page_size, pages_per_minute_color \n FROM product \n WHERE max_page_size = 'A4' OR pages_per_minute_color < 5", "table_name": "product", "query_description": "What are the products with the maximum page size eqal to A4 or a pages per minute color less than 5?", "results_description": "The product Fujitsu fi-6130 A4 Series Scanner has a maximum page size equal to A4 and a pages per minute color of 30.", "result": ",product,max_page_size,pages_per_minute_color\n0,Fujitsu fi-6130 A4 Series Scanner,A4,30.0\n", "difficulty": "small_select"}, {"table_id": "Companies", "query": "SELECT AVG(Profits_billion) AS \"average Profits_billion\" \n FROM Companies", "table_name": "Companies", "query_description": "Compute the average profits companies make.", "results_description": "The average of profits is 17.063157894736843 billions.", "result": ",average Profits_billion\n0,17.063157894736843\n", "difficulty": "aggregate"}, {"table_id": "song", "query": "SELECT AVG(rating) AS \"average rating\", AVG(resolution) AS \"average resolution\", languages \n FROM song \n WHERE languages = 'bangla'", "table_name": "song", "query_description": "What is the average rating and resolution of all bangla songs?", "results_description": "The songs of language bangla have an average rating of 7.5 and an average resolution of 558.", "result": ",languages,average rating,average resolution\n0,bangla,7.5,558.0\n", "difficulty": "aggregate"}, {"table_id": "Apartments", "query": "SELECT apt_type_code \n FROM Apartments \n GROUP BY apt_type_code ORDER BY COUNT(*) DESC", "table_name": "Apartments", "query_description": "Show the most common apartment type code.", "results_description": "The most common apartments type is \"Flat\"", "result": ",apt_type_code\n0,Flat\n", "difficulty": "aggregate_group_by"}, {"table_id": "airport", "query": "SELECT name, country \n FROM airport \n WHERE country <> 'Iceland'", "table_name": "airport", "query_description": "What are the names of the airports which are not in the country 'Iceland'?", "results_description": "Schiphol Airport is in the country of Netherlands.", "result": ",name,Country\n0,Schiphol Airport,Netherlands\n", "difficulty": "small_select"}, {"table_id": "budget", "query": "SELECT COUNT(*) AS \"count of budget\", budgeted, YEAR \n FROM budget \n WHERE budgeted > 3000 AND YEAR <= 2001", "table_name": "budget", "query_description": "Count the number of budgets in year 2001 or before whose budgeted amount is greater than 3000", "results_description": "The number of budgets in 1999 whose budgeted is more than 4979 is 3.", "result": ",Year,Budgeted,count of budget\n0,1999,4979,3\n", "difficulty": "aggregate"}, {"table_id": "Third_Party_Companies, Maintenance_Contracts", "query": "SELECT T1.company_name AS \"Third_Party_Companies company_name\", T2.contract_start_date AS \"Maintenance_Contracts contract_start_date\" \n 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", "table_name": "Third_Party_Companies, Maintenance_Contracts", "query_description": "Which company started the earliest the maintenance contract? Show the company name.", "results_description": "The company name is Grimes, Mosciski and Renner and the contract start date is 2017-04-21 00:03:07", "result": ",Third_Party_Companies company_name,Maintenance_Contracts contract_start_date\n0,\"Grimes, Mosciski and Renner\",2017-04-21 00:03:07\n", "difficulty": "join"}, {"table_id": "captain", "query": "SELECT name, rank \n FROM captain \n WHERE rank = 'Midshipman' OR rank = 'Lieutenant'", "table_name": "captain", "query_description": "Find the name of captains whose rank are either Midshipman or Lieutenant.", "results_description": "Captain Sir Henry Langford has a rank of Midshipman.", "result": ",Name,Rank\n0,Captain Sir Henry Langford,Midshipman\n", "difficulty": "small_select"}, {"table_id": "city", "query": "SELECT Census_Ranking, Status \n FROM city \n WHERE Status <> 'Village'", "table_name": "city", "query_description": "What are the census rankings of cities that do not have the status \"Village\"?", "results_description": "The cities that have the status \"Town\" have a census ranking of 636 of 5008", "result": ",Status,Census_Ranking\n0,Town,636 of 5008\n", "difficulty": "small_select"}, {"table_id": "station", "query": "SELECT city, COUNT(*) AS \"count of station\" \n FROM station \n GROUP BY city \n HAVING COUNT(*) >= 15", "table_name": "station", "query_description": "What is the name of every city that has at least 15 stations and how many stations does it have?", "results_description": "The city of San Francisco has 35 stations.", "result": ",city,count of station\n0,San Francisco,35\n", "difficulty": "aggregate_group_by"}, {"table_id": "channel", "query": "SELECT name, OWNER \n FROM channel \n WHERE OWNER = 'CCTV' OR OWNER = 'HBS'", "table_name": "channel", "query_description": "List the names of all the channels owned by either CCTV or HBS", "results_description": "The name is CCTV-1 and the owner is CCTV.", "result": ",Name,Owner\n0,CCTV-1,CCTV\n", "difficulty": "small_select"}, {"table_id": "Invoices", "query": "SELECT AVG(Order_Quantity) AS \"average Order_Quantity\", payment_method_code \n FROM Invoices \n WHERE payment_method_code = 'MasterCard'", "table_name": "Invoices", "query_description": "Check the invoices record and compute the average quantities ordered with the payment method \"MasterCard\".", "results_description": "The payment method MasterCards has an average order quantity of 1.8333333333333333.", "result": ",payment_method_code,average Order_Quantity\n0,MasterCard,1.8333333333333333\n", "difficulty": "aggregate"}, {"table_id": "ship", "query": "SELECT COUNT(*) AS \"count of ship\" \n FROM ship", "table_name": "ship", "query_description": "What is the number of ships?", "results_description": "There are 8 ship.", "result": ",count of ship\n0,8\n", "difficulty": "aggregate"}, {"table_id": "Customers", "query": "SELECT date_became_customer, last_name, first_name \n FROM Customers \n WHERE first_name = 'Carole' AND last_name = 'Bernhard'", "table_name": "Customers", "query_description": "When did customer with first name as Carole and last name as Bernhard became a customer?", "results_description": "Carole Bernhard became a customer in \t2016-05-11 17:03:48.", "result": ",last_name,first_name,date_became_customer\n0,Bernhard,Carole,2016-05-11 17:03:48\n", "difficulty": "small_select"}, {"table_id": "county", "query": "SELECT COUNT(*) AS \"count of county\" \n FROM county", "table_name": "county", "query_description": "How many counties are there in total?", "results_description": "there are 5 countries", "result": ",count of county\n0,5\n", "difficulty": "aggregate"}, {"table_id": "program", "query": "SELECT COUNT(*) AS \"count of program\" \n FROM program", "table_name": "program", "query_description": "Count the number of programs.", "results_description": "There are 5 programs", "result": ",count of program\n0,5\n", "difficulty": "aggregate"}, {"table_id": "player, tryout", "query": "SELECT AVG(T1.HS) AS \"average HS\", T2.decision AS \"tryout decision\" \n FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID \n WHERE T2.decision = 'no'", "table_name": "player, tryout", "query_description": "Find the average hours for the students whose tryout decision is no.", "results_description": "The average hours for the students whose tryout decision is no is 925", "result": ",average HS,tryout decision\n0,925.0,no\n", "difficulty": "join_aggregate"}, {"table_id": "employees", "query": "SELECT title, phone, hire_date, last_name, first_name \n FROM employees \n WHERE first_name = 'Nancy' AND last_name = 'Edwards'", "table_name": "employees", "query_description": "What is the title, phone and hire date of Nancy Edwards?", "results_description": "The employee Nancy Edwards has the phone +1 (403) 262-3443, she is a Sales Manager and was hired in 2002-05-01 00:00:00.", "result": ",phone,title,hire_date,last_name,first_name\n0,+1 (403) 262-3443,Sales Manager,2002-05-01 00:00:00,Edwards,Nancy\n", "difficulty": "large_select"}, {"table_id": "salary, team", "query": "SELECT AVG(T1.salary) AS \"average salary\", T2.name AS \"team name\" \n FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br \n WHERE T2.name = 'Boston Red Stockings'", "table_name": "salary, team", "query_description": "Compute the average salary of the players in the team called 'Boston Red Stockings'.", "results_description": "The average salary of the players in the team called 'Boston Red Stockings' is 2856616.7595628416", "result": ",team name,average salary\n0,Boston Red Stockings,2856616.7595628416\n", "difficulty": "join_aggregate"}, {"table_id": "assignedto, projects, scientists", "query": "SELECT T2.name AS \"projects name\", T3.name AS \"scientists name\" \n FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN \n WHERE T3.name LIKE '%Smith%'", "table_name": "assignedto, projects, scientists", "query_description": "Find the name of the project for which a scientist whose name contains \u2018Smith\u2019 is assigned to.", "results_description": "The scientist name is Carol Smith and the project name is Build Your Own Telescope", "result": ",projects name,scientists name\n0,Build Your Own Telescope,Carol Smith\n", "difficulty": "join"}, {"table_id": "Settlements", "query": "SELECT SUM(Amount_Settled) AS \"sum of Amount_Settled\" \n FROM Settlements", "table_name": "Settlements", "query_description": "Compute the total amount of settlement across all the settlements.", "results_description": "The sum of the all the settled amounts is 21993.", "result": ",sum of Amount_Settled\n0,21993\n", "difficulty": "aggregate"}, {"table_id": "pilot", "query": "SELECT Pilot_name, Team \n FROM pilot \n WHERE Team = 'Bradley' OR Team = 'Fordham'", "table_name": "pilot", "query_description": "Show the names of pilots from team \"Bradley\" or \"Fordham\".", "results_description": "The pilot Patrick O'Bryant is in team Bradley.", "result": ",Team,Pilot_name\n0,Bradley,Patrick O'Bryant\n", "difficulty": "small_select"}, {"table_id": "employees", "query": "SELECT first_name, last_name, salary \n FROM employees \n WHERE first_name LIKE '%m'", "table_name": "employees", "query_description": "Return the full names and salaries for employees with first names that end with the letter m.", "results_description": "The employee with first name Adam and last name Fripp has a salary of 8200.", "result": ",SALARY,LAST_NAME,FIRST_NAME\n0,8200,Fripp,Adam\n", "difficulty": "large_select"}, {"table_id": "Allergy_type", "query": "SELECT allergytype, allergy \n FROM Allergy_type \n WHERE allergy = 'Cat'", "table_name": "Allergy_type", "query_description": "What is allergy type of a cat allergy?", "results_description": "The allergy in cats is of type animal. ", "result": ",Allergy,AllergyType\n0,Cat,animal\n", "difficulty": "small_select"}, {"table_id": "customers", "query": "SELECT customer_name, payment_method \n FROM customers \n WHERE payment_method <> 'Cash'", "table_name": "customers", "query_description": "What is the name of customers who do not use Cash as payment method.", "results_description": "The customer Tillman Ernser has the payment method cheque.", "result": ",customer_name,payment_method\n0,Tillman Ernser,Cheque\n", "difficulty": "small_select"}, {"table_id": "physician, trained_in, procedures", "query": "SELECT T1.name AS \"physician name\", T3.cost AS \"procedures cost\" \n FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment \n WHERE T3.cost > 5000", "table_name": "physician, trained_in, procedures", "query_description": "Which physicians are trained in procedures that are more expensive than 5000?", "results_description": "The physician Christopher Turk has a procedure with a cost of 5600.", "result": ",physician name,procedures cost\n0,Christopher Turk,5600.0\n", "difficulty": "join"}, {"table_id": "music_festival, volume", "query": "SELECT T1.Date_of_ceremony AS \"music_festival Date_of_ceremony\", T2.Weeks_on_Top AS \"volume Weeks_on_Top\" \n FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID \n WHERE T2.Weeks_on_Top > 2", "table_name": "music_festival, volume", "query_description": "Please show the date of ceremony of the volumes that last more than 2 weeks on top.", "results_description": "The festival at 18 February 2011 was on top for 3 weeks", "result": ",volume Weeks_on_Top,music_festival Date_of_ceremony\n0,3.0,18 February 2011\n", "difficulty": "join"}, {"table_id": "track", "query": "SELECT COUNT(*) AS \"count of track\" \n FROM track", "table_name": "track", "query_description": "Count the number of tracks.", "results_description": "There are 9 tracks", "result": ",count of track\n0,9\n", "difficulty": "aggregate"}, {"table_id": "College", "query": "SELECT COUNT(*) AS \"count of College\", enr \n FROM College \n WHERE enr > 15000", "table_name": "College", "query_description": "What is the number of colleges with a student population greater than 15000?", "results_description": "The number of colleges is 3", "result": ",enr,count of College\n0,18000,3\n", "difficulty": "aggregate"}, {"table_id": "station", "query": "SELECT city, MAX(lat) AS \"maximum lat\" \n FROM station \n GROUP BY city", "table_name": "station", "query_description": "For each city, what is the highest latitude for its stations?", "results_description": "The city of Mountain View has a maximum latitude of 37.406940000000006.", "result": ",city,maximum lat\n0,Mountain View,37.406940000000006\n", "difficulty": "aggregate_group_by"}, {"table_id": "Student", "query": "SELECT Fname, Major \n FROM Student \n WHERE Major = 600", "table_name": "Student", "query_description": "What are the first names for all students who are from the major numbered 600?", "results_description": "The student with first name Linda is from the major 600.", "result": ",Fname,Major\n0,Linda,600\n", "difficulty": "small_select"}, {"table_id": "student, department", "query": "SELECT T2.dept_name AS \"department dept_name\", AVG(T1.stu_gpa) AS \"average stu_gpa\", T1.dept_code AS \"student dept_code\" \n FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code \n GROUP BY T1.dept_code ORDER BY AVG(T1.stu_gpa) DESC", "table_name": "student, department", "query_description": "Which department has the highest average student GPA, and what is the average gpa?", "results_description": "The department with code CIS and name Computer Info. Systems has a student with an average gpa of 3.1799999999999997", "result": ",average stu_gpa,student dept_code,department dept_name\n0,3.1799999999999997,CIS,Computer Info. Systems\n", "difficulty": "join_aggregate"}, {"table_id": "member", "query": "SELECT card_number, Hometown \n FROM member \n WHERE Hometown LIKE '%Kentucky%'", "table_name": "member", "query_description": "What are the card numbers of members from Kentucky?", "results_description": "The member with hometown in Louisville, Kentucky had the card number LT98.", "result": ",Hometown,Card_Number\n0,\"Louisville, Kentucky\",LT98\n", "difficulty": "small_select"}, {"table_id": "submission", "query": "SELECT AVG(Scores) AS \"average Scores\" \n FROM submission", "table_name": "submission", "query_description": "What is the average score of submissions?", "results_description": "The average submission score is 82.9.", "result": ",average Scores\n0,82.9\n", "difficulty": "aggregate"}, {"table_id": "Customers", "query": "SELECT customer_phone, customer_email, customer_first_name, customer_last_name \n FROM Customers \n WHERE customer_first_name = 'Aniyah' AND customer_last_name = 'Feest'", "table_name": "Customers", "query_description": "What is the phone and email for customer with first name Aniyah and last name Feest?", "results_description": "The customer Aniyah Feest has the email fahey.dorian@example.com and the phone (673)872-5338.", "result": ",customer_email,customer_phone,customer_last_name,customer_first_name\n0,fahey.dorian@example.com,(673)872-5338,Feest,Aniyah\n", "difficulty": "small_select"}, {"table_id": "accelerator_compatible_browser, browser, web_client_accelerator", "query": "SELECT T1.compatible_since_year AS \"accelerator_compatible_browser compatible_since_year\", T3.name AS \"web_client_accelerator name\", T2.name AS \"browser name\" \n 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 \n WHERE T3.name = 'CACHEbox' AND T2.name = 'Internet Explorer'", "table_name": "accelerator_compatible_browser, browser, web_client_accelerator", "query_description": "When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible?", "results_description": "The browser Internet Explorer and the accelerator CACHEbox are compatible since 1995.", "result": ",browser name,web_client_accelerator name,accelerator_compatible_browser compatible_since_year\n0,Internet Explorer,CACHEbox,1995\n", "difficulty": "join"}, {"table_id": "Sportsinfo", "query": "SELECT sportname, onscholarship \n FROM Sportsinfo \n WHERE onscholarship = 'Y' \n GROUP BY sportname ORDER BY COUNT(*) DESC", "table_name": "Sportsinfo", "query_description": "Which sport has most number of students on scholarship?", "results_description": "Football has students on scholarship.", "result": ",SportName,OnScholarship\n0,Football,Y\n", "difficulty": "aggregate_group_by"}, {"table_id": "BOOKINGS", "query": "SELECT Order_Date \n FROM BOOKINGS", "table_name": "BOOKINGS", "query_description": "List the order dates of all the bookings.", "results_description": "There was a booking in 2016-12-12 10:43:01", "result": ",Order_Date\n0,2016-12-12 10:43:01\n", "difficulty": "small_select"}, {"table_id": "Ref_Shipping_Agents", "query": "SELECT shipping_agent_name \n FROM Ref_Shipping_Agents", "table_name": "Ref_Shipping_Agents", "query_description": "What are the shipping agent names?", "results_description": "The shipping agent names are UPS", "result": ",shipping_agent_name\n0,UPS\n", "difficulty": "small_select"}, {"table_id": "user_profiles", "query": "SELECT name, email, followers \n FROM user_profiles \n WHERE followers > 1000", "table_name": "user_profiles", "query_description": "Find the name and email of the users who have more than 1000 followers.", "results_description": "Iron Man has 6662425 followers and email ts@richest.com.", "result": ",name,email,followers\n0,Iron Man,ts@richest.com,6662425\n", "difficulty": "small_select"}, {"table_id": "accounts, checking, savings", "query": "SELECT T1.name AS \"accounts name\", T3.balance + T2.balance \n FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid \n WHERE T3.balance < T2.balance", "table_name": "accounts, checking, savings", "query_description": "Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance.", "results_description": "The account with name Weeks has a total checking and savings balance of 7060", "result": ",accounts name,T3.balance + T2.balance\n0,Weeks,7060.0\n", "difficulty": "join"}, {"table_id": "products", "query": "SELECT name, price \n FROM products", "table_name": "products", "query_description": "What are the names and prices of all products in the store?", "results_description": "The product named Hard drive is priced 240.", "result": ",Name,Price\n0,Hard drive,240\n", "difficulty": "small_select"}, {"table_id": "journal, journal_committee", "query": "SELECT AVG(T1.sales) AS \"average sales\", T2.work_type AS \"journal_committee work_type\" \n FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID \n WHERE T2.work_type = 'Photo'", "table_name": "journal, journal_committee", "query_description": "What is the average sales of the journals that have an editor whose work type is 'Photo'?", "results_description": "The journal that has a committee with a work type of \"Photo\", has average sales of 4660.25", "result": ",average sales,journal_committee work_type\n0,4660.25,Photo\n", "difficulty": "join_aggregate"}, {"table_id": "Player", "query": "SELECT AVG(weight) AS \"average weight\" \n FROM Player", "table_name": "Player", "query_description": "What is the average weight of all players?", "results_description": "The average weight is 168.38028933092224.", "result": ",average weight\n0,168.38028933092224\n", "difficulty": "aggregate"}, {"table_id": "school", "query": "SELECT AVG(Enrollment) AS \"average Enrollment\" \n FROM school", "table_name": "school", "query_description": "Take the average of the school enrollment.", "results_description": "The average enrollment is 1663.3333333333333.", "result": ",average Enrollment\n0,1663.3333333333333\n", "difficulty": "aggregate"}, {"table_id": "company", "query": "SELECT MIN(market_value) AS \"minimum market_value\", MAX(market_value) AS \"maximum market_value\", AVG(market_value) AS \"average market_value\" \n FROM company", "table_name": "company", "query_description": "What is the minimum, maximum, and average market value for every company?", "results_description": "The average market value is 225.34, the maximum value is 407.4, and the minimum value is 147.4.", "result": ",average market_value,maximum market_value,minimum market_value\n0,225.34,407.4,147.4\n", "difficulty": "aggregate"}, {"table_id": "weather", "query": "SELECT zip_code \n FROM weather \n GROUP BY zip_code \n HAVING AVG(mean_visibility_miles) < 10", "table_name": "weather", "query_description": "For each zip code, select all those that have an average mean visiblity below 10.", "results_description": "The zip code 94041 has an average mean visibility below 10.", "result": ",zip_code\n0,94041\n", "difficulty": "aggregate_group_by"}, {"table_id": "Customers", "query": "SELECT email_address, date_of_birth, first_name \n FROM Customers \n WHERE first_name = 'Carole'", "table_name": "Customers", "query_description": "What are the email addresses and date of births for all customers who have a first name of Carole?", "results_description": "The customer with first name \"Carole\" and email \"everette.goyette@example.org\" was born in 1998-12-15 time 13:24:40.", "result": ",first_name,date_of_birth,email_address\n0,Carole,1998-12-15 13:24:40,everette.goyette@example.org\n", "difficulty": "small_select"}, {"table_id": "BOOKINGS", "query": "SELECT COUNT(*) AS \"count of BOOKINGS\" \n FROM BOOKINGS", "table_name": "BOOKINGS", "query_description": "Count the total number of bookings made.", "results_description": "The total number of bookings made is 15", "result": ",count of BOOKINGS\n0,15\n", "difficulty": "aggregate"}, {"table_id": "tracks", "query": "SELECT unit_price, name \n FROM tracks \n WHERE name = 'Fast As a Shark'", "table_name": "tracks", "query_description": "What is the unit price of the tune \"Fast As a Shark\"?", "results_description": "The unit price of the tune \"Fast As a Shark\" is 0.99.", "result": ",name,unit_price\n0,Fast As a Shark,0.99\n", "difficulty": "small_select"}, {"table_id": "stock", "query": "SELECT AVG(Quantity) AS \"average Quantity\" \n FROM stock", "table_name": "stock", "query_description": "Give the average quantity of stocks.", "results_description": "The average quantity is 110.875.", "result": ",average Quantity\n0,110.875\n", "difficulty": "aggregate"}, {"table_id": "drivers", "query": "SELECT forename, surname, nationality \n FROM drivers \n WHERE nationality = 'German'", "table_name": "drivers", "query_description": "Find the forename and surname of drivers whose nationality is German?", "results_description": "The forename is Nick and the surname is Heidfeld, with a German nationality.", "result": ",surname,forename,nationality\n0,Heidfeld,Nick,German\n", "difficulty": "small_select"}, {"table_id": "Apartments", "query": "SELECT apt_number, apt_type_code \n FROM Apartments \n WHERE apt_type_code = 'Flat'", "table_name": "Apartments", "query_description": "Which apartments have type code \"Flat\"? Give me their apartment numbers.", "results_description": "The apartment with number Suite 645 is of type flat.", "result": ",apt_number,apt_type_code\n0,Suite 645,Flat\n", "difficulty": "small_select"}, {"table_id": "Financial_transactions", "query": "SELECT AVG(transaction_amount) AS \"average transaction_amount\", MIN(transaction_amount) AS \"minimum transaction_amount\", MAX(transaction_amount) AS \"maximum transaction_amount\", SUM(transaction_amount) AS \"sum of transaction_amount\" \n FROM Financial_transactions", "table_name": "Financial_transactions", "query_description": "What is the average, minimum, maximum, and total transaction amount?", "results_description": "The average is 1329.0559999999998, the minimum is 368.46, the maximum is 1979.66, and the total is 19935.839999999997 of the transaction amount", "result": ",sum of transaction_amount,average transaction_amount,maximum transaction_amount,minimum transaction_amount\n0,19935.839999999997,1329.0559999999998,1979.66,368.46\n", "difficulty": "aggregate"}, {"table_id": "Player", "query": "SELECT pName, HS \n FROM Player \n WHERE HS < 1500", "table_name": "Player", "query_description": "What are the names and number of hours spent training for each player who trains for less than 1500 hours?", "results_description": "The player named Andrew has trained for 1200 hours", "result": ",HS,pName\n0,1200,Andrew\n", "difficulty": "small_select"}, {"table_id": "available_policies", "query": "SELECT customer_phone, policy_type_code \n FROM available_policies \n WHERE policy_type_code = 'Life Insurance'", "table_name": "available_policies", "query_description": "What are the customer phone numbers under the policy \"Life Insurance\"?", "results_description": "The customer phone number under the policy type Life Insurance is +16(2)5838999222", "result": ",Customer_Phone,policy_type_code\n0,+16(2)5838999222,Life Insurance\n", "difficulty": "small_select"}, {"table_id": "COURSE", "query": "SELECT CName, Days \n FROM COURSE \n WHERE Days = 'MTW'", "table_name": "COURSE", "query_description": "What are the course names for courses taught on MTW?", "results_description": "Course \"COMPUTER LITERACY\" was taught on MTW.", "result": ",Days,CName\n0,MTW,COMPUTER LITERACY\n", "difficulty": "small_select"}, {"table_id": "technician", "query": "SELECT COUNT(*) AS \"count of technician\" \n FROM technician", "table_name": "technician", "query_description": "What is the number of technicians?", "results_description": "There are 10 technicians.", "result": ",count of technician\n0,10\n", "difficulty": "aggregate"}, {"table_id": "papers", "query": "SELECT COUNT(*) AS \"count of papers\" \n FROM papers", "table_name": "papers", "query_description": "How many papers are published in total?", "results_description": "The number of published papers is 7", "result": ",count of papers\n0,7\n", "difficulty": "aggregate"}, {"table_id": "company", "query": "SELECT MIN(market_value) AS \"minimum market_value\", MAX(market_value) AS \"maximum market_value\", AVG(market_value) AS \"average market_value\" \n FROM company", "table_name": "company", "query_description": "Show minimum, maximum, and average market value for all companies.", "results_description": "The average market value is 225.34, the maximum is 407.4 and the minimum is 147.4.", "result": ",average market_value,maximum market_value,minimum market_value\n0,225.34,407.4,147.4\n", "difficulty": "aggregate"}, {"table_id": "Companies", "query": "SELECT COUNT(*) AS \"count of Companies\" \n FROM Companies", "table_name": "Companies", "query_description": "Count the number of companies.", "results_description": "There are 19 companies", "result": ",count of Companies\n0,19\n", "difficulty": "aggregate"}, {"table_id": "Invoices", "query": "SELECT COUNT(*) AS \"count of Invoices\" \n FROM Invoices", "table_name": "Invoices", "query_description": "How many invoices do we have?", "results_description": "We have 15 invoices.", "result": ",count of Invoices\n0,15\n", "difficulty": "aggregate"}, {"table_id": "candidate", "query": "SELECT poll_source \n FROM candidate \n GROUP BY poll_source ORDER BY COUNT(*) DESC", "table_name": "candidate", "query_description": "Which poll resource provided the most number of candidate information?", "results_description": "The most number of candidate information came from the poll source named Newsweek Poll", "result": ",Poll_Source\n0,Newsweek Poll\n", "difficulty": "aggregate_group_by"}, {"table_id": "club, member_of_club, student", "query": "SELECT t3.fname AS \"student fname\", t3.lname AS \"student lname\", t2.position AS \"member_of_club position\", t1.clubname AS \"club clubname\" \n FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid \n WHERE t1.clubname = 'Bootup Baltimore' AND t2.position = 'President'", "table_name": "club, member_of_club, student", "query_description": "Who is the president of the club \"Bootup Baltimore\"? Give me the first and last name.", "results_description": "The name of President of the club Bootup Baltimore is Linda Smith", "result": ",club clubname,student fname,student lname,member_of_club position\n0,Bootup Baltimore,Linda,Smith,President\n", "difficulty": "join"}, {"table_id": "dorm", "query": "SELECT dorm_name, gender \n FROM dorm \n WHERE gender = 'F'", "table_name": "dorm", "query_description": "Find the name of dorms only for female (F gender).", "results_description": "The Anonymous Donor Hall is a dorm for females.", "result": ",gender,dorm_name\n0,F,Anonymous Donor Hall\n", "difficulty": "small_select"}, {"table_id": "Drama_Workshop_Groups, Services", "query": "SELECT T1.Store_Phone AS \"Drama_Workshop_Groups Store_Phone\", T1.Store_Email_Address AS \"Drama_Workshop_Groups Store_Email_Address\" \n FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID", "table_name": "Drama_Workshop_Groups, Services", "query_description": "What are the phones and emails of workshop groups in which services are performed?", "results_description": "The drama workshop group has the phone (422)705-5633 and the email address roosevelt61@example.com.", "result": ",Drama_Workshop_Groups Store_Phone,Drama_Workshop_Groups Store_Email_Address\n0,(422)705-5633,roosevelt61@example.com\n", "difficulty": "join"}, {"table_id": "authors, authorship, papers, inst", "query": "SELECT t3.title AS \"papers title\", t2.authorder AS \"authorship authorder\", t1.lname AS \"authors lname\", t4.country AS \"inst country\" \n 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 \n WHERE t4.country = 'USA' AND t2.authorder = 2 AND t1.lname = 'Turon'", "table_name": "authors, authorship, papers, inst", "query_description": "Which paper is published in an institution in \"USA\" and have \"Turon\" as its second author?", "results_description": "The paper Functional Pearl: Modular Rollback through Control Logging has as second author Turon and it was published in USA.", "result": ",inst country,papers title,authors lname,authorship authorder\n0,USA,Functional Pearl: Modular Rollback through Control Logging,Turon,2\n", "difficulty": "join"}, {"table_id": "bank", "query": "SELECT COUNT(*) AS \"count of bank\" \n FROM bank", "table_name": "bank", "query_description": "Count the number of bank branches.", "results_description": "There are 4 bank branches", "result": ",count of bank\n0,4\n", "difficulty": "aggregate"}, {"table_id": "medicine_enzyme_interaction, medicine, enzyme", "query": "SELECT T1.interaction_type AS \"medicine_enzyme_interaction interaction_type\", T3.name AS \"enzyme name\", T2.name AS \"medicine name\" \n 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 \n WHERE T3.name = 'ALA synthase' AND T2.name = 'Aripiprazole'", "table_name": "medicine_enzyme_interaction, medicine, enzyme", "query_description": "What is the interaction type of the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?", "results_description": "The ALA synthase enzyme and the medicine Aripiprazole have an inhibitor interaction type", "result": ",enzyme name,medicine name,medicine_enzyme_interaction interaction_type\n0,ALA synthase,Aripiprazole,inhibitor\n", "difficulty": "join"}, {"table_id": "Apartments", "query": "SELECT AVG(room_count) AS \"average room_count\", apt_type_code \n FROM Apartments \n WHERE apt_type_code = 'Studio'", "table_name": "Apartments", "query_description": "What is the average number of rooms of apartments with type code \"Studio\"?", "results_description": "Apartments with type code \"Studio\" have 7.5 rooms in average", "result": ",apt_type_code,average room_count\n0,Studio,7.5\n", "difficulty": "aggregate"}, {"table_id": "Faculty", "query": "SELECT COUNT(*) AS \"count of Faculty\" \n FROM Faculty", "table_name": "Faculty", "query_description": "How many faculty do we have?", "results_description": "We have 58 faculties.", "result": ",count of Faculty\n0,58\n", "difficulty": "aggregate"}, {"table_id": "party", "query": "SELECT COUNT(*) AS \"count of party\" \n FROM party", "table_name": "party", "query_description": "Count the number of parties.", "results_description": "There are 8 parties.", "result": ",count of party\n0,8\n", "difficulty": "aggregate"}, {"table_id": "member_attendance, member, performance", "query": "SELECT T3.Date AS \"performance Date\", T2.Role AS \"member Role\" \n 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 \n WHERE T2.Role = 'Violin'", "table_name": "member_attendance, member, performance", "query_description": "Show the dates of performances with attending members whose roles are \"Violin\".", "results_description": "The member that played the violin performed in February 2.", "result": ",member Role,performance Date\n0,Violin,February 2\n", "difficulty": "join"}, {"table_id": "products, manufacturers", "query": "SELECT AVG(T1.price) AS \"average price\", T2.name AS \"manufacturers name\" \n FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code \n GROUP BY T2.name", "table_name": "products, manufacturers", "query_description": "What are the average prices of products for each manufacturer?", "results_description": "The manufacturer Creative Labs has an average price of 150.", "result": ",average price,manufacturers name\n0,150.0,Creative Labs\n", "difficulty": "join_aggregate"}, {"table_id": "phone", "query": "SELECT Accreditation_type, COUNT(*) AS \"count of phone\" \n FROM phone \n GROUP BY Accreditation_type", "table_name": "phone", "query_description": "How many phones belongs to each accreditation type?", "results_description": "4 phones belong the the full accreditation type.", "result": ",count of phone,Accreditation_type\n0,4,Full\n", "difficulty": "aggregate_group_by"}, {"table_id": "instructor", "query": "SELECT name, dept_name \n FROM instructor \n WHERE dept_name = 'Comp. Sci.'", "table_name": "instructor", "query_description": "Find the names of all instructors in computer science department", "results_description": "Bondi teaches in the computer science department", "result": ",name,dept_name\n0,Bondi,Comp. Sci.\n", "difficulty": "small_select"}, {"table_id": "cinema", "query": "SELECT LOCATION, COUNT(*) AS \"count of cinema\" \n FROM cinema \n GROUP BY LOCATION", "table_name": "cinema", "query_description": "Show each location and the number of cinemas there.", "results_description": "There are 3 cinemas located in County Clare.", "result": ",Location,count of cinema\n0,County Clare,3\n", "difficulty": "aggregate_group_by"}, {"table_id": "authors", "query": "SELECT lname, fname \n FROM authors \n WHERE fname = 'Amal'", "table_name": "authors", "query_description": "Which authors have first name \"Amal\"? List their last names.", "results_description": "The author's first name is Amal and the last name is Ahmed.", "result": ",fname,lname\n0,Amal,Ahmed\n", "difficulty": "small_select"}, {"table_id": "WINE", "query": "SELECT Grape, Appelation \n FROM WINE", "table_name": "WINE", "query_description": "What are the grapes and appelations of each wine?", "results_description": "The wine with the appelation St. Helena consists of Zinfandel grapes.", "result": ",Grape,Appelation\n0,Zinfandel,St. Helena\n", "difficulty": "small_select"}, {"table_id": "Member, party", "query": "SELECT T1.member_name AS \"Member member_name\", T2.party_name AS \"party party_name\" \n FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id", "table_name": "Member, party", "query_description": "What are the names of members and their corresponding parties?", "results_description": "The member with name Hon Tony Abbott is in party with name 3.", "result": ",party party_name,Member member_name\n0,3,Hon Tony Abbott\n", "difficulty": "join"}, {"table_id": "Person", "query": "SELECT age, job, name \n FROM Person \n WHERE job = 'doctor' AND name = 'Zach'", "table_name": "Person", "query_description": "What is the age of the doctor named Zach?", "results_description": "Zach is 45 years old and he is a doctor.", "result": ",age,job,name\n0,45,doctor,Zach\n", "difficulty": "small_select"}, {"table_id": "candidates, people", "query": "SELECT T2.first_name AS \"people first_name\", T2.last_name AS \"people last_name\" \n FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id", "table_name": "candidates, people", "query_description": "What are the first and last names of all the candidates?", "results_description": "The candidate Shannon Senger.", "result": ",people last_name,people first_name\n0,Senger,Shannon\n", "difficulty": "join"}, {"table_id": "races, results", "query": "SELECT MAX(T2.fastestlapspeed) AS \"maximum fastestlapspeed\", T1.year AS \"races year\", T1.name AS \"races name\" \n FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid \n WHERE T1.year = 2008 AND T1.name = 'Monaco Grand Prix'", "table_name": "races, results", "query_description": "What is the maximum fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?", "results_description": "The maximum fastest lap speed in race named Monaco Grand Prix in 2008 is 156.789.", "result": ",races name,races year,maximum fastestlapspeed\n0,Monaco Grand Prix,2008,156.789\n", "difficulty": "join_aggregate"}, {"table_id": "election", "query": "SELECT COUNT(*) AS \"count of election\" \n FROM election", "table_name": "election", "query_description": "How many elections are there?", "results_description": "There are 5 elections.", "result": ",count of election\n0,5\n", "difficulty": "aggregate"}, {"table_id": "club, member_of_club, student", "query": "SELECT AVG(t3.age) AS \"average age\", t1.clubname AS \"club clubname\" \n FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid \n WHERE t1.clubname = 'Hopkins Student Enterprises'", "table_name": "club, member_of_club, student", "query_description": "On average, how old are the members in the club \"Hopkins Student Enterprises\"?", "results_description": "The average age for the club Hopkins Student Enterprises is 20.", "result": ",average age,club clubname\n0,20.0,Hopkins Student Enterprises\n", "difficulty": "join_aggregate"}, {"table_id": "products", "query": "SELECT product_description, product_name \n FROM products \n WHERE product_name = 'Chocolate'", "table_name": "products", "query_description": "Return the description of the product called \"Chocolate\".", "results_description": "The product named chocolate has the description Handmade Chocolate.", "result": ",product_name,product_description\n0,Chocolate,Handmade chocolate\n", "difficulty": "small_select"}, {"table_id": "cinema", "query": "SELECT COUNT(*) AS \"count of cinema\" \n FROM cinema", "table_name": "cinema", "query_description": "Count the number of cinemas.", "results_description": "The number of cinemas is 10.", "result": ",count of cinema\n0,10\n", "difficulty": "aggregate"}, {"table_id": "products", "query": "SELECT COUNT(*) AS \"count of products\", product_category_code, typical_buying_price \n FROM products \n WHERE product_category_code = 'Spices' AND typical_buying_price > 1000", "table_name": "products", "query_description": "Find the number of products with category \"Spices\" and typically sold above 1000.", "results_description": "The category of Spices has 2 products and its typical buying price is 352447.2874677.", "result": ",count of products,typical_buying_price,product_category_code\n0,2,352447.2874677,Spices\n", "difficulty": "aggregate"}, {"table_id": "STUDENT", "query": "SELECT LName, Major \n FROM STUDENT \n WHERE Major = 50", "table_name": "STUDENT", "query_description": "What are the last names of students studying major 50?", "results_description": "The student with last name Epp majors 50.", "result": ",LName,Major\n0,Epp,50\n", "difficulty": "small_select"}, {"table_id": "campuses", "query": "SELECT campus, county \n FROM campuses \n WHERE county = 'Los Angeles'", "table_name": "campuses", "query_description": "Report the name of all campuses in Los Angeles county.", "results_description": "The campus of California State University-Dominguez Hills is located in the county of Los Angeles", "result": ",Campus,County\n0,California State University-Dominguez Hills,Los Angeles\n", "difficulty": "small_select"}, {"table_id": "web_client_accelerator", "query": "SELECT name \n FROM web_client_accelerator \n WHERE name LIKE '%Opera%'", "table_name": "web_client_accelerator", "query_description": "Which accelerator name contains substring \"Opera\"?", "results_description": "The accelerator is named Opera Turbo.", "result": ",name\n0,Opera Turbo\n", "difficulty": "small_select"}, {"table_id": "Products", "query": "SELECT AVG(Product_Price) AS \"average Product_Price\" \n FROM Products", "table_name": "Products", "query_description": "What is the average price for products?", "results_description": "The average product price is 2852.7806666666665.", "result": ",average Product_Price\n0,2852.7806666666665\n", "difficulty": "aggregate"}, {"table_id": "home_game, team", "query": "SELECT SUM(T1.games) AS \"sum of games\", T2.name AS \"team name\", T1.year AS \"home_game year\" \n FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br \n WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000", "table_name": "home_game, team", "query_description": "Count the total number of games the team Boston Red Stockings attended from 1990 to 2000.", "results_description": "Boston Red Stockings attended 4325 games from 1990 to 2000.", "result": ",team name,sum of games,home_game year\n0,Boston Red Stockings,4325,1990\n", "difficulty": "join_aggregate"}, {"table_id": "artist", "query": "SELECT AVG(Age) AS \"average Age\" \n FROM artist", "table_name": "artist", "query_description": "What is the average age of all artists?", "results_description": "The average age of all artists is 31.428571428571427", "result": ",average Age\n0,31.428571428571427\n", "difficulty": "aggregate"}, {"table_id": "publication", "query": "SELECT Price, Publisher \n FROM publication \n WHERE Publisher = 'Person' OR Publisher = 'Wiley'", "table_name": "publication", "query_description": "Show the prices of publications whose publisher is either \"Person\" or \"Wiley\"", "results_description": "The publisher Wiley has a price of 4100000.", "result": ",Price,Publisher\n0,4100000.0,Wiley\n", "difficulty": "small_select"}, {"table_id": "parties", "query": "SELECT payment_method_code, party_phone, party_email \n FROM parties \n WHERE party_email = 'enrico09@example.com'", "table_name": "parties", "query_description": "Find the payment method and phone of the party with email \"enrico09@example.com\".", "results_description": "The party with email enrico09@example.com and phone 05374656172 has Cheque as a payment method.", "result": ",party_email,party_phone,payment_method_code\n0,enrico09@example.com,05374656172,Cheque\n", "difficulty": "small_select"}, {"table_id": "enzyme", "query": "SELECT product, chromosome, porphyria, LOCATION \n FROM enzyme \n WHERE LOCATION = 'Cytosol'", "table_name": "enzyme", "query_description": "What is the product, chromosome and porphyria related to the enzymes which take effect at the location 'Cytosol'?", "results_description": "The product named Porphobilinogen with the 9q34 chromosome and the ALA-Dehydratase deficiency porphyria is located in the Cytosol", "result": ",Product,Location,Porphyria,Chromosome\n0,Porphobilinogen,Cytosol,ALA-Dehydratase deficiency,9q34\n", "difficulty": "large_select"}, {"table_id": "races", "query": "SELECT name, YEAR \n FROM races \n WHERE YEAR = 2017", "table_name": "races", "query_description": "What are the names of all the races that occurred in the year 2017?", "results_description": "Australian Grand Prix occurred in 2017.", "result": ",name,year\n0,Australian Grand Prix,2017\n", "difficulty": "small_select"}, {"table_id": "camera_lens", "query": "SELECT COUNT(*) AS \"count of camera_lens\", focal_length_mm \n FROM camera_lens \n WHERE focal_length_mm > 15", "table_name": "camera_lens", "query_description": "How many camera lenses have a focal length longer than 15 mm?", "results_description": "The number of camera lenses that have a focal length of 45 mm is 9", "result": ",focal_length_mm,count of camera_lens\n0,45.0,9.0\n", "difficulty": "aggregate"}, {"table_id": "instructor", "query": "SELECT name, dept_name, salary \n FROM instructor \n WHERE dept_name = 'Comp. Sci.' AND salary > 80000", "table_name": "instructor", "query_description": "Find the names of all instructors in Comp. Sci. department with salary > 80000.", "results_description": "The instructor named Bondi has a salary of 115469.11 and is in the Comp. Sci. department.", "result": ",name,salary,dept_name\n0,Bondi,115469.11,Comp. Sci.\n", "difficulty": "small_select"}, {"table_id": "ship", "query": "SELECT Name, Nationality \n FROM ship \n WHERE Nationality <> 'United States'", "table_name": "ship", "query_description": "List the name of ships whose nationality is not \"United States\".", "results_description": "The ship named Corbridge is from the United Kingdom.", "result": ",Name,Nationality\n0,Corbridge,United Kingdom\n", "difficulty": "small_select"}, {"table_id": "Financial_transactions", "query": "SELECT COUNT(*) AS \"count of Financial_transactions\" \n FROM Financial_transactions", "table_name": "Financial_transactions", "query_description": "Count the number of transactions.", "results_description": "There are 15 transactions in total", "result": ",count of Financial_transactions\n0,15\n", "difficulty": "aggregate"}, {"table_id": "Residents", "query": "SELECT other_details \n FROM Residents \n WHERE other_details LIKE '%Miss%'", "table_name": "Residents", "query_description": "What are the resident details containing the substring 'Miss'?", "results_description": "The resident's details are Miss Naomie Osinski.", "result": ",other_details\n0,Miss Naomie Osinski\n", "difficulty": "small_select"}, {"table_id": "inst", "query": "SELECT COUNT(*) AS \"count of inst\" \n FROM inst", "table_name": "inst", "query_description": "Count the number of institutions.", "results_description": "There are 8 institutions.", "result": ",count of inst\n0,8\n", "difficulty": "aggregate"}, {"table_id": "Rooms", "query": "SELECT SUM(beds) AS \"sum of beds\", bedtype \n FROM Rooms \n WHERE bedtype = 'King'", "table_name": "Rooms", "query_description": "Find the total number of king beds available.", "results_description": "There are 6 beds of type King.", "result": ",bedType,sum of beds\n0,King,6\n", "difficulty": "aggregate"}, {"table_id": "professor", "query": "SELECT COUNT(*) AS \"count of professor\", prof_high_degree \n FROM professor \n WHERE prof_high_degree = 'Ph.D.'", "table_name": "professor", "query_description": "How many professors do have a Ph.D. degree?", "results_description": "There are 18 professort with a Ph.D.", "result": ",PROF_HIGH_DEGREE,count of professor\n0,Ph.D.,18\n", "difficulty": "aggregate"}, {"table_id": "Vehicles", "query": "SELECT vehicle_id \n FROM Vehicles", "table_name": "Vehicles", "query_description": "List all vehicle id", "results_description": "The vehicle id is 1.", "result": ",vehicle_id\n0,1\n", "difficulty": "small_select"}, {"table_id": "Person", "query": "SELECT COUNT(*) AS \"count of Person\", age, job \n FROM Person \n WHERE age > 30 AND job = 'engineer'", "table_name": "Person", "query_description": "How many people whose age is greater 30 and job is engineer?", "results_description": "There is one engineer with an age of 35.", "result": ",age,job,count of Person\n0,35,engineer,1\n", "difficulty": "aggregate"}, {"table_id": "bridge", "query": "SELECT LOCATION, name \n FROM bridge \n WHERE name = 'Kolob Arch' OR name = 'Rainbow Bridge'", "table_name": "bridge", "query_description": "What is the location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'?", "results_description": "The location of the bridge named Kolob Arch is Zion National Park , Utah , USA", "result": ",name,location\n0,Kolob Arch,\"Zion National Park , Utah , USA\"\n", "difficulty": "small_select"}, {"table_id": "submission", "query": "SELECT AVG(Scores) AS \"average Scores\" \n FROM submission", "table_name": "submission", "query_description": "Compute the average score of submissions.", "results_description": "The average score is 82.9.", "result": ",average Scores\n0,82.9\n", "difficulty": "aggregate"}, {"table_id": "people", "query": "SELECT MIN(age) AS \"minimum age\", MAX(age) AS \"maximum age\", AVG(age) AS \"average age\" \n FROM people", "table_name": "people", "query_description": "Show the minimum, maximum, and average age for all people.", "results_description": "The average age is 30.166666666666668, the maximum age is 36 and the minimum age is 25.", "result": ",average age,maximum age,minimum age\n0,30.166666666666668,36.0,25.0\n", "difficulty": "aggregate"}, {"table_id": "Rating", "query": "SELECT MAX(stars) AS \"maximum stars\", MIN(stars) AS \"minimum stars\" \n FROM Rating", "table_name": "Rating", "query_description": "What is the lowest and highest rating star?", "results_description": "The minimum stars are 2 and the maximum stars are 5", "result": ",maximum stars,minimum stars\n0,5,2\n", "difficulty": "aggregate"}, {"table_id": "CUSTOMER, INVOICE", "query": "SELECT T2.InvoiceDate AS \"INVOICE InvoiceDate\", T1.FirstName AS \"CUSTOMER FirstName\", LastName \n FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId \n WHERE T1.FirstName = 'Astrid' AND LastName = 'Gruber'", "table_name": "CUSTOMER, INVOICE", "query_description": "What are the invoice dates for customers with the first name Astrid and the last name Gruber?", "results_description": "The invoice date of the customer with last name Gruber and first name Astrid is 2009-12-08 00:00:00.", "result": ",LastName,CUSTOMER FirstName,INVOICE InvoiceDate\n0,Gruber,Astrid,2009-12-08 00:00:00\n", "difficulty": "join"}, {"table_id": "body_builder", "query": "SELECT COUNT(*) AS \"count of body_builder\" \n FROM body_builder", "table_name": "body_builder", "query_description": "How many body builders are there?", "results_description": "There are 5 body builders in total", "result": ",count of body_builder\n0,5\n", "difficulty": "aggregate"}, {"table_id": "Employee", "query": "SELECT COUNT(*) AS \"count of Employee\", salary \n FROM Employee \n WHERE salary BETWEEN 100000 AND 200000", "table_name": "Employee", "query_description": "What is the number of employees that have a salary between 100000 and 200000?", "results_description": "There are 7 employees with a salary of 120433", "result": ",salary,count of Employee\n0,120433,7\n", "difficulty": "aggregate"}, {"table_id": "exhibition_record, exhibition", "query": "SELECT T2.theme AS \"exhibition theme\", T1.date AS \"exhibition_record date\", T1.attendance AS \"exhibition_record attendance\", T2.year AS \"exhibition year\" \n FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id \n WHERE T2.year = 2004", "table_name": "exhibition_record, exhibition", "query_description": "What is the theme, date, and attendance for the exhibition in year 2004?", "results_description": "The exhibition in December 2 2004 had the theme Santa Claus and a record attendance of 965.", "result": ",exhibition year,exhibition theme,exhibition_record date,exhibition_record attendance\n0,2004,Santa Claus,December 2,965\n", "difficulty": "join"}, {"table_id": "Faculty", "query": "SELECT building, COUNT(*) AS \"count of Faculty\" \n FROM Faculty \n GROUP BY building", "table_name": "Faculty", "query_description": "How many faculty members does each building have? List the result with the name of the building.", "results_description": "Barton building has 20 faculty members.", "result": ",Building,count of Faculty\n0,Barton,20\n", "difficulty": "aggregate_group_by"}, {"table_id": "people, perpetrator", "query": "SELECT T1.Height AS \"people Height\", T2.Injured AS \"perpetrator Injured\" \n FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Injured DESC", "table_name": "people, perpetrator", "query_description": "What are the heights of perpetrators in descending order of the number of people they injured?", "results_description": "The perpetrators have a height of 6.5 and have injured 80 people", "result": ",people Height,perpetrator Injured\n0,6.5,80.0\n", "difficulty": "join"}, {"table_id": "Ref_Document_Types", "query": "SELECT document_type_description, document_type_code \n FROM Ref_Document_Types \n WHERE document_type_code = 'Paper'", "table_name": "Ref_Document_Types", "query_description": "What is the description of document type 'Paper'?", "results_description": "The document type Paper has the following description: u", "result": ",document_type_code,document_type_description\n0,Paper,u\n", "difficulty": "small_select"}, {"table_id": "performance", "query": "SELECT Attendance, LOCATION \n FROM performance \n WHERE LOCATION = 'TD Garden' OR LOCATION = 'Bell Centre'", "table_name": "performance", "query_description": "Show the attendances of the performances at location \"TD Garden\" or \"Bell Centre\"", "results_description": "The attendance of the performance in TD Garden is 165.", "result": ",Location,Attendance\n0,TD Garden,165\n", "difficulty": "small_select"}, {"table_id": "Employee", "query": "SELECT COUNT(*) AS \"count of Employee\" \n FROM Employee", "table_name": "Employee", "query_description": "How many employees do we have?", "results_description": "The number of employees is 31.", "result": ",count of Employee\n0,31\n", "difficulty": "aggregate"}, {"table_id": "review", "query": "SELECT AVG(rating) AS \"average rating\", MAX(rating) AS \"maximum rating\" \n FROM review", "table_name": "review", "query_description": "Find the average and maximum rating of all reviews.", "results_description": "The average rating of all reviews is 7.14 with a max of 10", "result": ",average rating,maximum rating\n0,7.142857142857143,10.0\n", "difficulty": "aggregate"}, {"table_id": "district", "query": "SELECT District_name, City_Population \n FROM district \n WHERE City_Population BETWEEN 200000 AND 2000000", "table_name": "district", "query_description": "Find the name and population of district with population between 200000 and 2000000", "results_description": "The district with name Bahawalpur District has population 530438.", "result": ",District_name,City_Population\n0,Bahawalpur District,530438.0\n", "difficulty": "small_select"}, {"table_id": "Students", "query": "SELECT date_of_latest_logon, family_name \n FROM Students \n WHERE family_name = 'Jaskolski' OR family_name = 'Langosh'", "table_name": "Students", "query_description": "What are the dates of the latest logon of the students with family name \"Jaskolski\" or \"Langosh\"?", "results_description": "The latest logon of Jaskolski was at 2017-06-24 22:16:27", "result": ",family_name,date_of_latest_logon\n0,Jaskolski,2017-06-24 22:16:27\n", "difficulty": "small_select"}, {"table_id": "Video_games", "query": "SELECT COUNT(*) AS \"count of Video_games\" \n FROM Video_games", "table_name": "Video_games", "query_description": "How many video games do you have?", "results_description": "There are 6 video games ", "result": ",count of Video_games\n0,6\n", "difficulty": "aggregate"}, {"table_id": "player, tryout", "query": "SELECT AVG(T1.HS) AS \"average HS\", T2.decision AS \"tryout decision\" \n FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID \n WHERE T2.decision = 'no'", "table_name": "player, tryout", "query_description": "What is the average number of hours spent practicing for students who got rejected?", "results_description": "The average HS is 925 for players with tryout decision \"no\".", "result": ",average HS,tryout decision\n0,925.0,no\n", "difficulty": "join_aggregate"}, {"table_id": "dorm", "query": "SELECT COUNT(*) AS \"count of dorm\", SUM(student_capacity) AS \"sum of student_capacity\", gender \n FROM dorm \n GROUP BY gender", "table_name": "dorm", "query_description": "How many dorms are there and what is the total capacity for each gender?", "results_description": "There is 1 dorm for females with a student capacity of 128.", "result": ",gender,count of dorm,sum of student_capacity\n0,F,1,128\n", "difficulty": "aggregate_group_by"}, {"table_id": "ROLES", "query": "SELECT role_code, role_name, role_description \n FROM ROLES", "table_name": "ROLES", "query_description": "List all role codes, role names, and role descriptions.", "results_description": "The role code is MG, the role name is Manager and the role description is Vero harum corrupti odit ipsa vero et odio. Iste et recusandae temporibus maxime. Magni aspernatur fugit quis explicabo totam esse corrupti.", "result": ",Role_Code,Role_Name,Role_Description\n0,MG,Manager,Vero harum corrupti odit ipsa vero et odio. Iste et recusandae temporibus maxime. Magni aspernatur fugit quis explicabo totam esse corrupti.\n", "difficulty": "large_select"}, {"table_id": "Suppliers, supplier_addresses, addresses", "query": "SELECT T1.supplier_name AS \"Suppliers supplier_name\", T1.supplier_phone AS \"Suppliers supplier_phone\", T3.address_details AS \"addresses address_details\" \n 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", "table_name": "Suppliers, supplier_addresses, addresses", "query_description": "What are the names and phone numbers for all suppliers, sorted in alphabetical order of their addressed?", "results_description": "The supplier named AB Store has the phone 1-483-283-4742 and its address is 0258 Kessler Mountains Suite 688 Mooreside, ME 41586-5022.", "result": ",Suppliers supplier_name,Suppliers supplier_phone,addresses address_details\n0,AB Store,1-483-283-4742,\"0258 Kessler Mountains Suite 688\nMooreside, ME 41586-5022\"\n", "difficulty": "join"}, {"table_id": "injury_accident", "query": "SELECT player, number_of_matches, SOURCE, injury \n FROM injury_accident \n WHERE injury <> 'Knee problem'", "table_name": "injury_accident", "query_description": "What are the player name, number of matches, and information source for players who do not suffer from injury of 'Knee problem'?", "results_description": "The player Davide Santon suffers from injury of Clean-up surgery on his right knee, the number of matches is 12 and the source is inter.it", "result": ",Injury,Player,Source,Number_of_matches\n0,Clean-up surgery on his right knee,Davide Santon,inter.it,12\n", "difficulty": "large_select"}, {"table_id": "TRANSACTIONS", "query": "SELECT date_of_transaction, share_count, amount_of_transaction \n FROM TRANSACTIONS \n WHERE share_count >= 100 OR amount_of_transaction >= 100", "table_name": "TRANSACTIONS", "query_description": "What are the dates of transactions with at least 100 share count or amount bigger than 100?", "results_description": "In 1988-09-16 19:02:51 there were 8718572 shares with an amount of transaction of \t302507.6996.", "result": ",share_count,date_of_transaction,amount_of_transaction\n0,8718572,1988-09-16 19:02:51,302507.6996\n", "difficulty": "small_select"}, {"table_id": "member", "query": "SELECT name, address \n FROM member \n WHERE address = 'Harford' OR address = 'Waterbury'", "table_name": "member", "query_description": "Give me the names of members whose address is in Harford or Waterbury.", "results_description": "Robert Breton lives in Waterbury", "result": ",Name,Address\n0,\"Breton, Robert\",Waterbury\n", "difficulty": "small_select"}, {"table_id": "department", "query": "SELECT school_code, dept_name \n FROM department \n WHERE dept_name = 'Accounting'", "table_name": "department", "query_description": "What is the school code of the accounting department?", "results_description": "The department with name Accounting has the school code BUS.", "result": ",DEPT_NAME,SCHOOL_CODE\n0,Accounting,BUS\n", "difficulty": "small_select"}, {"table_id": "phone", "query": "SELECT chip_model, screen_mode, Hardware_Model_name \n FROM phone \n WHERE Hardware_Model_name = 'LG-P760'", "table_name": "phone", "query_description": "What are the chip model and screen mode of the phone with hardware model name \"LG-P760\"?", "results_description": "The phone with hardware model name \"LG-P760\" has chip model of X51v and has 3 screen modes", "result": ",chip_model,screen_mode,Hardware_Model_name\n0,X51v,3,LG-P760\n", "difficulty": "small_select"}, {"table_id": "products", "query": "SELECT product_details \n FROM products \n WHERE product_details LIKE '%Latte%' OR product_details LIKE '%Americano%'", "table_name": "products", "query_description": "Find the detail of products whose detail contains the word \"Latte\" or the word \"Americano\"", "results_description": "The product details are Americano.", "result": ",product_details\n0,Americano\n", "difficulty": "small_select"}, {"table_id": "Ref_document_types", "query": "SELECT document_type_code, document_type_name, document_type_description \n FROM Ref_document_types", "table_name": "Ref_document_types", "query_description": "Show all document type codes, document type names, document type descriptions.", "results_description": "The document with code BK is a book with a description of excellent.", "result": ",Document_Type_Code,Document_Type_Name,Document_Type_Description\n0,BK,Book,excellent\n", "difficulty": "large_select"}, {"table_id": "Financial_transactions", "query": "SELECT AVG(transaction_amount) AS \"average transaction_amount\", MIN(transaction_amount) AS \"minimum transaction_amount\", MAX(transaction_amount) AS \"maximum transaction_amount\", SUM(transaction_amount) AS \"sum of transaction_amount\" \n FROM Financial_transactions", "table_name": "Financial_transactions", "query_description": "Return the average, minimum, maximum, and total transaction amounts.", "results_description": "The transaction amounts have a sum of 19935.839999999997, an average of 1329.0559999999998, a maximum of 1979.66 and a minimum of 368.46.", "result": ",sum of transaction_amount,average transaction_amount,maximum transaction_amount,minimum transaction_amount\n0,19935.839999999997,1329.0559999999998,1979.66,368.46\n", "difficulty": "aggregate"}, {"table_id": "ROLES", "query": "SELECT role_code \n FROM ROLES", "table_name": "ROLES", "query_description": "What are all role codes?", "results_description": "The role codes are ED", "result": ",role_code\n0,ED\n", "difficulty": "small_select"}, {"table_id": "phone", "query": "SELECT Name, Carrier \n FROM phone \n WHERE Carrier = 'Sprint' OR Carrier = 'TMobile'", "table_name": "phone", "query_description": "Show the names of phones with carrier either \"Sprint\" or \"TMobile\".", "results_description": "The phone named IPhone 5s has carrier Sprint.", "result": ",Name,Carrier\n0,IPhone 5s,Sprint\n", "difficulty": "small_select"}, {"table_id": "product", "query": "SELECT product, max_page_size, pages_per_minute_color \n FROM product \n WHERE max_page_size = 'A4' AND pages_per_minute_color < 5", "table_name": "product", "query_description": "What are the products with the maximum page size A4 that also have a pages per minute color smaller than 5?", "results_description": "The Xerox Travel Scanner 100 product has a maximum page size A4 and a pages per minute color of 4", "result": ",product,max_page_size,pages_per_minute_color\n0,Xerox Travel Scanner 100,A4,4.0\n", "difficulty": "small_select"}, {"table_id": "Apartment_Bookings", "query": "SELECT booking_start_date, booking_end_date \n FROM Apartment_Bookings", "table_name": "Apartment_Bookings", "query_description": "Show the start dates and end dates of all the apartment bookings.", "results_description": "The bookings date start from 2016-09-26 17:13:49 and end on the date 2017-10-07 11:38:48", "result": ",booking_end_date,booking_start_date\n0,2017-10-07 11:38:48,2016-09-26 17:13:49\n", "difficulty": "small_select"}, {"table_id": "bank", "query": "SELECT SUM(no_of_customers) AS \"sum of no_of_customers\" \n FROM bank", "table_name": "bank", "query_description": "What is the total number of customers across banks?", "results_description": "There are 1146 customers across banks", "result": ",sum of no_of_customers\n0,1146\n", "difficulty": "aggregate"}, {"table_id": "university", "query": "SELECT school, founded, affiliation \n FROM university \n WHERE founded > 1850 OR affiliation = 'Public'", "table_name": "university", "query_description": "Find the schools that were either founded after 1850 or public.", "results_description": "The school University of Delaware was founded in 1743 and is public.", "result": ",School,Founded,Affiliation\n0,University of Delaware,1743.0,Public\n", "difficulty": "small_select"}, {"table_id": "channel", "query": "SELECT name, OWNER \n FROM channel \n WHERE OWNER <> 'CCTV'", "table_name": "channel", "query_description": "Find the names of channels that are not owned by CCTV.", "results_description": "The channel Hunan Satellite TV is owned by HBS.", "result": ",Name,Owner\n0,Hunan Satellite TV,HBS\n", "difficulty": "small_select"}, {"table_id": "products, Manufacturers", "query": "SELECT T1.Name AS \"products Name\", MAX(T1.Price) AS \"maximum Price\", T2.name AS \"Manufacturers name\" \n FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code \n GROUP BY T2.name", "table_name": "products, Manufacturers", "query_description": "Select the name of each manufacturer along with the name and price of its most expensive product.", "results_description": "The product DVD drive is manufactured by Creative Labs and has a price of 180.", "result": ",maximum Price,products Name,Manufacturers name\n0,180,DVD drive,Creative Labs\n", "difficulty": "join_aggregate"}, {"table_id": "Sportsinfo, Student", "query": "SELECT SUM(hoursperweek) AS \"sum of hoursperweek\", SUM(gamesplayed) AS \"sum of gamesplayed\", T2.age AS \"Student age\" \n FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID \n WHERE T2.age < 20", "table_name": "Sportsinfo, Student", "query_description": "Show total hours per week and number of games played for students under 20.", "results_description": "Students whose age is 18 played a total of 257 games and a total of 158 hours per week", "result": ",Student age,sum of gamesplayed,sum of hoursperweek\n0,18,257,158\n", "difficulty": "join_aggregate"}, {"table_id": "wrestler", "query": "SELECT Reign, Days_held \n FROM wrestler", "table_name": "wrestler", "query_description": "Show the reign and days held of wrestlers.", "results_description": "The reign of wrestlers is 1 and it held 344 days", "result": ",Reign,Days_held\n0,1,344\n", "difficulty": "small_select"}, {"table_id": "Person", "query": "SELECT name, age \n FROM Person \n WHERE age < 30", "table_name": "Person", "query_description": "What is the name of the person whose age is below 30?", "results_description": "Alice is 25 years old.", "result": ",age,name\n0,25,Alice\n", "difficulty": "small_select"}, {"table_id": "Settlements", "query": "SELECT Date_Claim_Made, Date_Claim_Settled \n FROM Settlements", "table_name": "Settlements", "query_description": "What are the claim dates and settlement dates of all the settlements?", "results_description": "The settlement claim was made in 2018-08-07 and it was settled in 2018-01-16.", "result": ",Date_Claim_Made,Date_Claim_Settled\n0,2018-08-07,2018-01-16\n", "difficulty": "small_select"}, {"table_id": "city", "query": "SELECT Status \n FROM city \n GROUP BY Status ORDER BY COUNT(*) ASC", "table_name": "city", "query_description": "Return the different statuses of cities, ascending by frequency.", "results_description": "City's status is town.", "result": ",Status\n0,Town\n", "difficulty": "aggregate_group_by"}, {"table_id": "CLASS, enroll, student", "query": "SELECT T3.stu_fname AS \"student stu_fname\", T1.crs_code AS \"CLASS crs_code\" \n 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 \n WHERE T1.crs_code = 'ACCT-211'", "table_name": "CLASS, enroll, student", "query_description": "What is the first name of each student enrolled in class ACCT-211?", "results_description": "The student with first name William is enrolled in the course ACCT-211.", "result": ",CLASS crs_code,student stu_fname\n0,ACCT-211,William\n", "difficulty": "join"}, {"table_id": "invoices", "query": "SELECT SUM(total) AS \"sum of total\", billing_state, billing_city \n FROM invoices \n WHERE billing_city = 'Chicago' AND billing_state = 'IL'", "table_name": "invoices", "query_description": "What are the total amount of money in the invoices billed from Chicago, Illinois?", "results_description": "The total invoices in the city of Chicago, state of IL, is 43.62.", "result": ",billing_city,sum of total,billing_state\n0,Chicago,43.62,IL\n", "difficulty": "aggregate"}, {"table_id": "Ref_locations", "query": "SELECT location_code, location_name \n FROM Ref_locations", "table_name": "Ref_locations", "query_description": "What are all the location codes and location names?", "results_description": "The location name is Brazil and the location code is b", "result": ",Location_Code,Location_Name\n0,b,Brazil\n", "difficulty": "small_select"}, {"table_id": "accounts, checking, savings", "query": "SELECT T3.balance AS \"savings balance\", T2.balance AS \"checking balance\" \n 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", "table_name": "accounts, checking, savings", "query_description": "What is the savings balance of the account belonging to the customer with the highest checking balance?", "results_description": "The savings balance is 200000 and the checking balance is 10000.", "result": ",savings balance,checking balance\n0,200000.0,10000.0\n", "difficulty": "join"}, {"table_id": "student", "query": "SELECT COUNT(*) AS \"count of student\", age, sex \n FROM student \n WHERE sex = 'F' AND age < 25", "table_name": "student", "query_description": "How many girl students who are younger than 25?", "results_description": "9 female students are 18 years old", "result": ",Age,Sex,count of student\n0,18,F,9\n", "difficulty": "aggregate"}, {"table_id": "Companies", "query": "SELECT COUNT(*) AS \"count of Companies\", Industry \n FROM Companies \n WHERE Industry = 'Banking' OR Industry = 'Conglomerate'", "table_name": "Companies", "query_description": "Find the number of companies whose industry is \"Banking\" or \"Conglomerate\",", "results_description": "There are 10 companies in the industry of Banking.", "result": ",Industry,count of Companies\n0,Banking,10\n", "difficulty": "aggregate"}, {"table_id": "ALBUM", "query": "SELECT COUNT(*) AS \"count of ALBUM\" \n FROM ALBUM", "table_name": "ALBUM", "query_description": "Find the number of albums.", "results_description": "There are 347 albums.", "result": ",count of ALBUM\n0,347\n", "difficulty": "aggregate"}, {"table_id": "Customers", "query": "SELECT customer_status_code \n FROM Customers \n GROUP BY customer_status_code ORDER BY COUNT(*) ASC", "table_name": "Customers", "query_description": "What is the status code with the least number of customers?", "results_description": "The status code Good Customer has the least number of customers.", "result": ",customer_status_code\n0,Good Customer\n", "difficulty": "aggregate_group_by"}, {"table_id": "country", "query": "SELECT Country_name, Capital \n FROM country", "table_name": "country", "query_description": "What are the names and capitals of each country?", "results_description": "Jakarta is the capital of Indonesia.", "result": ",Capital,Country_name\n0,Jakarta,Indonesia\n", "difficulty": "small_select"}, {"table_id": "HOTELS", "query": "SELECT COUNT(*) AS \"count of HOTELS\" \n FROM HOTELS", "table_name": "HOTELS", "query_description": "Find the total number of available hotels.", "results_description": "There are 20 hotels in total.", "result": ",count of HOTELS\n0,20\n", "difficulty": "aggregate"}, {"table_id": "Representative", "query": "SELECT Name, Party \n FROM Representative \n WHERE Party <> 'Republican'", "table_name": "Representative", "query_description": "What are the names of representatives whose party is not \"Republican\"?", "results_description": "John Quayle belongs to a \"Democratic\" party.", "result": ",Name,Party\n0,John Quayle,Democratic\n", "difficulty": "small_select"}, {"table_id": "race", "query": "SELECT CLASS \n FROM race \n GROUP BY CLASS ORDER BY COUNT(*) DESC", "table_name": "race", "query_description": "Give the class of races that is most common.", "results_description": "The most common class is DP/GT.", "result": ",Class\n0,DP/GT\n", "difficulty": "aggregate_group_by"}, {"table_id": "Students", "query": "SELECT email_address, last_name, first_name \n FROM Students \n WHERE first_name = 'Emma' AND last_name = 'Rohan'", "table_name": "Students", "query_description": "What is the email of the student with first name \"Emma\" and last name \"Rohan\"?", "results_description": "The student with first name Emma and last name Rohan has the email address derrick.jenkins@example.com.", "result": ",last_name,first_name,email_address\n0,Rohan,Emma,derrick.jenkins@example.com\n", "difficulty": "small_select"}, {"table_id": "authors", "query": "SELECT COUNT(*) AS \"count of authors\" \n FROM authors", "table_name": "authors", "query_description": "Count the number of authors.", "results_description": "There are 13 authors.", "result": ",count of authors\n0,13\n", "difficulty": "aggregate"}, {"table_id": "dorm", "query": "SELECT dorm_name, student_capacity \n FROM dorm \n WHERE student_capacity > 300", "table_name": "dorm", "query_description": "Find the name of dorms that can accommodate more than 300 students.", "results_description": "The Fawlty Towers dorms can accommodate 355 students", "result": ",dorm_name,student_capacity\n0,Fawlty Towers,355\n", "difficulty": "small_select"}, {"table_id": "enzyme", "query": "SELECT COUNT(*) AS \"count of enzyme\" \n FROM enzyme", "table_name": "enzyme", "query_description": "How many kinds of enzymes are there?", "results_description": "There are 8 enzymes in the database", "result": ",count of enzyme\n0,8\n", "difficulty": "aggregate"}, {"table_id": "mountain", "query": "SELECT Name, Prominence, Height \n FROM mountain \n WHERE Height > 5000 OR Prominence > 1000", "table_name": "mountain", "query_description": "Show the names of mountains with height more than 5000 or prominence more than 1000.", "results_description": "The mountain Kibo (Uhuru Pk) has a height of 5895 and a prominence of 5885", "result": ",Name,Height,Prominence\n0,Kibo (Uhuru Pk),5895.0,5885.0\n", "difficulty": "small_select"}, {"table_id": "school", "query": "SELECT AVG(Enrollment) AS \"average Enrollment\" \n FROM school", "table_name": "school", "query_description": "What is the average enrollment of schools?", "results_description": "The average school enrollment is 1663.3333333333333.", "result": ",average Enrollment\n0,1663.3333333333333\n", "difficulty": "aggregate"}, {"table_id": "products", "query": "SELECT AVG(price) AS \"average price\" \n FROM products", "table_name": "products", "query_description": "Compute the average price of all the products.", "results_description": "The average price of all the products is 153.72727272727272.", "result": ",average price\n0,153.72727272727272\n", "difficulty": "aggregate"}, {"table_id": "country", "query": "SELECT Official_native_language \n FROM country \n WHERE Official_native_language LIKE '%English%'", "table_name": "country", "query_description": "What are the official native languages that contain the string \"English\".", "results_description": "The official native language is Irish English.", "result": ",Official_native_language\n0,Irish English\n", "difficulty": "small_select"}, {"table_id": "customers", "query": "SELECT customer_email, customer_name, payment_method \n FROM customers \n WHERE payment_method = 'Visa'", "table_name": "customers", "query_description": "List the names and emails of customers who payed by Visa card.", "results_description": "The customer named Ron Emard has the email shaniya45@example.net and they payed by Visa card.", "result": ",customer_name,customer_email,payment_method\n0,Ron Emard,shaniya45@example.net,Visa\n", "difficulty": "small_select"}, {"table_id": "Customers", "query": "SELECT date_became_customer, last_name, first_name \n FROM Customers \n WHERE first_name = 'Carole' AND last_name = 'Bernhard'", "table_name": "Customers", "query_description": "When did Carole Bernhard first become a customer?", "results_description": "Carol Berbhard first become customer at 2016-05-11 17:03:48", "result": ",last_name,first_name,date_became_customer\n0,Bernhard,Carole,2016-05-11 17:03:48\n", "difficulty": "small_select"}, {"table_id": "acceptance, submission", "query": "SELECT T1.Result AS \"acceptance Result\", T2.Scores AS \"submission Scores\" \n FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC", "table_name": "acceptance, submission", "query_description": "Which submission received the highest score in acceptance result. Show me the result.", "results_description": "The highest submission score that got rejected was 82.", "result": ",acceptance Result,submission Scores\n0,Rejected,82.0\n", "difficulty": "join"}, {"table_id": "HOST", "query": "SELECT Nationality \n FROM HOST \n GROUP BY Nationality ORDER BY COUNT(*) DESC", "table_name": "HOST", "query_description": "Which nationality has the most hosts?", "results_description": "The nationality is United States.", "result": ",Nationality\n0,United States\n", "difficulty": "aggregate_group_by"}, {"table_id": "product, store_product, store", "query": "SELECT t1.product AS \"product product\", t3.store_name AS \"store store_name\" \n 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 \n WHERE t3.store_name = 'Miramichi'", "table_name": "product, store_product, store", "query_description": "What products are available at store named \"Miramichi\"?", "results_description": "The product Fujitsu fi-6130 A4 Series Scanner is available in the store Miramichi.", "result": ",product product,store store_name\n0,Fujitsu fi-6130 A4 Series Scanner,Miramichi\n", "difficulty": "join"}, {"table_id": "artist", "query": "SELECT COUNT(*) AS \"count of artist\" \n FROM artist", "table_name": "artist", "query_description": "How many artists are there?", "results_description": "There are 7 artists.", "result": ",count of artist\n0,7\n", "difficulty": "aggregate"}, {"table_id": "airport", "query": "SELECT name \n FROM airport \n WHERE name LIKE '%international%'", "table_name": "airport", "query_description": "Which of the airport names contains the word 'international'?", "results_description": "The airport with name Logan International Airport", "result": ",name\n0,Logan International Airport\n", "difficulty": "small_select"}, {"table_id": "student, lives_in, dorm", "query": "SELECT AVG(T1.age) AS \"average age\", T3.dorm_name AS \"dorm dorm_name\" \n FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid \n GROUP BY T3.dorm_name", "table_name": "student, lives_in, dorm", "query_description": "What is the average age for each dorm and what are the names of each dorm?", "results_description": "The average age in the Anonymous Donor Hall is 19.66", "result": ",average age,dorm dorm_name\n0,19.666666666666668,Anonymous Donor Hall\n", "difficulty": "join_aggregate"}, {"table_id": "artist, song", "query": "SELECT AVG(T2.rating) AS \"average rating\", T1.gender AS \"artist gender\" \n FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name \n WHERE T1.gender = 'Female'", "table_name": "artist, song", "query_description": "What is the average rating of songs produced by female artists?", "results_description": "The female gender has an average rating of 7.333333333333333.", "result": ",artist gender,average rating\n0,Female,7.333333333333333\n", "difficulty": "join_aggregate"}, {"table_id": "payments", "query": "SELECT payment_date, amount_paid, payment_type_code \n FROM payments \n WHERE amount_paid > 300 OR payment_type_code = 'Check'", "table_name": "payments", "query_description": "What are the payment date of the payment with amount paid higher than 300 or with payment type is 'Check'", "results_description": "The amount paid in 2018-03-09 16:28:00 was with payment code check.", "result": ",amount_paid,payment_date,payment_type_code\n0,206.27,2018-03-09 16:28:00,Check\n", "difficulty": "small_select"}, {"table_id": "university", "query": "SELECT school, LOCATION, affiliation \n FROM university \n WHERE affiliation = 'Public'", "table_name": "university", "query_description": "List all public schools and their locations.", "results_description": "The University of Delaware is located in Newark, DE and it is public.", "result": ",School,Location,Affiliation\n0,University of Delaware,\"Newark, DE\",Public\n", "difficulty": "small_select"}, {"table_id": "College", "query": "SELECT cName, enr, state \n FROM College \n WHERE enr > 10000 AND state = 'LA'", "table_name": "College", "query_description": "What are the names and enrollment numbers for colleges that have more than 10000 enrolled and are located in Louisiana?", "results_description": "The college named LSU in the state of LA has enr 18000.", "result": ",enr,cName,state\n0,18000,LSU,LA\n", "difficulty": "small_select"}, {"table_id": "Project_outcomes", "query": "SELECT COUNT(*) AS \"count of Project_outcomes\", outcome_code \n FROM Project_outcomes \n WHERE outcome_code = 'Patent'", "table_name": "Project_outcomes", "query_description": "How many Patent outcomes are generated from all the projects?", "results_description": "There are 5 patent outcomes generated from the projects", "result": ",outcome_code,count of Project_outcomes\n0,Patent,5\n", "difficulty": "aggregate"}, {"table_id": "Allergy_type", "query": "SELECT COUNT(*) AS \"count of Allergy_type\", allergytype \n FROM Allergy_type \n WHERE allergytype = 'animal'", "table_name": "Allergy_type", "query_description": "How many animal type allergies exist?", "results_description": "There exist 4 animal allergies.", "result": ",AllergyType,count of Allergy_type\n0,animal,4\n", "difficulty": "aggregate"}, {"table_id": "camera_lens", "query": "SELECT name \n FROM camera_lens \n WHERE name LIKE '%Digital%'", "table_name": "camera_lens", "query_description": "List the camera lens names containing substring \"Digital\".", "results_description": "The name of the camera lens is Olympus M.Zuiko Digital ED 45mm f/1.8.", "result": ",name\n0,Olympus M.Zuiko Digital ED 45mm f/1.8\n", "difficulty": "small_select"}, {"table_id": "employees", "query": "SELECT phone_number, salary \n FROM employees \n WHERE salary BETWEEN 8000 AND 12000", "table_name": "employees", "query_description": "what is the phone number of employees whose salary is in the range of 8000 and 12000?", "results_description": "The salary of the employee is 9000 and the phone number is 590.423.4567.", "result": ",SALARY,PHONE_NUMBER\n0,9000,590.423.4567\n", "difficulty": "small_select"}, {"table_id": "Project_Staff", "query": "SELECT role_code \n FROM Project_Staff \n GROUP BY role_code ORDER BY COUNT(*) DESC", "table_name": "Project_Staff", "query_description": "Which role is most common for the staff?", "results_description": "The most common staff role is \"researcher\"", "result": ",role_code\n0,researcher\n", "difficulty": "aggregate_group_by"}, {"table_id": "chip_model", "query": "SELECT COUNT(*) AS \"count of chip_model\", wifi \n FROM chip_model \n WHERE wifi = 'No'", "table_name": "chip_model", "query_description": "Count the number of chip model that do not have wifi.", "results_description": "The number of chip models that do not have wifi is 7", "result": ",WiFi,count of chip_model\n0,No,7\n", "difficulty": "aggregate"}, {"table_id": "Attribute_Definitions", "query": "SELECT attribute_data_type, attribute_name \n FROM Attribute_Definitions \n WHERE attribute_name = 'Green'", "table_name": "Attribute_Definitions", "query_description": "Find the attribute data type for the attribute named \"Green\".", "results_description": "The attribute name is Green and the data type is Bool.", "result": ",attribute_name,attribute_data_type\n0,Green,Bool\n", "difficulty": "small_select"}, {"table_id": "program", "query": "SELECT name, origin, OWNER \n FROM program", "table_name": "program", "query_description": "List the name, origin and owner of each program.", "results_description": "The program Aniworld is owned by Hunan Broadcasting System (HBS) and its origin is in Hunan.", "result": ",Name,Owner,Origin\n0,Aniworld,Hunan Broadcasting System (HBS),Hunan\n", "difficulty": "large_select"}, {"table_id": "Staff", "query": "SELECT COUNT(*) AS \"count of Staff\" \n FROM Staff", "table_name": "Staff", "query_description": "How many staff in total?", "results_description": "In total there are 15 staff.", "result": ",count of Staff\n0,15\n", "difficulty": "aggregate"}, {"table_id": "products, Manufacturers", "query": "SELECT T1.Name AS \"products Name\", MAX(T1.Price) AS \"maximum Price\", T2.name AS \"Manufacturers name\" \n FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code \n GROUP BY T2.name", "table_name": "products, Manufacturers", "query_description": "For each manufacturer name, what are the names and prices of their most expensive product?", "results_description": "The manufacturer Creative Labs has DVD drive priced 180.", "result": ",maximum Price,products Name,Manufacturers name\n0,180,DVD drive,Creative Labs\n", "difficulty": "join_aggregate"}, {"table_id": "customer_contact_channels", "query": "SELECT AVG(active_to_date - active_from_date) AS \"average active_to_date - active_from_date\" \n FROM customer_contact_channels", "table_name": "customer_contact_channels", "query_description": "Compute the average active time span of contact channels.", "results_description": "The average active time span of contact channels is 0.85", "result": ",average active_to_date - active_from_date\n0,0.85\n", "difficulty": "aggregate"}, {"table_id": "customer_address_history, customers, addresses", "query": "SELECT T2.customer_name AS \"customers customer_name\", T3.city AS \"addresses city\", T1.date_from AS \"customer_address_history date_from\", T1.date_to AS \"customer_address_history date_to\" \n 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", "table_name": "customer_address_history, customers, addresses", "query_description": "Show the customer name, customer address city, date from, and date to for each customer address history.", "results_description": "The customer named Madaline lives in East Rickey, and has an address history from 2015-07-23 14:37:18 to 2018-03-07 12:04:20", "result": ",addresses city,customers customer_name,customer_address_history date_to,customer_address_history date_from\n0,East Rickey,Madaline,2018-03-07 12:04:20,2015-07-23 14:37:18\n", "difficulty": "join"}, {"table_id": "book", "query": "SELECT Title, Writer \n FROM book \n WHERE Writer <> 'Elaine Lee'", "table_name": "book", "query_description": "What are the titles of the books whose writer is not \"Elaine Lee\"?", "results_description": "The Black Lamb was written by Timothy Truman", "result": ",Title,Writer\n0,The Black Lamb,Timothy Truman\n", "difficulty": "small_select"}, {"table_id": "Employee, Certificate, Aircraft", "query": "SELECT T3.name AS \"Aircraft name\", T1.name AS \"Employee name\" \n FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid \n WHERE T1.name = 'John Williams'", "table_name": "Employee, Certificate, Aircraft", "query_description": "What are the names of all aircrafts that John Williams have certificates to be able to fly?", "results_description": "The employee John Williams flies the aircraft Boeing 737-800.", "result": ",Aircraft name,Employee name\n0,Boeing 737-800,John Williams\n", "difficulty": "join"}, {"table_id": "party_host, HOST, party", "query": "SELECT T3.Location AS \"party Location\", T2.Name AS \"HOST Name\", T2.Age AS \"HOST Age\" \n 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", "table_name": "party_host, HOST, party", "query_description": "For each party, find its location and the name of its host. Sort the result in ascending order of the age of the host.", "results_description": "Carlos Delfino is 30 year old host of a party located in Various locations.", "result": ",HOST Age,HOST Name,party Location\n0,30,Carlos Delfino,Various locations\n", "difficulty": "join"}, {"table_id": "physician", "query": "SELECT name, POSITION \n FROM physician \n WHERE POSITION LIKE '%senior%'", "table_name": "physician", "query_description": "What are the names of the physicians who have 'senior' in their titles.", "results_description": "The physician Percival Cox has the title Senior Attending Physician.", "result": ",Name,Position\n0,Percival Cox,Senior Attending Physician\n", "difficulty": "small_select"}, {"table_id": "College", "query": "SELECT COUNT(*) AS \"count of College\" \n FROM College", "table_name": "College", "query_description": "How many different colleges are there?", "results_description": "There are 4 colleges", "result": ",count of College\n0,4\n", "difficulty": "aggregate"}, {"table_id": "teachers", "query": "SELECT firstname, classroom \n FROM teachers \n WHERE classroom = 110", "table_name": "teachers", "query_description": "Which teachers teach in classroom 110? Give me their first names.", "results_description": "A person with first name GEORGETTA is in classroom 110.", "result": ",Classroom,FirstName\n0,110, GEORGETTA\n", "difficulty": "small_select"}, {"table_id": "entrepreneur", "query": "SELECT Company, Investor \n FROM entrepreneur", "table_name": "entrepreneur", "query_description": "List the companies and the investors of entrepreneurs.", "results_description": "The company is Umbrolly and the investor is Duncan Bannatyne.", "result": ",Company,Investor\n0,Umbrolly,Duncan Bannatyne\n", "difficulty": "small_select"}, {"table_id": "party", "query": "SELECT minister, took_office \n FROM party \n WHERE took_office > 1961 OR took_office < 1959", "table_name": "party", "query_description": "Show the minister who took office after 1961 or before 1959.", "results_description": "The minister Dr. Kwame Nkrumah (MP) took office in 1957.", "result": ",Minister,Took_office\n0,Dr. Kwame Nkrumah (MP),1957\n", "difficulty": "small_select"}, {"table_id": "item, review", "query": "SELECT T1.title AS \"item title\", T2.rating AS \"review rating\" \n FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id \n WHERE T2.rating = 10", "table_name": "item, review", "query_description": "Find the names of goods that receive a rating of 10.", "results_description": "The orange has a rating equal to 10", "result": ",item title,review rating\n0,orange,10\n", "difficulty": "join"}, {"table_id": "Project_Staff", "query": "SELECT date_from, date_to, role_code \n FROM Project_Staff \n WHERE role_code = 'researcher'", "table_name": "Project_Staff", "query_description": "When did researchers start and stop working?", "results_description": "The date researchers started working from is 1981-10-09 21:32:53 until the date 2004-12-16 13:03:36", "result": ",date_to,date_from,role_code\n0,2004-12-16 13:03:36,1981-10-09 21:32:53,researcher\n", "difficulty": "small_select"}, {"table_id": "news_report, event, journalist", "query": "SELECT T3.Name AS \"journalist Name\", T2.Date AS \"event Date\" \n 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", "table_name": "news_report, event, journalist", "query_description": "Show the names of journalists and the dates of the events they reported.", "results_description": "Reporter Herbert Swindells reported an event at October 7 2010", "result": ",event Date,journalist Name\n0,7 October 2010,Herbert Swindells\n", "difficulty": "join"}, {"table_id": "body_builder", "query": "SELECT MIN(snatch) AS \"minimum snatch\" \n FROM body_builder", "table_name": "body_builder", "query_description": "What is the minimum snatch score?", "results_description": "The minimum snatch score is 130", "result": ",minimum snatch\n0,130.0\n", "difficulty": "aggregate"}, {"table_id": "APPELLATIONS", "query": "SELECT Area, County \n FROM APPELLATIONS", "table_name": "APPELLATIONS", "query_description": "List the area and county of all appelations.", "results_description": "Sonoma is a count in the North Coast area", "result": ",Area,County\n0,North Coast,Sonoma\n", "difficulty": "small_select"}, {"table_id": "races", "query": "SELECT name, YEAR \n FROM races \n WHERE YEAR BETWEEN 2009 AND 2011", "table_name": "races", "query_description": "What are the names of races held between 2009 and 2011?", "results_description": "Australian Grand Prix was held in 2009.", "result": ",name,year\n0,Australian Grand Prix,2009\n", "difficulty": "small_select"}, {"table_id": "stadium, event", "query": "SELECT t1.name AS \"stadium name\", t1.capacity AS \"stadium capacity\", t2.name AS \"event name\" \n FROM stadium AS t1 JOIN event AS t2 ON t1.id = t2.stadium_id \n WHERE t2.name = 'World Junior'", "table_name": "stadium, event", "query_description": "Find the name and capacity of the stadium where the event named \"World Junior\" happened.", "results_description": "The \"World Junior\" event happened at the Baku Olympic stadium, which has a capacity of 68000", "result": ",event name,stadium name,stadium capacity\n0,World Junior,Baku Olympic Stadium,68000\n", "difficulty": "join"}, {"table_id": "Ref_document_types", "query": "SELECT document_type_code, document_type_name, document_type_description \n FROM Ref_document_types", "table_name": "Ref_document_types", "query_description": "What are the codes, names, and descriptions of the different document types?", "results_description": "The document type code is excellent, the document type name is Book, and the document type description is BK", "result": ",Document_Type_Code,Document_Type_Name,Document_Type_Description\n0,BK,Book,excellent\n", "difficulty": "large_select"}, {"table_id": "campuses", "query": "SELECT campus, county \n FROM campuses \n WHERE county = 'Los Angeles'", "table_name": "campuses", "query_description": "List the campuses in Los Angeles county.", "results_description": "The campus of California State University-Dominguez Hills is in the Los Angeles county.", "result": ",Campus,County\n0,California State University-Dominguez Hills,Los Angeles\n", "difficulty": "small_select"}, {"table_id": "actor", "query": "SELECT Name, Age \n FROM actor \n WHERE Age <> 20", "table_name": "actor", "query_description": "List the name of actors whose age is not 20.", "results_description": "Actor Ray Meagher is 26 years old", "result": ",age,Name\n0,26,Ray Meagher\n", "difficulty": "small_select"}, {"table_id": "Apartment_Buildings", "query": "SELECT building_short_name, building_manager \n FROM Apartment_Buildings \n WHERE building_manager = 'Emma'", "table_name": "Apartment_Buildings", "query_description": "Show the short names of the buildings managed by \"Emma\".", "results_description": "The building whose manager is Emma has the short name Normandie Court", "result": ",building_manager,building_short_name\n0,Emma,Normandie Court\n", "difficulty": "small_select"}, {"table_id": "classroom", "query": "SELECT COUNT(*) AS \"count of classroom\", building \n FROM classroom \n WHERE building = 'Lamberton'", "table_name": "classroom", "query_description": "Count the number of classrooms in Lamberton.", "results_description": "The Lamberton building has 2 classrooms", "result": ",building,count of classroom\n0,Lamberton,2\n", "difficulty": "aggregate"}, {"table_id": "dependent", "query": "SELECT Dependent_name, relationship \n FROM dependent \n WHERE relationship = 'Spouse'", "table_name": "dependent", "query_description": "find all dependent names who have a spouse relation with some employee.", "results_description": "The dependent Joy has the relationship spouse.", "result": ",Relationship,Dependent_name\n0,Spouse,Joy\n", "difficulty": "small_select"}, {"table_id": "employees", "query": "SELECT phone, last_name, first_name \n FROM employees \n WHERE first_name = 'Nancy' AND last_name = 'Edwards'", "table_name": "employees", "query_description": "What is employee Nancy Edwards's phone number?", "results_description": "Nancy Edwards' phone number is +1 (403) 262-3443.", "result": ",phone,last_name,first_name\n0,+1 (403) 262-3443,Edwards,Nancy\n", "difficulty": "small_select"}, {"table_id": "catalog_contents, catalog_structure", "query": "SELECT t2.catalog_level_name AS \"catalog_structure catalog_level_name\", t1.price_in_dollars AS \"catalog_contents price_in_dollars\" \n 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", "table_name": "catalog_contents, catalog_structure", "query_description": "What is the level name of the cheapest catalog (in USD)?", "results_description": "The cheapest level costs 200.78 and is on the level named Category.", "result": ",catalog_contents price_in_dollars,catalog_structure catalog_level_name\n0,200.78,Category\n", "difficulty": "join"}, {"table_id": "party", "query": "SELECT Party_Theme, LOCATION \n FROM party", "table_name": "party", "query_description": "Give me the theme and location of each party.", "results_description": "The party located in Hemkade 48 Zaandam has a Spring theme.", "result": ",Location,Party_Theme\n0,Hemkade 48 Zaandam,Spring\n", "difficulty": "small_select"}, {"table_id": "Student", "query": "SELECT Age, Lname, Fname \n FROM Student \n WHERE Fname = 'Linda' AND Lname = 'Smith'", "table_name": "Student", "query_description": "What is the age of student Linda Smith?", "results_description": "Linda Smith is 18 years old.", "result": ",Age,Fname,LName\n0,18,Linda,Smith\n", "difficulty": "small_select"}, {"table_id": "physician, trained_in, procedures", "query": "SELECT AVG(T3.cost) AS \"average cost\", T1.name AS \"physician name\" \n FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment \n WHERE T1.name = 'John Wen'", "table_name": "physician, trained_in, procedures", "query_description": "Compute the mean price of procedures physician John Wen was trained in.", "results_description": "Physician John Wen was trained in procedures whose average cost is 4324.85", "result": ",average cost,physician name\n0,4324.857142857143,John Wen\n", "difficulty": "join_aggregate"}, {"table_id": "GENRE, TRACK", "query": "SELECT MAX(Milliseconds) AS \"maximum Milliseconds\", MIN(Milliseconds) AS \"minimum Milliseconds\", T1.Name AS \"GENRE Name\" \n FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId \n WHERE T1.Name = 'Pop'", "table_name": "GENRE, TRACK", "query_description": "What are the duration of the longest and shortest pop tracks in milliseconds?", "results_description": "Pop tracks have 663426 milliseconds maximum duration and 129666 milliseconds minimum duration.", "result": ",GENRE Name,maximum Milliseconds,minimum Milliseconds\n0,Pop,663426,129666\n", "difficulty": "join_aggregate"}, {"table_id": "COURSES", "query": "SELECT COUNT(*) AS \"count of COURSES\" \n FROM COURSES", "table_name": "COURSES", "query_description": "How many courses are there in total?", "results_description": "There are 15 courses in total", "result": ",count of COURSES\n0,15\n", "difficulty": "aggregate"}, {"table_id": "Organisations, organisation_Types", "query": "SELECT organisation_details, T2.organisation_type_description AS \"organisation_Types organisation_type_description\" \n FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type \n WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details", "table_name": "Organisations, organisation_Types", "query_description": "What are the details of all organizations that are described as Sponsors and sort the results in ascending order?", "results_description": "The details of the organization that is described as Sponsor are aperiam", "result": ",organisation_details,organisation_Types organisation_type_description\n0,aperiam,Sponsor\n", "difficulty": "join"}, {"table_id": "club", "query": "SELECT clubdesc, clubname \n FROM club \n WHERE clubname = 'Tennis Club'", "table_name": "club", "query_description": "What is the description of the club named \"Tennis Club\"?", "results_description": "Tennis Club has the description \"A competitive tennis club\".", "result": ",ClubDesc,ClubName\n0,A competitive tennis club.,Tennis Club\n", "difficulty": "small_select"}, {"table_id": "Aircraft", "query": "SELECT COUNT(*) AS \"count of Aircraft\", distance \n FROM Aircraft \n WHERE distance BETWEEN 1000 AND 5000", "table_name": "Aircraft", "query_description": "What is the count of aircrafts that have a distance between 1000 and 5000?", "results_description": "9 aircrafts have a distance of 3383", "result": ",distance,count of Aircraft\n0,3383,9\n", "difficulty": "aggregate"}, {"table_id": "TRANSACTIONS, Transactions_Lots", "query": "SELECT T2.lot_id AS \"Transactions_Lots lot_id\", AVG(amount_of_transaction) AS \"average amount_of_transaction\" \n FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id \n GROUP BY T2.lot_id", "table_name": "TRANSACTIONS, Transactions_Lots", "query_description": "Show the average amount of transactions for different lots.", "results_description": "Lot 1 has an average amount of transactions of 101119.25319999999", "result": ",Transactions_Lots lot_id,average amount_of_transaction\n0,1.0,101119.25319999999\n", "difficulty": "join_aggregate"}, {"table_id": "accounts, checking, savings", "query": "SELECT T2.balance AS \"checking balance\", T1.name AS \"accounts name\", T3.balance AS \"savings balance\" \n 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", "table_name": "accounts, checking, savings", "query_description": "What is the name and checking balance of the account which has the lowest savings balance?", "results_description": "The account with name Weeks has a savings balance of 60 and a checking balance of 7000.", "result": ",accounts name,savings balance,checking balance\n0,Weeks,60.0,7000.0\n", "difficulty": "join"}, {"table_id": "captain", "query": "SELECT name, CLASS, rank \n FROM captain", "table_name": "captain", "query_description": "Find the name, class and rank of all captains.", "results_description": "The name is Captain Sir Henry Langford, the rank is Midshipman and the class is Third-rate ship of the line.", "result": ",Name,Rank,Class\n0,Captain Sir Henry Langford,Midshipman,Third-rate ship of the line\n", "difficulty": "large_select"}, {"table_id": "store", "query": "SELECT TYPE, COUNT(*) AS \"count of store\" \n FROM store \n GROUP BY TYPE", "table_name": "store", "query_description": "For each type of store, how many of them are there?", "results_description": "There are 2 stores with type City Mall.", "result": ",Type,count of store\n0,City Mall,2\n", "difficulty": "aggregate_group_by"}, {"table_id": "player, school", "query": "SELECT T1.Team AS \"player Team\", T2.Location AS \"school Location\" \n FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID", "table_name": "player, school", "query_description": "For each player, show the team and the location of school they belong to.", "results_description": "The Tampa Bay Devil Rays team is located in the school of Milsons Point.", "result": ",player Team,school Location\n0,Tampa Bay Devil Rays,Milsons Point\n", "difficulty": "join"}, {"table_id": "film", "query": "SELECT COUNT(*) AS \"count of film\", title \n FROM film \n WHERE title LIKE '%Dummy%'", "table_name": "film", "query_description": "How many films have the word 'Dummy' in their titles?", "results_description": "There is 1 film titled The Case of the Smart Dummy.", "result": ",Title,count of film\n0,The Case of the Smart Dummy,1\n", "difficulty": "aggregate"}, {"table_id": "customers, customer_contact_channels", "query": "SELECT t1.customer_name AS \"customers customer_name\", t2.active_from_date AS \"customer_contact_channels active_from_date\", t2.channel_code AS \"customer_contact_channels channel_code\" \n FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id \n WHERE t2.channel_code = 'Email'", "table_name": "customers, customer_contact_channels", "query_description": "What are the name and active date of the customers whose contact channel code is email?", "results_description": "The customer named Devin Mills has email as his contact channel code and is active from 2017-12-07 18:18:15.", "result": ",customers customer_name,customer_contact_channels channel_code,customer_contact_channels active_from_date\n0,Devin Mills,Email,2017-12-07 18:18:15\n", "difficulty": "join"}, {"table_id": "HOTELS", "query": "SELECT COUNT(*) AS \"count of HOTELS\" \n FROM HOTELS", "table_name": "HOTELS", "query_description": "How many available hotels are there in total?", "results_description": "There are 20 hotels.", "result": ",count of HOTELS\n0,20\n", "difficulty": "aggregate"}, {"table_id": "aircraft, airport_aircraft, airport", "query": "SELECT AVG(T3.Total_Passengers) AS \"average Total_Passengers\", T1.Aircraft AS \"aircraft Aircraft\" \n 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 \n WHERE T1.Aircraft = 'Robinson R-22'", "table_name": "aircraft, airport_aircraft, airport", "query_description": "What is the average total number of passengers of airports that are associated with aircraft \"Robinson R-22\"?", "results_description": "The aircaft Robinson R-22 has 34205887 average number of total passengers.", "result": ",aircraft Aircraft,average Total_Passengers\n0,Robinson R-22,34205887.0\n", "difficulty": "join_aggregate"}, {"table_id": "station", "query": "SELECT AVG(lat) AS \"average lat\", AVG(long) AS \"average long\", city \n FROM station \n WHERE city = 'San Jose'", "table_name": "station", "query_description": "What is the average latitude and longitude of stations located in San Jose city?", "results_description": "The city of San Jose has an average latitude of 37.3364135625 and average longitude of \t-121.89160575.", "result": ",city,average lat,average long\n0,San Jose,37.3364135625,-121.89160575\n", "difficulty": "aggregate"}, {"table_id": "STUDENT", "query": "SELECT AVG(Age) AS \"average Age\", Sex \n FROM STUDENT \n WHERE Sex = 'F'", "table_name": "STUDENT", "query_description": "Find the average age of female students.", "results_description": "Female's average age is 19.7.", "result": ",Sex,average Age\n0,F,19.7\n", "difficulty": "aggregate"}, {"table_id": "building", "query": "SELECT COUNT(*) AS \"count of building\" \n FROM building", "table_name": "building", "query_description": "How many buildings are there?", "results_description": "There are 8 buildings.", "result": ",count of building\n0,8\n", "difficulty": "aggregate"}, {"table_id": "player", "query": "SELECT name_first, name_last, height, weight \n FROM player \n WHERE weight > 220 OR height < 75", "table_name": "player", "query_description": "What are the first name and last name of the players who have weight above 220 or height below 75?", "results_description": "The names of the players with heights above 220 and below 75 are Aaron and their last names are Hank. Their heights are 72 and their weights are 180 respectively.", "result": ",height,weight,name_last,name_first\n0,72,180,Aaron,Hank\n", "difficulty": "small_select"}, {"table_id": "customers", "query": "SELECT customer_name \n FROM customers \n WHERE customer_name LIKE '%Alex%'", "table_name": "customers", "query_description": "Find the name of all customers whose name contains \"Alex\".", "results_description": "One of the customers whose name contains \"Alex\", is Prof. Alexzander Hamill", "result": ",customer_name\n0,Prof. Alexzander Hamill\n", "difficulty": "small_select"}, {"table_id": "aircraft, airport_aircraft, airport", "query": "SELECT T1.Aircraft AS \"aircraft Aircraft\", T3.Airport_Name AS \"airport Airport_Name\" \n 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 \n WHERE T3.Airport_Name = 'London Gatwick'", "table_name": "aircraft, airport_aircraft, airport", "query_description": "What are the names of all the aircrafts associated with London Gatwick airport?", "results_description": "The aircraft Robinson R-22 is associated with London Gatwick airport", "result": ",aircraft Aircraft,airport Airport_Name\n0,Robinson R-22,London Gatwick\n", "difficulty": "join"}, {"table_id": "stadium", "query": "SELECT COUNT(*) AS \"count of stadium\" \n FROM stadium", "table_name": "stadium", "query_description": "How many stadiums are there?", "results_description": "There are 10 stadiums", "result": ",count of stadium\n0,10\n", "difficulty": "aggregate"}, {"table_id": "airports", "query": "SELECT name, city, country, elevation \n FROM airports \n WHERE city = 'New York'", "table_name": "airports", "query_description": "What is the name, city, country, and elevation for every airport in the city of New York?", "results_description": "La Guardia Airport in NY, USA has an elevation of 21", "result": ",city,name,country,elevation\n0,New York,La Guardia Airport,United States,21\n", "difficulty": "large_select"}, {"table_id": "tryout, player", "query": "SELECT MIN(T2.HS) AS \"minimum HS\", T1.pPos AS \"tryout pPos\" \n FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID \n GROUP BY T1.pPos", "table_name": "tryout, player", "query_description": "For each position, what is the minimum time students spent practicing?", "results_description": "For the position of goalie the minimum practice time was 1200 hours.", "result": ",minimum HS,tryout pPos\n0,1200,goalie\n", "difficulty": "join_aggregate"}, {"table_id": "claims_processing_stages", "query": "SELECT claim_status_description, claim_status_name \n FROM claims_processing_stages \n WHERE claim_status_name = 'Open'", "table_name": "claims_processing_stages", "query_description": "What is the description of the claim status \"Open\"?", "results_description": "The status name of the claim is Open and its description is Open a new claim.", "result": ",Claim_Status_Name,Claim_Status_Description\n0,Open,Open a new claim\n", "difficulty": "small_select"}, {"table_id": "customers", "query": "SELECT COUNT(*) AS \"count of customers\", city \n FROM customers \n WHERE city = 'Prague'", "table_name": "customers", "query_description": "How many customers live in Prague city?", "results_description": "2 customers live in the city of Prague.", "result": ",city,count of customers\n0,Prague,2\n", "difficulty": "aggregate"}, {"table_id": "employees, employees", "query": "SELECT T2.first_name AS \"employees first_name\", T2.last_name AS \"employees last_name\", COUNT(T1.reports_to) AS \"count of employees\" \n FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id \n GROUP BY T1.reports_to ORDER BY COUNT(T1.reports_to) DESC", "table_name": "employees, employees", "query_description": "Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee.", "results_description": "Nancy Edwards manages 3 employees.", "result": ",count of employees,employees last_name,employees first_name\n0,3,Edwards,Nancy\n", "difficulty": "join_aggregate"}, {"table_id": "Marketing_Regions", "query": "SELECT Marketing_Region_Descriptrion, Marketing_Region_Name \n FROM Marketing_Regions \n WHERE Marketing_Region_Name = 'China'", "table_name": "Marketing_Regions", "query_description": "Find the marketing region description of China?", "results_description": "The marketing region of Chine is our largest market", "result": ",Marketing_Region_Name,Marketing_Region_Descriptrion\n0,China,Our largest market\n", "difficulty": "small_select"}, {"table_id": "COURSE", "query": "SELECT CName, Days \n FROM COURSE \n WHERE Days = 'MTW'", "table_name": "COURSE", "query_description": "Which courses are taught on days MTW?", "results_description": "In Mondays, Tuesdays and Wednesdays, the course Computer Literacy is taught.", "result": ",Days,CName\n0,MTW,COMPUTER LITERACY\n", "difficulty": "small_select"}, {"table_id": "film", "query": "SELECT COUNT(*) AS \"count of film\", title \n FROM film \n WHERE title LIKE '%Dummy%'", "table_name": "film", "query_description": "Count the number of films whose title contains the word 'Dummy'.", "results_description": "There is 1 film whose title contains the word Dummy.", "result": ",Title,count of film\n0,The Case of the Smart Dummy,1\n", "difficulty": "aggregate"}, {"table_id": "Faculty", "query": "SELECT COUNT(*) AS \"count of Faculty\", Rank, building \n FROM Faculty \n WHERE Rank = 'Professor' AND building = 'NEB'", "table_name": "Faculty", "query_description": "Count the number of Professors who have office in building NEB.", "results_description": "5 professors have office in building NEB", "result": ",Rank,Building,count of Faculty\n0,Professor,NEB,5\n", "difficulty": "aggregate"}, {"table_id": "roller_coaster", "query": "SELECT Status, LENGTH, Height \n FROM roller_coaster \n WHERE LENGTH > 3300 OR Height > 100", "table_name": "roller_coaster", "query_description": "Show the statuses of roller coasters longer than 3300 or higher than 100.", "results_description": "The roller coaster had a height of 105, a length of 3914 and its status is operational.", "result": ",Height,Length,Status\n0,105.0,3914.0,Operating\n", "difficulty": "small_select"}, {"table_id": "customer_orders, order_items", "query": "SELECT SUM(t2.order_quantity) AS \"sum of order_quantity\", t1.order_date AS \"customer_orders order_date\" \n FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id \n WHERE t1.order_date < '2018-03-17 07:13:53'", "table_name": "customer_orders, order_items", "query_description": "What is the total amount of products purchased before 2018-03-17 07:13:53?", "results_description": "The sum of orders' quantity in 2018-02-24 13:18:49 is 45.", "result": ",sum of order_quantity,customer_orders order_date\n0,45,2018-02-24 13:18:49\n", "difficulty": "join_aggregate"}, {"table_id": "gymnast", "query": "SELECT AVG(Horizontal_Bar_Points) AS \"average Horizontal_Bar_Points\" \n FROM gymnast", "table_name": "gymnast", "query_description": "Return the average horizontal bar points across all gymnasts.", "results_description": "The average horizontal bar points of gymnasts is 9.603428571428571.", "result": ",average Horizontal_Bar_Points\n0,9.603428571428571\n", "difficulty": "aggregate"}, {"table_id": "Movie", "query": "SELECT title, director, YEAR \n FROM Movie \n WHERE director = 'James Cameron' AND YEAR > 2000", "table_name": "Movie", "query_description": "What is the name of the movie produced after 2000 and directed by James Cameron?", "results_description": "The movie Avatar was released in 2009 and was directed by James Cameron.", "result": ",year,title,director\n0,2009,Avatar,James Cameron\n", "difficulty": "small_select"}, {"table_id": "invoices", "query": "SELECT SUM(total) AS \"sum of total\", billing_state, billing_city \n FROM invoices \n WHERE billing_city = 'Chicago' AND billing_state = 'IL'", "table_name": "invoices", "query_description": "List total amount of invoice from Chicago, IL.", "results_description": "The total invoices in the city of Chicago, state IL, is 43.62.", "result": ",billing_city,sum of total,billing_state\n0,Chicago,43.62,IL\n", "difficulty": "aggregate"}, {"table_id": "flight", "query": "SELECT COUNT(*) AS \"count of flight\", velocity \n FROM flight \n WHERE velocity > 200", "table_name": "flight", "query_description": "How many flights have a velocity larger than 200?", "results_description": "There are 12 flights with a velocity larger than 200.", "result": ",Velocity,count of flight\n0,240.0,12.0\n", "difficulty": "aggregate"}, {"table_id": "ref_product_categories", "query": "SELECT unit_of_measure, product_category_code \n FROM ref_product_categories \n WHERE product_category_code = 'Herbs'", "table_name": "ref_product_categories", "query_description": "Return the unit of measure for 'Herb' products.", "results_description": "The product with category code Herbs has the unit of measure of handful.", "result": ",unit_of_measure,product_category_code\n0,Handful ,Herbs\n", "difficulty": "small_select"}, {"table_id": "Rooms", "query": "SELECT SUM(beds) AS \"sum of beds\", bedtype \n FROM Rooms \n WHERE bedtype = 'King'", "table_name": "Rooms", "query_description": "How many king beds are there?", "results_description": "There 6 beds of type King.", "result": ",bedType,sum of beds\n0,King,6\n", "difficulty": "aggregate"}, {"table_id": "staff, complaints", "query": "SELECT t1.last_name AS \"staff last_name\", t2.date_complaint_raised AS \"complaints date_complaint_raised\" \n FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised", "table_name": "staff, complaints", "query_description": "What is the last name of the staff who has handled the first ever complaint?", "results_description": "The first ever complaint was handled by Lynch in 1973-02-10 22:55:56", "result": ",staff last_name,complaints date_complaint_raised\n0,Lynch,1973-02-10 22:55:56\n", "difficulty": "join"}, {"table_id": "artist, song", "query": "SELECT T1.gender AS \"artist gender\", T1.artist_name AS \"artist artist_name\", T2.resolution AS \"song resolution\" \n FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.resolution", "table_name": "artist, song", "query_description": "What is the gender and name of the artist who sang the song with the smallest resolution?", "results_description": "The gender of the artist Farida is Female, the resolution is 320.", "result": ",artist gender,song resolution,artist artist_name\n0,Female,320,Farida\n", "difficulty": "join"}, {"table_id": "Financial_transactions", "query": "SELECT transaction_type, COUNT(*) AS \"count of Financial_transactions\" \n FROM Financial_transactions \n GROUP BY transaction_type", "table_name": "Financial_transactions", "query_description": "What are the different transaction types, and how many transactions of each have taken place?", "results_description": "The transcation type Payment had 3 financial transactions.", "result": ",transaction_type,count of Financial_transactions\n0,Payment,6\n", "difficulty": "aggregate_group_by"}, {"table_id": "Detention, Teachers", "query": "SELECT T1.datetime_detention_start AS \"Detention datetime_detention_start\", datetime_detention_end, T2.last_name AS \"Teachers last_name\" \n FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id \n WHERE T2.last_name = 'Schultz'", "table_name": "Detention, Teachers", "query_description": "Find the start and end dates of detentions of teachers with last name \"Schultz\".", "results_description": "The teacher with last name Schultz had a detention with start date 2017-09-05 00:38:25 and end date 2018-03-08 02:08:32.", "result": ",Teachers last_name,datetime_detention_end,Detention datetime_detention_start\n0,Schultz,2018-03-08 02:08:32,2017-09-05 00:38:25\n", "difficulty": "join"}, {"table_id": "people", "query": "SELECT * \n FROM people", "table_name": "people", "query_description": "List all info about all people.", "results_description": "Hubert Henno with id 1 is a male of height 188 and weight 83. He was born on the 6th of October 1976.", "result": ",Sex,Name,Height,Weight,People_ID,Date_of_Birth\n0,M,Hubert Henno,188.0,83.0,1,06.10.1976\n", "difficulty": "large_select"}, {"table_id": "STUDENT", "query": "SELECT Fname, Age \n FROM STUDENT \n WHERE Age > 22", "table_name": "STUDENT", "query_description": "What are the first names of all the students aged above 22?", "results_description": "Paul is 26 years old", "result": ",Age,Fname\n0,26,Paul\n", "difficulty": "small_select"}, {"table_id": "phone", "query": "SELECT COUNT(*) AS \"count of phone\", Company_name \n FROM phone \n WHERE Company_name = 'Nokia Corporation'", "table_name": "phone", "query_description": "How many phone hardware models are produced by the company named \"Nokia Corporation\"?", "results_description": "There are two phones made by Nokia Corporation", "result": ",Company_name,count of phone\n0,Nokia Corporation,2\n", "difficulty": "aggregate"}, {"table_id": "student, enroll", "query": "SELECT T1.stu_lname AS \"student stu_lname\", T2.enroll_grade AS \"enroll enroll_grade\", T2.class_code AS \"enroll class_code\" \n FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num \n WHERE T2.enroll_grade = 'A' AND T2.class_code = 10018", "table_name": "student, enroll", "query_description": "What is the last name of the student who got a grade A in the class with code 10018.", "results_description": "The student with last name is Bowser got a grade A in the class with code 10018.", "result": ",enroll class_code,student stu_lname,enroll enroll_grade\n0,10018,Bowser,A\n", "difficulty": "join"}, {"table_id": "Flight", "query": "SELECT AVG(price) AS \"average price\", origin, destination \n FROM Flight \n WHERE origin = 'Los Angeles' AND destination = 'Honolulu'", "table_name": "Flight", "query_description": "What is the average price for flights from LA to Honolulu?", "results_description": "The average price for a flight from Los Angeles to Honolulu is 400.605", "result": ",origin,destination,average price\n0,Los Angeles,Honolulu,400.605\n", "difficulty": "aggregate"}, {"table_id": "Faculty", "query": "SELECT fname, lname, Rank \n FROM Faculty \n WHERE Rank = 'Instructor'", "table_name": "Faculty", "query_description": "What are the first name and last name of all the instructors?", "results_description": "Mark Giuliano has the instructor rank. ", "result": ",Rank,Fname,Lname\n0,Instructor,Mark,Giuliano\n", "difficulty": "small_select"}, {"table_id": "physician", "query": "SELECT name, POSITION \n FROM physician \n WHERE POSITION LIKE '%senior%'", "table_name": "physician", "query_description": "Find the name of physicians whose position title contains the word 'senior'.", "results_description": "The physicial with name Percival Cox has position Senior Attending Physician.", "result": ",Name,Position\n0,Percival Cox,Senior Attending Physician\n", "difficulty": "small_select"}, {"table_id": "climber", "query": "SELECT Name, Country \n FROM climber \n WHERE Country <> 'Switzerland'", "table_name": "climber", "query_description": "List the names of climbers whose country is not Switzerland.", "results_description": "The climber Klaus Enders is from West Germany.", "result": ",Name,Country\n0,Klaus Enders,West Germany\n", "difficulty": "small_select"}, {"table_id": "payment", "query": "SELECT SUM(amount) AS \"sum of amount\" \n FROM payment", "table_name": "payment", "query_description": "Return the sum of all payment amounts.", "results_description": "The sum of all payment amounts is 67416.50999999208", "result": ",sum of amount\n0,67416.50999999208\n", "difficulty": "aggregate"}, {"table_id": "addresses, customer_addresses", "query": "SELECT T1.address_details AS \"addresses address_details\", T2.customer_id AS \"customer_addresses customer_id\" \n FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id = T2.address_id \n WHERE T2.customer_id = 10", "table_name": "addresses, customer_addresses", "query_description": "Return the address of customer 10.", "results_description": "The address of customer 10 is 36594 O'Keefe Lock New Cali, RI 42319.", "result": ",addresses address_details,customer_addresses customer_id\n0,\"36594 O'Keefe Lock\nNew Cali, RI 42319\",10\n", "difficulty": "join"}, {"table_id": "people, perpetrator", "query": "SELECT T1.Name AS \"people Name\", T1.Weight AS \"people Weight\" \n FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Weight DESC", "table_name": "people, perpetrator", "query_description": "What is the name of the perpetrator with the biggest weight.", "results_description": "Tyrone Brayan weights 220.", "result": ",people Name,people Weight\n0,Tyrone Brayan,220.0\n", "difficulty": "join"}, {"table_id": "people", "query": "SELECT AVG(height) AS \"average height\", AVG(weight) AS \"average weight\", sex \n FROM people \n WHERE sex = 'M'", "table_name": "people", "query_description": "Find the average height and weight for all males (sex is M).", "results_description": "The average weight and height of males are 86.71428571428571 and 195.14285714285714, respectively.", "result": ",Sex,average height,average weight\n0,M,195.14285714285714,86.71428571428571\n", "difficulty": "aggregate"}, {"table_id": "film_market_estimation", "query": "SELECT Low_Estimate, High_Estimate \n FROM film_market_estimation", "table_name": "film_market_estimation", "query_description": "Return the low and high estimates for all film markets.", "results_description": "The low and high estimates of all film markets are 80000 and 80400, respectively.", "result": ",Low_Estimate,High_Estimate\n0,80000.0,80400.0\n", "difficulty": "small_select"}, {"table_id": "Flight", "query": "SELECT flno, origin \n FROM Flight \n WHERE origin = 'Los Angeles'", "table_name": "Flight", "query_description": "What are the numbers of all flights coming from Los Angeles?", "results_description": "The flight number of the flight coming from Los Angeles is 99", "result": ",flno,origin\n0,99,Los Angeles\n", "difficulty": "small_select"}, {"table_id": "medicine", "query": "SELECT COUNT(*) AS \"count of medicine\", FDA_approved \n FROM medicine \n WHERE FDA_approved = 'No'", "table_name": "medicine", "query_description": "How many medicines have the FDA approval status 'No' ?", "results_description": "There are 11 medicines that have the FDA approval status 'No'", "result": ",FDA_approved,count of medicine\n0,No,11\n", "difficulty": "aggregate"}, {"table_id": "university", "query": "SELECT COUNT(*) AS \"count of university\", LOCATION \n FROM university \n WHERE LOCATION LIKE '%NY%'", "table_name": "university", "query_description": "How many universities have a location that contains NY?", "results_description": "The location\tStony Brook, NY has 1 university.", "result": ",Location,count of university\n0,\"Stony Brook, NY\",1\n", "difficulty": "aggregate"}, {"table_id": "people", "query": "SELECT Birth_Place \n FROM people \n GROUP BY Birth_Place ORDER BY COUNT(*) DESC", "table_name": "people", "query_description": "What is the most common birth place of people?", "results_description": "The most common birth place is Port Huron, Michigan.", "result": ",Birth_Place\n0,\"Port Huron, Michigan\"\n", "difficulty": "aggregate_group_by"}, {"table_id": "Course_Authors_and_Tutors, Courses", "query": "SELECT T1.login_name AS \"Course_Authors_and_Tutors login_name\", T2.course_name AS \"Courses course_name\" \n FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id \n WHERE T2.course_name = 'advanced database'", "table_name": "Course_Authors_and_Tutors, Courses", "query_description": "Which course author teaches the \"advanced database\" course? Give me his or her login name.", "results_description": "The author of the course advanced database has the login name al75.", "result": ",Courses course_name,Course_Authors_and_Tutors login_name\n0,advanced database,al75\n", "difficulty": "join"}, {"table_id": "documents", "query": "SELECT document_type_code \n FROM documents \n GROUP BY document_type_code \n HAVING SUM(access_count) > 10000", "table_name": "documents", "query_description": "What document types do have more than 10000 total access number.", "results_description": "The type code Advertisement has more than 10000 total accesses.", "result": ",document_type_code\n0,Advertisement\n", "difficulty": "aggregate_group_by"}, {"table_id": "chip_model, phone, screen_mode", "query": "SELECT T1.WiFi AS \"chip_model WiFi\", T3.Type AS \"screen_mode Type\", T2.Hardware_Model_name AS \"phone Hardware_Model_name\" \n 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 \n WHERE T2.Hardware_Model_name = 'LG-P760'", "table_name": "chip_model, phone, screen_mode", "query_description": "What are the wifi and screen mode type of the hardware model named \"LG-P760\"?", "results_description": "The chip model WiFi is 802.11b and the screen mode type is Text, for the hardware model named \"LG-P760\"", "result": ",chip_model WiFi,screen_mode Type,phone Hardware_Model_name\n0,802.11b,Text,LG-P760\n", "difficulty": "join"}, {"table_id": "documents", "query": "SELECT AVG(access_count) AS \"average access_count\" \n FROM documents", "table_name": "documents", "query_description": "What is the average access count of documents?", "results_description": "The average access count of documents is 4939.133333333333", "result": ",average access_count\n0,4939.133333333333\n", "difficulty": "aggregate"}, {"table_id": "Person", "query": "SELECT AVG(age) AS \"average age\", job \n FROM Person \n GROUP BY job", "table_name": "Person", "query_description": "How old is the average person for each job?", "results_description": "The average age of doctors is 45 years", "result": ",job,average age\n0,doctor,45.0\n", "difficulty": "aggregate_group_by"}, {"table_id": "APPELLATIONS, WINE", "query": "SELECT AVG(T2.Price) AS \"average Price\", T1.County AS \"APPELLATIONS County\" \n FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation \n WHERE T1.County = 'Sonoma'", "table_name": "APPELLATIONS, WINE", "query_description": "What is the average price of wines produced in appelations in Sonoma County?", "results_description": "The average price of wines produced in appelations in the country of Sonoma have an average price of 43.5", "result": ",average Price,APPELLATIONS County\n0,43.5,Sonoma\n", "difficulty": "join_aggregate"}, {"table_id": "Ref_locations", "query": "SELECT location_code, location_name \n FROM Ref_locations \n WHERE location_name = 'Canada'", "table_name": "Ref_locations", "query_description": "What is the location code for the country \"Canada\"?", "results_description": "The location code c is for the location Canada.", "result": ",Location_Code,Location_Name\n0,c,Canada\n", "difficulty": "small_select"}, {"table_id": "student_course_registrations, students", "query": "SELECT T2.student_details AS \"students student_details\", T1.registration_date AS \"student_course_registrations registration_date\" \n FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC", "table_name": "student_course_registrations, students", "query_description": "What details do we have on the students who registered for courses most recently?", "results_description": "The student named Martin registered on 2008-11-14 10:35:13", "result": ",students student_details,student_course_registrations registration_date\n0,Martin,2008-11-14 10:35:13\n", "difficulty": "join"}, {"table_id": "employees", "query": "SELECT first_name, last_name, salary \n FROM employees \n WHERE salary < 6000", "table_name": "employees", "query_description": "What are the full names and salaries for any employees earning less than 6000?", "results_description": "The employee with last name Austin and first name David has a salary of 4800.", "result": ",SALARY,LAST_NAME,FIRST_NAME\n0,4800,Austin,David\n", "difficulty": "large_select"}, {"table_id": "head", "query": "SELECT COUNT(*) AS \"count of head\", age \n FROM head \n WHERE age > 56", "table_name": "head", "query_description": "How many heads of the departments are older than 56 ?", "results_description": "There are 5 heads of the departments with age of 67", "result": ",age,count of head\n0,67.0,5.0\n", "difficulty": "aggregate"}, {"table_id": "entrepreneur, people", "query": "SELECT T2.Name AS \"people Name\", T1.Company AS \"entrepreneur Company\", T1.Money_Requested AS \"entrepreneur Money_Requested\" \n FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested", "table_name": "entrepreneur, people", "query_description": "List the names of entrepreneurs and their companies in descending order of money requested?", "results_description": "The entrepreneur Roberto Calcaterra with the company IV Cam has a money request of 50000.", "result": ",people Name,entrepreneur Company,entrepreneur Money_Requested\n0,Roberto Calcaterra,IV Cam,50000.0\n", "difficulty": "join"}, {"table_id": "driver", "query": "SELECT COUNT(*) AS \"count of driver\", age, home_city \n FROM driver \n WHERE home_city = 'Hartford' OR age < 40", "table_name": "driver", "query_description": "How many drivers are from Hartford city or younger than 40?", "results_description": "There are 11 drivers from Hartford city or younger than 40.", "result": ",Age,Home_city,count of driver\n0,40,Hartford,11\n", "difficulty": "aggregate"}, {"table_id": "station, trip", "query": "SELECT AVG(T1.lat) AS \"average lat\", AVG(T1.long) AS \"average long\" \n FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id", "table_name": "station, trip", "query_description": "What is the average latitude and longitude of all starting stations for the trips?", "results_description": "The average latitude is 37.74618133538529 and the average longitude is -122.36134722346611.", "result": ",average lat,average long\n0,37.74618133538529,-122.36134722346611\n", "difficulty": "join_aggregate"}, {"table_id": "Ref_locations", "query": "SELECT location_code, location_name \n FROM Ref_locations \n WHERE location_name = 'Canada'", "table_name": "Ref_locations", "query_description": "Show the location code of the country \"Canada\".", "results_description": "Country Canada has location code \"c\".", "result": ",Location_Code,Location_Name\n0,c,Canada\n", "difficulty": "small_select"}, {"table_id": "VISITORS", "query": "SELECT Tourist_Details \n FROM VISITORS", "table_name": "VISITORS", "query_description": "What is the detail of each visitor?", "results_description": "The tourist details is Toney", "result": ",Tourist_Details\n0,Toney\n", "difficulty": "small_select"}, {"table_id": "ARTIST", "query": "SELECT Name \n FROM ARTIST \n WHERE Name LIKE '%a%'", "table_name": "ARTIST", "query_description": "Find the names of all artists that have \"a\" in their names.", "results_description": "The artist's name is AC/DC.", "result": ",Name\n0,AC/DC\n", "difficulty": "small_select"}, {"table_id": "Student", "query": "SELECT COUNT(*) AS \"count of Student\", age \n FROM Student \n WHERE age = 18", "table_name": "Student", "query_description": "How many students are 18 years old?", "results_description": "There are 10 students who are 18 years old", "result": ",Age,count of Student\n0,18,10\n", "difficulty": "aggregate"}, {"table_id": "station_company, company, gas_station", "query": "SELECT T3.location AS \"gas_station location\", T2.market_value AS \"company market_value\" \n 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 \n WHERE T2.market_value > 100", "table_name": "station_company, company, gas_station", "query_description": "Show all locations where a gas station for company with market value greater than 100 is located.", "results_description": "The gas station located in Herne Hill has a market value of 227.6.", "result": ",company market_value,gas_station location\n0,227.6,Herne Hill\n", "difficulty": "join"}, {"table_id": "employees", "query": "SELECT first_name, department_id, last_name \n FROM employees \n WHERE last_name = 'McEwen'", "table_name": "employees", "query_description": "Display the first name, and department number for all employees whose last name is \"McEwen\".", "results_description": "The employee Allan McEwen belongs in the department with id 80.", "result": ",LAST_NAME,FIRST_NAME,DEPARTMENT_ID\n0,McEwen,Allan,80\n", "difficulty": "small_select"}, {"table_id": "Marketing_Regions, Stores", "query": "SELECT T1.Marketing_Region_Name AS \"Marketing_Regions Marketing_Region_Name\", T2.Store_Name AS \"Stores Store_Name\" \n FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code = T2.Marketing_Region_Code \n WHERE T2.Store_Name = 'Rob Dinning'", "table_name": "Marketing_Regions, Stores", "query_description": "Return the name of the marketing region the store Rob Dinning is located in.", "results_description": "The store Rob Dining is located in the marketing region of Canada", "result": ",Stores Store_Name,Marketing_Regions Marketing_Region_Name\n0,Rob Dinning,Canada\n", "difficulty": "join"}, {"table_id": "musical", "query": "SELECT Name, Nominee \n FROM musical \n WHERE Nominee = 'Bob Fosse'", "table_name": "musical", "query_description": "What are the names of musicals with nominee \"Bob Fosse\"?", "results_description": "Bob Fosse from the musical \"The Phantom of the Opera\" was nominated.", "result": ",Name,Nominee\n0,The Phantom of the Opera,Bob Fosse\n", "difficulty": "small_select"}, {"table_id": "Settlements", "query": "SELECT Date_Claim_Made, Date_Claim_Settled \n FROM Settlements", "table_name": "Settlements", "query_description": "Tell me the the claim date and settlement date for each settlement case.", "results_description": "The date that the claim was made is 2018-08-07 and it was settled in 2018-01-16.", "result": ",Date_Claim_Made,Date_Claim_Settled\n0,2018-08-07,2018-01-16\n", "difficulty": "small_select"}, {"table_id": "Financial_transactions", "query": "SELECT transaction_type, SUM(transaction_amount) AS \"sum of transaction_amount\" \n FROM Financial_transactions \n GROUP BY transaction_type", "table_name": "Financial_transactions", "query_description": "Show the transaction types and the total amount of transactions.", "results_description": "The Payment transactions types have 8743.15 of total amount of transactions", "result": ",transaction_type,sum of transaction_amount\n0,Payment,8743.15\n", "difficulty": "aggregate_group_by"}, {"table_id": "departments", "query": "SELECT * \n FROM departments \n WHERE department_name = 'Marketing'", "table_name": "departments", "query_description": "Display all the information about the department Marketing.", "results_description": "The department with name Marketing has department id 20, location id 1800 and manger id 201", "result": ",MANAGER_ID,LOCATION_ID,DEPARTMENT_ID,DEPARTMENT_NAME\n0,201,1800,20,Marketing\n", "difficulty": "large_select"}, {"table_id": "county", "query": "SELECT AVG(Population) AS \"average Population\" \n FROM county", "table_name": "county", "query_description": "On average how large is the population of the counties?", "results_description": "Countries' population are on average 58100.", "result": ",average Population\n0,58100.0\n", "difficulty": "aggregate"}, {"table_id": "school", "query": "SELECT Denomination, COUNT(*) AS \"count of school\" \n FROM school \n GROUP BY Denomination", "table_name": "school", "query_description": "Please show different denominations and the corresponding number of schools.", "results_description": "The denominations are Anglican and their number of schools are 3 respectively", "result": ",Denomination,count of school\n0,Anglican,3\n", "difficulty": "aggregate_group_by"}, {"table_id": "player", "query": "SELECT Residence \n FROM player \n GROUP BY Residence \n HAVING COUNT(*) >= 2", "table_name": "player", "query_description": "Show the residences that have at least two players.", "results_description": "The residence Winnipeg has at least 2 players.", "result": ",Residence\n0,Winnipeg\n", "difficulty": "aggregate_group_by"}, {"table_id": "jobs", "query": "SELECT job_title, max_salary - min_salary \n FROM jobs \n WHERE max_salary BETWEEN 12000 AND 18000", "table_name": "jobs", "query_description": "What are the job titles, and range of salaries for jobs with maximum salary between 12000 and 18000?", "results_description": "The range of salaries for jobs with title Finance Manager is 7800.", "result": ",JOB_TITLE,max_salary - min_salary\n0,Finance Manager,7800\n", "difficulty": "small_select"}, {"table_id": "races, results", "query": "SELECT MAX(T2.fastestlapspeed) AS \"maximum fastestlapspeed\", T1.year AS \"races year\", T1.name AS \"races name\" \n FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid \n WHERE T1.year = 2008 AND T1.name = 'Monaco Grand Prix'", "table_name": "races, results", "query_description": "What is the maximum fastest lap speed in the Monaco Grand Prix in 2008?", "results_description": "The maximum fastest lap speed in the Monaco Grand Prix in 2008 is 156.789", "result": ",races name,races year,maximum fastestlapspeed\n0,Monaco Grand Prix,2008,156.789\n", "difficulty": "join_aggregate"}, {"table_id": "customers, customer_contact_channels", "query": "SELECT t1.customer_name AS \"customers customer_name\", t2.active_from_date AS \"customer_contact_channels active_from_date\", t2.channel_code AS \"customer_contact_channels channel_code\" \n FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id \n WHERE t2.channel_code = 'Email'", "table_name": "customers, customer_contact_channels", "query_description": "Find the name and active date of the customer that use email as the contact channel.", "results_description": "The customer Devin Mills has the channel code email and is active from 2017-12-07 18:18:15.", "result": ",customers customer_name,customer_contact_channels channel_code,customer_contact_channels active_from_date\n0,Devin Mills,Email,2017-12-07 18:18:15\n", "difficulty": "join"}, {"table_id": "APPELLATIONS, WINE", "query": "SELECT MAX(T2.Price) AS \"maximum Price\", T1.Area AS \"APPELLATIONS Area\", T2.year AS \"WINE year\" \n FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation \n WHERE T1.Area = 'Central Coast' AND T2.year < 2005", "table_name": "APPELLATIONS, WINE", "query_description": "What is the maximum price of wines from the appelation in the Central Coast area, which was produced before 2005?", "results_description": "The maximum price of wines in the Central Coast apellation area is 60, for a wine produced in 2004", "result": ",WINE year,maximum Price,APPELLATIONS Area\n0,2004,60,Central Coast\n", "difficulty": "join_aggregate"}, {"table_id": "Flight", "query": "SELECT origin, destination \n FROM Flight \n WHERE destination = 'Honolulu'", "table_name": "Flight", "query_description": "Show origins of all flights with destination Honolulu.", "results_description": "The origin is Los Angeles and the destination is Honolulu.", "result": ",origin,destination\n0,Los Angeles,Honolulu\n", "difficulty": "small_select"}, {"table_id": "branch", "query": "SELECT city, open_year, membership_amount \n FROM branch \n WHERE open_year = 2001 AND membership_amount > 100", "table_name": "branch", "query_description": "Show all city with a branch opened in 2001 and a branch with more than 100 membership.", "results_description": "The London city branch opened in 2001 and has a membership amount of 112.", "result": ",City,Open_year,membership_amount\n0,London,2001,112\n", "difficulty": "small_select"}, {"table_id": "Students", "query": "SELECT date_of_latest_logon, family_name \n FROM Students \n WHERE family_name = 'Jaskolski' OR family_name = 'Langosh'", "table_name": "Students", "query_description": "Find the latest logon date of the students whose family name is \"Jaskolski\" or \"Langosh\".", "results_description": "The latest logon of the student with family name Jaskolski was at 2017-06-24 22:16:27", "result": ",family_name,date_of_latest_logon\n0,Jaskolski,2017-06-24 22:16:27\n", "difficulty": "small_select"}, {"table_id": "artist, song", "query": "SELECT T1.country AS \"artist country\", T2.languages AS \"song languages\", T1.gender AS \"artist gender\" \n FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name \n WHERE T1.gender = 'Female' AND T2.languages = 'bangla'", "table_name": "artist, song", "query_description": "What is the country of origin of the artist who is female and produced a song in Bangla?", "results_description": "The country of origin of the artist is Bangladesh", "result": ",artist gender,artist country,song languages\n0,Female,Bangladesh,bangla\n", "difficulty": "join"}, {"table_id": "affected_region, region, storm", "query": "SELECT T2.region_name AS \"region region_name\", T3.Number_Deaths AS \"storm Number_Deaths\" \n 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", "table_name": "affected_region, region, storm", "query_description": "Find the names of the regions which were affected by the storm that killed the greatest number of people.", "results_description": "The region name is Algeria and the number of deaths is 52", "result": ",region region_name,storm Number_Deaths\n0,Algeria,52\n", "difficulty": "join"}, {"table_id": "customers", "query": "SELECT email, phone, last_name, first_name \n FROM customers \n WHERE first_name = 'Astrid' AND last_name = 'Gruber'", "table_name": "customers", "query_description": "What is the email and phone number of Astrid Gruber the customer?", "results_description": "Astrid Gruber has email astrid.gruber@apple.at and phone +43 01 5134505.", "result": ",email,phone,last_name,first_name\n0,astrid.gruber@apple.at,+43 01 5134505,Gruber,Astrid\n", "difficulty": "small_select"}, {"table_id": "College", "query": "SELECT AVG(enr) AS \"average enr\" \n FROM College", "table_name": "College", "query_description": "What is the average enrollment number?", "results_description": "The average enrollment number is 17750", "result": ",average enr\n0,17750.0\n", "difficulty": "aggregate"}, {"table_id": "instructor", "query": "SELECT dept_name, salary \n FROM instructor \n GROUP BY dept_name ORDER BY AVG(salary) DESC", "table_name": "instructor", "query_description": "Find the name of the department which has the highest average salary of professors.", "results_description": "The department of Physics has a salary of 108011.81.", "result": ",salary,dept_name\n0,108011.81,Physics\n", "difficulty": "aggregate_group_by"}, {"table_id": "Allergy_type", "query": "SELECT allergytype, allergy \n FROM Allergy_type \n WHERE allergy = 'Cat'", "table_name": "Allergy_type", "query_description": "What is the type of allergy Cat?", "results_description": "The allergy of cats belongs to the animal type.", "result": ",Allergy,AllergyType\n0,Cat,animal\n", "difficulty": "small_select"}, {"table_id": "campuses", "query": "SELECT campus, LOCATION \n FROM campuses \n WHERE LOCATION = 'Chico'", "table_name": "campuses", "query_description": "What are the names of all campuses located at Chico?", "results_description": "The campus California State University-Chico is in Chico.", "result": ",Campus,Location\n0,California State University-Chico,Chico\n", "difficulty": "small_select"}, {"table_id": "Ref_budget_codes", "query": "SELECT budget_type_description, budget_type_code \n FROM Ref_budget_codes \n WHERE budget_type_code = 'ORG'", "table_name": "Ref_budget_codes", "query_description": "What is the description for the budget type with code ORG?", "results_description": "\u03a4he budget type with code ORG has description Organisation", "result": ",Budget_Type_Code,Budget_Type_Description\n0,ORG,Organisation\n", "difficulty": "small_select"}, {"table_id": "employee, professor, department", "query": "SELECT T3.dept_name AS \"department dept_name\", T2.prof_office AS \"professor prof_office\", T1.emp_lname AS \"employee emp_lname\" \n 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 \n WHERE T1.emp_lname = 'Heffington'", "table_name": "employee, professor, department", "query_description": "What is department name and office for the professor whose last name is Heffington?", "results_description": "The professor Heffington is in the Accounting department and her office is the KLR 229D.", "result": ",employee emp_lname,department dept_name,professor prof_office\n0,Heffington,Accounting,KLR 229D\n", "difficulty": "join"}, {"table_id": "book_club", "query": "SELECT category, YEAR \n FROM book_club \n WHERE YEAR > 1989 \n GROUP BY category \n HAVING COUNT(*) >= 2", "table_name": "book_club", "query_description": "List categories that have at least two books after year 1989.", "results_description": "The categort Gay SD/F has at least two books after 1989.", "result": ",Year,Category\n0,1990,Gay SF/F\n", "difficulty": "aggregate_group_by"}, {"table_id": "airport", "query": "SELECT AVG(International_Passengers) AS \"average International_Passengers\" \n FROM airport", "table_name": "airport", "query_description": "What is the average number of international passengers for an airport?", "results_description": "The average international passengers is 16443156.6.", "result": ",average International_Passengers\n0,16443156.6\n", "difficulty": "aggregate"}, {"table_id": "products_for_hire", "query": "SELECT product_name, product_description, product_type_code, daily_hire_cost \n FROM products_for_hire \n WHERE product_type_code = 'Cutlery' AND daily_hire_cost < 20", "table_name": "products_for_hire", "query_description": "What are the names and descriptions of the products that are of 'Cutlery' type and have daily hire cost lower than 20?", "results_description": "The product with name Book collection B has a hire cost of 15.62, a type code Cutlery and its description is War and Peace.", "result": ",product_name,daily_hire_cost,product_type_code,product_description\n0,Book collection B,15.62,Cutlery,War and Peace\n", "difficulty": "small_select"}, {"table_id": "INVOICES", "query": "SELECT payment_method_code \n FROM INVOICES \n GROUP BY payment_method_code ORDER BY COUNT(*) DESC", "table_name": "INVOICES", "query_description": "What is the payment method code used by the most orders?", "results_description": "The payment method code used by the most orders is MasterCard.", "result": ",payment_method_code\n0,MasterCard\n", "difficulty": "aggregate_group_by"}, {"table_id": "Ref_locations", "query": "SELECT COUNT(*) AS \"count of Ref_locations\" \n FROM Ref_locations", "table_name": "Ref_locations", "query_description": "How many locations are listed in the database?", "results_description": "5 locations are listed in the database.", "result": ",count of Ref_locations\n0,5\n", "difficulty": "aggregate"}, {"table_id": "county, election", "query": "SELECT T2.Delegate AS \"election Delegate\", T1.County_name AS \"county County_name\" \n FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District", "table_name": "county, election", "query_description": "Show the delegates and the names of county they belong to.", "results_description": "The election delegate Bates, Gail H. Gail H. Bates is in the county named Howard.", "result": ",election Delegate,county County_name\n0,\"Bates, Gail H. Gail H. Bates\",Howard\n", "difficulty": "join"}, {"table_id": "Rooms", "query": "SELECT decor, roomName \n FROM Rooms \n WHERE roomName = 'Recluse and defiance'", "table_name": "Rooms", "query_description": "Return the decor of the room named \"Recluse and defiance\".", "results_description": "The room Recluse and defiance has a modern decor.", "result": ",decor,roomName\n0,modern,Recluse and defiance\n", "difficulty": "small_select"}, {"table_id": "course, CLASS", "query": "SELECT SUM(T1.crs_credit) AS \"sum of crs_credit\", T1.dept_code AS \"course dept_code\" \n FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code \n GROUP BY T1.dept_code", "table_name": "course, CLASS", "query_description": "Find the total credits of all classes offered by each department.", "results_description": "The total credits of class with code ACCT are 15.", "result": ",course dept_code,sum of crs_credit\n0,ACCT,15.0\n", "difficulty": "join_aggregate"}, {"table_id": "DEPARTMENT", "query": "SELECT DName, Building \n FROM DEPARTMENT \n WHERE Building = 'Mergenthaler'", "table_name": "DEPARTMENT", "query_description": "Find the department name that is in Building \"Mergenthaler\".", "results_description": "The History of Art department is in the Mergenthaler building.", "result": ",DName,Building\n0,History of Art,Mergenthaler\n", "difficulty": "small_select"}, {"table_id": "candidate", "query": "SELECT COUNT(*) AS \"count of candidate\" \n FROM candidate", "table_name": "candidate", "query_description": "How many candidates are there?", "results_description": "There are 6 candidates", "result": ",count of candidate\n0,6\n", "difficulty": "aggregate"}, {"table_id": "airlines", "query": "SELECT country, name \n FROM airlines \n WHERE name LIKE 'Orbit%'", "table_name": "airlines", "query_description": "What are the countries of all airlines whose names start with Orbit?", "results_description": "The airline Orbit Express Airlines is from Turkey.", "result": ",name,country\n0,Orbit Express Airlines,Turkey\n", "difficulty": "small_select"}, {"table_id": "documents", "query": "SELECT SUM(access_count) AS \"sum of access_count\", document_type_code \n FROM documents \n GROUP BY document_type_code ORDER BY COUNT(*) DESC", "table_name": "documents", "query_description": "What is the total access count of documents that are of the most common document type?", "results_description": "The total access count of books is 11807.", "result": ",document_type_code,sum of access_count\n0,Book,11807\n", "difficulty": "aggregate_group_by"}, {"table_id": "manufacturers", "query": "SELECT SUM(revenue) AS \"sum of revenue\", Headquarter \n FROM manufacturers \n WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan'", "table_name": "manufacturers", "query_description": "Return the total revenue of companies with headquarters in Tokyo or Taiwan.", "results_description": "The headquarter in Tokyo had a total revenue of 250.", "result": ",Headquarter,sum of revenue\n0,Tokyo,250.0\n", "difficulty": "aggregate"}, {"table_id": "artist", "query": "SELECT artist_name, gender, country \n FROM artist \n WHERE country = 'UK' AND gender = 'Male'", "table_name": "artist", "query_description": "What are the names of artists who are Male and are from UK?", "results_description": "The artist named Michel is Male and is from UK", "result": ",gender,country,artist_name\n0,Male,UK,Michel\n", "difficulty": "small_select"}, {"table_id": "customer", "query": "SELECT COUNT(*) AS \"count of customer\", active \n FROM customer \n WHERE active = '1'", "table_name": "customer", "query_description": "How many customers have an active value of 1?", "results_description": "There are 584 customers with active 1.", "result": ",active,count of customer\n0,1,584\n", "difficulty": "aggregate"}, {"table_id": "Movie, Movie", "query": "SELECT T1.title AS \"Movie title\", T1.year AS \"Movie year\" \n FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director \n WHERE T1.title <> T2.title", "table_name": "Movie, Movie", "query_description": "For each director who directed more than one movie, what are the titles and dates of release for all those movies?", "results_description": "E.T. was released in 1982.", "result": ",Movie year,Movie title\n0,1982,E.T.\n", "difficulty": "join"}, {"table_id": "movie, culture_company, book_club", "query": "SELECT T1.title AS \"movie title\", T3.book_title AS \"book_club book_title\", T2.incorporated_in AS \"culture_company incorporated_in\" \n 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 \n WHERE T2.incorporated_in = 'China'", "table_name": "movie, culture_company, book_club", "query_description": "What are the titles of movies and books corresponding to companies incorporated in China?", "results_description": "The movie with title The Big Kahuna and the book with title Goldenboy are from companies incorporated in China", "result": ",movie title,book_club book_title,culture_company incorporated_in\n0,The Big Kahuna,Goldenboy,China\n", "difficulty": "join"}, {"table_id": "addresses", "query": "SELECT COUNT(*) AS \"count of addresses\", country \n FROM addresses \n WHERE country = 'USA'", "table_name": "addresses", "query_description": "How many addresses are there in country USA?", "results_description": "There are 15 addresses in USA", "result": ",country,count of addresses\n0,USA,15\n", "difficulty": "aggregate"}, {"table_id": "VOTING_RECORD", "query": "SELECT COUNT(*) AS \"count of VOTING_RECORD\" \n FROM VOTING_RECORD", "table_name": "VOTING_RECORD", "query_description": "Find the number of voting records in total.", "results_description": "The total number of voting records is 10", "result": ",count of VOTING_RECORD\n0,10\n", "difficulty": "aggregate"}, {"table_id": "game, injury_accident", "query": "SELECT T1.season AS \"game season\", T2.player AS \"injury_accident player\" \n FROM game AS T1 JOIN injury_accident AS T2 ON T1.id = T2.game_id \n WHERE T2.player = 'Walter Samuel'", "table_name": "game, injury_accident", "query_description": "What is the season of the game which causes the player 'Walter Samuel' to get injured?", "results_description": "Walter Samuel got injured in 2008.", "result": ",game season,injury_accident player\n0,2008,Walter Samuel\n", "difficulty": "join"}, {"table_id": "phone", "query": "SELECT Memory_in_G, Carrier \n FROM phone", "table_name": "phone", "query_description": "What are the memories and carriers of phones?", "results_description": "The phone with carrier Spring has 32 G of memory.", "result": ",Carrier,Memory_in_G\n0,Sprint,32\n", "difficulty": "small_select"}, {"table_id": "ENROLLED_IN, GRADECONVERSION, STUDENT", "query": "SELECT MAX(T2.gradepoint) AS \"maximum gradepoint\", MIN(T2.gradepoint) AS \"minimum gradepoint\", T3.city_code AS \"STUDENT city_code\" \n FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID \n WHERE T3.city_code = 'NYC'", "table_name": "ENROLLED_IN, GRADECONVERSION, STUDENT", "query_description": "What is the maximum and minimum grade point of students who live in NYC?", "results_description": "Students from NYC have a max grade point of 4 and minimum of 2", "result": ",STUDENT city_code,maximum gradepoint,minimum gradepoint\n0,NYC,4.0,2.0\n", "difficulty": "join_aggregate"}, {"table_id": "Products", "query": "SELECT Name \n FROM Products", "table_name": "Products", "query_description": "What are the names of all products?", "results_description": "The product name is \"Hard drive\".", "result": ",Name\n0,Hard drive\n", "difficulty": "small_select"}, {"table_id": "Employees", "query": "SELECT COUNT(*) AS \"count of Employees\" \n FROM Employees", "table_name": "Employees", "query_description": "How many employees do we have?", "results_description": "The number of employees is 15", "result": ",count of Employees\n0,15\n", "difficulty": "aggregate"}, {"table_id": "city", "query": "SELECT Official_Name, Population \n FROM city \n WHERE Population > 1500 OR Population < 500", "table_name": "city", "query_description": "What are the official names of cities that have population over 1500 or less than 500?", "results_description": "The city with official name Grand Falls/Grand-Sault has a population of 5706.", "result": ",Population,Official_Name\n0,5706.0,Grand Falls/Grand-Sault\n", "difficulty": "small_select"}, {"table_id": "technician", "query": "SELECT Name, Age \n FROM technician \n WHERE Age = 36 OR Age = 37", "table_name": "technician", "query_description": "What are the names of the technicians aged either 36 or 37?", "results_description": "The technician named Joe Sewell has an age of 37", "result": ",Age,Name\n0,37,Joe Sewell\n", "difficulty": "small_select"}, {"table_id": "Lessons", "query": "SELECT COUNT(*) AS \"count of Lessons\", lesson_status_code \n FROM Lessons \n WHERE lesson_status_code = 'Cancelled'", "table_name": "Lessons", "query_description": "How many lessons have been cancelled?", "results_description": "The lessons with status code Cancelled count to 9", "result": ",count of Lessons,lesson_status_code\n0,9,Cancelled\n", "difficulty": "aggregate"}, {"table_id": "country", "query": "SELECT COUNT(*) AS \"count of country\" \n FROM country", "table_name": "country", "query_description": "How many countries are there in total?", "results_description": "There are 6 countries.", "result": ",count of country\n0,6\n", "difficulty": "aggregate"}, {"table_id": "swimmer, record", "query": "SELECT t1.name AS \"swimmer name\", RESULT \n FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id \n WHERE RESULT = 'Win'", "table_name": "swimmer, record", "query_description": "Find the names of swimmers who has a result of \"win\".", "results_description": "Swimmer Sergiy Fesenko has won.", "result": ",Result,swimmer name\n0,Win,Sergiy Fesenko\n", "difficulty": "join"}, {"table_id": "EMPLOYEE", "query": "SELECT Phone \n FROM EMPLOYEE", "table_name": "EMPLOYEE", "query_description": "What are the phone numbers for each employee?", "results_description": "The phone is +1 (780) 428-9482.", "result": ",Phone\n0,+1 (780) 428-9482\n", "difficulty": "small_select"}, {"table_id": "Has_allergy", "query": "SELECT COUNT(*) AS \"count of Has_allergy\", Allergy \n FROM Has_allergy \n WHERE Allergy = 'Cat'", "table_name": "Has_allergy", "query_description": "How many students have cat allergies?", "results_description": "4 students have a cat allergy.", "result": ",Allergy,count of Has_allergy\n0,Cat,4\n", "difficulty": "aggregate"}, {"table_id": "track", "query": "SELECT COUNT(*) AS \"count of track\" \n FROM track", "table_name": "track", "query_description": "How many tracks do we have?", "results_description": "There are 9 tracks.", "result": ",count of track\n0,9\n", "difficulty": "aggregate"}, {"table_id": "movie", "query": "SELECT director, YEAR \n FROM movie \n WHERE YEAR = 1999 OR YEAR = 2000", "table_name": "movie", "query_description": "Which directors had a movie in either 1999 or 2000?", "results_description": "In 1999 Troy Duffy was the director.", "result": ",Year,Director\n0,1999,Troy Duffy\n", "difficulty": "small_select"}, {"table_id": "customers", "query": "SELECT customer_name, payment_method \n FROM customers \n WHERE payment_method <> 'Cash'", "table_name": "customers", "query_description": "Find the name of customers who did not pay with Cash.", "results_description": "Customer Tillman Ernser has used the payment method of Cheque.", "result": ",customer_name,payment_method\n0,Tillman Ernser,Cheque\n", "difficulty": "small_select"}, {"table_id": "employee", "query": "SELECT COUNT(*) AS \"count of employee\" \n FROM employee", "table_name": "employee", "query_description": "How many employees are there all together?", "results_description": "The total number of employees is 37", "result": ",count of employee\n0,37\n", "difficulty": "aggregate"}, {"table_id": "participants", "query": "SELECT COUNT(*) AS \"count of participants\", participant_type_code \n FROM participants \n WHERE participant_type_code = 'Organizer'", "table_name": "participants", "query_description": "How many participants belong to the type 'Organizer'?", "results_description": "There are 7 organizers.", "result": ",Participant_Type_Code,count of participants\n0,Organizer,7\n", "difficulty": "aggregate"}, {"table_id": "professor, department, employee", "query": "SELECT T3.EMP_FNAME AS \"employee EMP_FNAME\", T3.EMP_LNAME AS \"employee EMP_LNAME\", DEPT_NAME \n 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 \n WHERE DEPT_NAME = 'Biology'", "table_name": "professor, department, employee", "query_description": "What is the first and last name of the professor in biology department?", "results_description": "The department of Biology has a professor with first name Van and last name Thieu.", "result": ",DEPT_NAME,employee EMP_FNAME,employee EMP_LNAME\n0,Biology,Van,Thieu\n", "difficulty": "join"}, {"table_id": "customer", "query": "SELECT COUNT(*) AS \"count of customer\", active \n FROM customer \n WHERE active = '1'", "table_name": "customer", "query_description": "Count the number of customers who are active.", "results_description": "There are 584 customers who are active.", "result": ",active,count of customer\n0,1,584\n", "difficulty": "aggregate"}, {"table_id": "campuses, degrees", "query": "SELECT degrees, t1.campus AS \"t1 campus\", t2.year AS \"t2 year\" \n FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus \n WHERE t1.campus = 'San Jose State University' AND t2.year = 2000", "table_name": "campuses, degrees", "query_description": "How many degrees were conferred in \"San Jose State University\" in 2000?", "results_description": "In 2000, 3951 degrees were conferred in San Jose State University.", "result": ",Degrees,t2 year,t1 campus\n0,3951,2000,San Jose State University\n", "difficulty": "join"}, {"table_id": "furniture", "query": "SELECT SUM(market_rate) AS \"sum of market_rate\" \n FROM furniture ORDER BY market_rate DESC", "table_name": "furniture", "query_description": "find the total market rate of the furnitures that have the top 2 market shares.", "results_description": "The sum of market rate is 100.", "result": ",sum of market_rate\n0,100.0\n", "difficulty": "aggregate"}, {"table_id": "tryout", "query": "SELECT cName, pPos, decision \n FROM tryout \n WHERE decision = 'yes' AND pPos = 'goalie'", "table_name": "tryout", "query_description": "What college has a student who successfully made the team in the role of a goalie?", "results_description": "ASU college has a student who successfully made the team in the role of a goalie", "result": ",pPos,cName,decision\n0,goalie,ASU,yes\n", "difficulty": "small_select"}, {"table_id": "Person, PersonFriend", "query": "SELECT T2.name AS \"PersonFriend name\", T1.city AS \"Person city\" \n FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend \n WHERE T1.city = 'new york city'", "table_name": "Person, PersonFriend", "query_description": "Who has a friend that is from new york city?", "results_description": "Zach has a friend that is from new york city", "result": ",Person city,PersonFriend name\n0,new york city,Zach\n", "difficulty": "join"}, {"table_id": "editor", "query": "SELECT Name, Age \n FROM editor \n WHERE Age > 25", "table_name": "editor", "query_description": "List the names of editors who are older than 25.", "results_description": "The editor named Kamila Porczyk is 34 years old.", "result": ",Age,Name\n0,34.0,Kamila Porczyk\n", "difficulty": "small_select"}, {"table_id": "manufacturers", "query": "SELECT headquarter, founder \n FROM manufacturers \n WHERE founder = 'James'", "table_name": "manufacturers", "query_description": "Where is the headquarter of the company founded by James?", "results_description": "The company whose founder is James, has its headquarters in Los Angeles", "result": ",Founder,Headquarter\n0,James,Los Angeles\n", "difficulty": "small_select"}, {"table_id": "bank", "query": "SELECT AVG(no_of_customers) AS \"average no_of_customers\" \n FROM bank", "table_name": "bank", "query_description": "Find the average number of customers cross all banks.", "results_description": "The average number of customers across all banks is 286.5", "result": ",average no_of_customers\n0,286.5\n", "difficulty": "aggregate"}, {"table_id": "customers", "query": "SELECT COUNT(*) AS \"count of customers\" \n FROM customers", "table_name": "customers", "query_description": "How many customers are there?", "results_description": "There are 15 customers.", "result": ",count of customers\n0,15\n", "difficulty": "aggregate"}, {"table_id": "list", "query": "SELECT firstname, classroom \n FROM list \n WHERE classroom = 108", "table_name": "list", "query_description": "Find the first names of students studying in room 108.", "results_description": "The student with first name Lynnette is in classroom 108.", "result": ",Classroom,FirstName\n0,108, LYNNETTE\n", "difficulty": "small_select"}, {"table_id": "editor", "query": "SELECT Name, Age \n FROM editor", "table_name": "editor", "query_description": "What are the names and ages of editors?", "results_description": "Kamila Porczyk is 34 years old.", "result": ",Age,Name\n0,34.0,Kamila Porczyk\n", "difficulty": "small_select"}, {"table_id": "submission", "query": "SELECT Author, College \n FROM submission \n WHERE College = 'Florida' OR College = 'Temple'", "table_name": "submission", "query_description": "Which authors with submissions are from college \"Florida\" or \"Temple\"?", "results_description": "Sammy Green is from college Florida.", "result": ",Author,College\n0,Sammy Green,Florida\n", "difficulty": "small_select"}, {"table_id": "airports", "query": "SELECT name, elevation \n FROM airports \n WHERE elevation BETWEEN -50 AND 50", "table_name": "airports", "query_description": "What are the names of all airports whose elevation is between -50 and 50?", "results_description": "The Madang Airport has an elevation of 20", "result": ",name,elevation\n0,Madang Airport,20\n", "difficulty": "small_select"}, {"table_id": "list", "query": "SELECT firstname, classroom \n FROM list \n WHERE classroom = 108", "table_name": "list", "query_description": "What are the first names of students in room 108?", "results_description": "LYNNETTE is in classroom 108.", "result": ",Classroom,FirstName\n0,108, LYNNETTE\n", "difficulty": "small_select"}, {"table_id": "film", "query": "SELECT AVG(Gross_in_dollar) AS \"average Gross_in_dollar\" \n FROM film", "table_name": "film", "query_description": "Return the average gross sales in dollars across all films.", "results_description": "The average gross sales of the film is 114827242.38461539 dollars", "result": ",average Gross_in_dollar\n0,114827242.38461539\n", "difficulty": "aggregate"}, {"table_id": "All_documents, Ref_document_types", "query": "SELECT T2.document_type_name AS \"Ref_document_types document_type_name\", T1.document_name AS \"All_documents document_name\" \n FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code \n WHERE T1.document_name = 'How to read a book'", "table_name": "All_documents, Ref_document_types", "query_description": "What is the document type name for the document with name \"How to read a book\"?", "results_description": "The document with name How to read a book has a document type name Book.", "result": ",All_documents document_name,Ref_document_types document_type_name\n0,How to read a book,Book\n", "difficulty": "join"}, {"table_id": "song", "query": "SELECT AVG(rating) AS \"average rating\", languages \n FROM song \n GROUP BY languages", "table_name": "song", "query_description": "What is the average rating of songs for each language?", "results_description": "The average rating was 7.5 for bangla language.", "result": ",languages,average rating\n0,bangla,7.5\n", "difficulty": "aggregate_group_by"}, {"table_id": "Settlements", "query": "SELECT COUNT(*) AS \"count of Settlements\" \n FROM Settlements", "table_name": "Settlements", "query_description": "How many settlements are there in total?", "results_description": "The count of Settlements is 15.", "result": ",count of Settlements\n0,15\n", "difficulty": "aggregate"}, {"table_id": "VOTING_RECORD", "query": "SELECT Election_Cycle, COUNT(*) AS \"count of VOTING_RECORD\" \n FROM VOTING_RECORD \n GROUP BY Election_Cycle", "table_name": "VOTING_RECORD", "query_description": "For each election cycle, report the number of voting records.", "results_description": "The Fall election cycle has 5 voting records.", "result": ",Election_Cycle,count of VOTING_RECORD\n0,Fall,5\n", "difficulty": "aggregate_group_by"}, {"table_id": "student, lives_in, dorm", "query": "SELECT T1.fname AS \"student fname\", T3.dorm_name AS \"dorm dorm_name\" \n FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid \n WHERE T3.dorm_name = 'Smith Hall'", "table_name": "student, lives_in, dorm", "query_description": "Find the first name of students who are living in the Smith Hall.", "results_description": "Student named Tracy live in Smith Hall dorm", "result": ",student fname,dorm dorm_name\n0,Tracy,Smith Hall\n", "difficulty": "join"}, {"table_id": "Ref_locations", "query": "SELECT location_code, location_name \n FROM Ref_locations", "table_name": "Ref_locations", "query_description": "List all location codes and location names.", "results_description": "Brazil has the location code 'b'.", "result": ",Location_Code,Location_Name\n0,b,Brazil\n", "difficulty": "small_select"}, {"table_id": "products", "query": "SELECT name, price \n FROM products \n WHERE price <= 200", "table_name": "products", "query_description": "Select the name of the products with a price less than or equal to $200.", "results_description": "The product Memory has a price of 120", "result": ",Name,Price\n0,Memory,120\n", "difficulty": "small_select"}, {"table_id": "claims_processing_stages", "query": "SELECT COUNT(*) AS \"count of claims_processing_stages\" \n FROM claims_processing_stages", "table_name": "claims_processing_stages", "query_description": "Find the number of distinct stages in claim processing.", "results_description": "There are 2 claims processing stages.", "result": ",count of claims_processing_stages\n0,2\n", "difficulty": "aggregate"}, {"table_id": "appointment", "query": "SELECT COUNT(*) AS \"count of appointment\" \n FROM appointment", "table_name": "appointment", "query_description": "Count how many appointments have been made in total.", "results_description": "There are 9 appointments", "result": ",count of appointment\n0,9\n", "difficulty": "aggregate"}, {"table_id": "Students", "query": "SELECT login_name, family_name \n FROM Students \n WHERE family_name = 'Ward'", "table_name": "Students", "query_description": "Return the login names of the students whose family name is \"Ward\".", "results_description": "The person with family name Ward has the login name annamae.hoppe.", "result": ",login_name,family_name\n0,annamae.hoppe,Ward\n", "difficulty": "small_select"}, {"table_id": "institution", "query": "SELECT TYPE, founded, enrollment \n FROM institution \n WHERE founded > 1990 AND enrollment >= 1000", "table_name": "institution", "query_description": "Show the institution type with an institution founded after 1990 and an institution with at least 1000 enrollment.", "results_description": "The institution with type Private, founded in 1998, has an enrollment of 1200.", "result": ",Type,Founded,Enrollment\n0,Private,1998.0,1200\n", "difficulty": "small_select"}, {"table_id": "COURSES", "query": "SELECT COUNT(*) AS \"count of COURSES\" \n FROM COURSES", "table_name": "COURSES", "query_description": "Find the total number of courses offered.", "results_description": "There are 15 courses.", "result": ",count of COURSES\n0,15\n", "difficulty": "aggregate"}, {"table_id": "Catalog_Structure", "query": "SELECT catalog_level_name, catalog_level_number \n FROM Catalog_Structure \n WHERE catalog_level_number BETWEEN 5 AND 10", "table_name": "Catalog_Structure", "query_description": "Find the name and level of catalog structure with level between 5 and 10.", "results_description": "The catalog level sub-category has the level number 8.", "result": ",catalog_level_name,catalog_level_number\n0,Sub-Category,8\n", "difficulty": "small_select"}, {"table_id": "WINE", "query": "SELECT COUNT(*) AS \"count of WINE\", Winery \n FROM WINE \n WHERE Winery = 'Robert Biale'", "table_name": "WINE", "query_description": "Count the number of wines produced at Robert Biale winery.", "results_description": "The Robert Biale winery produces 4 wines.", "result": ",Winery,count of WINE\n0,Robert Biale,4\n", "difficulty": "aggregate"}, {"table_id": "customers", "query": "SELECT customer_id, customer_name \n FROM customers \n WHERE customer_name LIKE '%Diana%'", "table_name": "customers", "query_description": "What are the IDs of customers who have \"Diana\" in part of their names?", "results_description": "The customer named Dr. Diana Rath with customer ID 562 has \"Diana\" in part of their name", "result": ",Customer_ID,Customer_name\n0,562,Dr. Diana Rath\n", "difficulty": "small_select"}, {"table_id": "match_season", "query": "SELECT College \n FROM match_season \n GROUP BY College \n HAVING COUNT(*) >= 2", "table_name": "match_season", "query_description": "What are the names of all colleges that have two or more players?", "results_description": "The college of Maryland has more than 2 players.", "result": ",College\n0,Maryland\n", "difficulty": "aggregate_group_by"}, {"table_id": "ref_product_categories, products", "query": "SELECT T1.product_category_description AS \"ref_product_categories product_category_description\", T2.product_description AS \"products product_description\" \n FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code = T2.product_category_code \n WHERE T2.product_description LIKE '%t%'", "table_name": "ref_product_categories, products", "query_description": "Find the category descriptions of the products whose descriptions include letter 't'.", "results_description": "The product with description et has category description Spices.", "result": ",products product_description,ref_product_categories product_category_description\n0,et,Spices\n", "difficulty": "join"}, {"table_id": "airlines", "query": "SELECT COUNT(*) AS \"count of airlines\" \n FROM airlines", "table_name": "airlines", "query_description": "How many airlines are there?", "results_description": "There are 6162 airlines.", "result": ",count of airlines\n0,6162\n", "difficulty": "aggregate"}, {"table_id": "product", "query": "SELECT product \n FROM product \n WHERE product LIKE '%Scanner%'", "table_name": "product", "query_description": "Find all the product whose name contains the word \"Scanner\".", "results_description": "The name of the product is Fujitsu fi-6130 A4 Series Scanner.", "result": ",product\n0,Fujitsu fi-6130 A4 Series Scanner\n", "difficulty": "small_select"}, {"table_id": "artist, song", "query": "SELECT T1.artist_name AS \"artist artist_name\", T1.gender AS \"artist gender\", T2.releasedate AS \"song releasedate\" \n FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name \n WHERE T2.releasedate LIKE '%Mar%'", "table_name": "artist, song", "query_description": "List the name and gender for all artists who released songs in March.", "results_description": "The male artist Michel released a song in 17-MAR-2002.", "result": ",artist gender,song releasedate,artist artist_name\n0,Male,17-MAR-2002,Michel\n", "difficulty": "join"}, {"table_id": "volume", "query": "SELECT MAX(Weeks_on_Top) AS \"maximum Weeks_on_Top\", MIN(Weeks_on_Top) AS \"minimum Weeks_on_Top\" \n FROM volume", "table_name": "volume", "query_description": "What are the maximum and minimum week on top of all volumes?", "results_description": "The minimum is 1 week and the maximum is 3 weeks on top of all volumes", "result": ",maximum Weeks_on_Top,minimum Weeks_on_Top\n0,3.0,1.0\n", "difficulty": "aggregate"}, {"table_id": "driver", "query": "SELECT party, age, home_city \n FROM driver \n WHERE home_city = 'Hartford' AND age > 40", "table_name": "driver", "query_description": "Show the party with drivers from Hartford and drivers older than 40.", "results_description": "The driver's age is 46, belongs to the democratic party and the home city is Hartford.", "result": ",Age,Party,Home_city\n0,46,Dem,Hartford\n", "difficulty": "small_select"}, {"table_id": "Assessment_Notes", "query": "SELECT date_of_notes \n FROM Assessment_Notes", "table_name": "Assessment_Notes", "query_description": "What are the dates of the assessment notes?", "results_description": "The date of the assessment note is 1978-04-15 04:49:18", "result": ",date_of_notes\n0,1978-04-15 04:49:18\n", "difficulty": "small_select"}, {"table_id": "entrepreneur", "query": "SELECT COUNT(*) AS \"count of entrepreneur\" \n FROM entrepreneur", "table_name": "entrepreneur", "query_description": "Count the number of entrepreneurs.", "results_description": "There are 6 entrepreneurs.", "result": ",count of entrepreneur\n0,6\n", "difficulty": "aggregate"}, {"table_id": "station, trip", "query": "SELECT T1.lat AS \"station lat\", T1.long AS \"station long\", T1.city AS \"station city\", T2.duration AS \"trip duration\" \n FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id ORDER BY T2.duration", "table_name": "station, trip", "query_description": "What is the latitude, longitude, city of the station from which the shortest trip started?", "results_description": "The shortest trip had a duration of 61 and started from a station in San Francisco with a latitude of 37.776617 and a longtitude of -122.395260", "result": ",station lat,station city,station long,trip duration\n0,37.776617,San Francisco,-122.39526000000001,61\n", "difficulty": "join"}, {"table_id": "salary, team", "query": "SELECT SUM(T1.salary) AS \"sum of salary\", T2.name AS \"team name\", T1.year AS \"salary year\" \n FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br \n WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010", "table_name": "salary, team", "query_description": "What is the total salary paid by team Boston Red Stockings in 2010?", "results_description": "The team named Boston Red Stockings paid 812236665 on salaries in 2010.", "result": ",team name,salary year,sum of salary\n0,Boston Red Stockings,2010,812236665\n", "difficulty": "join_aggregate"}, {"table_id": "ref_colors", "query": "SELECT color_description \n FROM ref_colors", "table_name": "ref_colors", "query_description": "List the description of all the colors.", "results_description": "The color's description is \"red\".", "result": ",color_description\n0,red\n", "difficulty": "small_select"}, {"table_id": "Products", "query": "SELECT Product_Name, Product_Type_Code \n FROM Products", "table_name": "Products", "query_description": "What are the names and type codes of products?", "results_description": "Business Policy is a book.", "result": ",Product_Name,Product_Type_Code\n0,Business Policy,Books\n", "difficulty": "small_select"}, {"table_id": "CUSTOMER", "query": "SELECT FirstName, LastName, Email \n FROM CUSTOMER \n WHERE Email = 'luisg@embraer.com.br'", "table_name": "CUSTOMER", "query_description": "Find the full name of the customer with the email \"luisg@embraer.com.br\".", "results_description": "The email address of Lu\u00eds Gon\u00e7alves is luisg@embraer.com.br", "result": ",Email,LastName,FirstName\n0,luisg@embraer.com.br,Gon\u00e7alves,Lu\u00eds\n", "difficulty": "small_select"}, {"table_id": "employees", "query": "SELECT first_name, department_id, last_name \n FROM employees \n WHERE last_name = 'McEwen'", "table_name": "employees", "query_description": "What are the first names and department numbers for employees with last name McEwen?", "results_description": "Allan McEwen is form the department with id 80.", "result": ",LAST_NAME,FIRST_NAME,DEPARTMENT_ID\n0,McEwen,Allan,80\n", "difficulty": "small_select"}, {"table_id": "player, tryout", "query": "SELECT AVG(T1.HS) AS \"average HS\", MAX(T1.HS) AS \"maximum HS\", T2.decision AS \"tryout decision\" \n FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID \n WHERE T2.decision = 'yes'", "table_name": "player, tryout", "query_description": "What is the average and maximum number of hours students who made the team practiced?", "results_description": "For the students who made the team the maximum hours were 1600 and the average hours were 1400.", "result": ",average HS,maximum HS,tryout decision\n0,1400.0,1600,yes\n", "difficulty": "join_aggregate"}, {"table_id": "ROLES", "query": "SELECT role_code, role_name, role_description \n FROM ROLES", "table_name": "ROLES", "query_description": "What are all the role codes, role names, and role descriptions?", "results_description": "The role with code MG has the name Manager and its description is Vero harum corrupti odit ipsa vero et odio. Iste et recusandae temporibus maxime. Magni aspernatur fugit quis explicabo totam esse corrupti.", "result": ",Role_Code,Role_Name,Role_Description\n0,MG,Manager,Vero harum corrupti odit ipsa vero et odio. Iste et recusandae temporibus maxime. Magni aspernatur fugit quis explicabo totam esse corrupti.\n", "difficulty": "large_select"}, {"table_id": "gas_station", "query": "SELECT manager_name, open_year \n FROM gas_station \n WHERE open_year > 2000 \n GROUP BY manager_name ORDER BY COUNT(*) DESC", "table_name": "gas_station", "query_description": "What is the name of the manager with the most gas stations that opened after 2000?", "results_description": "Colin Denman is the manager of a gas station which opened in 2002.", "result": ",Open_Year,Manager_Name\n0,2002,Colin Denman\n", "difficulty": "aggregate_group_by"}, {"table_id": "station", "query": "SELECT name, total_passengers, LOCATION \n FROM station \n WHERE LOCATION <> 'London'", "table_name": "station", "query_description": "Show the names and total passengers for all train stations not in London.", "results_description": "The train station Birmingham New Street, in Birmingham, has 36.331 total passengers.", "result": ",Name,Location,Total_Passengers\n0,Birmingham New Street,Birmingham,36.331\n", "difficulty": "small_select"}, {"table_id": "Flight", "query": "SELECT flno, distance \n FROM Flight \n WHERE distance > 2000", "table_name": "Flight", "query_description": "Show flight number for all flights with more than 2000 distance.", "results_description": "The flight with number 99 has a distance of 2308.", "result": ",flno,distance\n0,99,2308\n", "difficulty": "small_select"}, {"table_id": "country, roller_coaster", "query": "SELECT T2.Name AS \"roller_coaster Name\", T1.Name AS \"country Name\" \n FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID", "table_name": "country, roller_coaster", "query_description": "Show the names of roller coasters and names of country they are in.", "results_description": "Boardwalk Bullet is in Austria.", "result": ",country Name,roller_coaster Name\n0,Austria,Boardwalk Bullet\n", "difficulty": "join"}, {"table_id": "BOOKINGS", "query": "SELECT COUNT(*) AS \"count of BOOKINGS\" \n FROM BOOKINGS", "table_name": "BOOKINGS", "query_description": "How many bookings do we have?", "results_description": "There are 15 bookings", "result": ",count of BOOKINGS\n0,15\n", "difficulty": "aggregate"}, {"table_id": "FACULTY", "query": "SELECT Room, Rank, Building \n FROM FACULTY \n WHERE Rank = 'Professor' AND Building = 'NEB'", "table_name": "FACULTY", "query_description": "What are the rooms for members of the faculty who are professors and who live in building NEB?", "results_description": "The room 219 is for professors who live in the building NEB.", "result": ",Rank,Room,Building\n0,Professor,219,NEB\n", "difficulty": "small_select"}, {"table_id": "school_details", "query": "SELECT Nickname, Division \n FROM school_details \n WHERE Division <> 'Division 1'", "table_name": "school_details", "query_description": "Show the nicknames of schools that are not in division 1.", "results_description": "The school nicknamed Auks is in Division 3.", "result": ",Division,Nickname\n0,Division 3,Auks\n", "difficulty": "small_select"}, {"table_id": "web_client_accelerator", "query": "SELECT name, operating_system, CONNECTION \n FROM web_client_accelerator \n WHERE CONNECTION <> 'Broadband'", "table_name": "web_client_accelerator", "query_description": "What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection?", "results_description": "CACHEbox has connection Broadband, Satellite, Wireless, Fiber, DSL and operating system Appliance (Linux).", "result": ",name,Connection,Operating_system\n0,CACHEbox,\"Broadband, Satellite, Wireless, Fiber, DSL\",Appliance (Linux)\n", "difficulty": "small_select"}, {"table_id": "wrestler", "query": "SELECT Name, LOCATION \n FROM wrestler", "table_name": "wrestler", "query_description": "What are the names and location of the wrestlers?", "results_description": "The name of the wrestler is Rey Misterio Sr. and the location is Tijuana , Mexico", "result": ",Name,Location\n0,Rey Misterio Sr.,\"Tijuana , Mexico\"\n", "difficulty": "small_select"}, {"table_id": "salary, player", "query": "SELECT SUM(T1.salary) AS \"sum of salary\", T2.name_last AS \"player name_last\", T1.year AS \"salary year\", T2.name_first AS \"player name_first\" \n FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id \n WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990", "table_name": "salary, player", "query_description": "How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total?", "results_description": "Barker Len in 1985 had a total salary of 3612500.", "result": ",salary year,sum of salary,player name_last,player name_first\n0,1985,3612500,Barker,Len\n", "difficulty": "join_aggregate"}, {"table_id": "park", "query": "SELECT COUNT(*) AS \"count of park\", state \n FROM park \n WHERE state = 'NY'", "table_name": "park", "query_description": "How many parks are there in the state of NY?", "results_description": "There are 40 parks in the state of NY", "result": ",state,count of park\n0,NY,40\n", "difficulty": "aggregate"}, {"table_id": "accounts, savings", "query": "SELECT SUM(T2.balance) AS \"sum of balance\", T1.name AS \"accounts name\" \n FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid \n WHERE T1.name <> 'Brown'", "table_name": "accounts, savings", "query_description": "What is the total balance of savings accounts not belonging to someone with the name Brown?", "results_description": "The accounts under the name Wang have a total balance of 1000310299", "result": ",accounts name,sum of balance\n0,Wang,1000310299.0\n", "difficulty": "join_aggregate"}, {"table_id": "Aircraft", "query": "SELECT name, distance \n FROM Aircraft", "table_name": "Aircraft", "query_description": "Show name and distance for all aircrafts.", "results_description": "The distance of aircraft Boeing 747-400 is 8430.", "result": ",name,distance\n0,Boeing 747-400,8430\n", "difficulty": "small_select"}, {"table_id": "address", "query": "SELECT phone, postal_code, address \n FROM address \n WHERE address = '1031 Daugavpils Parkway'", "table_name": "address", "query_description": "What is the phone number and postal code of the address 1031 Daugavpils Parkway?", "results_description": "Address 1031 Daugavpils Parkway has the phone number 107137400143 and the postal code 59025.", "result": ",phone,address,postal_code\n0,107137400143,1031 Daugavpils Parkway,59025\n", "difficulty": "small_select"}, {"table_id": "invoices", "query": "SELECT billing_state, COUNT(*) AS \"count of invoices\", SUM(total) AS \"sum of total\" \n FROM invoices \n WHERE billing_state = 'CA'", "table_name": "invoices", "query_description": "What is the number of invoices and total money billed in them from CA?", "results_description": "For the state of CA there are 21 invoices with a sum of 115.85999999999997.", "result": ",sum of total,billing_state,count of invoices\n0,115.85999999999997,CA,21\n", "difficulty": "aggregate"}, {"table_id": "albums", "query": "SELECT title \n FROM albums", "table_name": "albums", "query_description": "List every album's title.", "results_description": "One of the available albums is \"For Those About To Rock We Salute You\"", "result": ",title\n0,For Those About To Rock We Salute You\n", "difficulty": "small_select"}, {"table_id": "county_public_safety", "query": "SELECT MIN(Crime_rate) AS \"minimum Crime_rate\", MAX(Crime_rate) AS \"maximum Crime_rate\" \n FROM county_public_safety", "table_name": "county_public_safety", "query_description": "Return the minimum and maximum crime rates across all counties.", "results_description": "The maximum crime rate across all counties is 178 and the minimum is 49", "result": ",maximum Crime_rate,minimum Crime_rate\n0,178.0,49.0\n", "difficulty": "aggregate"}, {"table_id": "club", "query": "SELECT clublocation, clubname \n FROM club \n WHERE clubname = 'Pen and Paper Gaming'", "table_name": "club", "query_description": "Find the location of the club \"Pen and Paper Gaming\".", "results_description": "The club with name Pen and Paper Gaming is located in HHH", "result": ",ClubName,ClubLocation\n0,Pen and Paper Gaming,HHH\n", "difficulty": "small_select"}, {"table_id": "people, perpetrator", "query": "SELECT SUM(T2.Killed) AS \"sum of Killed\", T1.Height AS \"people Height\" \n FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID \n WHERE T1.Height > 1.84", "table_name": "people, perpetrator", "query_description": "What is the total kills of the perpetrators with height more than 1.84.", "results_description": "There were 163 people totally killed with height 6.4.", "result": ",people Height,sum of Killed\n0,6.4,163.0\n", "difficulty": "join_aggregate"}, {"table_id": "ship", "query": "SELECT flag \n FROM ship \n GROUP BY flag ORDER BY COUNT(*) DESC", "table_name": "ship", "query_description": "Return the flag that is most common among all ships.", "results_description": "The flag of Panama", "result": ",Flag\n0,Panama\n", "difficulty": "aggregate_group_by"}, {"table_id": "customers", "query": "SELECT address_line_1, address_line_2, email_address \n FROM customers \n WHERE email_address = 'vbogisich@example.org'", "table_name": "customers", "query_description": "What are lines 1 and 2 of the addressed of the customer with the email \"vbogisich@example.org\"?", "results_description": "The address line 1 of the customer with email address vbogisich@example.org is 72144 Katlynn Flat Suite 512 and the address line 2 is Suite 959", "result": ",email_address,address_line_1,address_line_2\n0,vbogisich@example.org,72144 Katlynn Flat Suite 512,Suite 959\n", "difficulty": "small_select"}, {"table_id": "Aircraft", "query": "SELECT COUNT(*) AS \"count of Aircraft\", distance \n FROM Aircraft \n WHERE distance BETWEEN 1000 AND 5000", "table_name": "Aircraft", "query_description": "How many aircrafts have distance between 1000 and 5000?", "results_description": "9 aircrafts have a distance of 3383", "result": ",distance,count of Aircraft\n0,3383,9\n", "difficulty": "aggregate"}, {"table_id": "races, results", "query": "SELECT AVG(T2.fastestlapspeed) AS \"average fastestlapspeed\", T1.name AS \"races name\", T1.year AS \"races year\" \n FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid \n WHERE T1.year > 2014 \n GROUP BY T1.name ORDER BY T1.year", "table_name": "races, results", "query_description": "What is the average fastest lap speed for races held after 2004, for each race, ordered by year?", "results_description": "The Abu Dhabi Grand Prix race, held in 2015, had an average fastest lap speed of 184.10512903225808.", "result": ",races name,races year,average fastestlapspeed\n0,Abu Dhabi Grand Prix,2015,184.10512903225808\n", "difficulty": "join_aggregate"}, {"table_id": "Course_Authors_and_Tutors", "query": "SELECT address_line_1 \n FROM Course_Authors_and_Tutors", "table_name": "Course_Authors_and_Tutors", "query_description": "List the addresses of all the course authors or tutors.", "results_description": "There is a course author or tutor that lives in 756 Monahan Mews Spinkashire, NJ 64230-5098.", "result": ",address_line_1\n0,\"756 Monahan Mews\nSpinkashire, NJ 64230-5098\"\n", "difficulty": "small_select"}, {"table_id": "Documents", "query": "SELECT COUNT(*) AS \"count of Documents\" \n FROM Documents", "table_name": "Documents", "query_description": "Count the number of documents.", "results_description": "The number of documents is 15.", "result": ",count of Documents\n0,15\n", "difficulty": "aggregate"}, {"table_id": "pilot", "query": "SELECT Name, Age \n FROM pilot \n WHERE Age >= 25", "table_name": "pilot", "query_description": "What are the name of pilots aged 25 or older?", "results_description": "The pilot named Ayana Spencer is 25 years old.", "result": ",Age,Name\n0,25,Ayana Spencer\n", "difficulty": "small_select"}, {"table_id": "documents", "query": "SELECT document_type_code, document_name \n FROM documents \n WHERE document_name = 'David CV'", "table_name": "documents", "query_description": "Return the type code of the document named \"David CV\".", "results_description": "The document with name David CV has a document type code of CV", "result": ",document_name,document_type_code\n0,David CV,CV\n", "difficulty": "small_select"}, {"table_id": "roller_coaster", "query": "SELECT LENGTH, Height \n FROM roller_coaster", "table_name": "roller_coaster", "query_description": "What are the lengths and heights of roller coasters?", "results_description": "The lengths of roller coasters are 3236 and their heights are 96", "result": ",Height,Length\n0,96.0,3236.0\n", "difficulty": "small_select"}, {"table_id": "Course_Authors_and_Tutors, Courses", "query": "SELECT T2.course_name AS \"Courses course_name\", T1.personal_name AS \"Course_Authors_and_Tutors personal_name\" \n FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id \n WHERE T1.personal_name = 'Julio'", "table_name": "Course_Authors_and_Tutors, Courses", "query_description": "Find the names of courses taught by the tutor who has personal name \"Julio\".", "results_description": "The Japanese's course author and tutor has personal name Julio.", "result": ",Courses course_name,Course_Authors_and_Tutors personal_name\n0,Japanese,Julio\n", "difficulty": "join"}, {"table_id": "captain", "query": "SELECT rank \n FROM captain \n GROUP BY rank ORDER BY COUNT(*) DESC", "table_name": "captain", "query_description": "Which rank is the most common among captains?", "results_description": "The most common rank among captains is Midshipman", "result": ",Rank\n0,Midshipman\n", "difficulty": "aggregate_group_by"}, {"table_id": "body_builder, people", "query": "SELECT T2.Birth_Date AS \"people Birth_Date\", T2.Birth_Place AS \"people Birth_Place\", T1.Total AS \"body_builder Total\" \n FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC", "table_name": "body_builder, people", "query_description": "What are the birth date and birth place of the body builder with the highest total points?", "results_description": "The are totally 317.5 body builders that were born in January 1, 1992 in Port Huron, Michigan.", "result": ",people Birth_Date,body_builder Total,people Birth_Place\n0,\"January 1, 1992\",317.5,\"Port Huron, Michigan\"\n", "difficulty": "join"}, {"table_id": "Drama_Workshop_Groups", "query": "SELECT Store_Name \n FROM Drama_Workshop_Groups", "table_name": "Drama_Workshop_Groups", "query_description": "What are the store names of drama workshop groups?", "results_description": "The store name is Amely Cafe", "result": ",Store_Name\n0,Amely Cafe\n", "difficulty": "small_select"}, {"table_id": "GENRE, TRACK", "query": "SELECT AVG(T2.UnitPrice) AS \"average UnitPrice\", T1.Name AS \"GENRE Name\" \n FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId \n WHERE T1.Name = 'Rock'", "table_name": "GENRE, TRACK", "query_description": "Find the average unit price of tracks from the Rock genre.", "results_description": "The genre of rock has an average unit price of 0.9900000000000079.", "result": ",GENRE Name,average UnitPrice\n0,Rock,0.9900000000000079\n", "difficulty": "join_aggregate"}, {"table_id": "tryout, player", "query": "SELECT T1.cName AS \"tryout cName\", T2.pName AS \"player pName\" \n FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID \n WHERE T2.pName LIKE 'D%'", "table_name": "tryout, player", "query_description": "Which colleges does each player with a name that starts with the letter D who tried out go to?", "results_description": "The player named David tried out for ASU", "result": ",player pName,tryout cName\n0,David,ASU\n", "difficulty": "join"}, {"table_id": "users", "query": "SELECT user_name, password, role_code \n FROM users \n GROUP BY role_code ORDER BY COUNT(*) DESC", "table_name": "users", "query_description": "List all the username and passwords of users with the most popular role.", "results_description": "The user named tremblay.raheem has role code value of DBA and their password is 9bc25a040d5647ced5ec32e1a455e90fafc10bcb", "result": ",password,role_code,user_name\n0,9bc25a040d5647ced5ec32e1a455e90fafc10bcb,DBA,tremblay.raheem\n", "difficulty": "aggregate_group_by"}, {"table_id": "Allergy_type, Has_allergy, Student", "query": "SELECT T1.Allergy AS \"Allergy_type Allergy\", T1.AllergyType AS \"Allergy_type AllergyType\", T3.Fname AS \"Student Fname\" \n FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID \n WHERE T3.Fname = 'Lisa' ORDER BY T1.Allergy", "table_name": "Allergy_type, Has_allergy, Student", "query_description": "What are the allergies the girl named Lisa has? And what are the types of them? Order the result by allergy names.", "results_description": "The student named Lisa has an allergy in anchovies which are of type food.", "result": ",Student Fname,Allergy_type Allergy,Allergy_type AllergyType\n0,Lisa,Anchovies,food\n", "difficulty": "join"}, {"table_id": "Apartment_Bookings, Guests", "query": "SELECT T1.booking_start_date AS \"Apartment_Bookings booking_start_date\", T1.booking_start_date AS \"Apartment_Bookings booking_start_date\", T2.gender_code AS \"Guests gender_code\" \n FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id \n WHERE T2.gender_code = 'Female'", "table_name": "Apartment_Bookings, Guests", "query_description": "Show the start dates and end dates of all the apartment bookings made by guests with gender code \"Female\".", "results_description": "The start date of all the apartment bookings made by guests with gender code \"Female\" is 2016-04-01 06:28:08", "result": ",Guests gender_code,Apartment_Bookings booking_start_date\n0,Female,2016-04-01 06:28:08\n", "difficulty": "join"}, {"table_id": "ENROLLED_IN, GRADECONVERSION, STUDENT", "query": "SELECT MAX(T2.gradepoint) AS \"maximum gradepoint\", MIN(T2.gradepoint) AS \"minimum gradepoint\", T3.city_code AS \"STUDENT city_code\" \n FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID \n WHERE T3.city_code = 'NYC'", "table_name": "ENROLLED_IN, GRADECONVERSION, STUDENT", "query_description": "Give the maximum and minimum gradepoints for students living in NYC?", "results_description": "Student that live in NYC have a minimum gradepoint of 2 and a maximum of 4", "result": ",STUDENT city_code,maximum gradepoint,minimum gradepoint\n0,NYC,4.0,2.0\n", "difficulty": "join_aggregate"}, {"table_id": "files, song", "query": "SELECT MAX(T2.resolution) AS \"maximum resolution\", MIN(T2.resolution) AS \"minimum resolution\", T1.duration AS \"files duration\" \n FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id \n WHERE T1.duration LIKE '3:%'", "table_name": "files, song", "query_description": "What is the maximum and minimum resolution of all songs that are approximately 3 minutes long?", "results_description": "The minimum and maximum resolution for files with duration 3:45 are 1080 and 1080 respectively", "result": ",files duration,maximum resolution,minimum resolution\n0,3:45,1080,1080\n", "difficulty": "join_aggregate"}, {"table_id": "enzyme", "query": "SELECT MAX(OMIM) AS \"maximum OMIM\" \n FROM enzyme", "table_name": "enzyme", "query_description": "What is the maximum OMIM value in the database?", "results_description": "The maximum OMIM value in the database is 606938", "result": ",maximum OMIM\n0,606938\n", "difficulty": "aggregate"}, {"table_id": "club", "query": "SELECT COUNT(*) AS \"count of club\" \n FROM club", "table_name": "club", "query_description": "Count the total number of clubs.", "results_description": "There are 4 clubs.", "result": ",count of club\n0,4\n", "difficulty": "aggregate"}, {"table_id": "school_bus, school, driver", "query": "SELECT T2.school AS \"school school\", T3.name AS \"driver name\" \n 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", "table_name": "school_bus, school, driver", "query_description": "Show the school name and driver name for all school buses.", "results_description": "Henry Genga is a school driver in Noelani Elementary School.", "result": ",driver name,school school\n0,Henry Genga,Noelani Elementary School\n", "difficulty": "join"}, {"table_id": "Guests", "query": "SELECT guest_first_name, guest_last_name \n FROM Guests", "table_name": "Guests", "query_description": "What are the first names and last names of all the guests?", "results_description": "One of the guests is named Kip DuBuque", "result": ",guest_last_name,guest_first_name\n0,DuBuque,Kip\n", "difficulty": "small_select"}, {"table_id": "country, match_season", "query": "SELECT T2.Player AS \"match_season Player\", T1.Country_name AS \"country Country_name\" \n FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country \n WHERE T1.Country_name = 'Indonesia'", "table_name": "country, match_season", "query_description": "Who are the players from Indonesia?", "results_description": "The player Damani Ralph is from Indonesia.", "result": ",match_season Player,country Country_name\n0,Damani Ralph Category:Articles with hCards,Indonesia\n", "difficulty": "join"}, {"table_id": "pilot", "query": "SELECT Nationality, COUNT(*) AS \"count of pilot\" \n FROM pilot \n GROUP BY Nationality", "table_name": "pilot", "query_description": "What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality.", "results_description": "There is 1 pilot that is from Nigeria", "result": ",Nationality,count of pilot\n0,Nigeria,1\n", "difficulty": "aggregate_group_by"}, {"table_id": "county", "query": "SELECT MAX(Population) AS \"maximum Population\", MIN(Population) AS \"minimum Population\" \n FROM county", "table_name": "county", "query_description": "What are the maximum and minimum population of the counties?", "results_description": "The max country population is 90000, while the minimum is 13300", "result": ",maximum Population,minimum Population\n0,90000.0,13300.0\n", "difficulty": "aggregate"}, {"table_id": "market", "query": "SELECT COUNT(*) AS \"count of market\", Number_cities \n FROM market \n WHERE Number_cities < 300", "table_name": "market", "query_description": "How many markets have number of cities smaller than 300?", "results_description": "There are three markets with 209 cities", "result": ",Number_cities,count of market\n0,209,3\n", "difficulty": "aggregate"}, {"table_id": "city", "query": "SELECT Hispanic, Black \n FROM city \n WHERE Black > 10", "table_name": "city", "query_description": "What are the percentage of hispanics in cities with the black percentage higher than 10?", "results_description": "The percentage of black people is 12.6 and of hispanic people is 99.5.", "result": ",Black,Hispanic\n0,12.6,99.5\n", "difficulty": "small_select"}, {"table_id": "COURSE", "query": "SELECT CName, Credits \n FROM COURSE \n WHERE Credits = 1", "table_name": "COURSE", "query_description": "List all names of courses with 1 credit?", "results_description": "The course INTRODUCTION TO COMPUTER SCIENCE has 1 credit.", "result": ",CName,Credits\n0,INTRODUCTION TO COMPUTER SCIENCE,1\n", "difficulty": "small_select"}, {"table_id": "teachers", "query": "SELECT lastname, classroom \n FROM teachers \n WHERE classroom = 109", "table_name": "teachers", "query_description": "Which teachers teach in classroom 109? Give me their last names.", "results_description": "The last name of teachers, who teach in classroom 109, is KAWA", "result": ",LastName,Classroom\n0,KAWA,109\n", "difficulty": "small_select"}, {"table_id": "mountain", "query": "SELECT Range \n FROM mountain \n GROUP BY Range ORDER BY COUNT(*) DESC", "table_name": "mountain", "query_description": "Which range contains the most mountains?", "results_description": "The range is Rwenzori.", "result": ",Range\n0,Rwenzori\n", "difficulty": "aggregate_group_by"}, {"table_id": "Sportsinfo, Student", "query": "SELECT T2.Lname AS \"Student Lname\", T1.onscholarship AS \"Sportsinfo onscholarship\" \n FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID \n WHERE T1.onscholarship = 'Y'", "table_name": "Sportsinfo, Student", "query_description": "What are the last names for all scholarship students?", "results_description": "Kim got a scholarship.", "result": ",Student Lname,Sportsinfo onscholarship\n0,Kim,Y\n", "difficulty": "join"}, {"table_id": "home_game, team", "query": "SELECT SUM(T1.games) AS \"sum of games\", T2.name AS \"team name\", T1.year AS \"home_game year\" \n FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br \n WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000", "table_name": "home_game, team", "query_description": "How many home games did the team Boston Red Stockings play from 1990 to 2000 in total?", "results_description": "The team Boston Red Stockings had 4325 games in the year 1990. ", "result": ",team name,sum of games,home_game year\n0,Boston Red Stockings,4325,1990\n", "difficulty": "join_aggregate"}, {"table_id": "film", "query": "SELECT title, rating \n FROM film \n WHERE rating = 'R'", "table_name": "film", "query_description": "What are all the movies rated as R? List the titles.", "results_description": "The movie titled AIRPORT POLLOCK is rated as R", "result": ",title,rating\n0,AIRPORT POLLOCK,R\n", "difficulty": "small_select"}, {"table_id": "Customers", "query": "SELECT COUNT(*) AS \"count of Customers\" \n FROM Customers", "table_name": "Customers", "query_description": "How many customers in total?", "results_description": "There are 15 customers in total", "result": ",count of Customers\n0,15\n", "difficulty": "aggregate"}, {"table_id": "faculty", "query": "SELECT SUM(faculty) AS \"sum of faculty\", YEAR \n FROM faculty \n WHERE YEAR = 2002", "table_name": "faculty", "query_description": "How many faculty, in total, are there in the year 2002?", "results_description": "In the year 2002 there were 16592.1 faculty.", "result": ",Year,sum of faculty\n0,2002.0,16592.1\n", "difficulty": "aggregate"}, {"table_id": "train", "query": "SELECT Name, Arrival \n FROM train", "table_name": "train", "query_description": "What are the names and arrival times of trains?", "results_description": "The train Wardha-Ballarshah Pass arrives in 08:54.", "result": ",Name,Arrival\n0,Wardha-Ballarshah Pass,08:54\n", "difficulty": "small_select"}, {"table_id": "club, member_of_club, student", "query": "SELECT AVG(t3.age) AS \"average age\", t1.clubname AS \"club clubname\" \n FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid \n WHERE t1.clubname = 'Bootup Baltimore'", "table_name": "club, member_of_club, student", "query_description": "Find the average age of the members in the club \"Bootup Baltimore\".", "results_description": "The members in the club \"Bootup Baltimore\" have an average age of 17.5", "result": ",average age,club clubname\n0,17.5,Bootup Baltimore\n", "difficulty": "join_aggregate"}, {"table_id": "Ref_locations", "query": "SELECT COUNT(*) AS \"count of Ref_locations\" \n FROM Ref_locations", "table_name": "Ref_locations", "query_description": "Show the number of locations.", "results_description": "There are 5 locations.", "result": ",count of Ref_locations\n0,5\n", "difficulty": "aggregate"}, {"table_id": "classroom", "query": "SELECT COUNT(*) AS \"count of classroom\", building \n FROM classroom \n WHERE building <> 'Lamberton'", "table_name": "classroom", "query_description": "How many classrooms are not in Lamberton?", "results_description": "There are 28 classrooms in the Alumni building", "result": ",building,count of classroom\n0,Alumni,28\n", "difficulty": "aggregate"}, {"table_id": "Movie", "query": "SELECT COUNT(*) AS \"count of Movie\", YEAR \n FROM Movie \n WHERE YEAR < 2000", "table_name": "Movie", "query_description": "How many movies were made before 2000?", "results_description": "There were 7 movies in 1939.", "result": ",year,count of Movie\n0,1939,7\n", "difficulty": "aggregate"}, {"table_id": "customer_contact_channels", "query": "SELECT channel_code \n FROM customer_contact_channels \n GROUP BY channel_code \n HAVING COUNT(customer_id) < 5", "table_name": "customer_contact_channels", "query_description": "List all the contact channel codes that were used less than 5 times.", "results_description": "The channel code Cell was used less than 5 times.", "result": ",channel_code\n0,Cell\n", "difficulty": "aggregate_group_by"}, {"table_id": "manufacturers", "query": "SELECT SUM(revenue) AS \"sum of revenue\", founder \n FROM manufacturers \n GROUP BY founder", "table_name": "manufacturers", "query_description": "What is the total revenue of companies started by founder?", "results_description": "The total revenue by companies founded by Andy is 120", "result": ",Founder,sum of revenue\n0,Andy,120.0\n", "difficulty": "aggregate_group_by"}, {"table_id": "repair_assignment, machine, technician", "query": "SELECT T3.Name AS \"technician Name\", T2.quality_rank AS \"machine quality_rank\" \n 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", "table_name": "repair_assignment, machine, technician", "query_description": "Show names of technicians in ascending order of quality rank of the machine they are assigned.", "results_description": "The technician John Brown has a quality rank of 1.", "result": ",technician Name,machine quality_rank\n0,John Brown,1\n", "difficulty": "join"}, {"table_id": "customers, customer_orders, order_items", "query": "SELECT SUM(t3.order_quantity) AS \"sum of order_quantity\", t1.customer_name AS \"customers customer_name\" \n 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 \n WHERE t1.customer_name = 'Rodrick Heaney'", "table_name": "customers, customer_orders, order_items", "query_description": "Tell me the total quantity of products bought by the customer called \"Rodrick Heaney\".", "results_description": "The customer Rodrick Heaney has 21 order quantities in total.", "result": ",sum of order_quantity,customers customer_name\n0,21,Rodrick Heaney\n", "difficulty": "join_aggregate"}, {"table_id": "staff, complaints, products", "query": "SELECT t1.last_name AS \"staff last_name\", t3.product_price AS \"products product_price\" \n 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", "table_name": "staff, complaints, products", "query_description": "Find the last name of the staff member who processed the complaint of the cheapest product.", "results_description": "The staff with last name Boehm processed the complaint for a product priced at 2.88.", "result": ",staff last_name,products product_price\n0,Boehm,2.88\n", "difficulty": "join"}, {"table_id": "employees", "query": "SELECT phone_number, salary \n FROM employees \n WHERE salary BETWEEN 8000 AND 12000", "table_name": "employees", "query_description": "Return the phone numbers of employees with salaries between 8000 and 12000.", "results_description": "The salary of employee with number \"590.423.4567\" is 9000.", "result": ",SALARY,PHONE_NUMBER\n0,9000,590.423.4567\n", "difficulty": "small_select"}, {"table_id": "CLASS, enroll, student", "query": "SELECT T3.stu_fname AS \"student stu_fname\", T1.crs_code AS \"CLASS crs_code\", T2.enroll_grade AS \"enroll enroll_grade\" \n 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 \n WHERE T1.crs_code = 'ACCT-211' AND T2.enroll_grade = 'C'", "table_name": "CLASS, enroll, student", "query_description": "What are the first names of all students who took ACCT-211 and received a C?", "results_description": "The student William got a C in the course with code ACCT-211.", "result": ",CLASS crs_code,student stu_fname,enroll enroll_grade\n0,ACCT-211,William,C\n", "difficulty": "join"}, {"table_id": "Customer_Payments", "query": "SELECT payment_method_code, COUNT(*) AS \"count of Customer_Payments\" \n FROM Customer_Payments \n GROUP BY payment_method_code", "table_name": "Customer_Payments", "query_description": "List all payment methods and number of payments using each payment methods.", "results_description": "The number of payments with the Credit Card payment method is 5", "result": ",payment_method_code,count of Customer_Payments\n0,Credit Card,5\n", "difficulty": "aggregate_group_by"}, {"table_id": "checking, savings", "query": "SELECT T1.balance + T2.balance \n FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance", "table_name": "checking, savings", "query_description": "What is the sum of checking and savings balances for all customers, ordered by the total balance?", "results_description": "The sum of two balances is 317.", "result": ",T1.balance + T2.balance\n0,317.0\n", "difficulty": "join"}, {"table_id": "Payments", "query": "SELECT SUM(Amount_Payment) AS \"sum of Amount_Payment\" \n FROM Payments", "table_name": "Payments", "query_description": "Compute the total amount of payment processed.", "results_description": "The total amount of payments processed is 3736533", "result": ",sum of Amount_Payment\n0,3736533\n", "difficulty": "aggregate"}, {"table_id": "WINE", "query": "SELECT COUNT(*) AS \"count of WINE\", Winery \n FROM WINE \n WHERE Winery = 'Robert Biale'", "table_name": "WINE", "query_description": "How many wines are produced at Robert Biale winery?", "results_description": "The Robert Biale winery produces 4 different wines", "result": ",Winery,count of WINE\n0,Robert Biale,4\n", "difficulty": "aggregate"}, {"table_id": "Ref_document_types", "query": "SELECT document_type_code, document_type_name \n FROM Ref_document_types", "table_name": "Ref_document_types", "query_description": "What are all the document type codes and document type names?", "results_description": "The document type code is CV and document type name is CV", "result": ",Document_Type_Code,Document_Type_Name\n0,CV,CV\n", "difficulty": "small_select"}, {"table_id": "market", "query": "SELECT MAX(Number_cities) AS \"maximum Number_cities\", MIN(Number_cities) AS \"minimum Number_cities\" \n FROM market", "table_name": "market", "query_description": "Return the maximum and minimum number of cities across all markets.", "results_description": "The market with the most cities has 700 cities, while the one with the least cities has 209", "result": ",maximum Number_cities,minimum Number_cities\n0,700,209\n", "difficulty": "aggregate"}, {"table_id": "faculty", "query": "SELECT SUM(faculty) AS \"sum of faculty\", YEAR \n FROM faculty \n WHERE YEAR = 2002", "table_name": "faculty", "query_description": "How many faculty is there in total in the year of 2002?", "results_description": "In 2002 the number of faculty was 16592.1", "result": ",Year,sum of faculty\n0,2002.0,16592.1\n", "difficulty": "aggregate"}, {"table_id": "races, results", "query": "SELECT MAX(T2.fastestlapspeed) AS \"maximum fastestlapspeed\", T1.name AS \"races name\", T1.year AS \"races year\" \n FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid \n WHERE T1.year > 2014 \n GROUP BY T1.name ORDER BY T1.year", "table_name": "races, results", "query_description": "What are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year?", "results_description": "The European Grand Prix race, held in 2016, had a maximum fastest lap speed of 202.946.", "result": ",races name,races year,maximum fastestlapspeed\n0,European Grand Prix,2016,202.946\n", "difficulty": "join_aggregate"}, {"table_id": "employees", "query": "SELECT * \n FROM employees \n WHERE salary BETWEEN 8000 AND 12000 AND commission_pct <> 'null' OR department_id <> 40", "table_name": "employees", "query_description": "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.", "results_description": "Steven King was hired in 1987-06-17 with a salary of 24000. His job, manager, and employee ids are AD_PRES, 0, and 100, respectively. The employee stays in department 90 with phone number 515.123.4567. He can be contacted on the email SKING.", "result": ",EMAIL,JOB_ID,SALARY,HIRE_DATE,LAST_NAME,FIRST_NAME,MANAGER_ID,EMPLOYEE_ID,PHONE_NUMBER,DEPARTMENT_ID,COMMISSION_PCT\n0,SKING,AD_PRES,24000,1987-06-17,King,Steven,0,100,515.123.4567,90,0\n", "difficulty": "large_select"}, {"table_id": "GENRE, TRACK", "query": "SELECT AVG(UnitPrice) AS \"average UnitPrice\", T1.Name AS \"GENRE Name\" \n FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId \n WHERE T1.Name = 'Jazz'", "table_name": "GENRE, TRACK", "query_description": "What is the average unit price of tracks that belong to Jazz genre?", "results_description": "The average unit price of jazz tracks is 0.9899999999999978", "result": ",GENRE Name,average UnitPrice\n0,Jazz,0.9899999999999978\n", "difficulty": "join_aggregate"}, {"table_id": "game", "query": "SELECT COUNT(*) AS \"count of game\", season \n FROM game \n WHERE season > 2007", "table_name": "game", "query_description": "How many games are held after season 2007?", "results_description": "The count of games held the season 2008 is 17", "result": ",Season,count of game\n0,2008,17\n", "difficulty": "aggregate"}, {"table_id": "Ref_budget_codes", "query": "SELECT COUNT(*) AS \"count of Ref_budget_codes\" \n FROM Ref_budget_codes", "table_name": "Ref_budget_codes", "query_description": "How many budget types do we have?", "results_description": "There are 3 budget types.", "result": ",count of Ref_budget_codes\n0,3\n", "difficulty": "aggregate"}, {"table_id": "manufacturers", "query": "SELECT founder, name \n FROM manufacturers \n WHERE name = 'Sony'", "table_name": "manufacturers", "query_description": "Who is the founder of Sony?", "results_description": "The founder of the manufacturer named Sony is Andy.", "result": ",Name,Founder\n0,Sony,Andy\n", "difficulty": "small_select"}, {"table_id": "county", "query": "SELECT MAX(Population) AS \"maximum Population\", MIN(Population) AS \"minimum Population\" \n FROM county", "table_name": "county", "query_description": "Return the maximum and minimum population among all counties.", "results_description": "The maximum population of all counties is 90000 and the minimum is 13300", "result": ",maximum Population,minimum Population\n0,90000.0,13300.0\n", "difficulty": "aggregate"}, {"table_id": "CLASS, enroll, student", "query": "SELECT T3.stu_fname AS \"student stu_fname\", T1.crs_code AS \"CLASS crs_code\" \n 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 \n WHERE T1.crs_code = 'ACCT-211'", "table_name": "CLASS, enroll, student", "query_description": "What are the first names of all students in course ACCT-211?", "results_description": "The student William is in course ACCT-211.", "result": ",CLASS crs_code,student stu_fname\n0,ACCT-211,William\n", "difficulty": "join"}, {"table_id": "Student", "query": "SELECT Fname, Lname, Major \n FROM Student \n WHERE Major = 600", "table_name": "Student", "query_description": "List all students' first names and last names who majored in 600.", "results_description": "Linda Smith majored in 600", "result": ",Fname,LName,Major\n0,Linda,Smith,600\n", "difficulty": "small_select"}, {"table_id": "airport", "query": "SELECT MAX(Transit_Passengers) AS \"maximum Transit_Passengers\", MIN(Transit_Passengers) AS \"minimum Transit_Passengers\" \n FROM airport", "table_name": "airport", "query_description": "What are the maximum and minimum number of transit passengers of all aiports.", "results_description": "The maximum number of transit passengers is 156246 while the minimum is 4395.", "result": ",maximum Transit_Passengers,minimum Transit_Passengers\n0,156246.0,4395.0\n", "difficulty": "aggregate"}, {"table_id": "Apartment_Buildings", "query": "SELECT building_address, building_phone, building_manager \n FROM Apartment_Buildings \n WHERE building_manager = 'Brenden'", "table_name": "Apartment_Buildings", "query_description": "What are the address and phone number of the buildings managed by \"Brenden\"?", "results_description": "The building manager Brenden manages the building with phone 915-617-2408x832 and address 354 Otto Villages Charliefort, VT 71664.", "result": ",building_phone,building_address,building_manager\n0,915-617-2408x832,\"354 Otto Villages\nCharliefort, VT 71664\",Brenden\n", "difficulty": "small_select"}, {"table_id": "artist", "query": "SELECT COUNT(*) AS \"count of artist\", age, year_join \n FROM artist \n WHERE age > 46 AND year_join > 1990", "table_name": "artist", "query_description": "How many artists are above age 46 and joined after 1990?", "results_description": "There are 3 artists above age 46 that joined after 1990.", "result": ",Age,Year_Join,count of artist\n0,47,1993,3\n", "difficulty": "aggregate"}, {"table_id": "addresses", "query": "SELECT state_province_county, country, zip_postcode \n FROM addresses \n WHERE zip_postcode LIKE '4%'", "table_name": "addresses", "query_description": "Find the state and country of all cities with post code starting with 4.", "results_description": "The Colorado state of the USA country has the post code 416.", "result": ",country,zip_postcode,state_province_county\n0,USA,416,Colorado\n", "difficulty": "small_select"}, {"table_id": "district", "query": "SELECT district_name, City_Population, city_area \n FROM district \n WHERE city_area > 10 OR City_Population > 100000", "table_name": "district", "query_description": "What are the names of all districts with a city area greater than 10 or have more than 100000 people living there?", "results_description": "The Attock District is in city area 20 and has a population of 94620.", "result": ",City_Area,District_name,City_Population\n0,20.0,Attock District,94620.0\n", "difficulty": "small_select"}, {"table_id": "Staff", "query": "SELECT date_left_staff, last_name, first_name \n FROM Staff \n WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "table_name": "Staff", "query_description": "When did the staff member with first name as Janessa and last name as Sawayn leave the company?", "results_description": "Janessa Sawayn left the company at 2018-03-23 22:53:12", "result": ",last_name,first_name,date_left_staff\n0,Sawayn,Janessa,2018-03-23 22:53:12\n", "difficulty": "small_select"}, {"table_id": "STUDENT", "query": "SELECT COUNT(*) AS \"count of STUDENT\" \n FROM STUDENT", "table_name": "STUDENT", "query_description": "Find the number of students in total.", "results_description": "There are 34 students in total", "result": ",count of STUDENT\n0,34\n", "difficulty": "aggregate"}, {"table_id": "university, basketball_match", "query": "SELECT t2.All_Games AS \"basketball_match All_Games\", t1.location AS \"university location\", team_name \n FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id \n WHERE team_name = 'Clemson'", "table_name": "university, basketball_match", "query_description": "Find the location and all games score of the school that has Clemson as its team name.", "results_description": "The team named Clemson is in the university that is located in New Brunswick, NJ and has scored 24-10 in all games.", "result": ",Team_Name,university location,basketball_match All_Games\n0,Clemson,\"New Brunswick, NJ\",24\u201310\n", "difficulty": "join"}, {"table_id": "EVENTS, Services", "query": "SELECT T1.event_details AS \"EVENTS event_details\", T2.Service_Type_Code AS \"Services Service_Type_Code\" \n FROM EVENTS AS T1 JOIN Services AS T2 ON T1.Service_ID = T2.Service_ID \n WHERE T2.Service_Type_Code = 'Marriage'", "table_name": "EVENTS, Services", "query_description": "what are the event details of the services that have the type code 'Marriage'?", "results_description": "The service with type code \"Marriage\" has the event detail \"Fail\"", "result": ",EVENTS event_details,Services Service_Type_Code\n0,Fail,Marriage\n", "difficulty": "join"}, {"table_id": "people", "query": "SELECT name, height \n FROM people \n WHERE height > 200 OR height < 190", "table_name": "people", "query_description": "find the names of people who are taller than 200 or lower than 190.", "results_description": "Hubert Henno's height is 188.", "result": ",Name,Height\n0,Hubert Henno,188.0\n", "difficulty": "small_select"}, {"table_id": "EMPLOYEE", "query": "SELECT BirthDate, City \n FROM EMPLOYEE \n WHERE City = 'Edmonton'", "table_name": "EMPLOYEE", "query_description": "What are the birth dates of employees living in Edmonton?", "results_description": "The employee that lives in Edmonton has birthdate 1962-02-18 00:00:00.", "result": ",City,BirthDate\n0,Edmonton,1962-02-18 00:00:00\n", "difficulty": "small_select"}, {"table_id": "customers", "query": "SELECT customer_id, customer_name \n FROM customers \n WHERE customer_name LIKE '%Diana%'", "table_name": "customers", "query_description": "Find the IDs of customers whose name contains \"Diana\".", "results_description": "The customer Dr. Diana Rath has ID 562.", "result": ",Customer_ID,Customer_name\n0,562,Dr. Diana Rath\n", "difficulty": "small_select"}, {"table_id": "Sportsinfo, Student", "query": "SELECT SUM(hoursperweek) AS \"sum of hoursperweek\", SUM(gamesplayed) AS \"sum of gamesplayed\", T2.Fname AS \"Student Fname\", T2.Lname AS \"Student Lname\" \n FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID \n WHERE T2.Fname = 'David' AND T2.Lname = 'Shieber'", "table_name": "Sportsinfo, Student", "query_description": "Show total hours per week and number of games played for student David Shieber.", "results_description": "David Shieber has played 64 games, with a total of 15 hours per week.", "result": ",Student Fname,Student Lname,sum of gamesplayed,sum of hoursperweek\n0,David,Shieber,64,15\n", "difficulty": "join_aggregate"}, {"table_id": "student", "query": "SELECT fname, age, city_code \n FROM student \n WHERE city_code = 'PHL' AND age BETWEEN 20 AND 25", "table_name": "student", "query_description": "Find the first name of students living in city PHL whose age is between 20 and 25.", "results_description": "David is 22 and lives in city PHL", "result": ",Age,Fname,city_code\n0,22,David,PHL\n", "difficulty": "small_select"}, {"table_id": "player_coach, coach, player", "query": "SELECT T3.Player_name AS \"player Player_name\", T2.Rank AS \"coach Rank\" \n 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 \n WHERE T2.Rank = 1", "table_name": "player_coach, coach, player", "query_description": "Show the names of players coached by the rank 1 coach.", "results_description": "The player Jean Luc Bouch\u00e9 is coached by a rank 1 coach.", "result": ",coach Rank,player Player_name\n0,1,Jean Luc Bouch\u00e9\n", "difficulty": "join"}, {"table_id": "perpetrator", "query": "SELECT AVG(Injured) AS \"average Injured\" \n FROM perpetrator", "table_name": "perpetrator", "query_description": "What is the average number of people injured by all perpetrators?", "results_description": "The average number of injured people by all perpetrators is 27.2.", "result": ",average Injured\n0,27.2\n", "difficulty": "aggregate"}, {"table_id": "gymnast, people", "query": "SELECT T1.Total_Points AS \"gymnast Total_Points\", T2.Age AS \"people Age\" \n FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age ASC", "table_name": "gymnast, people", "query_description": "What is the total point count of the youngest gymnast?", "results_description": "The age of the youngest gymnast is 20 and the total point count is 57.649", "result": ",people Age,gymnast Total_Points\n0,20.0,57.649\n", "difficulty": "join"}, {"table_id": "artist, song", "query": "SELECT T1.artist_name AS \"artist artist_name\", T1.country AS \"artist country\", T2.song_name AS \"song song_name\" \n FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name \n WHERE T2.song_name LIKE '%love%'", "table_name": "artist, song", "query_description": "What is the name and country of origin of the artist who released a song that has \"love\" in its title?", "results_description": "Enrique who sings \"My love\" is from USA.", "result": ",artist country,song song_name,artist artist_name\n0,USA,My love,Enrique\n", "difficulty": "join"}, {"table_id": "user_profiles", "query": "SELECT COUNT(*) AS \"count of user_profiles\" \n FROM user_profiles", "table_name": "user_profiles", "query_description": "How many users are there?", "results_description": "There are 7 user profiles", "result": ",count of user_profiles\n0,7\n", "difficulty": "aggregate"}, {"table_id": "country", "query": "SELECT COUNT(*) AS \"count of country\" \n FROM country", "table_name": "country", "query_description": "Count the number of countries.", "results_description": "There are 6 countries.", "result": ",count of country\n0,6\n", "difficulty": "aggregate"}, {"table_id": "climber", "query": "SELECT MAX(Points) AS \"maximum Points\", Country \n FROM climber \n WHERE Country = 'United Kingdom'", "table_name": "climber", "query_description": "Return the maximum number of points for climbers from the United Kingdom.", "results_description": "The maximum number of points for climbers from the United Kingdom is 3", "result": ",Country,maximum Points\n0,United Kingdom,3.0\n", "difficulty": "aggregate"}, {"table_id": "player, tryout", "query": "SELECT T1.pName AS \"player pName\", T1.HS AS \"player HS\", T2.decision AS \"tryout decision\" \n FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID \n WHERE T2.decision = 'yes'", "table_name": "player, tryout", "query_description": "What are the names and hours spent practicing of every student who received a yes at tryouts?", "results_description": "The name of the student who received a yes at tryouts is Andrew and the number of hours spent practicing is 1200", "result": ",player HS,player pName,tryout decision\n0,1200,Andrew,yes\n", "difficulty": "join"}, {"table_id": "player, tryout", "query": "SELECT T1.pName AS \"player pName\" \n FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName", "table_name": "player, tryout", "query_description": "What are the names of all students who tried out in alphabetical order?", "results_description": "The player name is Andrew.", "result": ",player pName\n0,Andrew\n", "difficulty": "join"}, {"table_id": "races, results", "query": "SELECT AVG(T2.fastestlapspeed) AS \"average fastestlapspeed\", T1.name AS \"races name\", T1.year AS \"races year\" \n FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid \n WHERE T1.year > 2014 \n GROUP BY T1.name ORDER BY T1.year", "table_name": "races, results", "query_description": "What are the average fastest lap speed in races held after 2004 grouped by race name and ordered by year?", "results_description": "The race Abu Dhabi Grand Prix in 2015 had average fastest lap speed 184.10512903225808.", "result": ",races name,races year,average fastestlapspeed\n0,Abu Dhabi Grand Prix,2015,184.10512903225808\n", "difficulty": "join_aggregate"}, {"table_id": "Customer_Payments, Customers", "query": "SELECT SUM(T1.amount_payment) AS \"sum of amount_payment\", T2.last_name AS \"Customers last_name\", T2.first_name AS \"Customers first_name\" \n FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id \n WHERE T2.first_name = 'Carole' AND T2.last_name = 'Bernhard'", "table_name": "Customer_Payments, Customers", "query_description": "How much in total does customer with first name as Carole and last name as Bernhard paid?", "results_description": "The customer with first name as Carole and last name as Bernhard paid 9886.62", "result": ",Customers last_name,Customers first_name,sum of amount_payment\n0,Bernhard,Carole,9886.62\n", "difficulty": "join_aggregate"}, {"table_id": "musical", "query": "SELECT Name, Nominee \n FROM musical \n WHERE Nominee = 'Bob Fosse'", "table_name": "musical", "query_description": "Return the names of musicals who have the nominee Bob Fosse.", "results_description": "The Phantom of the Opera has Bob Fosse as a nominee.", "result": ",Name,Nominee\n0,The Phantom of the Opera,Bob Fosse\n", "difficulty": "small_select"}, {"table_id": "postseason, team", "query": "SELECT MAX(T1.wins) AS \"maximum wins\", T2.name AS \"team name\" \n FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br \n WHERE T2.name = 'Boston Red Stockings'", "table_name": "postseason, team", "query_description": "What are the maximum scores the team Boston Red Stockings got when the team won in postseason?", "results_description": "The team Boston Red Stockings had 5 maximum wins.", "result": ",team name,maximum wins\n0,Boston Red Stockings,5\n", "difficulty": "join_aggregate"}, {"table_id": "Catalog_Contents", "query": "SELECT catalog_entry_name, capacity, price_in_dollars \n FROM Catalog_Contents \n WHERE price_in_dollars > 700", "table_name": "Catalog_Contents", "query_description": "Find the name and capacity of products with price greater than 700 (in USD).", "results_description": "The product Vimto costs 745.02 dollars and has capacity of 6.", "result": ",capacity,price_in_dollars,catalog_entry_name\n0,6,745.02,Vimto\n", "difficulty": "small_select"}, {"table_id": "student", "query": "SELECT dept_name \n FROM student \n GROUP BY dept_name ORDER BY COUNT(*) DESC", "table_name": "student", "query_description": "What is the name of the deparment with the highest enrollment?", "results_description": "The department with the highest enrollment is Civil Eng.", "result": ",dept_name\n0,Civil Eng.\n", "difficulty": "aggregate_group_by"}, {"table_id": "departments", "query": "SELECT * \n FROM departments \n WHERE department_name = 'Marketing'", "table_name": "departments", "query_description": "display all the information about the department Marketing.", "results_description": "The marketing department has a manager id equal to 201, a location id equal to 1800 and a department id equal to 20", "result": ",MANAGER_ID,LOCATION_ID,DEPARTMENT_ID,DEPARTMENT_NAME\n0,201,1800,20,Marketing\n", "difficulty": "large_select"}, {"table_id": "mountain", "query": "SELECT Country, Height \n FROM mountain \n WHERE Height > 5000", "table_name": "mountain", "query_description": "What are the countries of mountains with height bigger than 5000?", "results_description": "The mountain in the country of Tanzania has height 5895.", "result": ",Height,Country\n0,5895.0,Tanzania\n", "difficulty": "small_select"}, {"table_id": "swimmer", "query": "SELECT meter_200, meter_300, nationality \n FROM swimmer \n WHERE nationality = 'Australia'", "table_name": "swimmer", "query_description": "Find all 200 meter and 300 meter results of swimmers with nationality \"Australia\".", "results_description": "For Australia the 200 meter result was 1:56.34 and the 300 meter was 2:55.90.", "result": ",meter_200,meter_300,Nationality\n0,1:56.34,2:55.90,Australia\n", "difficulty": "small_select"}, {"table_id": "catalog_contents", "query": "SELECT COUNT(*) AS \"count of catalog_contents\" \n FROM catalog_contents", "table_name": "catalog_contents", "query_description": "How many products are there in the records?", "results_description": "There are 15 products in the records.", "result": ",count of catalog_contents\n0,15\n", "difficulty": "aggregate"}, {"table_id": "staff", "query": "SELECT last_name, email_address \n FROM staff \n WHERE email_address LIKE '%wrau%'", "table_name": "staff", "query_description": "What are the last names of staff with email addressed containing the substring \"wrau\"?", "results_description": "The staff with last name Erdman has the email address wrau@example.com.", "result": ",last_name,email_address\n0,Erdman,wrau@example.com\n", "difficulty": "small_select"}, {"table_id": "authors", "query": "SELECT fname, lname \n FROM authors \n WHERE lname = 'Ueno'", "table_name": "authors", "query_description": "What is the first name of the author with last name \"Ueno\"?", "results_description": "The first name is Katsuhiro and the last name is Ueno", "result": ",fname,lname\n0,Katsuhiro,Ueno\n", "difficulty": "small_select"}, {"table_id": "ORDER_ITEMS, Products", "query": "SELECT SUM(T1.Order_Quantity) AS \"sum of Order_Quantity\", T2.Product_Name AS \"Products Product_Name\" \n FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID \n WHERE T2.Product_Name = 'photo'", "table_name": "ORDER_ITEMS, Products", "query_description": "Compute the total order quantities of the product \"photo\".", "results_description": "There are 3 orders of the product photo.", "result": ",Products Product_Name,sum of Order_Quantity\n0,photo,3\n", "difficulty": "join_aggregate"}, {"table_id": "Accounts", "query": "SELECT COUNT(*) AS \"count of Accounts\" \n FROM Accounts", "table_name": "Accounts", "query_description": "Count the number of accounts.", "results_description": "There are 15 accounts.", "result": ",count of Accounts\n0,15\n", "difficulty": "aggregate"}, {"table_id": "Apartments", "query": "SELECT apt_number, room_count \n FROM Apartments", "table_name": "Apartments", "query_description": "What are the apartment number and the room count of each apartment?", "results_description": "The apartment Suite 645 has 7 rooms", "result": ",apt_number,room_count\n0,Suite 645,7\n", "difficulty": "small_select"}, {"table_id": "entrepreneur, people", "query": "SELECT SUM(T1.Money_Requested) AS \"sum of Money_Requested\", T2.Height AS \"people Height\" \n FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID \n WHERE T2.Height > 1.85", "table_name": "entrepreneur, people", "query_description": "What is the total money requested by entrepreneurs with height more than 1.85?", "results_description": "Entrepreneurs with height 1.9 have requested a total of 380000 money.", "result": ",people Height,sum of Money_Requested\n0,1.9,380000.0\n", "difficulty": "join_aggregate"}, {"table_id": "WINE", "query": "SELECT AVG(Price) AS \"average Price\", AVG(Cases) AS \"average Cases\", Grape, YEAR \n FROM WINE \n WHERE YEAR = 2009 AND Grape = 'Zinfandel'", "table_name": "WINE", "query_description": "Give the average price and case of wines made from Zinfandel grapes in the year 2009.", "results_description": "The Zinfandel grapes had 15000 average cases and an average price of 18 for the year of 2009.", "result": ",Year,Grape,average Cases,average Price\n0,2009,Zinfandel,15000.0,18.0\n", "difficulty": "aggregate"}, {"table_id": "Attribute_Definitions", "query": "SELECT attribute_data_type, attribute_name \n FROM Attribute_Definitions \n WHERE attribute_name = 'Green'", "table_name": "Attribute_Definitions", "query_description": "What is the attribute data type of the attribute with name \"Green\"?", "results_description": "The attribute with name \"Green\" has Bool as an attribute data type", "result": ",attribute_name,attribute_data_type\n0,Green,Bool\n", "difficulty": "small_select"}, {"table_id": "Student", "query": "SELECT Fname, Lname \n FROM Student", "table_name": "Student", "query_description": "Show first name and last name for all students.", "results_description": "The student is Linda Smith.", "result": ",Fname,LName\n0,Linda,Smith\n", "difficulty": "small_select"}, {"table_id": "Employees, ROLES", "query": "SELECT T1.employee_name AS \"Employees employee_name\", T2.role_name AS \"ROLES role_name\" \n FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code \n WHERE T2.role_name = 'Editor'", "table_name": "Employees, ROLES", "query_description": "Show the names of employees with role name Editor.", "results_description": "The name of employee with role name Editor is Stephanie", "result": ",ROLES role_name,Employees employee_name\n0,Editor,Stephanie\n", "difficulty": "join"}, {"table_id": "Course_Authors_and_Tutors", "query": "SELECT address_line_1, personal_name \n FROM Course_Authors_and_Tutors \n WHERE personal_name = 'Cathrine'", "table_name": "Course_Authors_and_Tutors", "query_description": "What are the addresses of the course authors or tutors with personal name \"Cathrine\"", "results_description": "The address of the course author or tutor Cathrine is 756 Monahan Mews Spinkashire, NJ 64230-5098.", "result": ",personal_name,address_line_1\n0,Cathrine,\"756 Monahan Mews\nSpinkashire, NJ 64230-5098\"\n", "difficulty": "small_select"}, {"table_id": "Lessons, Staff", "query": "SELECT AVG(price) AS \"average price\", T2.last_name AS \"Staff last_name\", T2.first_name AS \"Staff first_name\" \n FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id \n WHERE T2.first_name = 'Janessa' AND T2.last_name = 'Sawayn'", "table_name": "Lessons, Staff", "query_description": "What is average lesson price taught by staff with first name as Janessa and last name as Sawayn?", "results_description": "The staff Janessa Sawayn has an average price of 306.", "result": ",average price,Staff last_name,Staff first_name\n0,306.0,Sawayn,Janessa\n", "difficulty": "join_aggregate"}, {"table_id": "Player", "query": "SELECT COUNT(*) AS \"count of Player\", HS \n FROM Player \n WHERE HS > 1000", "table_name": "Player", "query_description": "How many different players trained for more than 1000 hours?", "results_description": "There are 4 players who have played 1200 hours", "result": ",HS,count of Player\n0,1200,4\n", "difficulty": "aggregate"}, {"table_id": "submission", "query": "SELECT Author, College \n FROM submission", "table_name": "submission", "query_description": "For each submission, show the author and their affiliated college.", "results_description": "The author Steve Niehaus went to the Notre Dame college.", "result": ",Author,College\n0,Steve Niehaus,Notre Dame\n", "difficulty": "small_select"}, {"table_id": "member", "query": "SELECT Country, COUNT(*) AS \"count of member\" \n FROM member \n GROUP BY Country", "table_name": "member", "query_description": "Show the different countries and the number of members from each.", "results_description": "4 members are from Canada", "result": ",Country,count of member\n0,Canada,4\n", "difficulty": "aggregate_group_by"}, {"table_id": "mill", "query": "SELECT name, LOCATION \n FROM mill \n WHERE LOCATION <> 'Donceel'", "table_name": "mill", "query_description": "What are the names of the mills which are not located in 'Donceel'?", "results_description": "The mill Le Vieux Molen was located in Coswarem.", "result": ",name,location\n0,Le Vieux Molen,Coswarem\n", "difficulty": "small_select"}, {"table_id": "body_builder, people", "query": "SELECT T2.Name AS \"people Name\" \n FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID", "table_name": "body_builder, people", "query_description": "What are the names of body builders?", "results_description": "The name of body builder is Jack Campbell", "result": ",people Name\n0,Jack Campbell\n", "difficulty": "join"}, {"table_id": "ship", "query": "SELECT Name, Nationality \n FROM ship \n WHERE Nationality = 'United States' OR Nationality = 'United Kingdom'", "table_name": "ship", "query_description": "Show the name of ships whose nationality is either United States or United Kingdom.", "results_description": "The ship named Corbridge is from United Kingdom", "result": ",Name,Nationality\n0,Corbridge,United Kingdom\n", "difficulty": "small_select"}, {"table_id": "book", "query": "SELECT Title, Issues \n FROM book", "table_name": "book", "query_description": "What are the title and issues of the books?", "results_description": "The book titled The Black Lamb had 6 issues.", "result": ",Title,Issues\n0,The Black Lamb,6.0\n", "difficulty": "small_select"}, {"table_id": "employees", "query": "SELECT first_name, last_name, salary \n FROM employees \n WHERE first_name LIKE '%m'", "table_name": "employees", "query_description": "Display the first and last name, and salary for those employees whose first name is ending with the letter m.", "results_description": "The employee Fripp Adam has a salary of 8200.", "result": ",SALARY,LAST_NAME,FIRST_NAME\n0,8200,Fripp,Adam\n", "difficulty": "large_select"}, {"table_id": "stock, device, shop", "query": "SELECT T3.Shop_Name AS \"shop Shop_Name\", T2.Carrier AS \"device Carrier\" \n 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", "table_name": "stock, device, shop", "query_description": "What are the names of device shops, and what are the carriers that they carry devices in stock for?", "results_description": "The device carrier Bell Mobility had a shop named Dinas Device.", "result": ",device Carrier,shop Shop_Name\n0,Bell Mobility,Dinas Device\n", "difficulty": "join"}, {"table_id": "Faculty", "query": "SELECT rank, sex, COUNT(*) AS \"count of Faculty\" \n FROM Faculty \n GROUP BY rank, sex", "table_name": "Faculty", "query_description": "How many faculty members do we have for each rank and gender?", "results_description": "For the gender F and the rank AssocProf the number of faculty members is 1", "result": ",Sex,Rank,count of Faculty\n0,F,AssocProf,1\n", "difficulty": "aggregate_group_by"}, {"table_id": "city, temperature", "query": "SELECT T2.Jan AS \"temperature Jan\", T1.city AS \"city city\" \n FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id \n WHERE T1.city = 'Shanghai'", "table_name": "city, temperature", "query_description": "Give me the temperature of Shanghai in January.", "results_description": "Shanghai's temperature on January is 17.8.", "result": ",city city,temperature Jan\n0,Shanghai,17.8\n", "difficulty": "join"}, {"table_id": "All_documents, Ref_document_types", "query": "SELECT T2.document_type_name AS \"Ref_document_types document_type_name\", T1.document_name AS \"All_documents document_name\" \n FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code \n WHERE T1.document_name = 'How to read a book'", "table_name": "All_documents, Ref_document_types", "query_description": "Find the document type name of the document named \"How to read a book\".", "results_description": "The document named \"How to read a book\" is of type book.", "result": ",All_documents document_name,Ref_document_types document_type_name\n0,How to read a book,Book\n", "difficulty": "join"}, {"table_id": "accounts, checking, savings", "query": "SELECT T1.name AS \"accounts name\" \n FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid \n WHERE T2.balance > T3.balance", "table_name": "accounts, checking, savings", "query_description": "Find the name of accounts whose checking balance is higher than corresponding saving balance.", "results_description": "The account's name is Weeks.", "result": ",accounts name\n0,Weeks\n", "difficulty": "join"}, {"table_id": "journalist, news_report", "query": "SELECT AVG(t1.age) AS \"average age\", AVG(Years_working) AS \"average Years_working\", t2.work_type AS \"news_report work_type\" \n FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_id = t2.journalist_id \n GROUP BY t2.work_type", "table_name": "journalist, news_report", "query_description": "Find the average age and experience working length of journalists working on different role type.", "results_description": "For the work type of Host the average age of journalists is 43 and the average years working is 16.5", "result": ",average age,average Years_working,news_report work_type\n0,43.0,16.5,Host\n", "difficulty": "join_aggregate"}, {"table_id": "home_game, team", "query": "SELECT SUM(T1.attendance) AS \"sum of attendance\", T2.name AS \"team name\", T1.year AS \"home_game year\" \n FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br \n WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010", "table_name": "home_game, team", "query_description": "How many games in total did team Boston Red Stockings attend from 2000 to 2010?", "results_description": "Boston Red Stockings team attended 156651355 games from 2000 to 2010.", "result": ",team name,home_game year,sum of attendance\n0,Boston Red Stockings,2000,156651355\n", "difficulty": "join_aggregate"}, {"table_id": "chip_model", "query": "SELECT * \n FROM chip_model", "table_name": "chip_model", "query_description": "Find the details for all chip models.", "results_description": "The X5 model does not have WiFi, it has 1CFII,1SD slots, 32 RAM MiB, 32 ROM MiB, it does not have Bluetooth and it was launched at 2002.", "result": ",WiFi,Slots,RAM_MiB,ROM_MiB,Bluetooth,Model_name,Launch_year\n0,No,\"1CFII,1SD\",32.0,32.0,No,X5,2002.0\n", "difficulty": "large_select"}, {"table_id": "actor, musical", "query": "SELECT T1.Name AS \"actor Name\", T2.Name AS \"musical Name\" \n FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID", "table_name": "actor, musical", "query_description": "What are the names of actors and the musicals that they are in?", "results_description": "The actor name is Ray Meagher and the musical name is The Phantom of the Opera", "result": ",actor Name,musical Name\n0,Ray Meagher,The Phantom of the Opera\n", "difficulty": "join"}, {"table_id": "party", "query": "SELECT COUNT(*) AS \"count of party\" \n FROM party", "table_name": "party", "query_description": "How many parties are there?", "results_description": "8 parties were hosted.", "result": ",count of party\n0,8\n", "difficulty": "aggregate"}, {"table_id": "All_documents", "query": "SELECT date_stored, Document_name \n FROM All_documents \n WHERE Document_name = 'Marry CV'", "table_name": "All_documents", "query_description": "When was the document named \"Marry CV\" stored? Give me the date.", "results_description": "The document named Marry CV was stored on 1986-10-14 17:53:39", "result": ",Date_Stored,Document_Name\n0,1986-10-14 17:53:39,Marry CV\n", "difficulty": "small_select"}, {"table_id": "Apartment_Bookings, Apartments", "query": "SELECT T2.apt_number AS \"Apartments apt_number\", T1.booking_start_date AS \"Apartment_Bookings booking_start_date\", T1.booking_start_date AS \"Apartment_Bookings booking_start_date\" \n FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id", "table_name": "Apartment_Bookings, Apartments", "query_description": "Show the apartment numbers, start dates, and end dates of all the apartment bookings.", "results_description": "Apartment number 859 has a booking start date from 2016-09-26 17:13:49", "result": ",Apartments apt_number,Apartment_Bookings booking_start_date\n0,Apt. 859,2016-09-26 17:13:49\n", "difficulty": "join"}, {"table_id": "wrestler", "query": "SELECT LOCATION \n FROM wrestler \n GROUP BY LOCATION \n HAVING COUNT(*) > 2", "table_name": "wrestler", "query_description": "List the locations that are shared by more than two wrestlers.", "results_description": "Tijuana , Mexico is shared by more than two wrestlers.", "result": ",Location\n0,\"Tijuana , Mexico\"\n", "difficulty": "aggregate_group_by"}, {"table_id": "APPELLATIONS", "query": "SELECT Area, County \n FROM APPELLATIONS", "table_name": "APPELLATIONS", "query_description": "What are the areas and counties for all appelations?", "results_description": "The county of Sonoma is the North Coast area.", "result": ",Area,County\n0,North Coast,Sonoma\n", "difficulty": "small_select"}, {"table_id": "Addresses", "query": "SELECT COUNT(*) AS \"count of Addresses\", state_province_county \n FROM Addresses \n WHERE state_province_county = 'Georgia'", "table_name": "Addresses", "query_description": "How many staff live in state Georgia?", "results_description": "There are 2 addresses in the county of Georgia.", "result": ",count of Addresses,state_province_county\n0,2,Georgia\n", "difficulty": "aggregate"}, {"table_id": "music_festival, volume", "query": "SELECT T2.Song AS \"volume Song\", T1.Result AS \"music_festival Result\" \n FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID \n WHERE T1.Result = 'Nominated'", "table_name": "music_festival, volume", "query_description": "Please show the songs that have result \"nominated\" at music festivals.", "results_description": "The song The Way was Nominated at a music festival", "result": ",volume Song,music_festival Result\n0, The Way,Nominated\n", "difficulty": "join"}, {"table_id": "representative", "query": "SELECT Party \n FROM representative \n GROUP BY Party \n HAVING COUNT(*) >= 3", "table_name": "representative", "query_description": "What parties have at least three representatives?", "results_description": "The democratic party has at least three representatives.", "result": ",Party\n0,Democratic\n", "difficulty": "aggregate_group_by"}, {"table_id": "student", "query": "SELECT COUNT(*) AS \"count of student\", dept_code \n FROM student \n GROUP BY dept_code", "table_name": "student", "query_description": "Find the number of students for each department.", "results_description": "The number of students at the department ACCT is 3", "result": ",DEPT_CODE,count of student\n0,ACCT,3\n", "difficulty": "aggregate_group_by"}, {"table_id": "technician", "query": "SELECT Team \n FROM technician \n GROUP BY Team ORDER BY COUNT(*) DESC", "table_name": "technician", "query_description": "Please show the team that has the most number of technicians.", "results_description": "The team that has the most number of technicians is CLE", "result": ",Team\n0,CLE\n", "difficulty": "aggregate_group_by"}, {"table_id": "journal_committee, editor, journal", "query": "SELECT T2.Name AS \"editor Name\", T3.Theme AS \"journal Theme\" \n 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", "table_name": "journal_committee, editor, journal", "query_description": "For each journal_committee, find the editor name and the journal theme.", "results_description": "A journal committee has the editor Kamila Porczyk and the journal theme at Minnesota Vikings.", "result": ",editor Name,journal Theme\n0,Kamila Porczyk,at Minnesota Vikings\n", "difficulty": "join"}, {"table_id": "cinema", "query": "SELECT name, openning_year, capacity \n FROM cinema", "table_name": "cinema", "query_description": "Show name, opening year, and capacity for each cinema.", "results_description": "The cinema named Codling has a capacity of 1100 and was opened in 2010.", "result": ",Name,Capacity,Openning_year\n0,Codling,1100,2010\n", "difficulty": "large_select"}, {"table_id": "entrepreneur, people", "query": "SELECT T2.Weight AS \"people Weight\", T1.Money_Requested AS \"entrepreneur Money_Requested\" \n FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested DESC", "table_name": "entrepreneur, people", "query_description": "Return the weights of entrepreneurs, ordered descending by amount of money requested.", "results_description": "The person with weight 80 is an entrepreneur who requested 150000.", "result": ",people Weight,entrepreneur Money_Requested\n0,80.0,150000.0\n", "difficulty": "join"}, {"table_id": "storm", "query": "SELECT COUNT(*) AS \"count of storm\", Number_Deaths \n FROM storm \n WHERE Number_Deaths > 0", "table_name": "storm", "query_description": "How many storms had death records?", "results_description": "6 storms had 7 deaths", "result": ",Number_Deaths,count of storm\n0,7,6\n", "difficulty": "aggregate"}, {"table_id": "student, department", "query": "SELECT T2.dept_name AS \"department dept_name\", stu_gpa \n FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa", "table_name": "student, department", "query_description": "What is the name of the department with the student that has the lowest GPA?", "results_description": "The department of Accounting has a GPA of 2.26.", "result": ",STU_GPA,department dept_name\n0,2.26,Accounting\n", "difficulty": "join"}, {"table_id": "instructor, teaches", "query": "SELECT name, course_id \n FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID", "table_name": "instructor, teaches", "query_description": "Find the names of all instructors who have taught some course and the course_id.", "results_description": "The instructor named Bondi taught the course with id 747.", "result": ",name,course_id\n0,Bondi,747\n", "difficulty": "join"}, {"table_id": "ORDER_ITEMS, Products", "query": "SELECT SUM(T1.Order_Quantity) AS \"sum of Order_Quantity\", T2.Product_Name AS \"Products Product_Name\" \n FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID \n WHERE T2.Product_Name = 'photo'", "table_name": "ORDER_ITEMS, Products", "query_description": "What are the total order quantities of photo products?", "results_description": "There are 3 orders for the product photo.", "result": ",Products Product_Name,sum of Order_Quantity\n0,photo,3\n", "difficulty": "join_aggregate"}, {"table_id": "game", "query": "SELECT season, home_team, away_team \n FROM game", "table_name": "game", "query_description": "List the season, home team, away team of all the games.", "results_description": "The game with home team \"Quruvchi\" and away team \"Pakhtakor\" was in season 2007.", "result": ",Season,Away_team,Home_team\n0,2007,Pakhtakor,Quruvchi\n", "difficulty": "large_select"}, {"table_id": "Customers", "query": "SELECT customer_status_code, cell_mobile_phone_number, email_address, last_name, first_name \n FROM Customers \n WHERE first_name = 'Marina' OR last_name = 'Kohler'", "table_name": "Customers", "query_description": "What is the status code, mobile phone number and email address of customer with last name as Kohler or first name as Marina?", "results_description": "The customer named Marina Koelpin has the email address mayert.judy@example.com, the mobile phone number 848-099-2095x785 and status code of Bad Customer", "result": ",last_name,first_name,email_address,customer_status_code,cell_mobile_phone_number\n0,Koelpin,Marina,mayert.judy@example.com,Bad Customer,848-099-2095x785\n", "difficulty": "large_select"}, {"table_id": "checking", "query": "SELECT AVG(balance) AS \"average balance\" \n FROM checking", "table_name": "checking", "query_description": "What is the average balance in checking accounts?", "results_description": "The average balance is 4583.428571428572.", "result": ",average balance\n0,4583.428571428572\n", "difficulty": "aggregate"}, {"table_id": "products, ref_product_categories", "query": "SELECT t2.unit_of_measure AS \"ref_product_categories unit_of_measure\", t2.product_category_code AS \"ref_product_categories product_category_code\", t1.product_name AS \"products product_name\" \n FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code \n WHERE t1.product_name = 'chervil'", "table_name": "products, ref_product_categories", "query_description": "Find the unit of measurement and product category code of product named \"chervil\".", "results_description": "For the product named chervil, the unit of measurement is Handful and the product category code is Herbs", "result": ",products product_name,ref_product_categories unit_of_measure,ref_product_categories product_category_code\n0,chervil,Handful ,Herbs\n", "difficulty": "join"}, {"table_id": "Apartment_Bookings, Guests", "query": "SELECT T2.guest_first_name AS \"Guests guest_first_name\", T1.booking_start_date AS \"Apartment_Bookings booking_start_date\", T1.booking_start_date AS \"Apartment_Bookings booking_start_date\" \n FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id", "table_name": "Apartment_Bookings, Guests", "query_description": "What are the guest first name, start date, and end date of each apartment booking?", "results_description": "Rebeca booked an apartment on 2016-09-26 time 17:13:49.", "result": ",Guests guest_first_name,Apartment_Bookings booking_start_date\n0,Rebeca,2016-09-26 17:13:49\n", "difficulty": "join"}, {"table_id": "mailshot_customers", "query": "SELECT outcome_code, COUNT(*) AS \"count of mailshot_customers\" \n FROM mailshot_customers \n GROUP BY outcome_code", "table_name": "mailshot_customers", "query_description": "Show the outcome code of mailshots along with the number of mailshots in each outcome code.", "results_description": "The outcome code No Response has 5 mailshot customers.", "result": ",outcome_code,count of mailshot_customers\n0,No Response,5\n", "difficulty": "aggregate_group_by"}, {"table_id": "chip_model, phone", "query": "SELECT MAX(T1.RAM_MiB) AS \"maximum RAM_MiB\", MIN(T1.RAM_MiB) AS \"minimum RAM_MiB\", T2.Company_name AS \"phone Company_name\" \n FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model \n WHERE T2.Company_name = 'Nokia Corporation'", "table_name": "chip_model, phone", "query_description": "What is maximum and minimum RAM size of phone produced by company named \"Nokia Corporation\"?", "results_description": "The phone produced by company named Nokia Corporation has a maximum RAM of 32 and a minimum RAM of 32", "result": ",maximum RAM_MiB,minimum RAM_MiB,phone Company_name\n0,32.0,32.0,Nokia Corporation\n", "difficulty": "join_aggregate"}, {"table_id": "tweets", "query": "SELECT COUNT(*) AS \"count of tweets\" \n FROM tweets", "table_name": "tweets", "query_description": "Find the number of tweets in record.", "results_description": "There are 8 tweets.", "result": ",count of tweets\n0,8\n", "difficulty": "aggregate"}, {"table_id": "stadium", "query": "SELECT average_attendance, capacity_percentage \n FROM stadium \n WHERE capacity_percentage > 100", "table_name": "stadium", "query_description": "What is the average attendance of stadiums with capacity percentage higher than 100%?", "results_description": "The average attendance was 87047 with a capacity percentage of 108.8.", "result": ",Average_Attendance,Capacity_Percentage\n0,87047.0,108.8\n", "difficulty": "small_select"}, {"table_id": "party_events", "query": "SELECT COUNT(*) AS \"count of party_events\" \n FROM party_events", "table_name": "party_events", "query_description": "How many party events do we have?", "results_description": "There are 8 party events.", "result": ",count of party_events\n0,8\n", "difficulty": "aggregate"}, {"table_id": "employees", "query": "SELECT first_name, last_name, hire_date, salary, department_id \n FROM employees \n WHERE first_name NOT LIKE '%M%'", "table_name": "employees", "query_description": "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.", "results_description": "The employee named King Steven had a salary of 24000, a hire date of 1987-06-17 and his department id is 90.", "result": ",SALARY,HIRE_DATE,LAST_NAME,FIRST_NAME,DEPARTMENT_ID\n0,24000,1987-06-17,King,Steven,90\n", "difficulty": "large_select"}, {"table_id": "products", "query": "SELECT AVG(price) AS \"average price\" \n FROM products", "table_name": "products", "query_description": "What is the average price across all products?", "results_description": "The average price is 153.72727272727272.", "result": ",average price\n0,153.72727272727272\n", "difficulty": "aggregate"}, {"table_id": "aircraft, airport_aircraft, airport", "query": "SELECT T1.Aircraft AS \"aircraft Aircraft\", T1.Description AS \"aircraft Description\", T3.Total_Passengers AS \"airport Total_Passengers\" \n 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 \n WHERE T3.Total_Passengers > 10000000", "table_name": "aircraft, airport_aircraft, airport", "query_description": "What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000?", "results_description": "The aircraft named Bell 206B3 JetRanger with the description of Turboshaft utility helicopter is associated with an airport that has 67054745 total passengers", "result": ",aircraft Aircraft,aircraft Description,airport Total_Passengers\n0,Bell 206B3 JetRanger,Turboshaft utility helicopter,67054745.0\n", "difficulty": "join"}, {"table_id": "tracks", "query": "SELECT composer, name \n FROM tracks \n WHERE name = 'Fast As a Shark'", "table_name": "tracks", "query_description": "What is the composer who created the track \"Fast As a Shark\"?", "results_description": "Song \"Fast as a Shark\" was composed by F. Baltes, S. Kaufman, U. Dirkscneider & W. Hoffman", "result": ",name,composer\n0,Fast As a Shark,\"F. Baltes, S. Kaufman, U. Dirkscneider & W. Hoffman\"\n", "difficulty": "small_select"}, {"table_id": "teachers", "query": "SELECT firstname, classroom \n FROM teachers \n WHERE classroom = 110", "table_name": "teachers", "query_description": "Find the first names of all the teachers that teach in classroom 110.", "results_description": "The first name of the teacherthat teach in classroom 110 is GEORGETTA", "result": ",Classroom,FirstName\n0,110, GEORGETTA\n", "difficulty": "small_select"}, {"table_id": "driver", "query": "SELECT name, home_city, age \n FROM driver", "table_name": "driver", "query_description": "Show the name, home city, and age for all drivers.", "results_description": "Matthew Ritter is 40 years old and lives in Hartford.", "result": ",Age,Name,Home_city\n0,40,Matthew Ritter,Hartford\n", "difficulty": "large_select"}, {"table_id": "ref_product_categories", "query": "SELECT product_category_description, product_category_code \n FROM ref_product_categories \n WHERE product_category_code = 'Spices'", "table_name": "ref_product_categories", "query_description": "What is the description of the product category with the code 'Spices'?", "results_description": "The description of the product category with the code 'Spices' is Spices", "result": ",product_category_code,product_category_description\n0,Spices,Spices\n", "difficulty": "small_select"}, {"table_id": "EMPLOYEE", "query": "SELECT FirstName, LastName, City \n FROM EMPLOYEE \n WHERE City = 'Calgary'", "table_name": "EMPLOYEE", "query_description": "What are the first names and last names of the employees who live in Calgary city.", "results_description": "The FirstNames and LastNames of the employees who live in Calgary city are Nancy Edwards resepctively", "result": ",City,LastName,FirstName\n0,Calgary,Edwards,Nancy\n", "difficulty": "small_select"}, {"table_id": "region", "query": "SELECT region_name \n FROM region \n WHERE region_name <> 'Denmark'", "table_name": "region", "query_description": "Show names for all regions except for Denmark.", "results_description": "The region name is Afghanistan", "result": ",Region_name\n0,Afghanistan\n", "difficulty": "small_select"}, {"table_id": "products, Manufacturers", "query": "SELECT AVG(T1.Price) AS \"average Price\", T2.name AS \"Manufacturers name\" \n FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code \n GROUP BY T2.name", "table_name": "products, Manufacturers", "query_description": "Select the average price of each manufacturer's products, showing the manufacturer's name.", "results_description": "The Creative Labs manufacturer has an average price of 150 of products", "result": ",average Price,Manufacturers name\n0,150.0,Creative Labs\n", "difficulty": "join_aggregate"}, {"table_id": "aircraft, MATCH", "query": "SELECT T2.Location AS \"MATCH Location\", T1.Aircraft AS \"aircraft Aircraft\" \n FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft", "table_name": "aircraft, MATCH", "query_description": "What is the location and name of the winning aircraft?", "results_description": "In Mina' Zayid , Abu Dhabi the aircraft Robinson R-22 won.", "result": ",MATCH Location,aircraft Aircraft\n0,\"Mina' Zayid , Abu Dhabi\",Robinson R-22\n", "difficulty": "join"}, {"table_id": "projects", "query": "SELECT AVG(hours) AS \"average hours\" \n FROM projects", "table_name": "projects", "query_description": "Find the average hours of all projects.", "results_description": "The average hours of projects is 1441.642857142857.", "result": ",average hours\n0,1441.642857142857\n", "difficulty": "aggregate"}, {"table_id": "affected_region, region, storm", "query": "SELECT T3.name AS \"storm name\", T2.region_name AS \"region region_name\" \n 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 \n WHERE T2.region_name = 'Denmark'", "table_name": "affected_region, region, storm", "query_description": "Show all storm names affecting region \"Denmark\".", "results_description": "The storm name affecting region Denmark is Five", "result": ",storm name,region region_name\n0,Five,Denmark\n", "difficulty": "join"}, {"table_id": "Ref_Document_Status", "query": "SELECT document_status_description, document_status_code \n FROM Ref_Document_Status \n WHERE document_status_code = 'working'", "table_name": "Ref_Document_Status", "query_description": "What is the description of document status code 'working'?", "results_description": "The document with status code working has the status description currently working on.", "result": ",document_status_code,document_status_description\n0,working,currently working on\n", "difficulty": "small_select"}, {"table_id": "ship", "query": "SELECT TYPE, Nationality \n FROM ship", "table_name": "ship", "query_description": "What are the type and nationality of ships?", "results_description": "Cargo ship is from United Kingdom.", "result": ",Type,Nationality\n0,Cargo ship,United Kingdom\n", "difficulty": "small_select"}, {"table_id": "school_bus", "query": "SELECT MAX(years_working) AS \"maximum years_working\", MIN(years_working) AS \"minimum years_working\", AVG(years_working) AS \"average years_working\" \n FROM school_bus", "table_name": "school_bus", "query_description": "What is the maximum, minimum and average years spent working on a school bus?", "results_description": "The maximum is 10, the minimum is 2 and average is 5.8 of years spent working on a school bus", "result": ",average years_working,maximum years_working,minimum years_working\n0,5.8,10.0,2.0\n", "difficulty": "aggregate"}, {"table_id": "bank, loan", "query": "SELECT T1.bname AS \"bank bname\", T1.city AS \"bank city\", T2.loan_type AS \"loan loan_type\" \n FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id \n WHERE T2.loan_type = 'Business'", "table_name": "bank, loan", "query_description": "Find the city and name of bank branches that provide business loans.", "results_description": "The bank named broadway in New York City provides business loans.", "result": ",bank city,bank bname,loan loan_type\n0,New York City,broadway,Business\n", "difficulty": "join"}, {"table_id": "mountain", "query": "SELECT AVG(prominence) AS \"average prominence\", country \n FROM mountain \n WHERE country = 'Morocco'", "table_name": "mountain", "query_description": "What are the average prominence of the mountains in country 'Morocco'?", "results_description": "The mountains in Morocco have an average prominence of 1316.5", "result": ",Country,average prominence\n0,Morocco,1316.5\n", "difficulty": "aggregate"}, {"table_id": "Apartment_Facilities, Apartments", "query": "SELECT SUM(T2.room_count) AS \"sum of room_count\", T1.facility_code AS \"Apartment_Facilities facility_code\" \n FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id \n WHERE T1.facility_code = 'Gym'", "table_name": "Apartment_Facilities, Apartments", "query_description": "Show the total number of rooms of all apartments with facility code \"Gym\".", "results_description": "The facility with code Gym has 15 rooms.", "result": ",sum of room_count,Apartment_Facilities facility_code\n0,15,Gym\n", "difficulty": "join_aggregate"}, {"table_id": "airlines", "query": "SELECT country, name \n FROM airlines \n WHERE name LIKE 'Orbit%'", "table_name": "airlines", "query_description": "Find the country of the airlines whose name starts with 'Orbit'.", "results_description": "Orbit Express Airlines is in Turkey.", "result": ",name,country\n0,Orbit Express Airlines,Turkey\n", "difficulty": "small_select"}, {"table_id": "elimination, wrestler", "query": "SELECT T2.Name AS \"wrestler Name\", T1.Team AS \"elimination Team\", T2.Days_held AS \"wrestler Days_held\" \n FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC", "table_name": "elimination, wrestler", "query_description": "List the names of wrestlers and the teams in elimination in descending order of days held.", "results_description": "The wrestler named Gran Hamada is on the elimination team Team Batista and was held for 960 days", "result": ",wrestler Name,elimination Team,wrestler Days_held\n0,Gran Hamada,Team Batista,960\n", "difficulty": "join"}, {"table_id": "Addresses, Student_Addresses", "query": "SELECT T1.line_1 AS \"Addresses line_1\", AVG(T2.monthly_rental) AS \"average monthly_rental\", T2.address_id AS \"Student_Addresses address_id\" \n FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id \n GROUP BY T2.address_id", "table_name": "Addresses, Student_Addresses", "query_description": "What are the line 1 and average monthly rentals of all student addresses?", "results_description": "The address 020 Orie Canyon has a montlhy rental of 1028.9549333333334.", "result": ",Addresses line_1,average monthly_rental,Student_Addresses address_id\n0,020 Orie Canyon,1028.9549333333334,1\n", "difficulty": "join_aggregate"}, {"table_id": "Apartments", "query": "SELECT AVG(bedroom_count) AS \"average bedroom_count\" \n FROM Apartments", "table_name": "Apartments", "query_description": "Find the average number of bedrooms of all the apartments.", "results_description": "The average number of bedrooms is 4.466666666666667.", "result": ",average bedroom_count\n0,4.466666666666667\n", "difficulty": "aggregate"}, {"table_id": "Employees", "query": "SELECT employee_name, role_code, date_of_birth, employee_Name \n FROM Employees \n WHERE employee_Name = 'Armani'", "table_name": "Employees", "query_description": "Show the name, role code, and date of birth for the employee with name 'Armani'.", "results_description": "The employee named Armani was born in 1988-12-08 06:13:33 and his role code is ED.", "result": ",Role_Code,Date_of_Birth,Employee_Name\n0,ED,1988-12-08 06:13:33,Armani\n", "difficulty": "large_select"}, {"table_id": "building", "query": "SELECT name, height_feet, floors \n FROM building \n WHERE height_feet >= 200 AND floors >= 20", "table_name": "building", "query_description": "List the names of buildings with at least 200 feet of height and with at least 20 floors.", "results_description": "The building\tFranklin Exchange Building has 22 floors and is 280 feet high.", "result": ",Name,Floors,Height_feet\n0,Franklin Exchange Building,22,280\n", "difficulty": "small_select"}, {"table_id": "authors, authorship, papers", "query": "SELECT t1.lname AS \"authors lname\", t3.title AS \"papers title\" \n FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid \n WHERE t3.title LIKE '%Monadic%'", "table_name": "authors, authorship, papers", "query_description": "Find the last names of all the authors that have written a paper with title containing the word \"Monadic\".", "results_description": "The author Gibbons has written the paper titled Just do it: Simple Monadic Equational Reasoning", "result": ",papers title,authors lname\n0,Just do it: Simple Monadic Equational Reasoning,Gibbons\n", "difficulty": "join"}, {"table_id": "Bookings, Drama_Workshop_Groups", "query": "SELECT T2.Store_Name AS \"Drama_Workshop_Groups Store_Name\", T1.Status_Code AS \"Bookings Status_Code\" \n FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID \n WHERE T1.Status_Code = 'stop'", "table_name": "Bookings, Drama_Workshop_Groups", "query_description": "Which workshop groups have bookings with status code \"stop\"? Give me the names.", "results_description": "\"Bednar Film\" workshop group has bookings with status code \"stop\".", "result": ",Bookings Status_Code,Drama_Workshop_Groups Store_Name\n0,stop,Bednar Film\n", "difficulty": "join"}, {"table_id": "Elimination", "query": "SELECT Elimination_Move, Team \n FROM Elimination \n WHERE Team = 'Team Orton'", "table_name": "Elimination", "query_description": "Return the elimination movies of wrestlers on Team Orton.", "results_description": "The elimination move of Team Orton is Go To Sleep.", "result": ",Team,Elimination_Move\n0,Team Orton,Go To Sleep\n", "difficulty": "small_select"}, {"table_id": "dorm", "query": "SELECT AVG(student_capacity) AS \"average student_capacity\", SUM(student_capacity) AS \"sum of student_capacity\", gender \n FROM dorm \n WHERE gender = 'X'", "table_name": "dorm", "query_description": "Find the average and total capacity of dorms for the students with gender X.", "results_description": "The dorm for gender X has 1136 total student capacity and 227.2 average student capacity.", "result": ",gender,sum of student_capacity,average student_capacity\n0,X,1136,227.2\n", "difficulty": "aggregate"}, {"table_id": "Student", "query": "SELECT MIN(age) AS \"minimum age\", AVG(age) AS \"average age\", MAX(age) AS \"maximum age\" \n FROM Student", "table_name": "Student", "query_description": "What is the minimum, mean, and maximum age across all students?", "results_description": "The average age of students is 19.58, the maximum age is 27 and the minimum age is 16", "result": ",average age,maximum age,minimum age\n0,19.558823529411764,27.0,16.0\n", "difficulty": "aggregate"}, {"table_id": "airports", "query": "SELECT name, elevation \n FROM airports \n WHERE elevation BETWEEN -50 AND 50", "table_name": "airports", "query_description": "Find the name of airports whose altitude is between -50 and 50.", "results_description": "The airport name is Madang Airport and the elevation is 20", "result": ",name,elevation\n0,Madang Airport,20\n", "difficulty": "small_select"}, {"table_id": "member, round", "query": "SELECT T1.Name AS \"member Name\", Rank_in_Round \n FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID ORDER BY Rank_in_Round ASC", "table_name": "member, round", "query_description": "Show the names of members in ascending order of their rank in rounds.", "results_description": "Jack Nicklaus has a rank in round of 1", "result": ",member Name,Rank_in_Round\n0,Jack Nicklaus,1\n", "difficulty": "join"}, {"table_id": "city", "query": "SELECT Census_Ranking, Status \n FROM city \n WHERE Status <> 'Village'", "table_name": "city", "query_description": "Show the census ranking of cities whose status are not \"Village\".", "results_description": "The town has a Census Ranking of 636 of 50008.", "result": ",Status,Census_Ranking\n0,Town,636 of 5008\n", "difficulty": "small_select"}, {"table_id": "phone_market, market, phone", "query": "SELECT T3.Name AS \"phone Name\", T2.Num_of_shops AS \"market Num_of_shops\" \n 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 \n WHERE T2.Num_of_shops > 50", "table_name": "phone_market, market, phone", "query_description": "Show the names of phones that are on market with number of shops greater than 50.", "results_description": "The phone IPhone 5s has 54 shops on market.", "result": ",phone Name,market Num_of_shops\n0,IPhone 5s,54.0\n", "difficulty": "join"}, {"table_id": "Course_Authors_and_Tutors", "query": "SELECT login_name, family_name \n FROM Course_Authors_and_Tutors", "table_name": "Course_Authors_and_Tutors", "query_description": "List all the login names and family names of course author and tutors.", "results_description": "The user with login name jmckenzie has the family name Grant.", "result": ",login_name,family_name\n0,jmckenzie,Grant\n", "difficulty": "small_select"}, {"table_id": "enzyme", "query": "SELECT name \n FROM enzyme \n WHERE name LIKE '%ALA%'", "table_name": "enzyme", "query_description": "What are the names of enzymes that include the string 'ALA'?", "results_description": "The name is ALA synthase.", "result": ",name\n0,ALA synthase\n", "difficulty": "small_select"}, {"table_id": "customers, customer_addresses, addresses", "query": "SELECT t1.customer_name AS \"customers customer_name\", t3.state_province_county AS \"addresses state_province_county\" \n 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 \n WHERE t3.state_province_county = 'Colorado'", "table_name": "customers, customer_addresses, addresses", "query_description": "What are the names of customers who live in Colorado state?", "results_description": "The name of the customer who lives in the state of Colorado is Miss Aliyah Witting", "result": ",customers customer_name,addresses state_province_county\n0,Miss Aliyah Witting,Colorado\n", "difficulty": "join"}, {"table_id": "artist", "query": "SELECT AVG(Age) AS \"average Age\" \n FROM artist", "table_name": "artist", "query_description": "Return the average age across all artists.", "results_description": "The average age is 31.428571428571427.", "result": ",average Age\n0,31.428571428571427\n", "difficulty": "aggregate"}, {"table_id": "STUDENT, VOTING_RECORD", "query": "SELECT AVG(T1.Age) AS \"average Age\", T1.Sex AS \"STUDENT Sex\", T2.Election_Cycle AS \"VOTING_RECORD Election_Cycle\" \n FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote \n WHERE T1.Sex = 'F' AND T2.Election_Cycle = 'Spring'", "table_name": "STUDENT, VOTING_RECORD", "query_description": "What is the average age of the female students with secretary votes in the spring election cycle?", "results_description": "The average age of the female students with secretary votes in the Spring election cycle is 21.", "result": ",STUDENT Sex,average Age,VOTING_RECORD Election_Cycle\n0,F,21.0,Spring\n", "difficulty": "join_aggregate"}, {"table_id": "rooms", "query": "SELECT roomname, baseprice \n FROM rooms \n WHERE baseprice BETWEEN 120 AND 150", "table_name": "rooms", "query_description": "Which rooms cost between 120 and 150? Give me the room names.", "results_description": "The room named Recluse and defiance has the base price of 150.", "result": ",roomName,basePrice\n0,Recluse and defiance,150\n", "difficulty": "small_select"}, {"table_id": "campuses", "query": "SELECT campus, YEAR \n FROM campuses \n WHERE YEAR = 1958", "table_name": "campuses", "query_description": "Find all the campuses opened in 1958.", "results_description": "California State University-Northridge campus opened in 1958", "result": ",Year,Campus\n0,1958,California State University-Northridge\n", "difficulty": "small_select"}, {"table_id": "inventory", "query": "SELECT COUNT(*) AS \"count of inventory\", store_id \n FROM inventory \n WHERE store_id = 1", "table_name": "inventory", "query_description": "How many items in inventory does store 1 have?", "results_description": "Store 1 has 2270 inventories.", "result": ",store_id,count of inventory\n0,1,2270\n", "difficulty": "aggregate"}, {"table_id": "COURSE", "query": "SELECT COUNT(*) AS \"count of COURSE\" \n FROM COURSE", "table_name": "COURSE", "query_description": "How many courses are there in total?", "results_description": "There are 76 courses in total.", "result": ",count of COURSE\n0,76\n", "difficulty": "aggregate"}, {"table_id": "catalog_contents", "query": "SELECT catalog_entry_name, width, LENGTH \n FROM catalog_contents \n WHERE LENGTH < 3 OR width > 5", "table_name": "catalog_contents", "query_description": "Find the names of the products with length smaller than 3 or height greater than 5.", "results_description": "The width is 6, the length is 6 and the catalog's entry name is Root beer.", "result": ",width,length,catalog_entry_name\n0,6,6,Root beer\n", "difficulty": "small_select"}, {"table_id": "employees, departments, locations", "query": "SELECT T1.first_name AS \"employees first_name\", T1.last_name AS \"employees last_name\", T2.department_name AS \"departments department_name\", T3.city AS \"locations city\", T3.state_province AS \"locations state_province\" \n 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", "table_name": "employees, departments, locations", "query_description": "What are the full names, departments, cities, and state provinces for each employee?", "results_description": "Steven King works in the Executive dept. in Seattle, Washington", "result": ",locations city,employees last_name,employees first_name,locations state_province,departments department_name\n0,Seattle,King,Steven,Washington,Executive\n", "difficulty": "join"}, {"table_id": "film", "query": "SELECT title, Studio \n FROM film \n WHERE Studio LIKE '%Universal%'", "table_name": "film", "query_description": "What are the titles and studios of films that have been produced by a studio whose name contains \"Universal\"?", "results_description": "The film ET the Extra-Terrestrial has been produced by Universal studio", "result": ",Title,Studio\n0,ET the Extra-Terrestrial,Universal\n", "difficulty": "small_select"}, {"table_id": "body_builder, people", "query": "SELECT T2.Name AS \"people Name\", T2.Weight AS \"people Weight\" \n FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC", "table_name": "body_builder, people", "query_description": "What is the name of the body builder with the greatest body weight?", "results_description": "The heaviest body builder is Al Montoya, weighing 100", "result": ",people Name,people Weight\n0,Al Montoya,100.0\n", "difficulty": "join"}, {"table_id": "district", "query": "SELECT district_name, City_Population, city_area \n FROM district \n WHERE city_area > 10 OR City_Population > 100000", "table_name": "district", "query_description": "Find the name all districts with city area greater than 10 or population larger than 100000", "results_description": "The Attock District has a city area of 20 and city population of 94620", "result": ",City_Area,District_name,City_Population\n0,20.0,Attock District,94620.0\n", "difficulty": "small_select"}, {"table_id": "Ref_document_types", "query": "SELECT document_type_code, document_type_name \n FROM Ref_document_types", "table_name": "Ref_document_types", "query_description": "List all document type codes and document type names.", "results_description": "The document type code is CV and the document type name is CV", "result": ",Document_Type_Code,Document_Type_Name\n0,CV,CV\n", "difficulty": "small_select"}, {"table_id": "Catalog_Structure", "query": "SELECT catalog_level_name, catalog_level_number \n FROM Catalog_Structure \n WHERE catalog_level_number BETWEEN 5 AND 10", "table_name": "Catalog_Structure", "query_description": "What are the name and level of catalog structure with level number between 5 and 10", "results_description": "The name of the catalog level is Sub-Category and the catalog level number is 8", "result": ",catalog_level_name,catalog_level_number\n0,Sub-Category,8\n", "difficulty": "small_select"}, {"table_id": "exhibition", "query": "SELECT theme, YEAR, ticket_price \n FROM exhibition \n WHERE ticket_price < 15", "table_name": "exhibition", "query_description": "Show theme and year for all exhibitions with ticket prices lower than 15.", "results_description": "Exhibition \"Santa Claus and Rudolph the Red-Nosed Reindeer\" was held in 2006 and its ticket price was 14.95.", "result": ",Year,Theme,Ticket_Price\n0,2006,Santa Claus and Rudolph the Red-Nosed Reindeer,14.95\n", "difficulty": "small_select"}, {"table_id": "services", "query": "SELECT COUNT(*) AS \"count of services\" \n FROM services", "table_name": "services", "query_description": "How many services are there?", "results_description": "There are 4 services.", "result": ",count of services\n0,4\n", "difficulty": "aggregate"}, {"table_id": "film_market_estimation", "query": "SELECT Low_Estimate, High_Estimate \n FROM film_market_estimation", "table_name": "film_market_estimation", "query_description": "What are the low and high estimates of film markets?", "results_description": "Film markets have a low estimate of 80000 and a high estimate of 80400.", "result": ",Low_Estimate,High_Estimate\n0,80000.0,80400.0\n", "difficulty": "small_select"}, {"table_id": "Allergy_type", "query": "SELECT COUNT(*) AS \"count of Allergy_type\", allergytype \n FROM Allergy_type \n WHERE allergytype = 'animal'", "table_name": "Allergy_type", "query_description": "How many allergies have type animal?", "results_description": "There are 4 types of animal allergies.", "result": ",AllergyType,count of Allergy_type\n0,animal,4\n", "difficulty": "aggregate"}, {"table_id": "product", "query": "SELECT max_page_size \n FROM product \n GROUP BY max_page_size ORDER BY COUNT(*) DESC", "table_name": "product", "query_description": "Find the most prominent max page size among all the products.", "results_description": "The most prominent max page size is A4.", "result": ",max_page_size\n0,A4\n", "difficulty": "aggregate_group_by"}, {"table_id": "Street_Markets, TOURIST_ATTRACTIONS", "query": "SELECT T1.Market_Details AS \"Street_Markets Market_Details\", T2.How_to_Get_There AS \"TOURIST_ATTRACTIONS How_to_Get_There\" \n FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID \n WHERE T2.How_to_Get_There = 'walk' OR T2.How_to_Get_There = 'bus'", "table_name": "Street_Markets, TOURIST_ATTRACTIONS", "query_description": "Find the details of all the markets that are accessible by walk or bus.", "results_description": "The market with details Broadway is accessible by walk.", "result": ",Street_Markets Market_Details,TOURIST_ATTRACTIONS How_to_Get_There\n0,Broadway,walk\n", "difficulty": "join"}, {"table_id": "Ref_calendar", "query": "SELECT COUNT(*) AS \"count of Ref_calendar\" \n FROM Ref_calendar", "table_name": "Ref_calendar", "query_description": "How many calendar items do we have?", "results_description": "There are 15 ref calendars.", "result": ",count of Ref_calendar\n0,15\n", "difficulty": "aggregate"}, {"table_id": "Document_locations", "query": "SELECT location_code, date_in_location_from, date_in_locaton_to \n FROM Document_locations", "table_name": "Document_locations", "query_description": "Show the location code, the starting date and ending data in that location for all the documents.", "results_description": "Location code \"e\" has a starting date of 2008-06-08 12:45:38 and an ending date of 2017-01-06 23:17:22", "result": ",Location_Code,Date_in_Locaton_To,Date_in_Location_From\n0,e,2008-06-08 12:45:38,2017-01-06 23:17:22\n", "difficulty": "large_select"}, {"table_id": "products, ref_colors", "query": "SELECT t1.color_code AS \"products color_code\", t2.color_description AS \"ref_colors color_description\", t1.product_name AS \"products product_name\" \n FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code \n WHERE t1.product_name = 'chervil'", "table_name": "products, ref_colors", "query_description": "Return the color code and description for the product with the name 'chervil'.", "results_description": "The product named chervil has the color code 7 with description black.", "result": ",products color_code,products product_name,ref_colors color_description\n0,7,chervil,black\n", "difficulty": "join"}, {"table_id": "campuses", "query": "SELECT campus, county \n FROM campuses \n WHERE county = 'Los Angeles'", "table_name": "campuses", "query_description": "What campuses are located in the county of Los Angeles?", "results_description": "The campus California State University-Dominguez Hills is in the county of Los Angeles.", "result": ",Campus,County\n0,California State University-Dominguez Hills,Los Angeles\n", "difficulty": "small_select"}, {"table_id": "Restaurant_Type", "query": "SELECT ResTypeDescription, ResTypeName \n FROM Restaurant_Type \n WHERE ResTypeName = 'Sandwich'", "table_name": "Restaurant_Type", "query_description": "What is the description of the restaurant type Sandwich?", "results_description": "The restaurant type Sandwich has the description Simplest there is.", "result": ",ResTypeName,ResTypeDescription\n0,Sandwich,Simplest there is.\n", "difficulty": "small_select"}, {"table_id": "documents", "query": "SELECT document_type_code, document_name \n FROM documents \n WHERE document_name = 'David CV'", "table_name": "documents", "query_description": "What is the type of the document named \"David CV\"?", "results_description": "The document named David CV is of type CV.", "result": ",document_name,document_type_code\n0,David CV,CV\n", "difficulty": "small_select"}, {"table_id": "university", "query": "SELECT MAX(Enrollment) AS \"maximum Enrollment\" \n FROM university", "table_name": "university", "query_description": "What is the maximum enrollment across all schools?", "results_description": "The maximum enrollment is 56868.", "result": ",maximum Enrollment\n0,56868.0\n", "difficulty": "aggregate"}, {"table_id": "Band", "query": "SELECT COUNT(*) AS \"count of Band\" \n FROM Band", "table_name": "Band", "query_description": "Find the number of bands.", "results_description": "There are 0 bands.", "result": ",count of Band\n0,0\n", "difficulty": "aggregate"}, {"table_id": "loan, bank, customer", "query": "SELECT T2.bname AS \"bank bname\", T3.credit_score AS \"customer credit_score\" \n 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 \n WHERE T3.credit_score < 100", "table_name": "loan, bank, customer", "query_description": "Find the names of bank branches that have provided a loan to any customer whose credit score is below 100.", "results_description": "The morningside bank has a customer with credit score 30.", "result": ",bank bname,customer credit_score\n0,morningside,30\n", "difficulty": "join"}, {"table_id": "city, temperature", "query": "SELECT T1.city AS \"city city\" \n FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id \n WHERE T2.Mar < T2.Jul OR T2.Mar > T2.Oct", "table_name": "city, temperature", "query_description": "Which cities' temperature in March is lower than that in July or higher than that in Oct?", "results_description": "The city Shanghai", "result": ",city city\n0,Shanghai\n", "difficulty": "join"}, {"table_id": "playlists", "query": "SELECT name \n FROM playlists", "table_name": "playlists", "query_description": "What are the names of all the playlists?", "results_description": "The name is Music.", "result": ",name\n0,Music\n", "difficulty": "small_select"}, {"table_id": "technician", "query": "SELECT Name, Team \n FROM technician \n WHERE Team <> 'NYY'", "table_name": "technician", "query_description": "What is the name of the technician whose team is not 'NYY'?", "results_description": "The technician named Tony Sewell supports the CLE team.", "result": ",Name,Team\n0,Tony Sewell,CLE\n", "difficulty": "small_select"}, {"table_id": "Tourist_Attractions, VISITS, VISITORS", "query": "SELECT T1.Name AS \"Tourist_Attractions Name\", T3.Tourist_Details AS \"VISITORS Tourist_Details\" \n 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 \n WHERE T3.Tourist_Details = 'Vincent'", "table_name": "Tourist_Attractions, VISITS, VISITORS", "query_description": "Show the tourist attractions visited by the tourist whose detail is 'Vincent'.", "results_description": "The tourist with details Vincent has visited the flying elephant attraction.", "result": ",Tourist_Attractions Name,VISITORS Tourist_Details\n0,flying elephant,Vincent\n", "difficulty": "join"}, {"table_id": "manager", "query": "SELECT MAX(LEVEL) AS \"maximum LEVEL\", Country \n FROM manager \n WHERE Country <> 'Australia\t'", "table_name": "manager", "query_description": "What is the maximum level of managers in countries that are not \"Australia\"?", "results_description": "The maxium level of managers in Australia is 12", "result": ",Country,maximum LEVEL\n0,Australia,12\n", "difficulty": "aggregate"}, {"table_id": "advisor, instructor, student", "query": "SELECT T2.name AS \"instructor name\", T2.salary AS \"instructor salary\", T3.dept_name AS \"student dept_name\" \n FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id \n WHERE T3.dept_name = 'Math'", "table_name": "advisor, instructor, student", "query_description": "Find the name and salary of instructors who are advisors of the students from the Math department.", "results_description": "The salary of the instructors Sullivan from the Math department are 90038.09 ", "result": ",instructor name,instructor salary,student dept_name\n0,Sullivan,90038.09,Math\n", "difficulty": "join"}, {"table_id": "catalog_contents, catalog_structure", "query": "SELECT t2.catalog_level_name AS \"catalog_structure catalog_level_name\", t1.price_in_dollars AS \"catalog_contents price_in_dollars\" \n 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", "table_name": "catalog_contents, catalog_structure", "query_description": "Find the level name of the catalog with the lowest price (in USD).", "results_description": "The catalog level name with the lowest price in dollars is \"Category\", with a price of 200.78", "result": ",catalog_contents price_in_dollars,catalog_structure catalog_level_name\n0,200.78,Category\n", "difficulty": "join"}, {"table_id": "WINE", "query": "SELECT Name, YEAR \n FROM WINE \n WHERE YEAR = '2008'", "table_name": "WINE", "query_description": "What are the names of all wines produced in 2008?", "results_description": "The wine Old Kraft Vineyard was produced in 2008.", "result": ",Name,Year\n0,Old Kraft Vineyard,2008\n", "difficulty": "small_select"}, {"table_id": "student", "query": "SELECT COUNT(*) AS \"count of student\" \n FROM student", "table_name": "student", "query_description": "How many students are there?", "results_description": "There are 34 students", "result": ",count of student\n0,34\n", "difficulty": "aggregate"}, {"table_id": "College", "query": "SELECT AVG(enr) AS \"average enr\", state \n FROM College \n WHERE state = 'FL'", "table_name": "College", "query_description": "What is average enrollment of colleges in the state FL?", "results_description": "The average enrollment of colleges in Florida is 19000", "result": ",state,average enr\n0,FL,19000.0\n", "difficulty": "aggregate"}, {"table_id": "order_items", "query": "SELECT AVG(order_quantity) AS \"average order_quantity\" \n FROM order_items", "table_name": "order_items", "query_description": "What is the average amount of items ordered in each order?", "results_description": "The average order quantity is 6.333333333333333.", "result": ",average order_quantity\n0,6.333333333333333\n", "difficulty": "aggregate"}, {"table_id": "SUBJECTS", "query": "SELECT subject_name \n FROM SUBJECTS", "table_name": "SUBJECTS", "query_description": "What are the names of all the subjects.", "results_description": "The name of the subject is Computer Science", "result": ",subject_name\n0,Computer Science\n", "difficulty": "small_select"}, {"table_id": "classroom", "query": "SELECT COUNT(*) AS \"count of classroom\", building \n FROM classroom \n WHERE building <> 'Lamberton'", "table_name": "classroom", "query_description": "Count the number of rooms that are not in the Lamberton building.", "results_description": "There are 28 classrooms in the Alumni building", "result": ",building,count of classroom\n0,Alumni,28\n", "difficulty": "aggregate"}, {"table_id": "entrepreneur, people", "query": "SELECT T1.Company AS \"entrepreneur Company\", T2.Height AS \"people Height\" \n FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Height DESC", "table_name": "entrepreneur, people", "query_description": "Which company was started by the entrepreneur with the greatest height?", "results_description": "The company Elizabeth Galton Ltd was started by an en entrepreneur with a height of 1.95", "result": ",people Height,entrepreneur Company\n0,1.95,Elizabeth Galton Ltd\n", "difficulty": "join"}, {"table_id": "repair_assignment, machine, technician", "query": "SELECT T3.Name AS \"technician Name\", T2.quality_rank AS \"machine quality_rank\" \n 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", "table_name": "repair_assignment, machine, technician", "query_description": "What are the names of the technicians by ascending order of quality rank for the machine they are assigned?", "results_description": "The technician named John Brown uses the machine with quality rank 1.", "result": ",technician Name,machine quality_rank\n0,John Brown,1\n", "difficulty": "join"}, {"table_id": "festival_detail", "query": "SELECT Festival_Name, LOCATION \n FROM festival_detail", "table_name": "festival_detail", "query_description": "What are the names and locations of festivals?", "results_description": "Panasonic Awards are held in United States.", "result": ",Location,Festival_Name\n0,United States,Panasonic Awards\n", "difficulty": "small_select"}, {"table_id": "Allergy_type", "query": "SELECT allergy, allergytype \n FROM Allergy_type", "table_name": "Allergy_type", "query_description": "What are the allergies and their types?", "results_description": "The allergy on eggs is of type food.", "result": ",Allergy,AllergyType\n0,Eggs,food\n", "difficulty": "small_select"}, {"table_id": "Apartment_Facilities, Apartments", "query": "SELECT SUM(T2.room_count) AS \"sum of room_count\", T1.facility_code AS \"Apartment_Facilities facility_code\" \n FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id \n WHERE T1.facility_code = 'Gym'", "table_name": "Apartment_Facilities, Apartments", "query_description": "Find the total number of rooms in the apartments that have facility code \"Gym\".", "results_description": "There are 15 rooms in the apartments that have facility code \"Gym\".", "result": ",sum of room_count,Apartment_Facilities facility_code\n0,15,Gym\n", "difficulty": "join_aggregate"}, {"table_id": "Person", "query": "SELECT age, job, name \n FROM Person \n WHERE job = 'doctor' AND name = 'Zach'", "table_name": "Person", "query_description": "How old is the doctor named Zach?", "results_description": "The doctor named Zach is 45 years old", "result": ",age,job,name\n0,45,doctor,Zach\n", "difficulty": "small_select"}, {"table_id": "Drama_Workshop_Groups", "query": "SELECT Store_Name \n FROM Drama_Workshop_Groups", "table_name": "Drama_Workshop_Groups", "query_description": "Show all the Store_Name of drama workshop groups.", "results_description": "The store name is Amely Cafe.", "result": ",Store_Name\n0,Amely Cafe\n", "difficulty": "small_select"}, {"table_id": "music_festival", "query": "SELECT Category, RESULT \n FROM music_festival \n WHERE RESULT = 'Awarded'", "table_name": "music_festival", "query_description": "What are the category of music festivals with result \"Awarded\"?", "results_description": "The category of music festivals with result Awarded is Best Song", "result": ",Result,Category\n0,Awarded,Best Song\n", "difficulty": "small_select"}, {"table_id": "Ref_budget_codes", "query": "SELECT budget_type_description, budget_type_code \n FROM Ref_budget_codes \n WHERE budget_type_code = 'ORG'", "table_name": "Ref_budget_codes", "query_description": "Return the description of the budget type that has the code ORG.", "results_description": "The description of the budget type code \"ORG\" is \"Organisation\"", "result": ",Budget_Type_Code,Budget_Type_Description\n0,ORG,Organisation\n", "difficulty": "small_select"}, {"table_id": "employees", "query": "SELECT COUNT(*) AS \"count of employees\", country \n FROM employees \n WHERE country = 'Canada'", "table_name": "employees", "query_description": "How many employees live in Canada?", "results_description": "In the country of Canada 8 employees live.", "result": ",country,count of employees\n0,Canada,8\n", "difficulty": "aggregate"}, {"table_id": "csu_fees", "query": "SELECT AVG(campusfee) AS \"average campusfee\", YEAR \n FROM csu_fees \n WHERE YEAR = 1996", "table_name": "csu_fees", "query_description": "What is the average fee for a CSU campus in the year of 1996?", "results_description": "The average campus fee on year 1996 is 1936.090909090909", "result": ",Year,average campusfee\n0,1996.0,1936.090909090909\n", "difficulty": "aggregate"}, {"table_id": "Faculty, Faculty_participates_in, Activity", "query": "SELECT T3.activity_name AS \"Activity activity_name\", T1.fname AS \"Faculty fname\", T1.lname AS \"Faculty lname\" \n FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN Activity AS T3 ON T3.actid = T2.actid \n WHERE T1.fname = 'Mark' AND T1.lname = 'Giuliano'", "table_name": "Faculty, Faculty_participates_in, Activity", "query_description": "What are the names of the activities Mark Giuliano is involved in", "results_description": "The faculty memebr Mark Giuliano is involved in the Canasta activity.", "result": ",Faculty fname,Faculty lname,Activity activity_name\n0,Mark,Giuliano,Canasta\n", "difficulty": "join"}, {"table_id": "city, county_public_safety", "query": "SELECT T1.White AS \"city White\", T2.Crime_rate AS \"county_public_safety Crime_rate\" \n FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID", "table_name": "city, county_public_safety", "query_description": "Show white percentages of cities and the crime rates of counties they are in.", "results_description": "City white with value 93.1 has a crime rate of 118.", "result": ",city White,county_public_safety Crime_rate\n0,93.1,118.0\n", "difficulty": "join"}, {"table_id": "entrepreneur", "query": "SELECT COUNT(*) AS \"count of entrepreneur\" \n FROM entrepreneur", "table_name": "entrepreneur", "query_description": "How many entrepreneurs are there?", "results_description": "There are 6 entrepreneurs.", "result": ",count of entrepreneur\n0,6\n", "difficulty": "aggregate"}, {"table_id": "SHOPS, TOURIST_ATTRACTIONS", "query": "SELECT T1.Shop_Details AS \"SHOPS Shop_Details\", T2.How_to_Get_There AS \"TOURIST_ATTRACTIONS How_to_Get_There\" \n FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID = T2.Tourist_Attraction_ID \n WHERE T2.How_to_Get_There = 'walk'", "table_name": "SHOPS, TOURIST_ATTRACTIONS", "query_description": "Find the details of the shops that can be reached by walk.", "results_description": "The shop selling soup can be reached by walking", "result": ",SHOPS Shop_Details,TOURIST_ATTRACTIONS How_to_Get_There\n0,soup,walk\n", "difficulty": "join"}, {"table_id": "EMPLOYEE", "query": "SELECT Phone \n FROM EMPLOYEE", "table_name": "EMPLOYEE", "query_description": "List the phone numbers of all employees.", "results_description": "The phone number is +1 (780) 428-9482.", "result": ",Phone\n0,+1 (780) 428-9482\n", "difficulty": "small_select"}, {"table_id": "users", "query": "SELECT COUNT(*) AS \"count of users\", user_login \n FROM users \n WHERE user_login = 1", "table_name": "users", "query_description": "How many users are logged in?", "results_description": "There 7 users logged in.", "result": ",user_login,count of users\n0,1,7\n", "difficulty": "aggregate"}, {"table_id": "ARTIST", "query": "SELECT Name \n FROM ARTIST \n WHERE Name LIKE '%a%'", "table_name": "ARTIST", "query_description": "What are the names of artist who have the letter 'a' in their names?", "results_description": "The name of the artist is AC/DC.", "result": ",Name\n0,AC/DC\n", "difficulty": "small_select"}, {"table_id": "discipline_enrollments, campuses", "query": "SELECT SUM(t1.graduate) AS \"sum of graduate\", t1.year AS \"discipline_enrollments year\", t2.campus AS \"campuses campus\" \n FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id \n WHERE t1.year = 2004 AND t2.campus = 'San Francisco State University'", "table_name": "discipline_enrollments, campuses", "query_description": "What is the number of graduates in \"San Francisco State University\" in year 2004?", "results_description": "The number of graduates in campus called San Francisco State University in year 2004 is 5017", "result": ",campuses campus,sum of graduate,discipline_enrollments year\n0,San Francisco State University,5017,2004\n", "difficulty": "join_aggregate"}, {"table_id": "Customers", "query": "SELECT customer_status_code, cell_mobile_phone_number, email_address, last_name, first_name \n FROM Customers \n WHERE first_name = 'Marina' OR last_name = 'Kohler'", "table_name": "Customers", "query_description": "What is the status code, phone number, and email address of the customer whose last name is Kohler or whose first name is Marina?", "results_description": "The customer Marina Koelpin has a status code of Bad Customer, the phone number is 848-099-2095x785 and the email address is mayert.judy@example.com", "result": ",last_name,first_name,email_address,customer_status_code,cell_mobile_phone_number\n0,Koelpin,Marina,mayert.judy@example.com,Bad Customer,848-099-2095x785\n", "difficulty": "large_select"}, {"table_id": "elimination, wrestler", "query": "SELECT T2.Name AS \"wrestler Name\", T1.Elimination_Move AS \"elimination Elimination_Move\" \n FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID", "table_name": "elimination, wrestler", "query_description": "Give the names of wrestlers and their elimination moves.", "results_description": "The elimination move of Rey Misterio Sr. is called \"Go To Sleep\".", "result": ",wrestler Name,elimination Elimination_Move\n0,Rey Misterio Sr.,Go To Sleep\n", "difficulty": "join"}, {"table_id": "GENRE, TRACK", "query": "SELECT AVG(Milliseconds) AS \"average Milliseconds\", T1.Name AS \"GENRE Name\" \n FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId \n WHERE T1.Name = 'Latin' OR T1.Name = 'Pop'", "table_name": "GENRE, TRACK", "query_description": "Find the average millisecond length of Latin and Pop tracks.", "results_description": "For the Latin genre, the average millisecond length is 232566.4274322169", "result": ",GENRE Name,average Milliseconds\n0,Latin,232566.4274322169\n", "difficulty": "join_aggregate"}, {"table_id": "constructors, constructorstandings", "query": "SELECT T1.name AS \"constructors name\", T1.nationality AS \"constructors nationality\", T2.points AS \"constructorstandings points\" \n FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid \n WHERE T1.nationality = 'Japanese' AND T2.points > 5", "table_name": "constructors, constructorstandings", "query_description": "What are the names of all the Japanese constructors that have earned more than 5 points?", "results_description": "Toyota is a Japanese constructor with 8 points", "result": ",constructors name,constructors nationality,constructorstandings points\n0,Toyota,Japanese,8.0\n", "difficulty": "join"}, {"table_id": "party", "query": "SELECT Lieutenant_Governor, Comptroller, Party \n FROM party \n WHERE Party = 'Democratic'", "table_name": "party", "query_description": "Show the lieutenant governor and comptroller from the democratic party.", "results_description": "The Democratic party has the comptroller Carl McCall and the lieutenant governor Sandra Frankel.", "result": ",Party,Comptroller,Lieutenant_Governor\n0,Democratic,Carl McCall,Sandra Frankel\n", "difficulty": "small_select"}, {"table_id": "Student", "query": "SELECT city_code, Lname, Fname \n FROM Student \n WHERE Fname = 'Linda' AND Lname = 'Smith'", "table_name": "Student", "query_description": "Which city does student Linda Smith live in?", "results_description": "The student Linda Smith lives in the city with code BAL", "result": ",Fname,LName,city_code\n0,Linda,Smith,BAL\n", "difficulty": "small_select"}, {"table_id": "COURSE, DEPARTMENT", "query": "SELECT T2.Dname AS \"DEPARTMENT Dname\", T2.Room AS \"DEPARTMENT Room\", T1.CName AS \"COURSE CName\" \n FROM COURSE AS T1 JOIN DEPARTMENT AS T2 ON T1.DNO = T2.DNO \n WHERE T1.CName = 'INTRODUCTION TO COMPUTER SCIENCE'", "table_name": "COURSE, DEPARTMENT", "query_description": "What are the department name and room for the course INTRODUCTION TO COMPUTER SCIENCE?", "results_description": "The course named INTRODUCTION TO COMPUTER SCIENCE is in the department of Computer Science, in room 224. ", "result": ",COURSE CName,DEPARTMENT Room,DEPARTMENT Dname\n0,INTRODUCTION TO COMPUTER SCIENCE,224,Computer Science\n", "difficulty": "join"}, {"table_id": "player", "query": "SELECT Player_name, residence, Occupation \n FROM player \n WHERE Occupation <> 'Researcher'", "table_name": "player", "query_description": "List the name and residence for players whose occupation is not \"Researcher\".", "results_description": "The player name is Jean Luc Bouch\u00e9, the occupation is Locomotive Engineer and the residence is Brandon", "result": ",Residence,Occupation,Player_name\n0,Brandon,Locomotive Engineer,Jean Luc Bouch\u00e9\n", "difficulty": "small_select"}, {"table_id": "Employee", "query": "SELECT AVG(salary) AS \"average salary\", MAX(salary) AS \"maximum salary\" \n FROM Employee", "table_name": "Employee", "query_description": "What is the average and largest salary of all employees?", "results_description": "The average salary is 109915.3870967742 and the largest salary is 289950 of all employees", "result": ",average salary,maximum salary\n0,109915.3870967742,289950.0\n", "difficulty": "aggregate"}, {"table_id": "party", "query": "SELECT minister, party_name \n FROM party \n WHERE party_name <> 'Progress Party'", "table_name": "party", "query_description": "Which ministers are not a part of the Progress Party?", "results_description": "MP Dr. Kwame Nkrumah belongs to the Convention Peoples Party", "result": ",Minister,Party_name\n0,Dr. Kwame Nkrumah (MP),Convention Peoples Party\n", "difficulty": "small_select"}, {"table_id": "professor, employee, department", "query": "SELECT T2.emp_fname AS \"employee emp_fname\", T1.prof_office AS \"professor prof_office\", T1.prof_high_degree AS \"professor prof_high_degree\", T3.dept_name AS \"department dept_name\" \n 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 \n WHERE T3.dept_name = 'History' AND T1.prof_high_degree <> 'Ph.D.'", "table_name": "professor, employee, department", "query_description": "What are the first names and offices of history professors who don't have Ph.D.s?", "results_description": "The employee named James is in the department of History, he has the office DRE 156 and his high degree is MA.", "result": ",employee emp_fname,department dept_name,professor prof_office,professor prof_high_degree\n0,James,History,DRE 156,MA\n", "difficulty": "join"}, {"table_id": "track", "query": "SELECT name, LOCATION \n FROM track", "table_name": "track", "query_description": "What are the names and locations of all tracks?", "results_description": "The name is Auto Club Speedway and the location is Fontana, CA.", "result": ",Name,Location\n0,Auto Club Speedway,\"Fontana, CA\"\n", "difficulty": "small_select"}, {"table_id": "Player", "query": "SELECT pName, HS \n FROM Player \n WHERE HS BETWEEN 500 AND 1500", "table_name": "Player", "query_description": "What are the names of players whose training hours is between 500 and 1500?", "results_description": "The player name Andrew has 1200 hours.", "result": ",HS,pName\n0,1200,Andrew\n", "difficulty": "small_select"}, {"table_id": "Accounts", "query": "SELECT other_account_details, account_name \n FROM Accounts \n WHERE account_name = '338'", "table_name": "Accounts", "query_description": "Show other account details for account with name 338.", "results_description": "The account with name 338 has Regular as other account details ", "result": ",account_name,other_account_details\n0,338,Regular\n", "difficulty": "small_select"}, {"table_id": "county, election", "query": "SELECT T1.County_name AS \"county County_name\", T2.Committee AS \"election Committee\" \n FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District \n WHERE T2.Committee = 'Appropriations'", "table_name": "county, election", "query_description": "What are the names of the county that the delegates on \"Appropriations\" committee belong to?", "results_description": "The appropriations committee belongs to the county of Howard", "result": ",county County_name,election Committee\n0,Howard,Appropriations\n", "difficulty": "join"}, {"table_id": "Flight", "query": "SELECT COUNT(*) AS \"count of Flight\" \n FROM Flight", "table_name": "Flight", "query_description": "What is the number of flights?", "results_description": "The number of flights is 10", "result": ",count of Flight\n0,10\n", "difficulty": "aggregate"}, {"table_id": "manufacturer", "query": "SELECT AVG(Num_of_Factories) AS \"average Num_of_Factories\", num_of_shops \n FROM manufacturer \n WHERE num_of_shops > 20", "table_name": "manufacturer", "query_description": "Find the average number of factories for the manufacturers that have more than 20 shops.", "results_description": "The average number of factories for the manufacturer is 19.5 and the number of shops is 35", "result": ",Num_of_Shops,average Num_of_Factories\n0,35.0,19.5\n", "difficulty": "aggregate"}, {"table_id": "BOOKINGS", "query": "SELECT Planned_Delivery_Date, Actual_Delivery_Date \n FROM BOOKINGS", "table_name": "BOOKINGS", "query_description": "Show all the planned delivery dates and actual delivery dates of bookings.", "results_description": "The planned delivery date is 2013-03-10 18:47:05 and the actual delivery date is 1997-11-21 10:07:40.", "result": ",Actual_Delivery_Date,Planned_Delivery_Date\n0,1997-11-21 10:07:40,2013-03-10 18:47:05\n", "difficulty": "small_select"}, {"table_id": "Rating", "query": "SELECT MAX(stars) AS \"maximum stars\", MIN(stars) AS \"minimum stars\" \n FROM Rating", "table_name": "Rating", "query_description": "What is the maximum and mininum number of stars a rating can receive?", "results_description": "The maximum and minimum number of stars are 5 and 2, respectively.", "result": ",maximum stars,minimum stars\n0,5,2\n", "difficulty": "aggregate"}, {"table_id": "campuses, degrees", "query": "SELECT T1.campus AS \"campuses campus\", SUM(T2.degrees) AS \"sum of degrees\", T1.county AS \"campuses county\", T2.year AS \"degrees year\" \n FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus \n WHERE T1.county = 'Orange' AND T2.year >= 2000 \n GROUP BY T1.campus", "table_name": "campuses, degrees", "query_description": "What is the total number of degrees granted after 2000 for each Orange county campus?", "results_description": "In 2000, the California State University-Fullerton in Orange County awarded 26211 degrees", "result": ",degrees year,sum of degrees,campuses campus,campuses county\n0,2000,26211,California State University-Fullerton,Orange\n", "difficulty": "join_aggregate"}, {"table_id": "Student", "query": "SELECT MIN(age) AS \"minimum age\", AVG(age) AS \"average age\", MAX(age) AS \"maximum age\" \n FROM Student", "table_name": "Student", "query_description": "Show the minimum, average, and maximum age of all students.", "results_description": "The minimum age is 16, the average age is 19.558823529411764, and the maximum age is 27 of all students", "result": ",average age,maximum age,minimum age\n0,19.558823529411764,27.0,16.0\n", "difficulty": "aggregate"}, {"table_id": "employee", "query": "SELECT fname, lname, salary \n FROM employee \n WHERE salary > 30000", "table_name": "employee", "query_description": "Return the first names and last names of employees who earn more than 30000 in salary.", "results_description": "The employee first name is Franklin, the last name is Wong and his salary is 40000.", "result": ",Fname,Lname,Salary\n0,Franklin,Wong,40000\n", "difficulty": "small_select"}, {"table_id": "organizations, organization_contact_individuals, individuals", "query": "SELECT t3.individual_last_name AS \"individuals individual_last_name\", t1.organization_name AS \"organizations organization_name\", t2.date_contact_to AS \"organization_contact_individuals date_contact_to\" \n 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 \n WHERE t1.organization_name = 'Labour Party' ORDER BY t2.date_contact_to DESC", "table_name": "organizations, organization_contact_individuals, individuals", "query_description": "What is the last name of the contact individual from the Labour party organization who was contacted most recently?", "results_description": "Bradtke from the Labour Party organization has contacted at 2018-03-25 10:27:18.", "result": ",organizations organization_name,individuals individual_last_name,organization_contact_individuals date_contact_to\n0,Labour Party,Bradtke,2018-03-25 10:27:18\n", "difficulty": "join"}, {"table_id": "Student", "query": "SELECT major \n FROM Student \n GROUP BY major ORDER BY COUNT(*) DESC", "table_name": "Student", "query_description": "Which major has most number of students?", "results_description": "The major 600 has the most number of students.", "result": ",Major\n0,600\n", "difficulty": "aggregate_group_by"}, {"table_id": "film", "query": "SELECT Studio \n FROM film \n GROUP BY Studio ORDER BY COUNT(*) DESC", "table_name": "film", "query_description": "What is the name of teh studio that created the most films?", "results_description": "The studio is Paramount.", "result": ",Studio\n0,Paramount\n", "difficulty": "aggregate_group_by"}, {"table_id": "party_events", "query": "SELECT COUNT(*) AS \"count of party_events\" \n FROM party_events", "table_name": "party_events", "query_description": "Count the number of party events.", "results_description": "There are 8 party events", "result": ",count of party_events\n0,8\n", "difficulty": "aggregate"}, {"table_id": "home_game, park", "query": "SELECT T2.park_name AS \"park park_name\", T1.attendance AS \"home_game attendance\", T1.year AS \"home_game year\" \n FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id \n WHERE T1.year = 2008 ORDER BY T1.attendance DESC", "table_name": "home_game, park", "query_description": "Which park did the most people attend in 2008?", "results_description": "The name of the park with attendance of 4298655 people in 2008 was Yankee Stadium I ", "result": ",home_game year,park park_name,home_game attendance\n0,2008,Yankee Stadium I,4298655\n", "difficulty": "join"}, {"table_id": "artist", "query": "SELECT name, year_join, country \n FROM artist \n WHERE country <> 'United States'", "table_name": "artist", "query_description": "What are the names and year of joining for artists that do not have the country \"United States\"?", "results_description": "Vijay Singh frin Fiji joined in 1998", "result": ",Name,Country,Year_Join\n0,Vijay Singh,Fiji,1998\n", "difficulty": "small_select"}, {"table_id": "student", "query": "SELECT COUNT(*) AS \"count of student\" \n FROM student", "table_name": "student", "query_description": "Count the total number of students.", "results_description": "There are 34 students in total.", "result": ",count of student\n0,34\n", "difficulty": "aggregate"}, {"table_id": "station", "query": "SELECT AVG(total_passengers) AS \"average total_passengers\", MAX(total_passengers) AS \"maximum total_passengers\", LOCATION \n FROM station \n WHERE LOCATION = 'London' OR LOCATION = 'Glasgow'", "table_name": "station", "query_description": "What is the average and maximum number of total passengers for train stations in London or Glasgow?", "results_description": "In London the average total passengers are 48.01500000000001 while the maximum is 103.534.", "result": ",Location,average total_passengers,maximum total_passengers\n0,London,48.01500000000001,103.534\n", "difficulty": "aggregate"}, {"table_id": "member_attendance, member, performance", "query": "SELECT T2.Name AS \"member Name\", T3.Location AS \"performance Location\" \n 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", "table_name": "member_attendance, member, performance", "query_description": "Show the names of members and the location of performances they attended in ascending alphabetical order of their names.", "results_description": "Charlie Burke attended a performance in Madison Square Garden", "result": ",member Name,performance Location\n0,Charlie Burke,Madison Square Garden\n", "difficulty": "join"}, {"table_id": "races, results", "query": "SELECT AVG(T2.fastestlapspeed) AS \"average fastestlapspeed\", T1.year AS \"races year\", T1.name AS \"races name\" \n FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid \n WHERE T1.year = 2008 AND T1.name = 'Monaco Grand Prix'", "table_name": "races, results", "query_description": "What is the average fastest lap speed for the Monaco Grand Prix in 2008?", "results_description": "The Monaco Grand Prix in 2008 had an average fastest lap speed of 146.49920000000003", "result": ",races name,races year,average fastestlapspeed\n0,Monaco Grand Prix,2008,146.49920000000003\n", "difficulty": "join_aggregate"}, {"table_id": "technician", "query": "SELECT Name, Age \n FROM technician \n WHERE Age = 36 OR Age = 37", "table_name": "technician", "query_description": "Show the name of technicians aged either 36 or 37", "results_description": "The names of technicians are Joe Sewell and their ages are 37", "result": ",Age,Name\n0,37,Joe Sewell\n", "difficulty": "small_select"}, {"table_id": "Student_Course_Enrolment, Student_Tests_Taken", "query": "SELECT T1.date_of_completion AS \"Student_Course_Enrolment date_of_completion\", T2.test_result AS \"Student_Tests_Taken test_result\" \n FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id \n WHERE T2.test_result = 'Fail'", "table_name": "Student_Course_Enrolment, Student_Tests_Taken", "query_description": "What are the completion dates of all the tests that have result \"Fail\"?", "results_description": "The test completed at 2018-03-02 14:38:49 has the result Fail.", "result": ",Student_Tests_Taken test_result,Student_Course_Enrolment date_of_completion\n0,Fail,2018-03-02 14:38:49\n", "difficulty": "join"}, {"table_id": "follows", "query": "SELECT COUNT(*) AS \"count of follows\" \n FROM follows", "table_name": "follows", "query_description": "How many followers does each user have?", "results_description": "Each user has 9 follows.", "result": ",count of follows\n0,9\n", "difficulty": "aggregate"}, {"table_id": "employees, jobs", "query": "SELECT job_title, AVG(salary) AS \"average salary\", T2.job_title AS \"jobs job_title\" \n FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id \n GROUP BY T2.job_title", "table_name": "employees, jobs", "query_description": "display job title and average salary of employees.", "results_description": "The average salary of an accountant is 7920.", "result": ",JOB_TITLE,average salary,jobs job_title\n0,Accountant,7920.0,Accountant\n", "difficulty": "join_aggregate"}, {"table_id": "Rooms", "query": "SELECT decor, COUNT(*) AS \"count of Rooms\", basePrice \n FROM Rooms \n WHERE basePrice > 120 \n GROUP BY decor", "table_name": "Rooms", "query_description": "How many rooms cost more than 120, for each different decor?", "results_description": "There are 2 rooms with modern decor and price 150.", "result": ",decor,basePrice,count of Rooms\n0,modern,150,2\n", "difficulty": "aggregate_group_by"}, {"table_id": "Video_games", "query": "SELECT gtype, gname \n FROM Video_games \n WHERE gname = 'Call of Destiny'", "table_name": "Video_games", "query_description": "What is the type of video game Call of Destiny.", "results_description": "The video game Call of Destiny is a Frist-person shooter.", "result": ",GName,GType\n0,Call of Destiny,Frist-person shooter\n", "difficulty": "small_select"}, {"table_id": "county_public_safety", "query": "SELECT LOCATION \n FROM county_public_safety \n GROUP BY LOCATION ORDER BY COUNT(*) DESC", "table_name": "county_public_safety", "query_description": "What is the location shared by most counties?", "results_description": "East is the location shared by most counties", "result": ",Location\n0,East\n", "difficulty": "aggregate_group_by"}, {"table_id": "albums, artists", "query": "SELECT T1.title AS \"albums title\", T2.name AS \"artists name\" \n FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id \n WHERE T2.name = 'Aerosmith'", "table_name": "albums, artists", "query_description": "List Aerosmith's albums.", "results_description": "The album titled Big Ones is from the artists Aerosmith.", "result": ",albums title,artists name\n0,Big Ones,Aerosmith\n", "difficulty": "join"}, {"table_id": "Ref_document_types", "query": "SELECT document_type_code, document_type_name \n FROM Ref_document_types \n WHERE document_type_name = 'Paper'", "table_name": "Ref_document_types", "query_description": "What is the document type code for document type \"Paper\"?", "results_description": "The document type Paper has code PR.", "result": ",Document_Type_Code,Document_Type_Name\n0,PR,Paper\n", "difficulty": "small_select"}, {"table_id": "Movie", "query": "SELECT director, title \n FROM Movie \n WHERE title = 'Avatar'", "table_name": "Movie", "query_description": "Who is the director of movie Avatar?", "results_description": "Avatar was directed by James Cameron", "result": ",title,director\n0,Avatar,James Cameron\n", "difficulty": "small_select"}, {"table_id": "Rooms", "query": "SELECT roomName, basePrice, beds, decor \n FROM Rooms \n WHERE basePrice < 160 AND beds = 2 AND decor = 'modern'", "table_name": "Rooms", "query_description": "Find the names of all modern rooms with a base price below $160 and two beds.", "results_description": "The room Mendicant with cryptic has 2 beds, modern decor and base price 125.", "result": ",beds,decor,roomName,basePrice\n0,2,modern,Mendicant with cryptic,125\n", "difficulty": "small_select"}, {"table_id": "DEPARTMENT", "query": "SELECT COUNT(*) AS \"count of DEPARTMENT\", Division \n FROM DEPARTMENT \n WHERE Division = 'AS'", "table_name": "DEPARTMENT", "query_description": "What is the number of departments in Division \"AS\"?", "results_description": "The division AS has 19 departments.", "result": ",Division,count of DEPARTMENT\n0,AS,19\n", "difficulty": "aggregate"}, {"table_id": "WINE", "query": "SELECT MAX(Price) AS \"maximum Price\", MAX(Score) AS \"maximum Score\", Appelation \n FROM WINE \n WHERE Appelation = 'St. Helena'", "table_name": "WINE", "query_description": "What are the maximum price and score of wines produced by St. Helena appelation?", "results_description": "The wines produced by St. Helena have a maximum price of 150 and a maximum score of 97", "result": ",Appelation,maximum Price,maximum Score\n0,St. Helena,150,97\n", "difficulty": "aggregate"}, {"table_id": "perpetrator", "query": "SELECT MAX(YEAR) AS \"maximum YEAR\" \n FROM perpetrator", "table_name": "perpetrator", "query_description": "In which year did the most recent crime happen?", "results_description": "The maximum year is 1995.", "result": ",maximum YEAR\n0,1995.0\n", "difficulty": "aggregate"}, {"table_id": "Student_Tests_Taken", "query": "SELECT date_test_taken, test_result \n FROM Student_Tests_Taken \n WHERE test_result = 'Pass'", "table_name": "Student_Tests_Taken", "query_description": "Which tests have \"Pass\" results? Return the dates when the tests were taken.", "results_description": "The test that has Pass result was taken at 2018-03-25 21:50:22", "result": ",test_result,date_test_taken\n0,Pass,2018-03-25 21:50:22\n", "difficulty": "small_select"}, {"table_id": "files, song", "query": "SELECT AVG(T1.duration) AS \"average duration\", T2.resolution AS \"song resolution\", T1.formats AS \"files formats\" \n FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id \n WHERE T1.formats = 'mp3' AND T2.resolution < 800", "table_name": "files, song", "query_description": "What is the average song duration for the songs that are in mp3 format and whose resolution below 800?", "results_description": "The songs that are in mp3 format and whose resolution is below 800 have a duration of 3 and a resolution of 512", "result": ",files formats,song resolution,average duration\n0,mp3,512,3.0\n", "difficulty": "join_aggregate"}, {"table_id": "PERFORMERS", "query": "SELECT Customer_Phone, Customer_Name \n FROM PERFORMERS \n WHERE Customer_Name = 'Ashley'", "table_name": "PERFORMERS", "query_description": "What is the phone number of the performer Ashley?", "results_description": "The customer named Ashley has the phone 893-536-8857.", "result": ",Customer_Name,Customer_Phone\n0,Ashley,893-536-8857\n", "difficulty": "small_select"}, {"table_id": "employees", "query": "SELECT hire_date, first_name \n FROM employees \n WHERE first_name NOT LIKE '%M%'", "table_name": "employees", "query_description": "On what dates were employees without the letter M in their first names hired?", "results_description": "Steven was hired on the 17th of June 1987.", "result": ",HIRE_DATE,FIRST_NAME\n0,1987-06-17,Steven\n", "difficulty": "small_select"}, {"table_id": "entrepreneur, people", "query": "SELECT T2.Name AS \"people Name\", T1.Company AS \"entrepreneur Company\", T1.Money_Requested AS \"entrepreneur Money_Requested\" \n FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested", "table_name": "entrepreneur, people", "query_description": "What are the names of entrepreneurs and their corresponding investors, ordered descending by the amount of money requested?", "results_description": "The entrepreneur with name Roberto Calcaterra works in the company IV Cam and has requested the amount of 50000 money.", "result": ",people Name,entrepreneur Company,entrepreneur Money_Requested\n0,Roberto Calcaterra,IV Cam,50000.0\n", "difficulty": "join"}, {"table_id": "Apartment_Bookings, Guests", "query": "SELECT T2.guest_first_name AS \"Guests guest_first_name\", T2.guest_last_name AS \"Guests guest_last_name\", T1.booking_status_code AS \"Apartment_Bookings booking_status_code\" \n FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id \n WHERE T1.booking_status_code = 'Confirmed'", "table_name": "Apartment_Bookings, Guests", "query_description": "Which guests have apartment bookings with status code \"Confirmed\"? Return their first names and last names.", "results_description": "The first name of the guest that has apartment booking with status code Confirmed is Else and the last name is Roberts", "result": ",Guests guest_last_name,Guests guest_first_name,Apartment_Bookings booking_status_code\n0,Roberts,Else,Confirmed\n", "difficulty": "join"}, {"table_id": "Student", "query": "SELECT COUNT(*) AS \"count of Student\" \n FROM Student", "table_name": "Student", "query_description": "What is the total number of students?", "results_description": "The number of students is 34.", "result": ",count of Student\n0,34\n", "difficulty": "aggregate"}, {"table_id": "Faculty", "query": "SELECT sex, COUNT(*) AS \"count of Faculty\", rank \n FROM Faculty \n WHERE rank = 'AsstProf' \n GROUP BY sex", "table_name": "Faculty", "query_description": "How many male and female assistant professors do we have?", "results_description": "We have 3 female assistant professors.", "result": ",Sex,Rank,count of Faculty\n0,F,AsstProf,3\n", "difficulty": "aggregate_group_by"}, {"table_id": "Student_Addresses, Students", "query": "SELECT T2.cell_mobile_number AS \"Students cell_mobile_number\", T1.monthly_rental AS \"Student_Addresses monthly_rental\" \n FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.monthly_rental ASC", "table_name": "Student_Addresses, Students", "query_description": "What is the cell phone number of the student whose address has the lowest monthly rental?", "results_description": "The student with mobile number 08605192839 has a monthly rental of 620.2801.", "result": ",Students cell_mobile_number,Student_Addresses monthly_rental\n0,08605192839,620.2801\n", "difficulty": "join"}, {"table_id": "ship", "query": "SELECT TYPE, AVG(Tonnage) AS \"average Tonnage\" \n FROM ship \n GROUP BY TYPE", "table_name": "ship", "query_description": "For each type, what is the average tonnage?", "results_description": "Battleships have an average tonnage of 4845", "result": ",Type,average Tonnage\n0,Battle ship,4845.0\n", "difficulty": "aggregate_group_by"}, {"table_id": "schedule, film", "query": "SELECT T2.title AS \"film title\", MAX(T1.price) AS \"maximum price\", T1.film_id AS \"schedule film_id\" \n FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id \n GROUP BY T1.film_id", "table_name": "schedule, film", "query_description": "Give me the title and highest price for each film.", "results_description": "The movie The Case of the Mystery Weekend had a maximum price of 15.99 and an id of 1.", "result": ",film title,maximum price,schedule film_id\n0,The Case of the Mystery Weekend,15.99,1\n", "difficulty": "join_aggregate"}, {"table_id": "body_builder", "query": "SELECT * \n FROM body_builder", "table_name": "body_builder", "query_description": "Show all information about each body builder.", "results_description": "The body builder with id 1 has a total of 317.5, a 142.5 snatch, a person id 1 and 175 clean jerks.", "result": ",Total,Snatch,People_ID,Clean_Jerk,Body_Builder_ID\n0,317.5,142.5,1.0,175.0,1.0\n", "difficulty": "large_select"}, {"table_id": "customer", "query": "SELECT cust_name, acc_bal \n FROM customer \n WHERE cust_name LIKE '%a%'", "table_name": "customer", "query_description": "What are the names and account balances of customers with the letter a in their names?", "results_description": "Customer Mary has account balance equal to 2000", "result": ",acc_bal,cust_name\n0,2000,Mary\n", "difficulty": "small_select"}, {"table_id": "enroll, student, CLASS", "query": "SELECT AVG(T2.stu_gpa) AS \"average stu_gpa\", T3.crs_code AS \"CLASS crs_code\" \n 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 \n WHERE T3.crs_code = 'ACCT-211'", "table_name": "enroll, student, CLASS", "query_description": "What is the average gpa of the students enrolled in the course with code ACCT-211?", "results_description": "The average GPA of students enrolled in the course with code ACCT-211 is 3.05", "result": ",CLASS crs_code,average stu_gpa\n0,ACCT-211,3.0549999999999997\n", "difficulty": "join_aggregate"}, {"table_id": "employees, departments, locations", "query": "SELECT first_name, last_name, salary, T3.city AS \"locations city\" \n 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 \n WHERE T3.city = 'London'", "table_name": "employees, departments, locations", "query_description": "display the full name (first and last name), and salary of those employees who working in any department located in London.", "results_description": "Susan Mavris works in London. Her salary is 6500.", "result": ",SALARY,LAST_NAME,FIRST_NAME,locations city\n0,6500,Mavris,Susan,London\n", "difficulty": "join"}, {"table_id": "phone", "query": "SELECT COUNT(*) AS \"count of phone\" \n FROM phone", "table_name": "phone", "query_description": "How many phones are there?", "results_description": "There are 5 phones.", "result": ",count of phone\n0,5\n", "difficulty": "aggregate"}, {"table_id": "ship", "query": "SELECT TYPE, Nationality \n FROM ship", "table_name": "ship", "query_description": "What are the types and nationalities of every ship?", "results_description": "The ship of type Cargo has the United Kingdom nationality.", "result": ",Type,Nationality\n0,Cargo ship,United Kingdom\n", "difficulty": "small_select"}, {"table_id": "Movie, Movie", "query": "SELECT T1.title AS \"Movie title\", T1.year AS \"Movie year\" \n FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director \n WHERE T1.title <> T2.title", "table_name": "Movie, Movie", "query_description": "For directors who had more than one movie, return the titles and produced years of all movies directed by them.", "results_description": "The movie titles E.T. was released in 1982.", "result": ",Movie year,Movie title\n0,1982,E.T.\n", "difficulty": "join"}, {"table_id": "gymnast, people", "query": "SELECT AVG(T2.Age) AS \"average Age\" \n FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "table_name": "gymnast, people", "query_description": "Return the average age across all gymnasts.", "results_description": "The average gymnast age is 21.714285714285715.", "result": ",average Age\n0,21.714285714285715\n", "difficulty": "join_aggregate"}, {"table_id": "ship, captain", "query": "SELECT t1.name AS \"ship name\", t2.age AS \"captain age\" \n FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id ORDER BY t2.age", "table_name": "ship, captain", "query_description": "Find the name of the ship that is steered by the youngest captain.", "results_description": "The ship named HMS Destiny has a captain aged 38.", "result": ",ship name,captain age\n0,HMS Destiny,38\n", "difficulty": "join"}, {"table_id": "ref_product_categories", "query": "SELECT product_category_description, unit_of_measure, product_category_code \n FROM ref_product_categories \n WHERE product_category_code = 'Herbs'", "table_name": "ref_product_categories", "query_description": "What is the product category description and unit of measurement of category \"Herbs\"?", "results_description": "The product category description of the product with category code Herbs, is Herbs and the its unit of measure is Handful", "result": ",unit_of_measure,product_category_code,product_category_description\n0,Handful ,Herbs,Herbs\n", "difficulty": "small_select"}, {"table_id": "INVESTORS", "query": "SELECT COUNT(*) AS \"count of INVESTORS\" \n FROM INVESTORS", "table_name": "INVESTORS", "query_description": "Find the number of investors in total.", "results_description": "The count of investors is 20.", "result": ",count of INVESTORS\n0,20\n", "difficulty": "aggregate"}, {"table_id": "musical", "query": "SELECT Nominee, Award \n FROM musical \n WHERE Award = 'Tony Award' OR Award = 'Cleavant Derricks'", "table_name": "musical", "query_description": "Show the musical nominee with award \"Bob Fosse\" or \"Cleavant Derricks\".", "results_description": "Bob Fosse was nominated at the Tony Awards.", "result": ",Award,Nominee\n0,Tony Award,Bob Fosse\n", "difficulty": "small_select"}, {"table_id": "tryout", "query": "SELECT cName, pPos, decision \n FROM tryout \n WHERE decision = 'yes' AND pPos = 'goalie'", "table_name": "tryout", "query_description": "Which college has any student who is a goalie and succeeded in the tryout.", "results_description": "The student from college ASU succeeded the tryouts for the goalie position.", "result": ",pPos,cName,decision\n0,goalie,ASU,yes\n", "difficulty": "small_select"}, {"table_id": "party", "query": "SELECT minister, party_name \n FROM party \n WHERE party_name <> 'Progress Party'", "table_name": "party", "query_description": "Show all ministers who do not belong to Progress Party.", "results_description": "The minister is named Dr. Kwame Nkrumah (MP) and he is in the Convention Peoples Party.", "result": ",Minister,Party_name\n0,Dr. Kwame Nkrumah (MP),Convention Peoples Party\n", "difficulty": "small_select"}, {"table_id": "farm", "query": "SELECT COUNT(*) AS \"count of farm\" \n FROM farm", "table_name": "farm", "query_description": "How many farms are there?", "results_description": "There are 8 farms", "result": ",count of farm\n0,8\n", "difficulty": "aggregate"}, {"table_id": "campuses", "query": "SELECT COUNT(*) AS \"count of campuses\", county \n FROM campuses \n WHERE county = 'Los Angeles'", "table_name": "campuses", "query_description": "How many campuses exist are in the county of LA?", "results_description": "There are 5 campuses in the county of LA", "result": ",County,count of campuses\n0,Los Angeles,5\n", "difficulty": "aggregate"}, {"table_id": "Ref_Document_Types", "query": "SELECT document_type_code \n FROM Ref_Document_Types", "table_name": "Ref_Document_Types", "query_description": "What document type codes do we have?", "results_description": "The document's type code is CD.", "result": ",document_type_code\n0,CD\n", "difficulty": "small_select"}, {"table_id": "weekly_weather", "query": "SELECT MIN(low_temperature) AS \"minimum low_temperature\", MAX(wind_speed_mph) AS \"maximum wind_speed_mph\" \n FROM weekly_weather", "table_name": "weekly_weather", "query_description": "show the lowest low temperature and highest wind speed in miles per hour.", "results_description": "The lowest low temperature is 46 and the highest wind speed in miles per hour is 24", "result": ",maximum wind_speed_mph,minimum low_temperature\n0,24,46\n", "difficulty": "aggregate"}, {"table_id": "Course_Authors_and_Tutors, Courses", "query": "SELECT T1.login_name AS \"Course_Authors_and_Tutors login_name\", T2.course_name AS \"Courses course_name\" \n FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id \n WHERE T2.course_name = 'advanced database'", "table_name": "Course_Authors_and_Tutors, Courses", "query_description": "Find the login name of the course author that teaches the course with name \"advanced database\".", "results_description": "The course advanced database has an author with the login name al75.", "result": ",Courses course_name,Course_Authors_and_Tutors login_name\n0,advanced database,al75\n", "difficulty": "join"}, {"table_id": "Rooms", "query": "SELECT bedType, COUNT(*) AS \"count of Rooms\" \n FROM Rooms \n GROUP BY bedType", "table_name": "Rooms", "query_description": "What are the number of rooms for each bed type?", "results_description": "There are two rooms with a double bed", "result": ",bedType,count of Rooms\n0,Double,2\n", "difficulty": "aggregate_group_by"}, {"table_id": "employees, departments, locations", "query": "SELECT T1.first_name AS \"employees first_name\", T1.last_name AS \"employees last_name\", T3.city AS \"locations city\" \n 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 \n WHERE T1.first_name LIKE '%z%'", "table_name": "employees, departments, locations", "query_description": "display those employees who contain a letter z to their first name and also display their last name, city.", "results_description": "The employee named Mozhe Atkinson is in the South San Francisco city.", "result": ",locations city,employees last_name,employees first_name\n0,South San Francisco,Atkinson,Mozhe\n", "difficulty": "join"}, {"table_id": "city", "query": "SELECT city, regional_population \n FROM city \n WHERE regional_population > 10000000", "table_name": "city", "query_description": "Please give me a list of cities whose regional population is over 10000000.", "results_description": "The city of Shanghai has 23019148 regional population.", "result": ",City,Regional_Population\n0,Shanghai,23019148\n", "difficulty": "small_select"}, {"table_id": "Catalog_Contents", "query": "SELECT catalog_entry_name, capacity, price_in_dollars \n FROM Catalog_Contents \n WHERE price_in_dollars > 700", "table_name": "Catalog_Contents", "query_description": "Which catalog contents has price above 700 dollars? Show their catalog entry names and capacities.", "results_description": "The catalog contents, which their price is above 700 dollars, are Vimto and their capacities are 6 respectively.", "result": ",capacity,price_in_dollars,catalog_entry_name\n0,6,745.02,Vimto\n", "difficulty": "small_select"}, {"table_id": "invoices", "query": "SELECT invoice_number, invoice_date \n FROM invoices \n WHERE invoice_date < '1989-09-03' OR invoice_date > '2007-12-25'", "table_name": "invoices", "query_description": "Find the invoice numbers which are created before 1989-09-03 or after 2007-12-25.", "results_description": "The invoice with number 4 was created in 1985-04-27 08:38:49.", "result": ",invoice_date,invoice_number\n0,1985-04-27 08:38:49,4\n", "difficulty": "small_select"}, {"table_id": "Rating, Movie", "query": "SELECT T2.title AS \"Movie title\", AVG(T1.stars) AS \"average stars\", T1.mID AS \"Rating mID\" \n FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID \n GROUP BY T1.mID ORDER BY AVG(T1.stars) DESC", "table_name": "Rating, Movie", "query_description": "What are the movie titles with the highest average rating and what are those ratings?", "results_description": "The movie Snow White has an id of 106 and 4.5 average stars.", "result": ",Rating mID,Movie title,average stars\n0,106,Snow White,4.5\n", "difficulty": "join_aggregate"}, {"table_id": "artist", "query": "SELECT artist_name, gender, country \n FROM artist \n WHERE country = 'UK' AND gender = 'Male'", "table_name": "artist", "query_description": "What are the names of all male British artists?", "results_description": "Michel is a male artist from United Kingdom.", "result": ",gender,country,artist_name\n0,Male,UK,Michel\n", "difficulty": "small_select"}, {"table_id": "APPELLATIONS", "query": "SELECT COUNT(*) AS \"count of APPELLATIONS\", County \n FROM APPELLATIONS \n WHERE County = 'Napa'", "table_name": "APPELLATIONS", "query_description": "How many appelations are in Napa Country?", "results_description": "There are 11 appelations in Napa Country", "result": ",County,count of APPELLATIONS\n0,Napa,11\n", "difficulty": "aggregate"}, {"table_id": "Rooms", "query": "SELECT roomName, bedType, decor \n FROM Rooms \n WHERE decor = 'traditional'", "table_name": "Rooms", "query_description": "What are the bed type and name of all the rooms with traditional decor?", "results_description": "The room named Interim but salutary has a King bed type and its decor is traditional.", "result": ",decor,bedType,roomName\n0,traditional,King,Interim but salutary\n", "difficulty": "small_select"}, {"table_id": "Claims", "query": "SELECT SUM(Amount_Claimed) AS \"sum of Amount_Claimed\" \n FROM Claims", "table_name": "Claims", "query_description": "What is total amount claimed summed across all the claims?", "results_description": "The sum of amount claimed is 775458.", "result": ",sum of Amount_Claimed\n0,775458\n", "difficulty": "aggregate"}, {"table_id": "Document_Types", "query": "SELECT document_type_code, document_description \n FROM Document_Types \n WHERE document_description LIKE 'Initial%'", "table_name": "Document_Types", "query_description": "Which document type is described with the prefix 'Initial'?", "results_description": "The document with code APP has the description 'Initial Application'.", "result": ",document_type_code,document_description\n0,APP,Initial Application\n", "difficulty": "small_select"}, {"table_id": "station, trip", "query": "SELECT T1.lat AS \"station lat\", T1.long AS \"station long\", T1.city AS \"station city\", T2.duration AS \"trip duration\" \n FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id ORDER BY T2.duration", "table_name": "station, trip", "query_description": "What is the latitude, longitude, and city of the station from which the trip with smallest duration started?", "results_description": "The station in the city of San Francisco has a latitude of 37.776617, a longitude of -122.39526000000001 and the trip duration is 61.", "result": ",station lat,station city,station long,trip duration\n0,37.776617,San Francisco,-122.39526000000001,61\n", "difficulty": "join"}, {"table_id": "classroom", "query": "SELECT building, room_number, capacity \n FROM classroom \n WHERE capacity BETWEEN 50 AND 100", "table_name": "classroom", "query_description": "What are the room numbers and corresponding buildings for classrooms which can seat between 50 to 100 students?", "results_description": "The room with number 45 of the Nassau building has a capacity of 92. ", "result": ",building,capacity,room_number\n0,Nassau,92,45\n", "difficulty": "small_select"}, {"table_id": "faculty, campuses", "query": "SELECT faculty, T1.year AS \"faculty year\", T2.campus AS \"campuses campus\" \n FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id \n WHERE T1.year = 2002 AND T2.campus = 'Long Beach State University'", "table_name": "faculty, campuses", "query_description": "What is the number of faculty at Long Beach State University in 2002?", "results_description": "Long Beach State University had 1429 staff members in 2002", "result": ",Faculty,faculty year,campuses campus\n0,1429.0,2002,Long Beach State University\n", "difficulty": "join"}, {"table_id": "employees", "query": "SELECT title, phone, hire_date, last_name, first_name \n FROM employees \n WHERE first_name = 'Nancy' AND last_name = 'Edwards'", "table_name": "employees", "query_description": "What is the title, phone number and hire date for the employee named Nancy Edwards?", "results_description": "The employee Nancy Edwards has the phone +1 (403) 262-3443, she is a Sales Manager and was hired in 2002-05-01 00:00:00.", "result": ",phone,title,hire_date,last_name,first_name\n0,+1 (403) 262-3443,Sales Manager,2002-05-01 00:00:00,Edwards,Nancy\n", "difficulty": "large_select"}, {"table_id": "store", "query": "SELECT COUNT(*) AS \"count of store\" \n FROM store", "table_name": "store", "query_description": "How many stores are there?", "results_description": "There are 0 stores", "result": ",count of store\n0,0\n", "difficulty": "aggregate"}, {"table_id": "stock", "query": "SELECT AVG(Quantity) AS \"average Quantity\" \n FROM stock", "table_name": "stock", "query_description": "What is the average quantity of stocks?", "results_description": "The average quantity of stocks is 110.875.", "result": ",average Quantity\n0,110.875\n", "difficulty": "aggregate"}, {"table_id": "university", "query": "SELECT school, founded, affiliation \n FROM university \n WHERE founded > 1850 OR affiliation = 'Public'", "table_name": "university", "query_description": "What are the schools that were either founded before 1850 or are public?", "results_description": "The University of Delaware was founded in 1743 and its affiliation is public.", "result": ",School,Founded,Affiliation\n0,University of Delaware,1743.0,Public\n", "difficulty": "small_select"}, {"table_id": "music_festival", "query": "SELECT Category, RESULT \n FROM music_festival \n WHERE RESULT = 'Awarded'", "table_name": "music_festival", "query_description": "Return the categories of music festivals that have the result \"Awarded\".", "results_description": "The category Best Song has the result awarded.", "result": ",Result,Category\n0,Awarded,Best Song\n", "difficulty": "small_select"}, {"table_id": "school", "query": "SELECT COUNT(*) AS \"count of school\" \n FROM school", "table_name": "school", "query_description": "Count the number of schools.", "results_description": "There are 6 schools.", "result": ",count of school\n0,6\n", "difficulty": "aggregate"}, {"table_id": "employees", "query": "SELECT first_name, last_name, department_id \n FROM employees \n WHERE department_id = 70 OR department_id = 90", "table_name": "employees", "query_description": "What are the full names of employees who with in department 70 or 90?", "results_description": "The first and last names of the employees of department with id 90 are Steven King ", "result": ",LAST_NAME,FIRST_NAME,DEPARTMENT_ID\n0,King,Steven,90\n", "difficulty": "small_select"}, {"table_id": "enzyme, medicine_enzyme_interaction, medicine", "query": "SELECT T1.name AS \"enzyme name\", T2.interaction_type AS \"medicine_enzyme_interaction interaction_type\", T3.name AS \"medicine name\" \n 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 \n WHERE T3.name = 'Amisulpride' AND T2.interaction_type = 'inhibitor'", "table_name": "enzyme, medicine_enzyme_interaction, medicine", "query_description": "What are the names of enzymes in the medicine named 'Amisulpride' that can serve as an 'inhibitor'?", "results_description": "The medicine Amisulpride contains the enzyme ALA synthase, which can serve as an inhibitor.", "result": ",enzyme name,medicine name,medicine_enzyme_interaction interaction_type\n0,ALA synthase,Amisulpride,inhibitor\n", "difficulty": "join"}, {"table_id": "stadium", "query": "SELECT name \n FROM stadium \n WHERE name LIKE '%Bank%'", "table_name": "stadium", "query_description": "Which stadium name contains the substring \"Bank\"?", "results_description": "The name is Bank of America Stadium.", "result": ",name\n0,Bank of America Stadium\n", "difficulty": "small_select"}, {"table_id": "dorm", "query": "SELECT student_capacity, gender, dorm_name \n FROM dorm \n WHERE dorm_name LIKE '%Donor%'", "table_name": "dorm", "query_description": "What is the student capacity and type of gender for the dorm whose name as the phrase Donor in it?", "results_description": "The dorm named Anonymous Donor Hall with gender F has a student capacity of 128.", "result": ",gender,dorm_name,student_capacity\n0,F,Anonymous Donor Hall,128\n", "difficulty": "small_select"}, {"table_id": "Guests", "query": "SELECT gender_code, COUNT(*) AS \"count of Guests\" \n FROM Guests \n GROUP BY gender_code ORDER BY COUNT(*) DESC", "table_name": "Guests", "query_description": "Sort the gender codes in descending order of their corresponding number of guests. Return both the gender codes and counts.", "results_description": "There were 9 female guests.", "result": ",gender_code,count of Guests\n0,Female,9\n", "difficulty": "aggregate_group_by"}, {"table_id": "Student", "query": "SELECT Fname, Lname \n FROM Student", "table_name": "Student", "query_description": "What are the full names of all students", "results_description": "The student's name is Linda Smith.", "result": ",Fname,LName\n0,Linda,Smith\n", "difficulty": "small_select"}, {"table_id": "track", "query": "SELECT name, LOCATION \n FROM track", "table_name": "track", "query_description": "Show the name and location for all tracks.", "results_description": "The track named Auto Club Speedway is located in Fontana, CA.", "result": ",Name,Location\n0,Auto Club Speedway,\"Fontana, CA\"\n", "difficulty": "small_select"}, {"table_id": "CHARACTERISTICS", "query": "SELECT COUNT(*) AS \"count of CHARACTERISTICS\" \n FROM CHARACTERISTICS", "table_name": "CHARACTERISTICS", "query_description": "Count the number of characteristics.", "results_description": "There are 15 characteristics.", "result": ",count of CHARACTERISTICS\n0,15\n", "difficulty": "aggregate"}, {"table_id": "campuses", "query": "SELECT campus, YEAR \n FROM campuses \n WHERE YEAR = 1958", "table_name": "campuses", "query_description": "What are the campuses that opened in 1958?", "results_description": "The campus California State University-Northridge open in 1958", "result": ",Year,Campus\n0,1958,California State University-Northridge\n", "difficulty": "small_select"}, {"table_id": "Aircraft", "query": "SELECT COUNT(*) AS \"count of Aircraft\" \n FROM Aircraft", "table_name": "Aircraft", "query_description": "How many aircrafts exist in the database?", "results_description": "There are 16 aircrafts.", "result": ",count of Aircraft\n0,16\n", "difficulty": "aggregate"}, {"table_id": "STUDENT", "query": "SELECT MAX(Age) AS \"maximum Age\" \n FROM STUDENT", "table_name": "STUDENT", "query_description": "Find the maximum age of all the students.", "results_description": "The maximum age of all the students is 27.", "result": ",maximum Age\n0,27\n", "difficulty": "aggregate"}, {"table_id": "city, county_public_safety", "query": "SELECT T1.Name AS \"city Name\", T2.Name AS \"county_public_safety Name\" \n FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID", "table_name": "city, county_public_safety", "query_description": "What are the names of cities, as well as the names of the counties they correspond to?", "results_description": "The city of Adjuntas corresponds to the county of Abbotsford", "result": ",city Name,county_public_safety Name\n0,Adjuntas,Abbotsford\n", "difficulty": "join"}, {"table_id": "enroll, student, CLASS", "query": "SELECT AVG(T2.stu_gpa) AS \"average stu_gpa\", T3.crs_code AS \"CLASS crs_code\" \n 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 \n WHERE T3.crs_code = 'ACCT-211'", "table_name": "enroll, student, CLASS", "query_description": "What is the average GPA of students taking ACCT-211?", "results_description": "The average GPA of students taking ACCT-211 is 3.0549999999999997", "result": ",CLASS crs_code,average stu_gpa\n0,ACCT-211,3.0549999999999997\n", "difficulty": "join_aggregate"}, {"table_id": "city, county_public_safety", "query": "SELECT T1.White AS \"city White\", T2.Crime_rate AS \"county_public_safety Crime_rate\" \n FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID", "table_name": "city, county_public_safety", "query_description": "What are the white percentages of cities, and the corresponding crime rates of the counties they correspond to?", "results_description": "The white percentage is 93.1 and the crime rate is 118.", "result": ",city White,county_public_safety Crime_rate\n0,93.1,118.0\n", "difficulty": "join"}, {"table_id": "wrestler", "query": "SELECT LOCATION \n FROM wrestler \n GROUP BY LOCATION \n HAVING COUNT(*) > 2", "table_name": "wrestler", "query_description": "Which locations are shared by more than two wrestlers?", "results_description": "Tijuana, Mexica is a location shared by more than two wrestlers.", "result": ",Location\n0,\"Tijuana , Mexico\"\n", "difficulty": "aggregate_group_by"}, {"table_id": "projects", "query": "SELECT SUM(hours) AS \"sum of hours\" \n FROM projects", "table_name": "projects", "query_description": "Find the total hours of all projects.", "results_description": "The sum of hours of all projects is 20183", "result": ",sum of hours\n0,20183\n", "difficulty": "aggregate"}, {"table_id": "Behavior_Incident", "query": "SELECT date_incident_start, date_incident_end, incident_type_code \n FROM Behavior_Incident \n WHERE incident_type_code = 'NOISE'", "table_name": "Behavior_Incident", "query_description": "What are the start and end dates for incidents with incident type code \"NOISE\"?", "results_description": "Incidents with type code NOISE started in 2017-07-09 10:04:13 and ended in 2018-03-08 14:08:54.", "result": ",date_incident_end,incident_type_code,date_incident_start\n0,2018-03-08 14:08:54,NOISE,2017-07-09 10:04:13\n", "difficulty": "small_select"}, {"table_id": "races", "query": "SELECT name, YEAR \n FROM races \n WHERE YEAR BETWEEN 2009 AND 2011", "table_name": "races", "query_description": "What are the names of all races held between 2009 and 2011?", "results_description": "Australian Grand Prix was held in 2009.", "result": ",name,year\n0,Australian Grand Prix,2009\n", "difficulty": "small_select"}, {"table_id": "technician", "query": "SELECT Team \n FROM technician \n GROUP BY Team \n HAVING COUNT(*) >= 2", "table_name": "technician", "query_description": "What is the team with at least 2 technicians?", "results_description": "Team CLE has at least 2 technicians", "result": ",Team\n0,CLE\n", "difficulty": "aggregate_group_by"}, {"table_id": "player, tryout", "query": "SELECT T1.pName AS \"player pName\", T2.cName AS \"tryout cName\", T2.decision AS \"tryout decision\" \n FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID \n WHERE T2.decision = 'yes'", "table_name": "player, tryout", "query_description": "Find the name and college of students whose decisions are yes in the tryout.", "results_description": "The player named Andrew has tryout decision yes and tryout name ASU.", "result": ",player pName,tryout cName,tryout decision\n0,Andrew,ASU,yes\n", "difficulty": "join"}, {"table_id": "Ref_document_types", "query": "SELECT document_type_code, document_type_name \n FROM Ref_document_types \n WHERE document_type_name = 'Paper'", "table_name": "Ref_document_types", "query_description": "Find the code of the document type \"Paper\".", "results_description": "The code of the document type \"Paper\" is \"PR\"", "result": ",Document_Type_Code,Document_Type_Name\n0,PR,Paper\n", "difficulty": "small_select"}, {"table_id": "employees", "query": "SELECT * \n FROM employees \n WHERE hire_date < '2002-06-21'", "table_name": "employees", "query_description": "What is all the information about employees hired before June 21, 2002?", "results_description": "Steven King was hired on 1987-06-17, his email is SKING, his job id is AD_PRES, his salary is 24000, his manager_id is 0, employee id is 100, department id is 90 and his phone is 515.123.4567", "result": ",EMAIL,JOB_ID,SALARY,HIRE_DATE,LAST_NAME,FIRST_NAME,MANAGER_ID,EMPLOYEE_ID,PHONE_NUMBER,DEPARTMENT_ID,COMMISSION_PCT\n0,SKING,AD_PRES,24000,1987-06-17,King,Steven,0,100,515.123.4567,90,0\n", "difficulty": "large_select"}, {"table_id": "Restaurant", "query": "SELECT Rating, ResName \n FROM Restaurant \n WHERE ResName = 'Subway'", "table_name": "Restaurant", "query_description": "What is the rating of the restaurant Subway?", "results_description": "The Subway restaurant has a rating of 3.", "result": ",Rating,ResName\n0,3,Subway\n", "difficulty": "small_select"}, {"table_id": "region", "query": "SELECT COUNT(*) AS \"count of region\" \n FROM region", "table_name": "region", "query_description": "Count the number of regions.", "results_description": "The number of regions is 5", "result": ",count of region\n0,5\n", "difficulty": "aggregate"}, {"table_id": "driver", "query": "SELECT name, age, home_city \n FROM driver \n WHERE home_city = 'Hartford' AND age < 40", "table_name": "driver", "query_description": "List names for drivers from Hartford city and younger than 40.", "results_description": "The driver Douglas McCroy is from Hartford and 36 years old.", "result": ",Age,Name,Home_city\n0,36,Douglas McCrory,Hartford\n", "difficulty": "small_select"}, {"table_id": "player, player_college, college", "query": "SELECT AVG(T1.height) AS \"average height\", T3.name_full AS \"college name_full\" \n 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 \n WHERE T3.name_full = 'Yale University'", "table_name": "player, player_college, college", "query_description": "What is the average height of the players from the college named 'Yale University'?", "results_description": "The average height of players from Yale University is 59.13", "result": ",average height,college name_full\n0,59.13559322033898,Yale University\n", "difficulty": "join_aggregate"}, {"table_id": "Accounts", "query": "SELECT other_account_details, account_name \n FROM Accounts \n WHERE account_name = '338'", "table_name": "Accounts", "query_description": "What are the other account details for the account with the name 338?", "results_description": "The account with name 338 has other account details Regular.", "result": ",account_name,other_account_details\n0,338,Regular\n", "difficulty": "small_select"}, {"table_id": "products", "query": "SELECT COUNT(*) AS \"count of products\", price \n FROM products \n WHERE price >= 180", "table_name": "products", "query_description": "How many products have prices of at least 180?", "results_description": "There are 5 products with a price of 240.", "result": ",Price,count of products\n0,240,5\n", "difficulty": "aggregate"}, {"table_id": "song", "query": "SELECT song_name, languages \n FROM song \n WHERE languages = 'english'", "table_name": "song", "query_description": "What are the names of all songs in English?", "results_description": "Song \"My love\" is in english.", "result": ",languages,song_name\n0,english,My love\n", "difficulty": "small_select"}, {"table_id": "Employee", "query": "SELECT COUNT(*) AS \"count of Employee\", salary \n FROM Employee \n WHERE salary BETWEEN 100000 AND 200000", "table_name": "Employee", "query_description": "How many employees have salary between 100000 and 200000?", "results_description": "7 employees have a salary of 120433", "result": ",salary,count of Employee\n0,120433,7\n", "difficulty": "aggregate"}, {"table_id": "circuits", "query": "SELECT name, country \n FROM circuits \n WHERE country = 'UK' OR country = 'Malaysia'", "table_name": "circuits", "query_description": "What are the names of all the circuits that are in the UK or Malaysia?", "results_description": "The Sepang International Circuit is in Malaysia", "result": ",name,country\n0,Sepang International Circuit,Malaysia\n", "difficulty": "small_select"}, {"table_id": "products", "query": "SELECT name, price \n FROM products", "table_name": "products", "query_description": "Select the names and the prices of all the products in the store.", "results_description": "The prices for the products Hard drive are 240 respectively", "result": ",Name,Price\n0,Hard drive,240\n", "difficulty": "small_select"}, {"table_id": "election, representative", "query": "SELECT T2.Lifespan AS \"representative Lifespan\", Vote_Percent \n FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY Vote_Percent DESC", "table_name": "election, representative", "query_description": "What are the lifespans of representatives in descending order of vote percent?", "results_description": "Representatives with lifespan 1918\u2013 have a vote percent of 19.5.", "result": ",Vote_Percent,representative Lifespan\n0,19.5,1918\u2013\n", "difficulty": "join"}, {"table_id": "company", "query": "SELECT Name, Industry \n FROM company \n WHERE Industry = 'Banking' OR Industry = 'Retailing'", "table_name": "company", "query_description": "Show the names of companies in the banking or retailing industry?", "results_description": "The company JPMorgan Chase in the banking industry.", "result": ",Name,Industry\n0,JPMorgan Chase,Banking\n", "difficulty": "small_select"}, {"table_id": "CUSTOMERS", "query": "SELECT Customer_Phone, Customer_Email_Address, Customer_Name \n FROM CUSTOMERS \n WHERE Customer_Name = 'Harold'", "table_name": "CUSTOMERS", "query_description": "Find the phone number and email address of customer \"Harold\".", "results_description": "The phone number of the customer with name Harold is 624-096-7791 and the email is jerde.harmon@example.com", "result": ",Customer_Name,Customer_Phone,Customer_Email_Address\n0,Harold,624-096-7791,jerde.harmon@example.com\n", "difficulty": "small_select"}, {"table_id": "station", "query": "SELECT city, COUNT(*) AS \"count of station\" \n FROM station \n GROUP BY city \n HAVING COUNT(*) >= 15", "table_name": "station", "query_description": "List the name and the number of stations for all the cities that have at least 15 stations.", "results_description": "The city of San Francisco has 35 stations.", "result": ",city,count of station\n0,San Francisco,35\n", "difficulty": "aggregate_group_by"}, {"table_id": "acceptance, submission", "query": "SELECT T2.Author AS \"submission Author\", T1.Result AS \"acceptance Result\" \n FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID", "table_name": "acceptance, submission", "query_description": "For each submission, find its author and acceptance result.", "results_description": "The submission author Sammy Green was accepted.", "result": ",acceptance Result,submission Author\n0,Accepted,Sammy Green\n", "difficulty": "join"}, {"table_id": "Staff", "query": "SELECT date_of_birth, last_name, first_name \n FROM Staff \n WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "table_name": "Staff", "query_description": "What is the date of birth for the staff member named Janessa Sawayn?", "results_description": "Janessa Sawayn was born on 2010-12-08 16:55:14.", "result": ",last_name,first_name,date_of_birth\n0,Sawayn,Janessa,2010-12-08 16:55:14\n", "difficulty": "small_select"}, {"table_id": "gymnast", "query": "SELECT COUNT(*) AS \"count of gymnast\" \n FROM gymnast", "table_name": "gymnast", "query_description": "Count the number of gymnasts.", "results_description": "There are 7 gymnasts.", "result": ",count of gymnast\n0,7\n", "difficulty": "aggregate"}, {"table_id": "All_documents", "query": "SELECT date_stored, Document_name \n FROM All_documents \n WHERE Document_name = 'Marry CV'", "table_name": "All_documents", "query_description": "What is the date when the document \"Marry CV\" was stored?", "results_description": "The document \"Marry CV\" was stored on 1986-10-14 17:53:39", "result": ",Date_Stored,Document_Name\n0,1986-10-14 17:53:39,Marry CV\n", "difficulty": "small_select"}, {"table_id": "College", "query": "SELECT SUM(enr) AS \"sum of enr\" \n FROM College", "table_name": "College", "query_description": "What is the total enrollment number of all colleges?", "results_description": "The total enrollment number of all colleges is 71000", "result": ",sum of enr\n0,71000\n", "difficulty": "aggregate"}, {"table_id": "journalist", "query": "SELECT Nationality, Age \n FROM journalist", "table_name": "journalist", "query_description": "What are the nationalities and ages of journalists?", "results_description": "The age is 37 and the nationality is England.", "result": ",Age,Nationality\n0,37,England\n", "difficulty": "small_select"}, {"table_id": "airlines", "query": "SELECT COUNT(*) AS \"count of airlines\" \n FROM airlines", "table_name": "airlines", "query_description": "What is the total number of airlines?", "results_description": "The total number of airlines is 6162", "result": ",count of airlines\n0,6162\n", "difficulty": "aggregate"}, {"table_id": "airlines", "query": "SELECT country, active \n FROM airlines \n WHERE active = 'Y' \n GROUP BY country ORDER BY COUNT(*) DESC", "table_name": "airlines", "query_description": "Which countries has the most number of airlines whose active status is 'Y'?", "results_description": "The US has the most airlines with an active status \"Y\"", "result": ",active,country\n0,Y,United States\n", "difficulty": "aggregate_group_by"}, {"table_id": "club, player", "query": "SELECT AVG(T2.Points) AS \"average Points\", T1.name AS \"club name\" \n FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID \n WHERE T1.name = 'AIB'", "table_name": "club, player", "query_description": "What is the average number of points for players from the \"AIB\" club?", "results_description": "\"AIB\" club has on average 28 points.", "result": ",club name,average Points\n0,AIB,28.0\n", "difficulty": "join_aggregate"}, {"table_id": "policies, customers", "query": "SELECT policy_type_code, t2.customer_details AS \"customers customer_details\" \n FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id \n WHERE t2.customer_details = 'Dayana Robel'", "table_name": "policies, customers", "query_description": "Find all the policy type codes associated with the customer \"Dayana Robel\"", "results_description": "The customer Dayana Robel is associated with the policy type Uniformed.", "result": ",Policy_Type_Code,customers customer_details\n0,Uniformed,Dayana Robel\n", "difficulty": "join"}, {"table_id": "races, circuits", "query": "SELECT T1.name AS \"races name\", T2.country AS \"circuits country\", T1.year AS \"races year\" \n FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid \n WHERE T2.country = 'Spain' AND T1.year > 2017", "table_name": "races, circuits", "query_description": "What are the names of the races held after 2017 in Spain?", "results_description": "The 2018 Spanish Grand Prix was held in Spain.", "result": ",races name,races year,circuits country\n0,Spanish Grand Prix,2018,Spain\n", "difficulty": "join"}, {"table_id": "journal_committee, editor, journal", "query": "SELECT T2.Name AS \"editor Name\", T3.Sales AS \"journal Sales\" \n 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 \n WHERE T3.Sales > 3000", "table_name": "journal_committee, editor, journal", "query_description": "Show the names of editors that are on the committee of journals with sales bigger than 3000.", "results_description": "The names of the editors are Kamila Porczyk with 4271 journal sales", "result": ",editor Name,journal Sales\n0,Kamila Porczyk,4271\n", "difficulty": "join"}, {"table_id": "channel", "query": "SELECT SUM(Share_in_percent) AS \"sum of Share_in_percent\", OWNER \n FROM channel \n WHERE OWNER = 'CCTV'", "table_name": "channel", "query_description": "What is the total share (in percent) of all the channels owned by CCTV?", "results_description": "The total percentage share of channels owned by CCTV is 22.09", "result": ",Owner,sum of Share_in_percent\n0,CCTV,22.090000000000003\n", "difficulty": "aggregate"}, {"table_id": "professor, employee, department", "query": "SELECT T2.emp_fname AS \"employee emp_fname\", T1.prof_office AS \"professor prof_office\", T1.prof_high_degree AS \"professor prof_high_degree\", T3.dept_name AS \"department dept_name\" \n 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 \n WHERE T3.dept_name = 'History' AND T1.prof_high_degree <> 'Ph.D.'", "table_name": "professor, employee, department", "query_description": "Find the first name and office of history professor who did not get a Ph.D. degree.", "results_description": "James from the history department, where his office is DRE 156, holds a MA degree.", "result": ",employee emp_fname,department dept_name,professor prof_office,professor prof_high_degree\n0,James,History,DRE 156,MA\n", "difficulty": "join"}, {"table_id": "Student", "query": "SELECT city_code, COUNT(*) AS \"count of Student\" \n FROM Student \n GROUP BY city_code", "table_name": "Student", "query_description": "Show all cities and corresponding number of students.", "results_description": "There is 1 student in the city with code ATL.", "result": ",city_code,count of Student\n0,ATL,1\n", "difficulty": "aggregate_group_by"}, {"table_id": "races", "query": "SELECT name, YEAR \n FROM races \n WHERE YEAR = 2017", "table_name": "races", "query_description": "Find the names of all races held in 2017.", "results_description": "The race of the Australian Grand Prix was held in 2017.", "result": ",name,year\n0,Australian Grand Prix,2017\n", "difficulty": "small_select"}, {"table_id": "bank", "query": "SELECT city, state, bname \n FROM bank \n WHERE bname = 'morningside'", "table_name": "bank", "query_description": "Find the city and state of the bank branch named morningside.", "results_description": "The bank named morningside is in New York City.", "result": ",city,bname,state\n0,New York City,morningside,New York\n", "difficulty": "small_select"}, {"table_id": "media_types", "query": "SELECT name \n FROM media_types", "table_name": "media_types", "query_description": "What are the names of all the media types?", "results_description": "The name of the media is MPEG audio file.", "result": ",name\n0,MPEG audio file\n", "difficulty": "small_select"}, {"table_id": "volume", "query": "SELECT Song, Weeks_on_Top \n FROM volume \n WHERE Weeks_on_Top > 1", "table_name": "volume", "query_description": "What are the songs in volumes with more than 1 week on top?", "results_description": "The Way is a song with 3 weeks on top in volumes.", "result": ",Song,Weeks_on_Top\n0, The Way,3.0\n", "difficulty": "small_select"}, {"table_id": "student, department", "query": "SELECT T2.dept_name AS \"department dept_name\", AVG(T1.stu_gpa) AS \"average stu_gpa\", T1.dept_code AS \"student dept_code\" \n FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code \n GROUP BY T1.dept_code ORDER BY AVG(T1.stu_gpa) DESC", "table_name": "student, department", "query_description": "What is the name and the average gpa of department whose students have the highest average gpa?", "results_description": "The department name is Computer Info. Systems with code CIS and the average gap of the students is 3.1799999999999997", "result": ",average stu_gpa,student dept_code,department dept_name\n0,3.1799999999999997,CIS,Computer Info. Systems\n", "difficulty": "join_aggregate"}, {"table_id": "course, SECTION", "query": "SELECT T1.title AS \"course title\", building, YEAR, semester \n FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id \n WHERE building = 'Chandler' AND semester = 'Fall' AND YEAR = 2010", "table_name": "course, SECTION", "query_description": "What is the title of the course that was offered at building Chandler during the fall semester in the year of 2010?", "results_description": "In 2020, during the fall semester the course International Trade was offered in the Chandler building.", "result": ",year,building,semester,course title\n0,2010,Chandler,Fall,International Trade\n", "difficulty": "join"}, {"table_id": "performance", "query": "SELECT LOCATION \n FROM performance \n GROUP BY LOCATION \n HAVING COUNT(*) >= 2", "table_name": "performance", "query_description": "Show the locations that have at least two performances.", "results_description": "The location Verizon Center has at least two performances.", "result": ",Location\n0,Verizon Center\n", "difficulty": "aggregate_group_by"}, {"table_id": "phone", "query": "SELECT Hardware_Model_name, Company_name, Accreditation_type \n FROM phone \n WHERE Accreditation_type LIKE 'Full'", "table_name": "phone", "query_description": "Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name.", "results_description": "The company Sony Mobile Communications has the phones XPERIA T, XPERIA J with accreditation type Full.", "result": ",Company_name,Accreditation_type,Hardware_Model_name\n0,Sony Mobile Communications,Full,\"XPERIA T, XPERIA J\"\n", "difficulty": "small_select"}, {"table_id": "products", "query": "SELECT product_name, product_category_code \n FROM products \n WHERE product_category_code = 'Spices'", "table_name": "products", "query_description": "What are the names of products with category \"Spices\"?", "results_description": "Cumin is one of the products in the category of spices", "result": ",product_name,product_category_code\n0,cumin,Spices\n", "difficulty": "small_select"}, {"table_id": "Faculty", "query": "SELECT COUNT(*) AS \"count of Faculty\", Rank, building \n FROM Faculty \n WHERE Rank = 'Professor' AND building = 'NEB'", "table_name": "Faculty", "query_description": "How many Professors are in building NEB?", "results_description": "The count of faculty with rank Professor, in the building NEB, is 5.", "result": ",Rank,Building,count of Faculty\n0,Professor,NEB,5\n", "difficulty": "aggregate"}, {"table_id": "Staff", "query": "SELECT COUNT(*) AS \"count of Staff\", first_name \n FROM Staff \n WHERE first_name = 'Ludie'", "table_name": "Staff", "query_description": "How many staff have the first name Ludie?", "results_description": "There is one staff named Ludie", "result": ",first_name,count of Staff\n0,Ludie,1\n", "difficulty": "aggregate"}, {"table_id": "Faculty", "query": "SELECT rank, Fname, Lname \n FROM Faculty", "table_name": "Faculty", "query_description": "What are the rank, first name, and last name of the faculty members?", "results_description": "Mark Giuliano has the instructor rank. ", "result": ",Rank,Fname,Lname\n0,Instructor,Mark,Giuliano\n", "difficulty": "large_select"}, {"table_id": "medicine_enzyme_interaction, medicine, enzyme", "query": "SELECT T1.interaction_type AS \"medicine_enzyme_interaction interaction_type\", T3.name AS \"enzyme name\", T2.name AS \"medicine name\" \n 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 \n WHERE T3.name = 'ALA synthase' AND T2.name = 'Aripiprazole'", "table_name": "medicine_enzyme_interaction, medicine, enzyme", "query_description": "What is the type of interaction for the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?", "results_description": "The ezyme named ALA synthase and the medicine named Aripiprazole have an inhibitor type of interaction ", "result": ",enzyme name,medicine name,medicine_enzyme_interaction interaction_type\n0,ALA synthase,Aripiprazole,inhibitor\n", "difficulty": "join"}, {"table_id": "product", "query": "SELECT product, max_page_size, pages_per_minute_color \n FROM product \n WHERE max_page_size = 'A4' AND pages_per_minute_color < 5", "table_name": "product", "query_description": "Find products with max page size as \"A4\" and pages per minute color smaller than 5.", "results_description": "Xerox Travel Scanner 100 has a max page size of A4 and 4 color pages per minute", "result": ",product,max_page_size,pages_per_minute_color\n0,Xerox Travel Scanner 100,A4,4.0\n", "difficulty": "small_select"}, {"table_id": "manufacturers", "query": "SELECT COUNT(*) AS \"count of manufacturers\", headquarter \n FROM manufacturers \n WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing'", "table_name": "manufacturers", "query_description": "How many manufacturers have headquarters in either Tokyo or Beijing?", "results_description": "The headquarter in Tokyo has 2 manufacturers.", "result": ",Headquarter,count of manufacturers\n0,Tokyo,2\n", "difficulty": "aggregate"}, {"table_id": "inst", "query": "SELECT COUNT(*) AS \"count of inst\" \n FROM inst", "table_name": "inst", "query_description": "How many institutions are there?", "results_description": "There are 8 institutions.", "result": ",count of inst\n0,8\n", "difficulty": "aggregate"}, {"table_id": "home_game", "query": "SELECT YEAR, AVG(attendance) AS \"average attendance\" \n FROM home_game \n GROUP BY YEAR", "table_name": "home_game", "query_description": "For each year, return the year and the average number of attendance at home games.", "results_description": "For the year 1871 the average number of attendance at home games was 17125", "result": ",year,average attendance\n0,1871.0,17125.0\n", "difficulty": "aggregate_group_by"}, {"table_id": "channel", "query": "SELECT SUM(Rating_in_percent) AS \"sum of Rating_in_percent\", OWNER \n FROM channel \n GROUP BY OWNER", "table_name": "channel", "query_description": "What is the total rating of channel for each channel owner?", "results_description": "The channel owned by Anhui Television has a total rating of 0.2", "result": ",Owner,sum of Rating_in_percent\n0,Anhui Television,0.2\n", "difficulty": "aggregate_group_by"}, {"table_id": "university", "query": "SELECT school, LOCATION, affiliation \n FROM university \n WHERE affiliation = 'Public'", "table_name": "university", "query_description": "What are the public schools and what are their locations?", "results_description": "The school University of Delaware is located in Newark, DE and its affiliation is Public.", "result": ",School,Location,Affiliation\n0,University of Delaware,\"Newark, DE\",Public\n", "difficulty": "small_select"}, {"table_id": "COURSE", "query": "SELECT COUNT(*) AS \"count of COURSE\", Credits \n FROM COURSE \n WHERE Credits > 2", "table_name": "COURSE", "query_description": "How many courses have more than 2 credits?", "results_description": "There are 71 courses with 3 credits.", "result": ",Credits,count of COURSE\n0,3,71\n", "difficulty": "aggregate"}, {"table_id": "candidate", "query": "SELECT COUNT(*) AS \"count of candidate\" \n FROM candidate", "table_name": "candidate", "query_description": "Count the number of candidates.", "results_description": "There are 6 candidates.", "result": ",count of candidate\n0,6\n", "difficulty": "aggregate"}, {"table_id": "user_profiles", "query": "SELECT MAX(followers) AS \"maximum followers\", SUM(followers) AS \"sum of followers\" \n FROM user_profiles", "table_name": "user_profiles", "query_description": "Find the maximum and total number of followers of all users.", "results_description": "All users have a combined 260392178 followers, while the maximum number of followers is 99999998", "result": ",sum of followers,maximum followers\n0,260392178,99999998\n", "difficulty": "aggregate"}, {"table_id": "device", "query": "SELECT Carrier, Software_Platform \n FROM device \n WHERE Software_Platform <> 'Android'", "table_name": "device", "query_description": "What are the carriers of devices whose software platforms are not \"Android\"?", "results_description": "Verizon Wireless is the carrier of devices whose software platform is iOS.", "result": ",Carrier,Software_Platform\n0,Verizon Wireless,iOS\n", "difficulty": "small_select"}, {"table_id": "campuses", "query": "SELECT campus, LOCATION \n FROM campuses \n WHERE LOCATION = 'Chico'", "table_name": "campuses", "query_description": "What campuses are located in Chico?", "results_description": "The campus of California State University-Chico is located in Chico", "result": ",Campus,Location\n0,California State University-Chico,Chico\n", "difficulty": "small_select"}, {"table_id": "party_host, HOST, party", "query": "SELECT T3.Party_Theme AS \"party Party_Theme\", T2.Name AS \"HOST Name\" \n 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", "table_name": "party_host, HOST, party", "query_description": "Show the themes of parties and the names of the party hosts.", "results_description": "Host Austin Daye has a party with theme \"Spring\".", "result": ",HOST Name,party Party_Theme\n0,Austin Daye,Spring\n", "difficulty": "join"}, {"table_id": "HOTELS", "query": "SELECT price_range \n FROM HOTELS", "table_name": "HOTELS", "query_description": "What are the price ranges of hotels?", "results_description": "The price range of the hotels is 2914989.571.", "result": ",price_range\n0,2914989.571\n", "difficulty": "small_select"}, {"table_id": "Apartments", "query": "SELECT AVG(room_count) AS \"average room_count\", apt_type_code \n FROM Apartments \n WHERE apt_type_code = 'Studio'", "table_name": "Apartments", "query_description": "Find the average room count of the apartments that have the \"Studio\" type code.", "results_description": "The average room count of the apartments that have the \"Studio\" type code is 7.5", "result": ",apt_type_code,average room_count\n0,Studio,7.5\n", "difficulty": "aggregate"}, {"table_id": "GENRE, TRACK", "query": "SELECT AVG(UnitPrice) AS \"average UnitPrice\", T1.Name AS \"GENRE Name\" \n FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId \n WHERE T1.Name = 'Jazz'", "table_name": "GENRE, TRACK", "query_description": "Find the average unit price of jazz tracks.", "results_description": "The average unit price of the music genre Jazz is 0.9899999999999978", "result": ",GENRE Name,average UnitPrice\n0,Jazz,0.9899999999999978\n", "difficulty": "join_aggregate"}, {"table_id": "city", "query": "SELECT city, regional_population \n FROM city \n WHERE regional_population > 10000000", "table_name": "city", "query_description": "Which cities have regional population above 10000000?", "results_description": "The city Shanghai has regional population 23019148.", "result": ",City,Regional_Population\n0,Shanghai,23019148\n", "difficulty": "small_select"}, {"table_id": "acceptance, submission", "query": "SELECT T1.Result AS \"acceptance Result\", T2.Scores AS \"submission Scores\" \n FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC", "table_name": "acceptance, submission", "query_description": "Show the result of the submission with the highest score.", "results_description": "The submission score is 82 and the acceptance result is Rejected.", "result": ",acceptance Result,submission Scores\n0,Rejected,82.0\n", "difficulty": "join"}, {"table_id": "people, candidate", "query": "SELECT t1.name AS \"people name\", t1.sex AS \"people sex\", MIN(oppose_rate) AS \"minimum oppose_rate\" \n FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id \n GROUP BY t1.sex", "table_name": "people, candidate", "query_description": "Find the name of the candidates whose oppose percentage is the lowest for each sex.", "results_description": "St\u00e9phane Antiga is a female with a minimum oppose rate of 0.32.", "result": ",people sex,people name,minimum oppose_rate\n0,F,St\u00e9phane Antiga,0.32\n", "difficulty": "join_aggregate"}, {"table_id": "artist", "query": "SELECT name, year_join, country \n FROM artist \n WHERE country <> 'United States'", "table_name": "artist", "query_description": "Show all artist names and the year joined who are not from United States.", "results_description": "The join year of Vijay Singh who is from Fiji is 1998.", "result": ",Name,Country,Year_Join\n0,Vijay Singh,Fiji,1998\n", "difficulty": "small_select"}, {"table_id": "Student", "query": "SELECT COUNT(*) AS \"count of Student\", age \n FROM Student \n WHERE age = 18", "table_name": "Student", "query_description": "How many students are age 18?", "results_description": "10 students are at the age of 18", "result": ",Age,count of Student\n0,18,10\n", "difficulty": "aggregate"}, {"table_id": "people, perpetrator", "query": "SELECT T1.Name AS \"people Name\", T2.Country AS \"perpetrator Country\" \n FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID \n WHERE T2.Country <> 'China'", "table_name": "people, perpetrator", "query_description": "What are the names of perpetrators whose country is not \"China\"?", "results_description": "Perpetrator Ron Baxter is from South Korea", "result": ",people Name,perpetrator Country\n0,Ron Baxter,South Korea\n", "difficulty": "join"}, {"table_id": "useracct, review", "query": "SELECT T1.name AS \"useracct name\", T2.rating AS \"review rating\" \n FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id ORDER BY T2.rating DESC", "table_name": "useracct, review", "query_description": "Find the name of the user who gave the highest rating.", "results_description": "The user account Helen has a review rating of 10.", "result": ",review rating,useracct name\n0,10,Helen\n", "difficulty": "join"}, {"table_id": "Projects, Project_outcomes, Research_outcomes", "query": "SELECT T1.project_details AS \"Projects project_details\", T3.outcome_description AS \"Research_outcomes outcome_description\" \n 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 \n WHERE T3.outcome_description LIKE '%Published%'", "table_name": "Projects, Project_outcomes, Research_outcomes", "query_description": "List the project details of the projects with the research outcome described with the substring 'Published'.", "results_description": "The project with the detail 'doloremque' had a Published Research Paper as an outcome.", "result": ",Projects project_details,Research_outcomes outcome_description\n0,doloremque,Published Research Paper\n", "difficulty": "join"}, {"table_id": "artist", "query": "SELECT COUNT(*) AS \"count of artist\", country \n FROM artist \n WHERE country = 'Bangladesh'", "table_name": "artist", "query_description": "How many Bangladeshi artists are listed?", "results_description": "Bangladesh has two artists", "result": ",country,count of artist\n0,Bangladesh,2\n", "difficulty": "aggregate"}, {"table_id": "match_season", "query": "SELECT Draft_Pick_Number, Draft_Class, POSITION \n FROM match_season \n WHERE POSITION = 'Defender'", "table_name": "match_season", "query_description": "Show the draft pick numbers and draft classes of players whose positions are defenders.", "results_description": "Pick number 87 of the 1996 MLS Inaugural Player Draft is a Defender", "result": ",Position,Draft_Class,Draft_Pick_Number\n0,Defender,1996 MLS Inaugural Player Draft,87\n", "difficulty": "small_select"}, {"table_id": "film", "query": "SELECT Studio \n FROM film \n GROUP BY Studio \n HAVING AVG(Gross_in_dollar) >= 4500000", "table_name": "film", "query_description": "List the studios which average gross is above 4500000.", "results_description": "The studio with average gross above 4500000 is 20th Century Fox", "result": ",Studio\n0,20th Century Fox\n", "difficulty": "aggregate_group_by"}, {"table_id": "actor", "query": "SELECT Name, Age \n FROM actor \n WHERE Age <> 20", "table_name": "actor", "query_description": "What are the names of actors who are not 20 years old?", "results_description": "The actor Ray Meagher is 26 years old.", "result": ",age,Name\n0,26,Ray Meagher\n", "difficulty": "small_select"}, {"table_id": "WINE", "query": "SELECT Name, Score \n FROM WINE", "table_name": "WINE", "query_description": "List the names and scores of all wines.", "results_description": "The wine Old Kraft Vineyard has a score of 93.", "result": ",Name,Score\n0,Old Kraft Vineyard,93\n", "difficulty": "small_select"}, {"table_id": "body_builder", "query": "SELECT AVG(Snatch) AS \"average Snatch\" \n FROM body_builder", "table_name": "body_builder", "query_description": "What is the average snatch score of body builders?", "results_description": "The average snatch score of body builders is 137.5.", "result": ",average Snatch\n0,137.5\n", "difficulty": "aggregate"}, {"table_id": "Tasks", "query": "SELECT COUNT(*) AS \"count of Tasks\" \n FROM Tasks", "table_name": "Tasks", "query_description": "How many tasks are there?", "results_description": "There are 15 tasks.", "result": ",count of Tasks\n0,15\n", "difficulty": "aggregate"}, {"table_id": "Student", "query": "SELECT city_code, LName \n FROM Student \n WHERE LName = 'Kim'", "table_name": "Student", "query_description": "Which city does the student whose last name is \"Kim\" live in?", "results_description": "The student with last name Kim, live in the city with code \"HKG\"", "result": ",LName,city_code\n0,Kim,HKG\n", "difficulty": "small_select"}, {"table_id": "club", "query": "SELECT clublocation, clubname \n FROM club \n WHERE clubname = 'Tennis Club'", "table_name": "club", "query_description": "Where us the club named \"Tennis Club\" located?", "results_description": "The club named Tennis Club is located in AKW", "result": ",ClubName,ClubLocation\n0,Tennis Club,AKW\n", "difficulty": "small_select"}, {"table_id": "artist", "query": "SELECT COUNT(*) AS \"count of artist\" \n FROM artist", "table_name": "artist", "query_description": "How many artists do we have?", "results_description": "There are 7 artists in total.", "result": ",count of artist\n0,7\n", "difficulty": "aggregate"}, {"table_id": "Order_items, Products", "query": "SELECT T2.product_name AS \"Products product_name\", SUM(T1.product_quantity) AS \"sum of product_quantity\" \n FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id \n GROUP BY T2.product_name", "table_name": "Order_items, Products", "query_description": "What are the different product names, and what is the sum of quantity ordered for each product?", "results_description": "There are 5 Art products ordered", "result": ",Products product_name,sum of product_quantity\n0,Arts,5\n", "difficulty": "join_aggregate"}, {"table_id": "music_festival", "query": "SELECT Date_of_ceremony, RESULT \n FROM music_festival", "table_name": "music_festival", "query_description": "What are the dates of ceremony and results for each music festival?", "results_description": "The result was Nominated and the date of the ceremony was 18 February 2011.", "result": ",Result,Date_of_ceremony\n0,Nominated,18 February 2011\n", "difficulty": "small_select"}, {"table_id": "STUDENT, VOTING_RECORD", "query": "SELECT AVG(T1.Age) AS \"average Age\", T1.Sex AS \"STUDENT Sex\", T2.Election_Cycle AS \"VOTING_RECORD Election_Cycle\" \n FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote \n WHERE T1.Sex = 'F' AND T2.Election_Cycle = 'Spring'", "table_name": "STUDENT, VOTING_RECORD", "query_description": "Find the average age of female (sex is F) students who have secretary votes in the spring election cycle.", "results_description": "The female students who have votes in the spring election cycle have an average age of 21.", "result": ",STUDENT Sex,average Age,VOTING_RECORD Election_Cycle\n0,F,21.0,Spring\n", "difficulty": "join_aggregate"}, {"table_id": "products, ref_colors", "query": "SELECT t1.color_code AS \"products color_code\", t2.color_description AS \"ref_colors color_description\", t1.product_name AS \"products product_name\" \n FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code \n WHERE t1.product_name = 'chervil'", "table_name": "products, ref_colors", "query_description": "What is the color code and description of the product named \"chervil\"?", "results_description": "The color code of the product named chervil is 7 and the color description is black", "result": ",products color_code,products product_name,ref_colors color_description\n0,7,chervil,black\n", "difficulty": "join"}, {"table_id": "Rooms", "query": "SELECT roomName, bedType \n FROM Rooms \n WHERE bedType = 'King' OR bedType = 'Queen'", "table_name": "Rooms", "query_description": "List the name of rooms with king or queen bed.", "results_description": "The name of room with bed type King is Recluse and defiance", "result": ",bedType,roomName\n0,King,Recluse and defiance\n", "difficulty": "small_select"}, {"table_id": "customers, invoices", "query": "SELECT T1.first_name AS \"customers first_name\", T1.last_name AS \"customers last_name\", T2.invoice_date AS \"invoices invoice_date\" \n FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY T2.invoice_date DESC", "table_name": "customers, invoices", "query_description": "What are the first and last names of the 5 customers who purchased something most recently?", "results_description": "Manoj Pareek purchased something on 2011-12-22 00:00:00", "result": ",customers last_name,customers first_name,invoices invoice_date\n0,Pareek,Manoj,2011-12-22 00:00:00\n", "difficulty": "join"}, {"table_id": "Staff", "query": "SELECT date_joined_staff, last_name, first_name \n FROM Staff \n WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "table_name": "Staff", "query_description": "When did the staff member with first name as Janessa and last name as Sawayn join the company?", "results_description": "Sawayn Janessa joinded the staff in 2017-04-27 03:21:26.", "result": ",last_name,first_name,date_joined_staff\n0,Sawayn,Janessa,2017-04-27 03:21:26\n", "difficulty": "small_select"}, {"table_id": "technician", "query": "SELECT Team, Starting_Year \n FROM technician", "table_name": "technician", "query_description": "What is the team and starting year for each technician?", "results_description": "A technician in the NYY team started in 2012", "result": ",Team,Starting_Year\n0,NYY,2012.0\n", "difficulty": "small_select"}, {"table_id": "invoices", "query": "SELECT billing_state, COUNT(*) AS \"count of invoices\", SUM(total) AS \"sum of total\" \n FROM invoices \n WHERE billing_state = 'CA'", "table_name": "invoices", "query_description": "List the number of invoices and the invoice total from California.", "results_description": "There are 21 invoices from California with a combined total of 115.85", "result": ",sum of total,billing_state,count of invoices\n0,115.85999999999997,CA,21\n", "difficulty": "aggregate"}, {"table_id": "party, region", "query": "SELECT T1.party_name AS \"party party_name\", T2.region_name AS \"region region_name\" \n FROM party AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id", "table_name": "party, region", "query_description": "Show all party names and their region names.", "results_description": "The party named Convention Peoples Party was in the United Kingdom region.", "result": ",party party_name,region region_name\n0,Convention Peoples Party,United Kingdom\n", "difficulty": "join"}, {"table_id": "Rating, Movie", "query": "SELECT T2.title AS \"Movie title\", AVG(T1.stars) AS \"average stars\", T1.mID AS \"Rating mID\" \n FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID \n GROUP BY T1.mID ORDER BY AVG(T1.stars)", "table_name": "Rating, Movie", "query_description": "What are the titles and average ratings for all movies that have the lowest average rating?", "results_description": "The movie with id 103 and title The Sound of Music has 2.5 stars in average.", "result": ",Rating mID,Movie title,average stars\n0,103,The Sound of Music,2.5\n", "difficulty": "join_aggregate"}, {"table_id": "Faculty", "query": "SELECT Fname, Lname, phone, Sex \n FROM Faculty \n WHERE Sex = 'F'", "table_name": "Faculty", "query_description": "Show the first name, last name, and phone number for all female faculty members.", "results_description": "Faculty member Stacey Jones has phone number 3550 and is female", "result": ",Sex,Fname,Lname,Phone\n0,F,Stacey,Jones,3550\n", "difficulty": "large_select"}, {"table_id": "Video_games", "query": "SELECT gname, gtype \n FROM Video_games \n WHERE gtype = 'Collectible card game'", "table_name": "Video_games", "query_description": "Show all video games with type Collectible card game.", "results_description": "The game RNG Stone is a a collectible card game.", "result": ",GName,GType\n0,RNG Stone,Collectible card game\n", "difficulty": "small_select"}, {"table_id": "participants", "query": "SELECT participant_type_code \n FROM participants \n GROUP BY participant_type_code ORDER BY COUNT(*) DESC", "table_name": "participants", "query_description": "What is the most common participant type?", "results_description": "The participant type code is Participant.", "result": ",Participant_Type_Code\n0,Participant\n", "difficulty": "aggregate_group_by"}, {"table_id": "FACULTY", "query": "SELECT Room, Rank, Building \n FROM FACULTY \n WHERE Rank = 'Professor' AND Building = 'NEB'", "table_name": "FACULTY", "query_description": "Find the rooms of faculties with rank professor who live in building NEB.", "results_description": "The faculty with rank Professor lives in room 219, in NEB building.", "result": ",Rank,Room,Building\n0,Professor,219,NEB\n", "difficulty": "small_select"}, {"table_id": "bank", "query": "SELECT AVG(no_of_customers) AS \"average no_of_customers\", state \n FROM bank \n WHERE state = 'Utah'", "table_name": "bank", "query_description": "What is the average number of customers across banks in the state of Utah?", "results_description": "The state of Utah has an average of 123 customers in its banks", "result": ",state,average no_of_customers\n0,Utah,123.0\n", "difficulty": "aggregate"}, {"table_id": "customers", "query": "SELECT payment_method_code, COUNT(*) AS \"count of customers\" \n FROM customers \n GROUP BY payment_method_code", "table_name": "customers", "query_description": "For each payment method, return how many customers use it.", "results_description": "10 customers use Credit Card as a payment method.", "result": ",count of customers,payment_method_code\n0,10,Credit Card\n", "difficulty": "aggregate_group_by"}, {"table_id": "club, member_of_club, student", "query": "SELECT AVG(t3.age) AS \"average age\", t1.clubname AS \"club clubname\" \n FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid \n WHERE t1.clubname = 'Bootup Baltimore'", "table_name": "club, member_of_club, student", "query_description": "What is the average age of the members of the club \"Bootup Baltimore\"?", "results_description": "The club named Bootup Baltimore has an average age of 17.5.", "result": ",average age,club clubname\n0,17.5,Bootup Baltimore\n", "difficulty": "join_aggregate"}, {"table_id": "Activity", "query": "SELECT activity_name \n FROM Activity", "table_name": "Activity", "query_description": "List all the activities we have.", "results_description": "There is the Mountain Climbing activity", "result": ",activity_name\n0,Mountain Climbing\n", "difficulty": "small_select"}, {"table_id": "physician, trained_in, procedures", "query": "SELECT T1.name AS \"physician name\", T3.cost AS \"procedures cost\" \n 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", "table_name": "physician, trained_in, procedures", "query_description": "Find the physician who was trained in the most expensive procedure?", "results_description": "John Wen costed 10000", "result": ",physician name,procedures cost\n0,John Wen,10000.0\n", "difficulty": "join"}, {"table_id": "building", "query": "SELECT AVG(floors) AS \"average floors\", MAX(floors) AS \"maximum floors\", MIN(floors) AS \"minimum floors\" \n FROM building", "table_name": "building", "query_description": "What are the average, maximum, and minimum number of floors for all buildings?", "results_description": "The average number of floors for all buildings is 27.5 with a maximum of 42 and a minimum of 10", "result": ",average floors,maximum floors,minimum floors\n0,27.5,42.0,10.0\n", "difficulty": "aggregate"}, {"table_id": "Staff", "query": "SELECT date_joined_staff, last_name, first_name \n FROM Staff \n WHERE first_name = 'Janessa' AND last_name = 'Sawayn'", "table_name": "Staff", "query_description": "When did the staff member named Janessa Sawayn join the company?", "results_description": "The staff member named Janessa Sawayn join the company on 2017-04-27 03:21:26", "result": ",last_name,first_name,date_joined_staff\n0,Sawayn,Janessa,2017-04-27 03:21:26\n", "difficulty": "small_select"}, {"table_id": "Payments", "query": "SELECT Payment_ID, Date_Payment_Made, Amount_Payment, Payment_Method_Code \n FROM Payments \n WHERE Payment_Method_Code = 'Visa'", "table_name": "Payments", "query_description": "Which Payments were processed with Visa? List the payment Id, the date and the amount.", "results_description": "The payment with id 678 has an amount of 459407, was made at 2017-12-16 and the payment's method code was Visa.", "result": ",Payment_ID,Amount_Payment,Date_Payment_Made,Payment_Method_Code\n0,678,459407,2017-12-16,Visa\n", "difficulty": "large_select"}, {"table_id": "program", "query": "SELECT name, origin, OWNER \n FROM program", "table_name": "program", "query_description": "What are the name, origin and owner of each program?", "results_description": "The origins of the programs with names Aniworld are Human and their owners are Hunan Broadcasting System (HBS)", "result": ",Name,Owner,Origin\n0,Aniworld,Hunan Broadcasting System (HBS),Hunan\n", "difficulty": "large_select"}, {"table_id": "Apartment_Bookings, Apartments", "query": "SELECT AVG(room_count) AS \"average room_count\", T1.booking_status_code AS \"Apartment_Bookings booking_status_code\" \n FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id \n WHERE T1.booking_status_code = 'Provisional'", "table_name": "Apartment_Bookings, Apartments", "query_description": "What is the average room count of the apartments whose booking status code is \"Provisional\"?", "results_description": "There are 6.5 rooms in average with booking status code Provisional.", "result": ",average room_count,Apartment_Bookings booking_status_code\n0,6.5,Provisional\n", "difficulty": "join_aggregate"}, {"table_id": "Apartments", "query": "SELECT apt_type_code, bathroom_count, bedroom_count, room_count \n FROM Apartments \n GROUP BY apt_type_code ORDER BY SUM(room_count) DESC", "table_name": "Apartments", "query_description": "Which apartment type has the largest number of total rooms? Return the apartment type code, its number of bathrooms and number of bedrooms.", "results_description": "The Flat apartment type has 3 bedrooms, 1 bathroom and counts 7 rooms in total", "result": ",room_count,apt_type_code,bedroom_count,bathroom_count\n0,7,Flat,3,1\n", "difficulty": "aggregate_group_by"}, {"table_id": "CHARACTERISTICS", "query": "SELECT COUNT(*) AS \"count of CHARACTERISTICS\" \n FROM CHARACTERISTICS", "table_name": "CHARACTERISTICS", "query_description": "How many characteristics are there?", "results_description": "There are 15 characteristics.", "result": ",count of CHARACTERISTICS\n0,15\n", "difficulty": "aggregate"}, {"table_id": "physician, prescribes", "query": "SELECT T1.name AS \"physician name\", T2.dose AS \"prescribes dose\" \n FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC", "table_name": "physician, prescribes", "query_description": "Find the physician who prescribed the highest dose. What is his or her name?", "results_description": "John Dorian prescribes a dose of 5 ", "result": ",physician name,prescribes dose\n0,John Dorian,5\n", "difficulty": "join"}, {"table_id": "Bookings, Drama_Workshop_Groups", "query": "SELECT T2.Store_Name AS \"Drama_Workshop_Groups Store_Name\", T1.Status_Code AS \"Bookings Status_Code\" \n FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID \n WHERE T1.Status_Code = 'stop'", "table_name": "Bookings, Drama_Workshop_Groups", "query_description": "What are the names of the workshop groups that have bookings with status code \"stop\"?", "results_description": "The name of the workshop group is Bednar Film", "result": ",Bookings Status_Code,Drama_Workshop_Groups Store_Name\n0,stop,Bednar Film\n", "difficulty": "join"}, {"table_id": "Songs", "query": "SELECT COUNT(*) AS \"count of Songs\" \n FROM Songs", "table_name": "Songs", "query_description": "Count the number of songs.", "results_description": "The number of songs is 0.", "result": ",count of Songs\n0,0\n", "difficulty": "aggregate"}, {"table_id": "CLASS", "query": "SELECT class_code, class_room \n FROM CLASS \n WHERE class_room = 'KLR209'", "table_name": "CLASS", "query_description": "List the codes of all courses that take place in room KLR209.", "results_description": "The class with code 10017 takes place in room KLR209.", "result": ",CLASS_CODE,CLASS_ROOM\n0,10017,KLR209\n", "difficulty": "small_select"}, {"table_id": "authors", "query": "SELECT lname, fname \n FROM authors \n WHERE fname = 'Amal'", "table_name": "authors", "query_description": "Find the last name of the author with first name \"Amal\".", "results_description": "The first name is Amal and the last name is Ahmed.", "result": ",fname,lname\n0,Amal,Ahmed\n", "difficulty": "small_select"}, {"table_id": "addresses", "query": "SELECT COUNT(*) AS \"count of addresses\", state_province_county \n FROM addresses \n WHERE state_province_county = 'Colorado'", "table_name": "addresses", "query_description": "Count the number of cities in the state of Colorado.", "results_description": "The is 1 city in the state of Colorado", "result": ",count of addresses,state_province_county\n0,1,Colorado\n", "difficulty": "aggregate"}, {"table_id": "Flight", "query": "SELECT origin \n FROM Flight \n GROUP BY origin ORDER BY COUNT(*) DESC", "table_name": "Flight", "query_description": "Which origin has most number of flights?", "results_description": "Los Angeles has the most number of flights.", "result": ",origin\n0,Los Angeles\n", "difficulty": "aggregate_group_by"}, {"table_id": "exhibition", "query": "SELECT theme, YEAR, ticket_price \n FROM exhibition \n WHERE ticket_price < 15", "table_name": "exhibition", "query_description": "What are the theme and year for all exhibitions that have a ticket price under 15?", "results_description": "The theme of the exhibition was Santa Claus and Rudolph the Red-Nosed Reindeer, it was held in 2006 and the ticket price was 2006.", "result": ",Year,Theme,Ticket_Price\n0,2006,Santa Claus and Rudolph the Red-Nosed Reindeer,14.95\n", "difficulty": "small_select"}, {"table_id": "CUSTOMER", "query": "SELECT COUNT(*) AS \"count of CUSTOMER\", Email \n FROM CUSTOMER \n WHERE Email LIKE '%gmail.com%'", "table_name": "CUSTOMER", "query_description": "How many customers have email that contains \"gmail.com\"?", "results_description": "There are 8 customers", "result": ",Email,count of CUSTOMER\n0,ftremblay@gmail.com,8\n", "difficulty": "aggregate"}, {"table_id": "match_season, team", "query": "SELECT T1.Position AS \"match_season Position\", T2.Name AS \"team Name\" \n FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id \n WHERE T2.Name = 'Ryley Goldner'", "table_name": "match_season, team", "query_description": "Show the positions of the players from the team with name \"Ryley Goldner\".", "results_description": "The player Ryley Goldner plays the midfielder position.", "result": ",team Name,match_season Position\n0,Ryley Goldner,Midfielder\n", "difficulty": "join"}]