sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What is the total number of draws for Wakool when there are more than 11 losses and fewer than 4 wins? | SELECT COUNT(draws) FROM table_name_7 WHERE losses > 11 AND wins < 4 AND golden_rivers = "wakool" |
Which Tonnage (GRT) has a Nationality of united kingdom, and a Name of king gruffydd? | SELECT MIN(tonnage__grt_) FROM table_name_44 WHERE nationality = "united kingdom" AND name = "king gruffydd" |
What are the names for all aircrafts with at least 2 flights? | SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING count(*) >= 2 |
Please list the titles of the top 3 films with the highest replacement cost. | SELECT title FROM film WHERE replacement_cost = ( SELECT MAX(replacement_cost) FROM film ) LIMIT 3 |
How many played where the points were 80? | SELECT played FROM table_12807904_5 WHERE points = "80" |
Calculate the average satisfaction of the good students with their courses. | SELECT CAST(SUM(sat) AS REAL) / COUNT(course_id) FROM registration WHERE grade = 'B' |
there are in tobago species name helicops angulatus | SELECT tobago FROM table_1850282_5 WHERE species = "Helicops angulatus" |
Which Byes have an Against smaller than 1466, and Losses smaller than 6? | SELECT byes FROM table_name_91 WHERE against < 1466 AND losses < 6 |
What round was adelaide united the opposition with an attendance of 18,345? | SELECT round FROM table_name_32 WHERE opposition = "adelaide united" AND attendance = "18,345" |
What is the paperID code for University of Oxford? | select distinct T1.paperID from Papers AS T1 JOIN Authorship AS T2 JOIN Inst AS T3 where T3.name = 'University of Oxford' |
What is the broadcast date of the episode on 16mm t/r that ran 23:25? | SELECT broadcast_date FROM table_2101431_1 WHERE archive = "16mm t/r" AND run_time = "23:25" |
Calculate the average height in centimeter of all players who played in Acadie-Bathurst Titan during regular season. | SELECT CAST(SUM(T1.height_in_cm) AS REAL) / COUNT(T2.ELITEID) FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height INNER JOIN SeasonStatus AS T3 ON T2.ELITEID = T3.ELITEID WHERE T3.TEAM = 'Acadie-Bathurst Titan' AND T3.GAMETYPE = 'Regular Season' |
tell me the name of head id 1 | SELECT name FROM head WHERE head_ID = 1 |
What are the line 1 and average monthly rentals of all student addresses? | SELECT T1.line_1 , avg(T2.monthly_rental) FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id |
Which team has the location attendance of American Airlines Center 19954? | SELECT team FROM table_23285805_8 WHERE location_attendance = "American Airlines Center 19954" |
What day was there a hard surface when the partner was Marc Gicquel? | SELECT date FROM table_name_64 WHERE surface = "hard" AND partner = "marc gicquel" |
Provide the ranking system name for the "Quality of Education Rank" criteria. | SELECT T1.system_name FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id WHERE T2.criteria_name = 'Quality of Education Rank' |
Show the invoice number and the number of transactions for each invoice. | SELECT invoice_number , count(*) FROM Financial_transactions GROUP BY invoice_number |
What is the average, maximum, and minimum budget for all movies before 2000. | SELECT avg(budget_million) , max(budget_million) , min(budget_million) FROM movie WHERE YEAR < 2000 |
Find the names of the products with length smaller than 3 or height greater than 5. | SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 5 |
List down the customer's reference ID with true response. | SELECT REFID FROM Mailings1_2 WHERE RESPONSE = 'true' |
List all region names in alphabetical order. | SELECT region_name FROM region ORDER BY region_name; |
What is Country of Origin, when Type is Disposable, when Primary Cartridge is 105mm, and when Year of Intro is less than 2008? | SELECT country_of_origin FROM table_name_74 WHERE type = "disposable" AND primary_cartridge = "105mm" AND year_of_intro < 2008 |
Who is the person whose age is below 30? | SELECT name FROM Person WHERE age < 30 |
What is the first name of these people? | SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T1.lesson_status_code = "Cancelled" GROUP BY T2.first_name |
Who was the home team when the crowd was larger than 13,557? | SELECT home_team FROM table_name_71 WHERE crowd > 13 OFFSET 557 |
What is the Age of dorothy Peel as of 1 February 2014 ? | SELECT age_as_of_1_february_2014 FROM table_name_18 WHERE name = "dorothy peel" |
What place has a score greater than 68, and camilo villegas as the player? | SELECT place FROM table_name_51 WHERE score > 68 AND player = "camilo villegas" |
When 4 is the episode what is the air date? | SELECT first_air_date FROM table_28980706_4 WHERE episode = 4 |
What was the score for alcobaça when the opponent was in the final of xinyun han? | SELECT score FROM table_name_27 WHERE tournament = "alcobaça" AND opponent_in_the_final = "xinyun han" |
Show all region code and region name sorted by the codes. | SELECT region_code , region_name FROM region ORDER BY region_code |
Which SANSKRT has a CHINESE of 摩拏羅 / mónáluó? | SELECT sanskrt FROM table_name_76 WHERE chinese = "摩拏羅 / mónáluó" |
How many rounds did Virginia have? | SELECT round FROM table_20860739_1 WHERE college = "Virginia" |
Name the numbers for date of feb 27, 1996 | SELECT s_no FROM table_1594772_2 WHERE match_date = "Feb 27, 1996" |
What is the average salary for each job title? | SELECT job_title , AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id GROUP BY T2.job_title |
Calculate the percentage of part supply that costs more than 500. | SELECT CAST(SUM(IIF(ps_supplycost > 500, 1, 0)) AS REAL) * 100 / COUNT(ps_suppkey) FROM partsupp |
What team was the opponent when the score was 25-0? | SELECT opponent FROM table_name_7 WHERE score = "25-0" |
Which nationality's distance was 500m before 2012, when the record was 1:37.071s? | SELECT nationality FROM table_name_26 WHERE distance = "500m" AND year < 2012 AND record = "1:37.071s" |
Name the qual for year of 1960 | SELECT qual FROM table_name_25 WHERE year = "1960" |
State the name of vendor that supplies book resources to all school with literacy subject as their primary focus. | SELECT DISTINCT T1.vendor_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.primary_focus_subject LIKE 'Literacy' |
List the medicine name and trade name which can both interact as 'inhibitor' and 'activitor' with enzymes. | SELECT T1.name , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'inhibitor' INTERSECT SELECT T1.name , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'activitor' |
How many institutions with over 50,000 students in 2011 had a percentage of oversea students of more than 10%? | SELECT COUNT(*) FROM university_year WHERE year = 2011 AND num_students > 50000 AND pct_international_students > 10 |
What year did the 11th place play 26 games? | SELECT year FROM table_name_96 WHERE place = "11th" AND played = 26 |
What team does Anthony Redmond ride for? | SELECT team FROM table_name_32 WHERE rider = "anthony redmond" |
How many times is the player vaughn taylor listed? | SELECT COUNT(before) FROM table_28498999_3 WHERE player = "Vaughn Taylor" |
If the province is Manitoba, what is the Arabs 2001 number? | SELECT MAX(arabs_2001) FROM table_1939367_1 WHERE province = "Manitoba" |
Compute the average profits companies make. | SELECT avg(Profits_billion) FROM Companies |
What is all the information about the Marketing department? | SELECT * FROM departments WHERE department_name = 'Marketing' |
Who wrote episode 94? | SELECT written_by FROM table_10718631_2 WHERE no_in_series = 94 |
What are the ids of all vehicles? | SELECT vehicle_id FROM Vehicles; |
What are the names of the states that have some college students playing in the positions of goalie and mid-field? | SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' |
What was the number of earnings were cuts made are 19 and money list rank is 3? | SELECT earnings__€_ FROM table_12821159_14 WHERE cuts_made = 19 AND money_list_rank = 3 |
What type of paper is the 1 cent denominations made on? | SELECT paper_type FROM table_name_3 WHERE denomination = "1 cent" |
Name the lead with left bloc of 8.4% | SELECT lead FROM table_name_25 WHERE left_bloc = "8.4%" |
Count the number of distinct instructors who have taught a course. | SELECT COUNT (DISTINCT id) FROM teaches |
Show the school name and type for schools without a school bus. | SELECT school , TYPE FROM school WHERE school_id NOT IN (SELECT school_id FROM school_bus) |
How many poles does status grand prix have? | SELECT poles FROM table_name_57 WHERE racing_team = "status grand prix" |
How many draft copies does the document with id 2 have? | SELECT count(*) FROM Draft_Copies WHERE document_id = 2; |
When Type was rowexit what was the Category? | SELECT category FROM table_name_88 WHERE type = "rowexit" |
How many locations featured the Webb Family? | SELECT COUNT(location_s_) FROM table_19897294_11 WHERE family_families = "The Webb Family" |
what is the y = 2008 when the expression is easter day (julian calendar)? | SELECT y_ = _2008 FROM table_214479_8 WHERE expression = "Easter Day (Julian calendar)" |
List the names and origins of people who are not body builders. | SELECT Name , birth_place FROM people EXCEPT SELECT T1.Name , T1.birth_place FROM people AS T1 JOIN body_builder AS T2 ON T1.people_id = T2.people_id |
For each organisations with headquarters in the USA, provide the its full name and the city where the headquarter is located at. | SELECT Name, City FROM organization WHERE Country = 'USA' |
What is the category of the business with short review length and highest review stars within business ID from 5 t0 10? | SELECT T4.category_name FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Business_Categories AS T3 ON T2.business_id = T3.business_id INNER JOIN Categories AS T4 ON T3.category_id = T4.category_id WHERE T1.review_length LIKE 'Short' AND T2.business_id BETWEEN 5 AND 10 ORDER BY T1.review_stars DESC LIMIT 1 |
Who wrote Infiltration? | SELECT writer FROM table_name_86 WHERE title = "infiltration" |
What are the locations of those? | select location from gas_station where manager_name = ( SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY count ( * ) DESC LIMIT 1 ) |
Please list all of the contact information for the police district Near West. | SELECT phone, fax, tty, twitter FROM District WHERE district_name = 'Near West' |
Find all airlines that have fewer than 200 flights. | SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING COUNT(*) < 200 |
In the game on or before week 9, who was the opponent when the attendance was 61,626? | SELECT opponent FROM table_name_49 WHERE week < 9 AND attendance = "61,626" |
By how much did Elly Koss's weight increase from the observation in 2008 to the observation in 2009? | SELECT SUM(CASE WHEN strftime('%Y', T2.date) = '2009' THEN T2.VALUE END) - SUM(CASE WHEN strftime('%Y', T2.date) = '2008' THEN T2.VALUE END) AS increase , T2.units FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.description = 'Body Height' |
Which shipping method is preferred by customers the most? | SELECT T2.method_name FROM cust_order AS T1 INNER JOIN shipping_method AS T2 ON T1.shipping_method_id = T2.method_id GROUP BY T2.method_name ORDER BY COUNT(T2.method_id) DESC LIMIT 1 |
What are the names of all the reviewers and movie names? | SELECT name FROM Reviewer UNION SELECT title FROM Movie |
Could you please find the products with the pages per minute color larger than 5? | SELECT product FROM product WHERE pages_per_minute_color > 5 |
How many cups of almonds do you need for a chicken pocket sandwich? | SELECT COUNT(*) FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T1.title = 'Chicken Pocket Sandwich' AND T3.name = 'almonds' AND T2.unit = 'cup(s)' |
Provide the address of the legislator with the contact form of http://www.carper.senate.gov/contact/. | SELECT address FROM `current-terms` WHERE contact_form = 'http://www.carper.senate.gov/contact/' |
What is the name of the person with a type of transfer, and a Transfer fee of €8m + €2m in variables? | SELECT name FROM table_name_64 WHERE type = "transfer" AND transfer_fee = "€8m + €2m in variables" |
Which city has most number of customers? | SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY count(*) DESC LIMIT 1; |
How few km 2 does the area with Nay Pyi Taw as capital cover? | SELECT MIN(area__km_2__) FROM table_28741_1 WHERE capital = "Nay Pyi Taw" |
Which state is Mount Chiginagak located in? | SELECT state FROM table_name_8 WHERE mountain_peak = "mount chiginagak" |
how many airports are there in each country? | SELECT count(*) , country FROM airport GROUP BY country |
List all the product names with the color description "white". | SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = "white" |
Can you please list all of the locations with only one station? | SELECT LOCATION FROM station GROUP BY LOCATION HAVING count ( * ) = 1 |
Find the personal names of students not enrolled in any course. | SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_id |
What is the original language of the movie with the tagline "An offer you can't refuse."? | SELECT T3.language_name FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id INNER JOIN language_role AS T4 ON T2.language_role_id = T4.role_id WHERE T4.language_role = 'Original' AND T1.tagline LIKE 'An offer you can%t refuse.' |
Thank you for that! Could you update this list to include the channel name? | SELECT t1.name,t2.Channel_ID FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' |
List the products ordered by Becky Martin around the Central region. | SELECT DISTINCT T3.`Product Name` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.`Customer Name` = 'Becky Martin' AND T3.Region = 'Central' |
What is the constructor for the driver with grid less than 2? | SELECT constructor FROM table_name_6 WHERE grid < 2 |
What is the Record with a Date that is may 20, 1961? | SELECT record FROM table_name_73 WHERE date = "may 20, 1961" |
How many purses were there for the mar 16? | SELECT COUNT(purse__) AS $__ FROM table_11622771_1 WHERE date = "Mar 16" |
What engine was in the year of 1961? | SELECT engine FROM table_name_85 WHERE year = 1961 |
How many millions of people in the US watched the episode with season number 8? | SELECT us_viewers__millions_ FROM table_19925114_1 WHERE no_in_season = 8 |
Who was the most clutch player in 1986? Give his full name. | SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Scoring AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 1986 GROUP BY T2.playerID ORDER BY SUM(T2.GWG) DESC LIMIT 1 |
What is the game name that was held in Beijing in 2008? | SELECT T3.games_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T2.city_name = 'Beijing' AND T3.games_year = 2008 |
List the problem id and log id which are assigned to the staff named Rylan Homenick. | SELECT DISTINCT T2.problem_id , T2.problem_log_id FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T1.staff_first_name = "Rylan" AND T1.staff_last_name = "Homenick" |
What is the time for Brazil? | SELECT time FROM table_name_5 WHERE country = "brazil" |
With a record of 48-51 for the team, the lowest 2005 attendance was listed as how many? | SELECT MIN(attendance) FROM table_name_35 WHERE record = "48-51" |
What is the GameID of the GName RNG Stone ? | SELECT gtype FROM Video_games where gameid = 1 |
Give me the the first and last name of the faculty who advises the most students. | SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1 |
What is every entry for area if capital is Port-au-Prince? | SELECT area__km²_ FROM table_298550_1 WHERE capital = "Port-au-Prince" |
How many questions did user No.5 answer? | SELECT COUNT(QuestionID) FROM Answer WHERE UserID = 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.