answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT date FROM table_name_83 WHERE away_team = "melbourne" | On what date did the away team Melbourne play? | CREATE TABLE table_name_83 (date VARCHAR, away_team VARCHAR) |
SELECT date FROM table_22050544_3 WHERE event__number = "38M" | Event number 38m was held on which date? | CREATE TABLE table_22050544_3 (date VARCHAR, event__number VARCHAR) |
SELECT shirt_sponsor FROM table_25527255_2 WHERE team = "FC Bunyodkor" | Who is the shirt sponsor for FC Bunyodkor? | CREATE TABLE table_25527255_2 (
shirt_sponsor VARCHAR,
team VARCHAR
) |
SELECT home_team FROM table_name_56 WHERE away_team = "south melbourne" | What home team played the away team South Melbourne? | CREATE TABLE table_name_56 (home_team VARCHAR, away_team VARCHAR) |
SELECT winner FROM table_22050544_3 WHERE event = "$109 No Limit Hold'em w/rebuys [Turbo]" | Who won the $109 no limit hold'em w/rebuys [turbo]? | CREATE TABLE table_22050544_3 (winner VARCHAR, event VARCHAR) |
SELECT STU_FNAME, SUM(STU_GPA) FROM STUDENT WHERE STU_GPA < (SELECT AVG(STU_GPA) FROM STUDENT) GROUP BY STU_FNAME | Find the first name and gpa of the students whose gpa is lower than the average gpa of all students. Visualize by pie chart. | CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
)
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varchar(12),
EMP_INITIAL varchar(1),
EMP_J... |
SELECT MAX(area__sq_mi_) FROM table_name_88 WHERE county = "greenville county" | Which is the largest area in Greenville County, by square mile? | CREATE TABLE table_name_88 (area__sq_mi_ INTEGER, county VARCHAR) |
SELECT event FROM table_22050544_3 WHERE entries = "25,883" | Which event had 25,883 entries? | CREATE TABLE table_22050544_3 (event VARCHAR, entries VARCHAR) |
SELECT JOB_ID, SUM(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY JOB_ID | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, show me about the distribution of job_id and the sum of salary , and group by attribute job_id in a bar chart, list X in asc 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 jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE locations (
LOCATIO... |
SELECT SUM(2010 AS _census_population) FROM table_name_9 WHERE county = "oconee county" AND area__sq_mi_ < 674 | Which is the total number in the 2010 Census in Oconee County where the area in square miles was less than 674? | CREATE TABLE table_name_9 (county VARCHAR, area__sq_mi_ VARCHAR) |
SELECT COUNT(elapsed_time) FROM table_22050544_3 WHERE event = "$16.50 Fixed-Limit Badugi" | How many categories for elapsed time exist for the $16.50 fixed-limit badugi game? | CREATE TABLE table_22050544_3 (elapsed_time VARCHAR, event VARCHAR) |
SELECT diagnoses.icd9_code FROM diagnoses WHERE diagnoses.subject_id = "19420" | find the diagnosis icd9 code of subject id 19420. | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... |
SELECT particle FROM table_name_61 WHERE rest_mass_mev___c_2 = "1192.642(24)" | Which Particle has a Rest mass MeV/c 2 of 1192.642(24)? | CREATE TABLE table_name_61 (particle VARCHAR, rest_mass_mev___c_2 VARCHAR) |
SELECT year__ceremony_ FROM table_22032599_1 WHERE director = "Jaroslav Vojtek Category:Articles with hCards" | What year did jaroslav vojtek category:articles with hcards Direct? | CREATE TABLE table_22032599_1 (year__ceremony_ VARCHAR, director VARCHAR) |
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id WHERE (area.area LIKE '%Film and Cinema Studies%' OR course.description LIKE '%Film and Cinema Studies%' OR course.name LIKE '%Film and Cinema Studies%') AND course.enforced_requirement = 'N / ... | Which Film and Cinema Studies courses do n't have prerequisites ? | CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additio... |
SELECT particle FROM table_name_41 WHERE isospin_i = "1" AND commonly_decays_to = "p + + π 0 or n 0 + π +" | Which Particle has an Isospin I of 1 and Commonly decays to p + + π 0 or n 0 + π +? | CREATE TABLE table_name_41 (particle VARCHAR, isospin_i VARCHAR, commonly_decays_to VARCHAR) |
SELECT result FROM table_22032599_1 WHERE film_title_used_in_nomination = "Gypsy" | What was the result for Gypsy? | CREATE TABLE table_22032599_1 (result VARCHAR, film_title_used_in_nomination VARCHAR) |
SELECT COUNT(perfect_stem) FROM table_12784134_24 WHERE short_stem = "jo" | Name the perfect stem for jo | CREATE TABLE table_12784134_24 (
perfect_stem VARCHAR,
short_stem VARCHAR
) |
SELECT rest_mass_mev___c_2 FROM table_name_58 WHERE makeup = "u s s" AND spin___parity___j_p = "3⁄2 +" | When the Makeup is u s s and the Spin (Parity) J P of 3⁄2 +, what is the Rest mass MeV/C2? | CREATE TABLE table_name_58 (rest_mass_mev___c_2 VARCHAR, makeup VARCHAR, spin___parity___j_p VARCHAR) |
SELECT COUNT(film_title_used_in_nomination) FROM table_22032599_1 WHERE director = "Martin Repka Category:Articles with hCards" | HOw many films did martin repka category:articles with hcards direct? | CREATE TABLE table_22032599_1 (film_title_used_in_nomination VARCHAR, director VARCHAR) |
SELECT "country" FROM table_204_126 GROUP BY "country" ORDER BY COUNT("player") DESC LIMIT 1 | which country had the most leaders ? | CREATE TABLE table_204_126 (
id number,
"place" text,
"player" text,
"country" text,
"score" text,
"to par" number,
"money ($)" number
) |
SELECT particle FROM table_name_37 WHERE isospin_i = "1⁄2" AND symbol = "ξ ∗0 (1530)" | Which Particle has an Isospin I of 1⁄2, and a Symbol of ξ ∗0 (1530)? | CREATE TABLE table_name_37 (particle VARCHAR, isospin_i VARCHAR, symbol VARCHAR) |
SELECT result FROM table_22032599_1 WHERE film_title_used_in_nomination = "City of the Sun" | What was the result for City of the Sun? | CREATE TABLE table_22032599_1 (result VARCHAR, film_title_used_in_nomination VARCHAR) |
SELECT "Written by" FROM table_16202 WHERE "Title" = 'Solo' | Who are the writers for the episode 'solo'? | CREATE TABLE table_16202 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text
) |
SELECT particle FROM table_name_85 WHERE makeup = "d s s" AND spin___parity___j_p = "3⁄2 +" | Which Particle has a Makeup of d s s and a Spin (Parity) J P of 3⁄2 +? | CREATE TABLE table_name_85 (particle VARCHAR, makeup VARCHAR, spin___parity___j_p VARCHAR) |
SELECT language_s_ FROM table_22034853_1 WHERE film_title_used_in_nomination = "Late Bloomers" | What was the language for the movie "Late Bloomers"? | CREATE TABLE table_22034853_1 (language_s_ VARCHAR, film_title_used_in_nomination VARCHAR) |
SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer' | When are the birthdays of customer who are classified as 'Good Customer' status? | CREATE TABLE Customers (
date_of_birth VARCHAR,
customer_status_code VARCHAR
) |
SELECT particle FROM table_name_11 WHERE rest_mass_mev___c_2 = "1383.7±1.0" | Which Particle has a Rest mass MeV/c 2 of 1383.7±1.0? | CREATE TABLE table_name_11 (particle VARCHAR, rest_mass_mev___c_2 VARCHAR) |
SELECT COUNT(original_title) FROM table_22034853_1 WHERE film_title_used_in_nomination = "If the Sun Never Returns" | How many original titles were listed as "If the Sun Never Returns"? | CREATE TABLE table_22034853_1 (original_title VARCHAR, film_title_used_in_nomination VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "WHITE" AND lab.label = "Protein/Creatinine Ratio" | provide the number of patients whose ethnicity is white and lab test name is protein/creatinine ratio? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... |
SELECT title FROM table_name_83 WHERE year = 2003 AND genre = "rap" | What was the title of Ashanti's 2003 rap song? | CREATE TABLE table_name_83 (title VARCHAR, year VARCHAR, genre VARCHAR) |
SELECT language_s_ FROM table_22034853_1 WHERE film_title_used_in_nomination = "Mein Name Ist Bach" | What was the language of "Mein Name Ist Bach"? | CREATE TABLE table_22034853_1 (language_s_ VARCHAR, film_title_used_in_nomination VARCHAR) |
SELECT AVG("Decile") FROM table_68051 WHERE "Authority" = 'state' AND "Name" = 'ruapehu college' | What is the average decile of Ruapehu college, which has a state authority? | CREATE TABLE table_68051 (
"Name" text,
"Years" text,
"Area" text,
"Authority" text,
"Decile" real,
"Roll" real
) |
SELECT MAX(tries) FROM table_name_49 WHERE player = "paul sykes" AND points > 0 | How many tries did the player Paul Sykes take when he earned 0 points? | CREATE TABLE table_name_49 (tries INTEGER, player VARCHAR, points VARCHAR) |
SELECT year__ceremony_ FROM table_22034853_1 WHERE original_title = "Vitus" | What was the year for the film "Vitus"? | CREATE TABLE table_22034853_1 (year__ceremony_ VARCHAR, original_title VARCHAR) |
SELECT MIN("release date") FROM table_203_607 | the release dates are no earlier than what year ? | CREATE TABLE table_203_607 (
id number,
"catalogue number" text,
"artist" text,
"release title" text,
"format" text,
"release date" text
) |
SELECT position FROM table_name_74 WHERE goals = 0 AND points = 28 AND player = "mike forshaw" | Mike Forshaw had 0 goals and 28 points. What is his position? | CREATE TABLE table_name_74 (position VARCHAR, player VARCHAR, goals VARCHAR, points VARCHAR) |
SELECT COUNT(film_title_used_in_nomination) FROM table_22034853_1 WHERE original_title = "Dans la ville blanche" | How many films are titled "Dans la Ville Blanche"? | CREATE TABLE table_22034853_1 (film_title_used_in_nomination VARCHAR, original_title VARCHAR) |
SELECT t.TagName, e.Body AS "Excerpt", w.Body AS "WikiBody" FROM Tags AS t LEFT JOIN Posts AS e ON t.ExcerptPostId = e.Id LEFT JOIN Posts AS w ON t.WikiPostId = w.Id ORDER BY t.TagName | Get name, excerpts and wiki content of all tags.. | CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,... |
SELECT SUM(crowd) FROM table_name_47 WHERE venue = "brunswick street oval" | How big is the Venue of Brunswick Street Oval? | CREATE TABLE table_name_47 (crowd INTEGER, venue VARCHAR) |
SELECT COUNT(written_by) FROM table_22053239_1 WHERE us_viewers__millions_ = "5.35" | How many of the writers had 5.35 viewers? | CREATE TABLE table_22053239_1 (written_by VARCHAR, us_viewers__millions_ VARCHAR) |
SELECT "Result" FROM table_32707 WHERE "Week" > '2' AND "Date" = 'december 27, 2004' | What's the result for the game held on December 27, 2004 with a week greater than 2? | CREATE TABLE table_32707 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Attendance" text
) |
SELECT away_team AS score FROM table_name_24 WHERE away_team = "north melbourne" | What is the Away Team score of North Melbourne? | CREATE TABLE table_name_24 (away_team VARCHAR) |
SELECT elapsed_time FROM table_22050544_4 WHERE prize = "$9,377.42" | What was the elapsed time for the championship that had $9,377.42 in prize money? | CREATE TABLE table_22050544_4 (elapsed_time VARCHAR, prize VARCHAR) |
SELECT "Player" FROM table_60949 WHERE "Money ( \u00a3 )" = '140,000' | Who is the player with 140,000? | CREATE TABLE table_60949 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( \u00a3 )" text
) |
SELECT killed FROM table_name_55 WHERE unit = "personal staff" | What was the number of Personal Staff Units Killed? | CREATE TABLE table_name_55 (killed VARCHAR, unit VARCHAR) |
SELECT prize AS Pool FROM table_22050544_4 WHERE event__number = "27H" | What was the prize pool for the event number 27H? | CREATE TABLE table_22050544_4 (prize VARCHAR, event__number VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.icd9_code = "27801" | Count the number of patients whose diagnosis icd9 code is 27801. | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... |
SELECT complement FROM table_name_53 WHERE killed = "0 off 0 men" AND wounded = "0 off 0 men" AND unit = "artillery corps" | What was the Complement of Artillery Corps Units that had 0 off 0 men Killed or Wounded? | CREATE TABLE table_name_53 (complement VARCHAR, unit VARCHAR, killed VARCHAR, wounded VARCHAR) |
SELECT event FROM table_22050544_4 WHERE event__number = "8M" | What is the event name with the number 8M? | CREATE TABLE table_22050544_4 (event VARCHAR, event__number VARCHAR) |
SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 85700) AND prescriptions.drug = 'hydrochlorothiazide' AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month') | does hydrochlorothiazide have been prescribed to patient 85700 during this month? | CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
... |
SELECT wounded FROM table_name_79 WHERE complement = "83 off 9 men" | How many were Wounded while in a Unit with a Complement of 83 off 9 Men? | CREATE TABLE table_name_79 (wounded VARCHAR, complement VARCHAR) |
SELECT COUNT(1980 AS __mil_) FROM table_22071705_6 WHERE country = "Soviet Union" | Name the total number 1980 mil for soviet union | CREATE TABLE table_22071705_6 (country VARCHAR) |
SELECT Registration_Date, COUNT(Registration_Date) FROM Voting_record ORDER BY COUNT(Registration_Date) DESC | Give me a bar chart shows the distinct registration date, and bin the date into the weekday interval in a bar chart, and sort by the y axis from high to low please. | CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Voting_record (
StuID INTEGER,
Registration_Date VARCHAR(12),
Election_Cycle VARCHAR(12),
Presiden... |
SELECT missing FROM table_name_89 WHERE killed = "0 off 0 men" AND wounded = "0 off 0 men" AND unit = "royal waggon train" | How many of the Royal Waggon Train Unit were Missing while having a Killed of 0 off 0 men and a Wounded of 0 off 0 men? | CREATE TABLE table_name_89 (missing VARCHAR, unit VARCHAR, killed VARCHAR, wounded VARCHAR) |
SELECT COUNT(languages) FROM table_22073745_1 WHERE film_title_used_in_nomination = "Elles" | How many languages have elles as the film title used in nomination? | CREATE TABLE table_22073745_1 (languages VARCHAR, film_title_used_in_nomination VARCHAR) |
SELECT COUNT(region) FROM table_2588674_1 WHERE village = "Mongmong-Toto-Maite" | How many places named mongmong-toto-maite? | CREATE TABLE table_2588674_1 (
region VARCHAR,
village VARCHAR
) |
SELECT wounded FROM table_name_24 WHERE killed = "0 off 0 men" AND unit = "artillery corps" | How many were Wounded in the Artillery Corps unit while having 0 off 0 men Killed? | CREATE TABLE table_name_24 (wounded VARCHAR, killed VARCHAR, unit VARCHAR) |
SELECT COUNT(languages) FROM table_22073745_1 WHERE film_title_used_in_nomination = "Refractaire" | How many languages is refractaire as the film title used in nomination? | CREATE TABLE table_22073745_1 (languages VARCHAR, film_title_used_in_nomination VARCHAR) |
SELECT selfAnswer.Id AS "post_link", question.Score AS QuestionScore, selfAnswer.Score AS AnswerScore, question.Tags FROM Posts AS question INNER JOIN Posts AS selfAnswer ON selfAnswer.OwnerUserId = question.OwnerUserId AND selfAnswer.ParentId = question.Id AND selfAnswer.Id = question.AcceptedAnswerId WHERE question.P... | self accepted answers in the given tag. | CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
... |
SELECT surface FROM table_name_38 WHERE opponent = "yevgeny kafelnikov" | What suface during the game that had Yevgeny Kafelnikov as an opponent? | CREATE TABLE table_name_38 (surface VARCHAR, opponent VARCHAR) |
SELECT COUNT(languages) FROM table_22073745_1 WHERE original_title = "Le Roman de Renart" | How many languages have le roman de renart as the original title? | CREATE TABLE table_22073745_1 (languages VARCHAR, original_title VARCHAR) |
SELECT "player" FROM table_203_226 WHERE "player" IN ('anthony mcgrath', 'tim bresnan') ORDER BY "strike rate" LIMIT 1 | who has a lower strike rate , anthony mcgrath or tim bresnan ? | CREATE TABLE table_203_226 (
id number,
"player" text,
"matches" number,
"innings" number,
"not out" number,
"runs" number,
"high score" number,
"average" number,
"strike rate" number,
"100s" number,
"50s" number
) |
SELECT MIN(week) FROM table_name_63 WHERE opponent = "san jose sabercats" | What was the earliest week that the Storm played the San Jose Sabercats? | CREATE TABLE table_name_63 (week INTEGER, opponent VARCHAR) |
SELECT director FROM table_22073745_1 WHERE original_title = "Perl oder Pica" | Who is the director of the original title perl oder pica? | CREATE TABLE table_22073745_1 (director VARCHAR, original_title VARCHAR) |
SELECT dates_active FROM table_10602294_1 WHERE deaths = "185km/h (115mph)" | What were the active dates for the storm that had 185km/h (115mph) deaths? | CREATE TABLE table_10602294_1 (
dates_active VARCHAR,
deaths VARCHAR
) |
SELECT attendance FROM table_name_33 WHERE score = "† 4–4 †" | How many were in attendance when the score was † 4–4 †? | CREATE TABLE table_name_33 (attendance VARCHAR, score VARCHAR) |
SELECT result FROM table_22073745_1 WHERE year__ceremony_ = "2005 (78th)" | What is the result of the 2005 (78th) year ceremony? | CREATE TABLE table_22073745_1 (result VARCHAR, year__ceremony_ VARCHAR) |
SELECT series FROM table_name_54 WHERE winner = "jetmir salaj" | What is Series, when Winner is Jetmir Salaj? | CREATE TABLE table_name_54 (
series VARCHAR,
winner VARCHAR
) |
SELECT attendance FROM table_name_95 WHERE runner_up = "livingston" | How many people were watching when Livingston was the runner-up? | CREATE TABLE table_name_95 (attendance VARCHAR, runner_up VARCHAR) |
SELECT title FROM table_22078691_2 WHERE us_viewers__millions_ = "14.59" | What is the title that has 14.59 u.s. viewers (millions)? | CREATE TABLE table_22078691_2 (title VARCHAR, us_viewers__millions_ VARCHAR) |
SELECT voice_actor__harmony_gold_ova_dub_ FROM table_name_10 WHERE voice_actor__adv_tv_sentai_ova_dub_ = "kim prause" | Who is the voice actor (harmony gold ova dub) of the character with a voice actor (adv TV/sentai ova dub) Kim Prause? | CREATE TABLE table_name_10 (
voice_actor__harmony_gold_ova_dub_ VARCHAR,
voice_actor__adv_tv_sentai_ova_dub_ VARCHAR
) |
SELECT AVG(grid) FROM table_name_36 WHERE laps > 52 AND driver = "andrea de adamich" | what average grid has laps larger than 52 and contains the driver of andrea de adamich? | CREATE TABLE table_name_36 (grid INTEGER, laps VARCHAR, driver VARCHAR) |
SELECT title FROM table_22078691_2 WHERE us_viewers__millions_ = "13.59" | What is the title that had 13.59 u.s. viewers (millions)? | CREATE TABLE table_22078691_2 (title VARCHAR, us_viewers__millions_ VARCHAR) |
SELECT home_team AS score FROM table_name_59 WHERE away_team = "geelong" | What was the score of the home team when the away team was Geelong? | CREATE TABLE table_name_59 (
home_team VARCHAR,
away_team VARCHAR
) |
SELECT MAX(laps) FROM table_name_34 WHERE driver = "graham hill" AND grid > 18 | what's the highest lap that contains the driver of graham hill and a grid that is larger than 18? | CREATE TABLE table_name_34 (laps INTEGER, driver VARCHAR, grid VARCHAR) |
SELECT money_list_rank FROM table_22081847_1 WHERE earnings__$_ = "309,886" | If the earning amount is $309,886, what is the money list ranking? | CREATE TABLE table_22081847_1 (money_list_rank VARCHAR, earnings__$_ VARCHAR) |
SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY AVG(EMPLOYEE_ID) | For those employees who was hired before 2002-06-21, a bar chart shows the distribution of job_id and the average of employee_id , and group by attribute job_id, sort in ascending by the y axis please. | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... |
SELECT AVG(grid) FROM table_name_81 WHERE time_retired = "piston" AND laps < 15 | what's the average grid that has a time/retired piston and laps smaller than 15? | CREATE TABLE table_name_81 (grid INTEGER, time_retired VARCHAR, laps VARCHAR) |
SELECT MAX(wins) FROM table_22081847_1 | What was the maximum number of wins? | CREATE TABLE table_22081847_1 (wins INTEGER) |
SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id = T2.id ORDER BY T2.dock_count DESC LIMIT 1 | What is the id of the trip that started from the station with the highest dock count? | CREATE TABLE station (
id number,
name text,
lat number,
long number,
dock_count number,
city text,
installation_date text
)
CREATE TABLE trip (
id number,
duration number,
start_date text,
start_station_name text,
start_station_id number,
end_date text,
end_stat... |
SELECT tuner FROM table_name_86 WHERE season > 2004 AND driver = "gaurav gill" AND team = "team mrf" AND governing_body = "mai" | Who is the tuner after season 2004 with Gaurav Gill as the driver, Team MRF, and Mai governing body? | CREATE TABLE table_name_86 (tuner VARCHAR, governing_body VARCHAR, team VARCHAR, season VARCHAR, driver VARCHAR) |
SELECT scoring_average FROM table_22081847_1 WHERE year = 2010 | If the year is 2010, what was the average score? | CREATE TABLE table_22081847_1 (scoring_average VARCHAR, year VARCHAR) |
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Yang Zhang%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offeri... | What classes will Dr. Yang Zhang be teaching this upcoming semester ? | CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
countr... |
SELECT driver FROM table_name_37 WHERE tuner = "n. leelakrishnan" AND governing_body = "mai" AND season = 2003 | Who is the driver in season 2003 with a tuner of N. Leelakrishnan and a Mai governing body? | CREATE TABLE table_name_37 (driver VARCHAR, season VARCHAR, tuner VARCHAR, governing_body VARCHAR) |
SELECT COUNT(event) FROM table_22083044_2 WHERE fastest_lap = "Tim Macrow" AND pole_position = "Joey Foster" | How many times did Tim Macrow and Joey Foster both got the fastest lap and pole position respectively? | CREATE TABLE table_22083044_2 (event VARCHAR, fastest_lap VARCHAR, pole_position VARCHAR) |
SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'neurosurgery - resection of avm')) GROUP BY ... | what is the maximum total hospital cost involving a procedure called a neurosurgery - resection of avm? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wa... |
SELECT tuner FROM table_name_23 WHERE team = "mrf" | Who is the turner on Team MRF? | CREATE TABLE table_name_23 (tuner VARCHAR, team VARCHAR) |
SELECT winning_team FROM table_22083044_2 WHERE circuit = "Queensland Raceway" AND fastest_lap = "Tim Macrow" | What was the winning team where Tim Macrow won the fastest lap on Queensland Raceway circuit? | CREATE TABLE table_22083044_2 (winning_team VARCHAR, circuit VARCHAR, fastest_lap VARCHAR) |
SELECT COUNT("representative") FROM table_204_887 WHERE "party" = 'republican' | how many representatives are republican ? | CREATE TABLE table_204_887 (
id number,
"district" number,
"representative" text,
"party" text,
"residence" text,
"counties represented" text
) |
SELECT MIN(season) FROM table_name_34 WHERE driver = "farad bathena" | What is the earliest season with driver Farad Bathena? | CREATE TABLE table_name_34 (season INTEGER, driver VARCHAR) |
SELECT MAX(no_in_series) FROM table_22078972_2 WHERE written_by = "David North" | What's the series number of the episode whose writer is David North? | CREATE TABLE table_22078972_2 (no_in_series INTEGER, written_by VARCHAR) |
SELECT MAX(played) FROM table_name_36 WHERE points > 11 AND lost > 7 | Can you tell me the highest Played that has the Points larger than 11, and the Lost larger than 7? | CREATE TABLE table_name_36 (
played INTEGER,
points VARCHAR,
lost VARCHAR
) |
SELECT MIN(goals) FROM table_name_63 WHERE league = "major league soccer" AND season = "2005" | Which Major League Soccer team for the 2005 season has the lowest goals? | CREATE TABLE table_name_63 (goals INTEGER, league VARCHAR, season VARCHAR) |
SELECT MAX(no_in_series) FROM table_22078972_2 WHERE us_viewers__millions_ = "17.04" | What's the series number of the episode seen by 17.04 million people in the US? | CREATE TABLE table_22078972_2 (no_in_series INTEGER, us_viewers__millions_ VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE procedures.icd9_code = "4601" AND prescriptions.route = "IV BOLUS" | count the number of patients on iv bolus route of drug administration who have procedure icd9 code 4601. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... |
SELECT AVG(apps) FROM table_name_43 WHERE league = "major league soccer" AND club = "seattle sounders fc" AND goals < 0 | What are the average apps for the Major League Soccer team club for the Seattle Sounders FC that has goals less than 0? | CREATE TABLE table_name_43 (apps INTEGER, goals VARCHAR, league VARCHAR, club VARCHAR) |
SELECT title FROM table_22078972_2 WHERE us_viewers__millions_ = "18.15" | What's the title of the episode first seen by 18.15 million people in the US? | CREATE TABLE table_22078972_2 (title VARCHAR, us_viewers__millions_ VARCHAR) |
SELECT MAX(rank) FROM table_name_87 WHERE wins__outdoor_ > 1 AND wins__indoor_ < 0 | Name the most rank for wins outdoor larger than 1 and wins indoor less than 0 | CREATE TABLE table_name_87 (
rank INTEGER,
wins__outdoor_ VARCHAR,
wins__indoor_ VARCHAR
) |
SELECT icelandic FROM table_name_59 WHERE danish = "blåt/blå" | Which Icelandic has a Danish of blåt/blå? | CREATE TABLE table_name_59 (icelandic VARCHAR, danish VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.