answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT AVG(weight), pettype FROM pets GROUP BY pettype | Find the average weight for each pet type. | CREATE TABLE pets (pettype VARCHAR, weight INTEGER) |
SELECT winner FROM table_name_11 WHERE event = "european poker tour grand final" | Who is the winner of the European Poker Tour Grand Final? | CREATE TABLE table_name_11 (
winner VARCHAR,
event VARCHAR
) |
SELECT mult FROM table_18823880_10 WHERE sspec_number = "SLBLW(B1)" | When slblw(b1) is the sspec number what is the mult.? | CREATE TABLE table_18823880_10 (mult VARCHAR, sspec_number VARCHAR) |
SELECT DISTINCT T1.fname, T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid | Find the first name and age of students who have a pet. | CREATE TABLE student (fname VARCHAR, age VARCHAR, stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR) |
SELECT visiting_team FROM table_name_10 WHERE date = "october 23" | What was the visiting team on october 23? | CREATE TABLE table_name_10 (
visiting_team VARCHAR,
date VARCHAR
) |
SELECT release_price___usd__ FROM table_18823880_10 WHERE socket = "socketG1" | When socketg1 is the socket what is the release price in dollars? | CREATE TABLE table_18823880_10 (release_price___usd__ VARCHAR, socket VARCHAR) |
SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith' | Find the id of the pet owned by student whose last name is ‘Smith’. | CREATE TABLE has_pet (petid VARCHAR, stuid VARCHAR); CREATE TABLE student (stuid VARCHAR, Lname VARCHAR) |
SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT FIRST_NAME LIKE '%M%' ORDER BY AVG(SALARY) | Bin the hire date into the day of week interval, and then calculate the average salary of employees in each day for a bar chart, note that just select those employees without the letter M in their first name, and could you list Y in ascending order? | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE... |
SELECT MAX(opponents) FROM table_18847456_2 WHERE date = "Dec. 19" | How many points did the opposing team score on Dec. 19, 1982? | CREATE TABLE table_18847456_2 (opponents INTEGER, date VARCHAR) |
SELECT COUNT(*), T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid | Find the number of pets for each student who has any pet and student id. | CREATE TABLE has_pet (stuid VARCHAR); CREATE TABLE student (stuid VARCHAR) |
SELECT "nation" FROM table_204_343 GROUP BY "nation" ORDER BY COUNT("model") LIMIT 1 | which country had the least number of models ? | CREATE TABLE table_204_343 (
id number,
"nation" text,
"model" text,
"length" text,
"barrel length" text,
"weight" text
) |
SELECT bills_originally_cosponsored FROM table_18852984_2 WHERE all_amendments_cosponsored = 0 | How many bills where originally cosponsored in those years where the total of all amendments cosponsored was 0? | CREATE TABLE table_18852984_2 (bills_originally_cosponsored VARCHAR, all_amendments_cosponsored VARCHAR) |
SELECT COUNT(*), t1.stuid FROM student AS t1 JOIN has_pet AS t2 ON t1.stuid = t2.stuid GROUP BY t1.stuid | For students who have pets , how many pets does each student have ? list their ids instead of names . | CREATE TABLE has_pet (stuid VARCHAR); CREATE TABLE student (stuid VARCHAR) |
SELECT "Department" FROM table_21337 WHERE "Local Investment (US$)" = '626,798' | What was the department that got $626,798 in local investments? | CREATE TABLE table_21337 (
"Department" text,
"Projects" real,
"Municipalities" real,
"Farmers" real,
"Irrigated Ha" real,
"BID/PRONAR Investment (US$)" text,
"Local Investment (US$)" text,
"Total" text
) |
SELECT all_bills_cosponsored FROM table_18852984_2 WHERE bills_originally_cosponsored = 113 | How many bill cosponsored during those years where bills originally cosponsored is 113? | CREATE TABLE table_18852984_2 (all_bills_cosponsored VARCHAR, bills_originally_cosponsored VARCHAR) |
SELECT T1.fname, T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING COUNT(*) > 1 | Find the first name and gender of student who have more than one pet. | CREATE TABLE student (fname VARCHAR, sex VARCHAR, stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR) |
SELECT "First elected" FROM table_74004 WHERE "Candidates" = 'Hosea Moffitt (F) 57.9% Josiah Masters (DR) 42.1%' | Name the first elected for hosea moffitt (f) 57.9% josiah masters (dr) 42.1% | CREATE TABLE table_74004 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) |
SELECT MAX(all_bills_sponsored) FROM table_18852984_2 | What is the greatest number of bills sponsored in any year? | CREATE TABLE table_18852984_2 (all_bills_sponsored INTEGER) |
SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat' | Find the last name of the student who has a cat that is age 3. | CREATE TABLE student (lname VARCHAR, stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE pets (petid VARCHAR, pet_age VARCHAR, pettype VARCHAR) |
SELECT winner FROM table_19930660_3 WHERE rufus_guest = "Sean Lock" | What is the resulting score for the episodes where Rufus's guest is Sean Lock? | CREATE TABLE table_19930660_3 (
winner VARCHAR,
rufus_guest VARCHAR
) |
SELECT MIN(cr_no) FROM table_1886270_1 | What is the lowest cr number? | CREATE TABLE table_1886270_1 (cr_no INTEGER) |
SELECT AVG(age) FROM student WHERE NOT stuid IN (SELECT stuid FROM has_pet) | Find the average age of students who do not have any pet . | CREATE TABLE student (age INTEGER, stuid VARCHAR); CREATE TABLE has_pet (age INTEGER, stuid VARCHAR) |
SELECT Event_Details, COUNT(Event_Details) FROM Events GROUP BY Event_Details ORDER BY Event_Details DESC | Group and count details for the events using a bar chart, and I want to list by the names in desc. | CREATE TABLE Participants (
Participant_ID INTEGER,
Participant_Type_Code CHAR(15),
Participant_Details VARCHAR(255)
)
CREATE TABLE Events (
Event_ID INTEGER,
Service_ID INTEGER,
Event_Details VARCHAR(255)
)
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15)
)
CREA... |
SELECT built FROM table_1886270_1 WHERE withdrawn = "2/1939" | When 2/1939 is the withdrawn when was it built? | CREATE TABLE table_1886270_1 (built VARCHAR, withdrawn VARCHAR) |
SELECT COUNT(*) FROM CONTINENTS | How many continents are there? | CREATE TABLE CONTINENTS (Id VARCHAR) |
SELECT MIN("Int yards") FROM table_72681 | Name the least amount of int yards | CREATE TABLE table_72681 (
"Player" text,
"G" real,
"Tackles" real,
"Solo" real,
"Assts" real,
"Sacks" text,
"Int" real,
"Int yards" real,
"Int avg." text,
"Int TD" real,
"Fum. rec" real,
"Fum. rec TD" real
) |
SELECT hr_no FROM table_1886270_1 WHERE hr_name = "River Ness" | When river ness is the hr name what is the hr number? | CREATE TABLE table_1886270_1 (hr_no VARCHAR, hr_name VARCHAR) |
SELECT T1.ContId, T1.Continent, COUNT(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId | How many countries does each continent have? List the continent id, continent name and the number of countries. | CREATE TABLE COUNTRIES (Continent VARCHAR); CREATE TABLE CONTINENTS (ContId VARCHAR, Continent VARCHAR) |
SELECT AVG(year) FROM table_name_49 WHERE quantity = 10 AND gwr_numbers = "409, 290, 315, 317–321, 324, 333" | What is the average Year that has a Quantity of 10, and a GWR Numbers of 409, 290, 315, 317 321, 324, 333? | CREATE TABLE table_name_49 (
year INTEGER,
quantity VARCHAR,
gwr_numbers VARCHAR
) |
SELECT COUNT(built) FROM table_1886270_1 WHERE hr_name = "(River Garry)" | When (river garry) is the hr name how many builts are there? | CREATE TABLE table_1886270_1 (built VARCHAR, hr_name VARCHAR) |
SELECT COUNT(*) FROM COUNTRIES | How many countries are listed? | CREATE TABLE COUNTRIES (Id VARCHAR) |
SELECT ABS((SELECT "time" FROM table_204_401 WHERE "name" = 'yelizaveta bryzhina') - (SELECT "time" FROM table_204_401 WHERE "name" = 'ksenija balta')) | the difference between yelizaveta bryzhina 's time and ksenija balta 's time ? | CREATE TABLE table_204_401 (
id number,
"rank" number,
"lane" number,
"name" text,
"nationality" text,
"react" number,
"time" number,
"notes" text
) |
SELECT MAX(cr_no) FROM table_1886270_1 | What is the highest cr number? | CREATE TABLE table_1886270_1 (cr_no INTEGER) |
SELECT T1.FullName, T1.Id, COUNT(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id | How many models does each car maker produce? List maker full name, id and the number. | CREATE TABLE MODEL_LIST (Maker VARCHAR); CREATE TABLE CAR_MAKERS (FullName VARCHAR, Id VARCHAR) |
SELECT LOG(10, CAST((JULIANDAY(CreationDate) - JULIANDAY(q.CreationDate)) * 1440.0 AS INT)) AS "Log Time (m)", LOG(10, COUNT(*)) FROM Posts AS q INNER JOIN Posts AS a ON a.ParentId = q.Id LEFT OUTER JOIN Posts AS a2 ON a.ParentId = a2.ParentId AND a.CreationDate > a2.CreationDate WHERE a2.Id IS NULL AND a.CreationDate ... | Questions counted by time to first answer (w/o 24 hr restriction, log/log axis). | CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDispl... |
SELECT COUNT(built) FROM table_1886270_1 WHERE hr_name = "River Ness" | When river ness is the hr name how many builts are there? | CREATE TABLE table_1886270_1 (built VARCHAR, hr_name VARCHAR) |
SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower LIMIT 1 | Which model of the car has the minimum horsepower? | CREATE TABLE CARS_DATA (Id VARCHAR, horsepower VARCHAR); CREATE TABLE CAR_NAMES (Model VARCHAR, MakeId VARCHAR) |
SELECT "Copa Libertadores 1992" FROM table_5223 WHERE "Supercopa Sudamericana 1992" = 'round of 16' AND "Team" = 'grêmio' | Which Copa Libertadores 1992 has a Supercopa Sudamericana 1992 of round of 16, and a Team of gr mio? | CREATE TABLE table_5223 (
"Team" text,
"Copa Libertadores 1992" text,
"Supercopa Sudamericana 1992" text,
"Copa CONMEBOL 1992" text,
"Recopa Sudamericana 1992" text,
"Intercontinental Cup 1992" text
) |
SELECT MAX(opponents) FROM table_18847736_2 WHERE opponent = "at Minnesota Vikings" | How many opponents are at Minnesota Vikings? | CREATE TABLE table_18847736_2 (opponents INTEGER, opponent VARCHAR) |
SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT AVG(Weight) FROM CARS_DATA) | Find the model of the car whose weight is below the average weight. | CREATE TABLE CARS_DATA (Id VARCHAR, Weight INTEGER); CREATE TABLE CARS_DATA (Weight INTEGER); CREATE TABLE CAR_NAMES (model VARCHAR, MakeId VARCHAR) |
SELECT DISTINCT program_requirement.additional_req, program_requirement.category, program_requirement.min_credit, program.name FROM program, program_requirement WHERE program.name LIKE '%CS-LSA%' AND program.program_id = program_requirement.program_id | Display requirements for a degree in CS-LSA . | CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE course (
c... |
SELECT date FROM table_18847736_2 WHERE opponent = "New England Patriots" | What is the date when the opponent is the New England Patriots? | CREATE TABLE table_18847736_2 (date VARCHAR, opponent VARCHAR) |
SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970' | Find the name of the makers that produced some cars in the year of 1970? | CREATE TABLE MODEL_LIST (Maker VARCHAR, model VARCHAR); CREATE TABLE CAR_MAKERS (Maker VARCHAR, Id VARCHAR); CREATE TABLE CARS_DATA (id VARCHAR, year VARCHAR); CREATE TABLE CAR_NAMES (model VARCHAR, MakeId VARCHAR) |
SELECT "Name" FROM table_75047 WHERE "Winner" = 's. loeb' AND "Length" = '13.04km' AND "Stage" = 'ss12' | What is the Name of the stage with S. Loeb as the Winner with a Length of 13.04km and a Stage of SS12? | CREATE TABLE table_75047 (
"Stage" text,
"Time" text,
"Name" text,
"Length" text,
"Winner" text
) |
SELECT date FROM table_18847736_2 WHERE dolphins_points = 6 | How many dates do the dolphins have 6 points? | CREATE TABLE table_18847736_2 (date VARCHAR, dolphins_points VARCHAR) |
SELECT T2.Make, T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT MIN(YEAR) FROM CARS_DATA) | Find the make and production time of the cars that were produced in the earliest year? | CREATE TABLE CARS_DATA (YEAR INTEGER); CREATE TABLE CAR_NAMES (Make VARCHAR, MakeId VARCHAR); CREATE TABLE CARS_DATA (Year VARCHAR, Id VARCHAR) |
SELECT "Location" FROM table_14078 WHERE "Mascot" = 'mustangs' | Where is the school located that has mustangs as a mascot? | CREATE TABLE table_14078 (
"School" text,
"Location" text,
"Mascot" text,
"Enrollment" real,
"IHSAA Class" text,
"# / County" text
) |
SELECT country FROM table_18862490_2 WHERE player = "Robert Allenby" | What country does robert allenby represent? | CREATE TABLE table_18862490_2 (country VARCHAR, player VARCHAR) |
SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980 | Which distinct car models are the produced after 1980? | CREATE TABLE CARS_DATA (id VARCHAR, year INTEGER); CREATE TABLE MODEL_LIST (model VARCHAR); CREATE TABLE CAR_NAMES (model VARCHAR, MakeId VARCHAR) |
SELECT "Away captain" FROM table_42818 WHERE "Date" = '11,12,13 aug 1902' | Who is the Away captain that played on 11,12,13 Aug 1902? | CREATE TABLE table_42818 (
"Date" text,
"Home captain" text,
"Away captain" text,
"Venue" text,
"Result" text
) |
SELECT to_par FROM table_18862490_2 WHERE year = 1998 | What score to par won in 1998? | CREATE TABLE table_18862490_2 (to_par VARCHAR, year VARCHAR) |
SELECT T1.Continent, COUNT(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent | How many car makers are there in each continents? List the continent name and the count. | CREATE TABLE COUNTRIES (continent VARCHAR, CountryId VARCHAR); CREATE TABLE CONTINENTS (Continent VARCHAR, ContId VARCHAR); CREATE TABLE car_makers (Country VARCHAR) |
SELECT Type, AVG(Tonnage) FROM ship GROUP BY Type ORDER BY AVG(Tonnage) | Show different types of ships and the average tonnage of ships of each type Show bar chart, sort Y in asc order. | CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
)
CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
) |
SELECT player FROM table_18862490_2 WHERE score = 64 - 70 - 67 - 69 = 270 | What player(s) had the score of 64-70-67-69=270? | CREATE TABLE table_18862490_2 (player VARCHAR, score VARCHAR) |
SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country ORDER BY COUNT(*) DESC LIMIT 1 | Which of the countries has the most car makers? List the country name. | CREATE TABLE CAR_MAKERS (Country VARCHAR); CREATE TABLE COUNTRIES (CountryName VARCHAR, CountryId VARCHAR) |
SELECT "Vice President" FROM table_55249 WHERE "President" = 'daniel masny' AND "Treasurer" = 'rebecca t. altmann' | Which Vice President has a President of daniel masny, and a Treasurer of rebecca t. altmann? | CREATE TABLE table_55249 (
"Year" text,
"President" text,
"Vice President" text,
"Gen.-Secretary" text,
"Treasurer" text
) |
SELECT player FROM table_18862490_2 WHERE score = 64 - 71 - 67 - 67 = 269 | What players had teh score of 64-71-67-67=269? | CREATE TABLE table_18862490_2 (player VARCHAR, score VARCHAR) |
SELECT COUNT(*), t2.fullname FROM model_list AS t1 JOIN car_makers AS t2 ON t1.maker = t2.id GROUP BY t2.id | How many car models are produced by each maker ? Only list the count and the maker full name . | CREATE TABLE model_list (maker VARCHAR); CREATE TABLE car_makers (fullname VARCHAR, id VARCHAR) |
SELECT thursday FROM table_11019212_1 WHERE location = "Hawthorne" | what's the thursday time with location being hawthorne | CREATE TABLE table_11019212_1 (
thursday VARCHAR,
location VARCHAR
) |
SELECT MIN(year) FROM table_18862490_2 WHERE score = 68 - 66 - 68 - 71 = 273 | What is the first yar that someone won with a score of 68-66-68-71=273? | CREATE TABLE table_18862490_2 (year INTEGER, score VARCHAR) |
SELECT COUNT(*), T2.FullName, T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id | What is the number of car models that are produced by each maker and what is the id and full name of each maker? | CREATE TABLE CAR_MAKERS (FullName VARCHAR, id VARCHAR, Id VARCHAR); CREATE TABLE MODEL_LIST (Maker VARCHAR) |
SELECT product_name, product_id FROM products WHERE product_price BETWEEN 600 AND 700 | Return the names and ids of all products whose price is between 600 and 700. | CREATE TABLE supplier_addresses (
supplier_id number,
address_id number,
date_from time,
date_to time
)
CREATE TABLE department_store_chain (
dept_store_chain_id number,
dept_store_chain_name text
)
CREATE TABLE products (
product_id number,
product_type_code text,
product_name tex... |
SELECT COUNT(socialist) FROM table_1886589_1 WHERE lead = "12.6%" | How many socialist have a lead of 12.6%? | CREATE TABLE table_1886589_1 (socialist VARCHAR, lead VARCHAR) |
SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)' | What is the accelerate of the car make amc hornet sportabout (sw)? | CREATE TABLE CARS_DATA (Accelerate VARCHAR, Id VARCHAR); CREATE TABLE CAR_NAMES (MakeId VARCHAR, Make VARCHAR) |
SELECT "Chassis" FROM table_50547 WHERE "Engine" = 'honda' AND "Sponsor" = 'motorola' | What is the Chassis of the Honda Engine with a Motorola sponsor? | CREATE TABLE table_50547 (
"Team" text,
"Chassis" text,
"Engine" text,
"Tire" text,
"Sponsor" text
) |
SELECT MIN(SOl) FROM table_1888157_1 | What is the lowest SOL? | CREATE TABLE table_1888157_1 (SOl INTEGER) |
SELECT COUNT(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france' | How many car makers are there in france? | CREATE TABLE COUNTRIES (CountryId VARCHAR, CountryName VARCHAR); CREATE TABLE CAR_MAKERS (Country VARCHAR) |
SELECT COUNT(number_of_seasons_in_top_division) FROM table_1510519_1 WHERE position_in_2012_13 = "005 5th" | How many seasons in the top division for the team that finished 005 5th in 2012-2013 | CREATE TABLE table_1510519_1 (
number_of_seasons_in_top_division VARCHAR,
position_in_2012_13 VARCHAR
) |
SELECT MAX(ga) FROM table_1888157_1 WHERE gf = 39 | What is the highest GA when GF is 39? | CREATE TABLE table_1888157_1 (ga INTEGER, gf VARCHAR) |
SELECT COUNT(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa' | How many car models are produced in the usa? | CREATE TABLE CAR_MAKERS (Id VARCHAR, Country VARCHAR); CREATE TABLE COUNTRIES (CountryId VARCHAR, CountryName VARCHAR); CREATE TABLE MODEL_LIST (Maker VARCHAR) |
SELECT "Chassis" FROM table_67986 WHERE "Engine" = 'ferrari flat-12' AND "Points" > '1' | A ferrari flat-12 engine with more than 1 point has what kind of chassis? | CREATE TABLE table_67986 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
) |
SELECT COUNT(record) FROM table_18904831_5 WHERE score = "W 70-66" | How many different records were there in the games that ended in w 70-66? | CREATE TABLE table_18904831_5 (record VARCHAR, score VARCHAR) |
SELECT AVG(mpg) FROM CARS_DATA WHERE Cylinders = 4 | What is the average miles per gallon(mpg) of the cars with 4 cylinders? | CREATE TABLE CARS_DATA (mpg INTEGER, Cylinders VARCHAR) |
SELECT MAX(lost) FROM table_name_15 WHERE team = "quetta zorawar" | What is the most number of losses for Quetta Zorawar? | CREATE TABLE table_name_15 (
lost INTEGER,
team VARCHAR
) |
SELECT record FROM table_18904831_5 WHERE high_rebounds = "Dydek (10)" | What was the record of the game in which Dydek (10) did the most high rebounds? | CREATE TABLE table_18904831_5 (record VARCHAR, high_rebounds VARCHAR) |
SELECT MIN(weight) FROM cars_data WHERE cylinders = 8 AND year = 1974 | What is the smallest weight of the car produced with 8 cylinders on 1974 ? | CREATE TABLE cars_data (weight INTEGER, cylinders VARCHAR, year VARCHAR) |
SELECT description FROM table_name_67 WHERE year_of_issue = 1983 AND weight = "3.50grams" | Which Description has a Year of Issue of 1983, and a Weight of 3.50grams? | CREATE TABLE table_name_67 (
description VARCHAR,
year_of_issue VARCHAR,
weight VARCHAR
) |
SELECT high_rebounds FROM table_18904831_5 WHERE high_points = "Sales (17)" | Who did the most high rebounds in the game where Sales (17) did the high points? | CREATE TABLE table_18904831_5 (high_rebounds VARCHAR, high_points VARCHAR) |
SELECT Maker, Model FROM MODEL_LIST | What are all the makers and models? | CREATE TABLE MODEL_LIST (Maker VARCHAR, Model VARCHAR) |
SELECT patients.gender FROM patients WHERE patients.subject_id = 1862 | whats the sex of patient 1862? | CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE charte... |
SELECT total_footage_remaining_from_missing_episodes__mm AS :ss_ FROM table_1889619_5 WHERE story_no = "018" AND source = "Private individual" | When a private individual is the source and 018 is the story number what is the total footage remaining from missing episodes (mm:ss)? | CREATE TABLE table_1889619_5 (total_footage_remaining_from_missing_episodes__mm VARCHAR, story_no VARCHAR, source VARCHAR) |
SELECT T1.CountryName, T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING COUNT(*) >= 1 | What are the countries having at least one car maker? List name and id. | CREATE TABLE CAR_MAKERS (Country VARCHAR); CREATE TABLE COUNTRIES (CountryName VARCHAR, CountryId VARCHAR) |
SELECT MAX(top_5) FROM table_1708014_1 WHERE top_10 = 5 AND team_s_ = "#40 Chip Ganassi Racing" | For team #40 chip ganassi racing which top 5 is the highest where top 10 is 5? | CREATE TABLE table_1708014_1 (
top_5 INTEGER,
top_10 VARCHAR,
team_s_ VARCHAR
) |
SELECT country_territory FROM table_1889619_5 WHERE story_no = "032" AND missing_episodes_with_recovered_footage = "Episode 4" | When episode 4 is the missing episode with recovered footage and the 032 is the story number what is the country/territory? | CREATE TABLE table_1889619_5 (country_territory VARCHAR, story_no VARCHAR, missing_episodes_with_recovered_footage VARCHAR) |
SELECT COUNT(*) FROM CARS_DATA WHERE horsepower > 150 | What is the number of the cars with horsepower more than 150? | CREATE TABLE CARS_DATA (horsepower INTEGER) |
SELECT "County" FROM table_75627 WHERE "Median household income" = '$46,872' | What County has a Median household income of $46,872? | CREATE TABLE table_75627 (
"County" text,
"Per capita income" text,
"Median household income" text,
"Median family income" text,
"Population" real,
"Number of households" real
) |
SELECT MIN(game) FROM table_18894744_5 WHERE record = "8-3" | Name the least game for 8-3 | CREATE TABLE table_18894744_5 (game INTEGER, record VARCHAR) |
SELECT AVG(Weight), YEAR FROM CARS_DATA GROUP BY YEAR | What is the average weight of cars each year? | CREATE TABLE CARS_DATA (YEAR VARCHAR, Weight INTEGER) |
SELECT T1.role_description FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code WHERE T2.employee_name = "Koby" | What is the role of the employee named Koby? | CREATE TABLE ROLES (
role_description VARCHAR,
role_code VARCHAR
)
CREATE TABLE Employees (
role_code VARCHAR,
employee_name VARCHAR
) |
SELECT opponent FROM table_18894744_5 WHERE record = "10-4" | Name the opponent for record 10-4 | CREATE TABLE table_18894744_5 (opponent VARCHAR, record VARCHAR) |
SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING COUNT(*) >= 3 | Which countries in europe have at least 3 car manufacturers? | CREATE TABLE COUNTRIES (CountryName VARCHAR, Continent VARCHAR, CountryId VARCHAR); CREATE TABLE CONTINENTS (ContId VARCHAR, Continent VARCHAR); CREATE TABLE CAR_MAKERS (Country VARCHAR) |
SELECT T2.budget_type_code, T2.budget_type_description, T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_budget_codes AS T2 ON T1.budget_type_code = T2.budget_type_code | Show the budget type code and description and the corresponding document id. | CREATE TABLE Documents_with_expenses (
document_id VARCHAR,
budget_type_code VARCHAR
)
CREATE TABLE Ref_budget_codes (
budget_type_code VARCHAR,
budget_type_description VARCHAR
) |
SELECT high_rebounds FROM table_18894744_5 WHERE record = "7-1" | Name the high rebounds for record 7-1 | CREATE TABLE table_18894744_5 (high_rebounds VARCHAR, record VARCHAR) |
SELECT T2.horsepower, T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1 | What is the maximum horsepower and the make of the car models with 3 cylinders? | CREATE TABLE CAR_NAMES (Make VARCHAR, MakeId VARCHAR); CREATE TABLE CARS_DATA (horsepower VARCHAR, Id VARCHAR, cylinders VARCHAR) |
SELECT "Date" FROM table_60743 WHERE "Tournament" = 'izmir cup' AND "Opponent" = 'somdev devvarman' | What date was the Izmir Cup in which lhan played against Somdev Devvarman? | CREATE TABLE table_60743 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
) |
SELECT game FROM table_18894744_5 WHERE date = "June 16" | Name the game for june 16 | CREATE TABLE table_18894744_5 (game VARCHAR, date VARCHAR) |
SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC LIMIT 1 | Which model saves the most gasoline? That is to say, have the maximum miles per gallon. | CREATE TABLE CAR_NAMES (Model VARCHAR, MakeId VARCHAR); CREATE TABLE CARS_DATA (Id VARCHAR, mpg VARCHAR) |
SELECT COUNT(*) FROM table_204_724 WHERE "outcome" = 'winner' | how many winners are there ? | CREATE TABLE table_204_724 (
id number,
"outcome" text,
"no." number,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents in the final" text,
"score in the final" text
) |
SELECT game FROM table_18894744_5 WHERE date = "June 7" | Name the game for june 7 | CREATE TABLE table_18894744_5 (game VARCHAR, date VARCHAR) |
SELECT t1.model FROM car_names AS t1 JOIN cars_data AS t2 ON t1.makeid = t2.id ORDER BY t2.mpg DESC LIMIT 1 | What is the car model with the highest mpg ? | CREATE TABLE cars_data (id VARCHAR, mpg VARCHAR); CREATE TABLE car_names (model VARCHAR, makeid VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.