table stringlengths 33 7.14k | question stringlengths 4 1.06k | output stringlengths 2 4.44k ⌀ |
|---|---|---|
CREATE TABLE table_25691838_2 (
guest VARCHAR,
production_code VARCHAR
) | Who were the guests in the episode with production code 6021? | SELECT guest FROM table_25691838_2 WHERE production_code = 6021 |
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... | let me know the birth date and preferred language of patient james sloan. | SELECT demographic.dob, demographic.language FROM demographic WHERE demographic.name = "James Sloan" |
CREATE TABLE table_30345 (
"Character" text,
"Game" text,
"Platform" text,
"Status" text,
"Mystic Arte" text,
"Character Voice" text
) | How many mystic arte have hisui (jadeite) hearts 1 as the character? | SELECT COUNT("Mystic Arte") FROM table_30345 WHERE "Character" = 'Hisui (Jadeite) Hearts 1' |
CREATE TABLE table_name_92 (
team VARCHAR,
qual_2 VARCHAR
) | What team had a qual 2 time of 58.385? | SELECT team FROM table_name_92 WHERE qual_2 = "58.385" |
CREATE TABLE table_5514 (
"Game" real,
"January" real,
"Opponent" text,
"Score" text,
"Record" text
) | What is the sum of games for a record of 33-13-3? | SELECT SUM("Game") FROM table_5514 WHERE "Record" = '33-13-3' |
CREATE TABLE table_62721 (
"Elector" text,
"Place of birth" text,
"Cardinalatial title" text,
"Elevated" text,
"Elevator" text
) | Who is the elevator with the cardinalatial title of Deacon of SS. Sergio e Bacco? | SELECT "Elevator" FROM table_62721 WHERE "Cardinalatial title" = 'deacon of ss. sergio e bacco' |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugst... | how many hours have passed since the first time patient 006-133605 has taken a bicarbonate lab test in the current hospital encounter? | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', lab.labresulttime)) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-133605' AND patient.hos... |
CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(50),
building_phone VARCHAR(80)
)
CREATE TABLE Guests (
guest_id INTEGER,
... | Show the number of apartment bookings in each year and bin booking end date by year with a bar chart. | SELECT booking_end_date, COUNT(booking_end_date) FROM Apartment_Bookings |
CREATE TABLE table_72126 (
"Nation" text,
"Population (thousands)" real,
"Internet subscriptions (2000) (thousands of users)" real,
"Internet subscriptions (2008) (thousands of users)" real,
"% growth (2000\u20132008)" real,
"% Internet users" real
) | What is the maximum percentage grown 2000-2008 in burundi | SELECT MAX("% growth (2000\u20132008)") FROM table_72126 WHERE "Nation" = 'Burundi' |
CREATE TABLE table_2668336_17 (
incumbent VARCHAR,
candidates VARCHAR
) | The candidates Charles Fisher (DR) 65.1% W. Jones (F) 34.9% is for what incumbent? | SELECT incumbent FROM table_2668336_17 WHERE candidates = "Charles Fisher (DR) 65.1% W. Jones (F) 34.9%" |
CREATE TABLE table_43631 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) | What is Location, when Round is '1', and when Opponent is 'Joe Slick'? | SELECT "Location" FROM table_43631 WHERE "Round" = '1' AND "Opponent" = 'joe slick' |
CREATE TABLE table_4214 (
"Skip (Club)" text,
"W" real,
"L" real,
"PF" real,
"PA" real,
"Ends Won" real,
"Ends Lost" real,
"Blank Ends" real,
"Stolen Ends" real
) | When 6 is the w what is the pa? | SELECT "PA" FROM table_4214 WHERE "W" = '6' |
CREATE TABLE table_37453 (
"Team" text,
"Driver" text,
"Laps" real,
"Time" text,
"Grid" real
) | What is the lowest laps a grid less than 22 with a time of +35.268 has? | SELECT MIN("Laps") FROM table_37453 WHERE "Grid" < '22' AND "Time" = '+35.268' |
CREATE TABLE table_62362 (
"Week" text,
"Date" text,
"Home team" text,
"Away team" text,
"Venue" text
) | What is the home team in week 1? | SELECT "Home team" FROM table_62362 WHERE "Week" = '1' |
CREATE TABLE table_38203 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the leowest number of Bronze medals for Jamaica who ranked less than 4 and had more than 0 silver medals and a total of less than 22 medals? | SELECT MIN("Bronze") FROM table_38203 WHERE "Silver" > '0' AND "Rank" < '4' AND "Nation" = 'jamaica' AND "Total" < '22' |
CREATE TABLE table_name_73 (
venue VARCHAR,
result VARCHAR
) | What venue has a Result of 3-0? | SELECT venue FROM table_name_73 WHERE result = "3-0" |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id numbe... | how much difference was patient 13782's change of heart rate last measured on the first icu visit compared to the value first measured on the first icu visit? | SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 13782) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND chartevents.item... |
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
... | Mkt Mngmtin Sport were , are , or will be taught by whom ? | SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN course ON course.course_id = course_offering.course_id WHERE course.name L... |
CREATE TABLE table_25503 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | How many attended on december 2? | SELECT COUNT("Location Attendance") FROM table_25503 WHERE "Date" = 'December 2' |
CREATE TABLE table_15197 (
"Name" text,
"Hair Color:" text,
"Eye Color:" text,
"Release Date" text,
"Retired?" text
) | What is the release date for gold hair color? | SELECT "Release Date" FROM table_15197 WHERE "Hair Color:" = 'gold' |
CREATE TABLE table_44076 (
"Season" text,
"Series" text,
"Team" text,
"Races" text,
"Wins" text,
"Poles" text,
"F/Laps" text,
"Podiums" text,
"Points" text,
"Pos." text
) | what is the f/laps when the season is 2011 and races is 18? | SELECT "F/Laps" FROM table_44076 WHERE "Season" = '2011' AND "Races" = '18' |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | Give me the comparison about Team_ID over the All_Neutral by a bar chart, show from high to low by the All_Neutral please. | SELECT All_Neutral, Team_ID FROM basketball_match ORDER BY All_Neutral DESC |
CREATE TABLE table_53312 (
"Name" text,
"Circuit" text,
"Date" text,
"Winning driver" text,
"Winning constructor" text,
"Report" text
) | Name the report with cuban race | SELECT "Report" FROM table_53312 WHERE "Name" = 'cuban race' |
CREATE TABLE table_19998428_3 (
san_javier_municipality___percentage_ VARCHAR,
cuatro_cañadas_municipality___percentage_ VARCHAR
) | What is the San Javier municipality percentage if the Cuatro Ca adas municipality percentage is 202? | SELECT san_javier_municipality___percentage_ FROM table_19998428_3 WHERE cuatro_cañadas_municipality___percentage_ = "202" |
CREATE TABLE table_name_48 (
car VARCHAR,
yards VARCHAR,
avg VARCHAR
) | How many carries for the player with under 6 yards and an average of over 5? | SELECT COUNT(car) FROM table_name_48 WHERE yards < 6 AND avg > 5 |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CRE... | in 2102, how many patients were diagnosed with diabetes mellitus - type ii during the same hospital encounter after the previous diagnosis of malignancy - primary lung cancer? | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'malignancy - primary lung cancer' AND STRFTIME('%y', diagnosis.diagnosist... |
CREATE TABLE table_1206114_2 (
implementation VARCHAR,
netflow_version VARCHAR
) | What is the implementation when the netflow version is v5, v8, v9, ipfix? | SELECT implementation FROM table_1206114_2 WHERE netflow_version = "v5, v8, v9, IPFIX" |
CREATE TABLE table_17253 (
"Station Number" text,
"District" text,
"Location" text,
"Type" text,
"Appliances" text,
"Registrations" text
) | what are all the type where location is st ives, cambridgeshire | SELECT "Type" FROM table_17253 WHERE "Location" = 'St Ives, Cambridgeshire' |
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
CREATE TABLE Reviewer (
rID int,
name text
)
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
) | Show me a bar chart for how many movie reviews does each director get?, and display the total number in ascending order. | SELECT director, COUNT(*) FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director ORDER BY COUNT(*) |
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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | how many patients whose admission year is less than 2146 and procedure long title is repair of fistula involving bladder and intestine? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2146" AND procedures.long_title = "Repair of fistula involving bladder and intestine" |
CREATE TABLE table_11621915_1 (
winner VARCHAR,
purse__$__ VARCHAR,
date VARCHAR
) | what's the winner with purse( $ ) value of bigger than 964017.2297960471 and date value of may 28 | SELECT winner FROM table_11621915_1 WHERE purse__$__ > 964017.2297960471 AND date = "May 28" |
CREATE TABLE table_name_28 (
height_ft___m VARCHAR,
year VARCHAR,
name VARCHAR
) | What is the height that has a year after 1983 and is named Phoenix Tower? | SELECT height_ft___m FROM table_name_28 WHERE year > 1983 AND name = "phoenix tower" |
CREATE TABLE table_20738 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Ground" text,
"Crowd" real,
"Date" text
) | Who was the away team playing at Carlton? | SELECT "Away team" FROM table_20738 WHERE "Home team" = 'Carlton' |
CREATE TABLE table_name_96 (
opponent VARCHAR,
loss VARCHAR
) | Who was the opponent at the game that had a loss of Bell (6 9)? | SELECT opponent FROM table_name_96 WHERE loss = "bell (6–9)" |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | what is average days of hospital stay of patients whose primary disease is sternal wound infection? | SELECT AVG(demographic.days_stay) FROM demographic WHERE demographic.diagnosis = "STERNAL WOUND INFECTION" |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | Avid users under 18 years old.. | SELECT Id, DisplayName, Views AS Age, Reputation FROM Users WHERE Age < 18 AND Reputation >= 200 ORDER BY Age |
CREATE TABLE table_name_17 (
round VARCHAR,
date VARCHAR,
venue VARCHAR,
result VARCHAR
) | What is the round of the match at venue A with a result of 1-2 on 7 December 2004? | SELECT round FROM table_name_17 WHERE venue = "a" AND result = "1-2" AND date = "7 december 2004" |
CREATE TABLE table_name_2 (
film_or_series VARCHAR,
result VARCHAR,
category VARCHAR
) | Which film or series was nominated in the category of best fansite? | SELECT film_or_series FROM table_name_2 WHERE result = "nominated" AND category = "best fansite" |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instruc... | Are there any CAAS prerequisites for CS majors ? | SELECT DISTINCT course.department, course.name, course.number FROM program_course INNER JOIN course ON program_course.course_id = course.course_id WHERE course.department = 'CAAS' |
CREATE TABLE table_72208 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
) | What is the original air dates for the title 'firestorm'? | SELECT "Original air date" FROM table_72208 WHERE "Title" = 'Firestorm' |
CREATE TABLE table_8928 (
"Year" real,
"Date" text,
"Winner" text,
"Result" text,
"Location" text
) | What is Winner, when Location is Connie Mack Stadium, and when Year is 1946? | SELECT "Winner" FROM table_8928 WHERE "Location" = 'connie mack stadium' AND "Year" = '1946' |
CREATE TABLE table_30745 (
"IOC Code" text,
"Country" text,
"Network Station" text,
"Television Station" text,
"Radio Station" text
) | How many television station listing have a radio station as lao national radio? | SELECT COUNT("Television Station") FROM table_30745 WHERE "Radio Station" = 'Lao National Radio' |
CREATE TABLE table_name_75 (
tournament VARCHAR,
surface VARCHAR,
finalist VARCHAR
) | Where was the tournament where the match was on a hard surface and jan-michael gambill (19) was the finalist? | SELECT tournament FROM table_name_75 WHERE surface = "hard" AND finalist = "jan-michael gambill (19)" |
CREATE TABLE table_2171 (
"English Name" text,
"Simplified Chinese" text,
"Traditional Chinese" text,
"Pinyin" text,
"Area" real,
"Population" real,
"Density" real
) | What is the total number of areas that are called Nanqiao District? | SELECT COUNT("Area") FROM table_2171 WHERE "English Name" = 'Nanqiao District' |
CREATE TABLE table_25030512_12 (
candidates VARCHAR,
district VARCHAR,
first_elected VARCHAR
) | When 2010 is the first elected and Florida 7 is the district who are the candidates? | SELECT candidates FROM table_25030512_12 WHERE district = "Florida 7" AND first_elected = "2010" |
CREATE TABLE table_204_392 (
id number,
"#" number,
"stadium" text,
"capacity" number,
"city" text,
"country" text,
"domed or retractable roof" text
) | which is the only stadium on the list that is in kazakhstan ? | SELECT "stadium" FROM table_204_392 WHERE "country" = 'kazakhstan' |
CREATE TABLE table_name_82 (
year INTEGER,
title VARCHAR
) | What is the highest year for the title, 'loves lost and found'? | SELECT MAX(year) FROM table_name_82 WHERE title = "loves lost and found" |
CREATE TABLE table_name_93 (
club VARCHAR,
played VARCHAR,
lost VARCHAR
) | What club has a played number of 19, and the lost of 14? | SELECT club FROM table_name_93 WHERE played = "19" AND lost = "14" |
CREATE TABLE table_40788 (
"Abbr." text,
"Political Leader" text,
"International Affiliation" text,
"Votes ( 2012 )" text,
"House of Rep. seats" real,
"Senate seats" real,
"European Parliament seats" real
) | What is the average number of House of Representatives seats had an abbreviation of d66? | SELECT AVG("House of Rep. seats") FROM table_40788 WHERE "Abbr." = 'd66' |
CREATE TABLE table_name_48 (
average INTEGER,
evening_gown VARCHAR
) | What is the lowest average score where the evening gown score was 8.811? | SELECT MIN(average) FROM table_name_48 WHERE evening_gown = 8.811 |
CREATE TABLE phone (
Name text,
Phone_ID int,
Memory_in_G int,
Carrier text,
Price real
)
CREATE TABLE market (
Market_ID int,
District text,
Num_of_employees int,
Num_of_shops real,
Ranking int
)
CREATE TABLE phone_market (
Market_ID int,
Phone_ID text,
Num_of_stoc... | Show different carriers of phones together with the number of phones with each carrier by a bar chart, could you rank by the Y in asc? | SELECT Carrier, COUNT(*) FROM phone GROUP BY Carrier ORDER BY COUNT(*) |
CREATE TABLE table_17571 (
"Condition" text,
"Prothrombin time" text,
"Partial thromboplastin time" text,
"Bleeding time" text,
"Platelet count" text
) | How in prothrombin affected by glanzmann's thrombasthenia. | SELECT "Prothrombin time" FROM table_17571 WHERE "Condition" = 'Glanzmann''s thrombasthenia' |
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREA... | show me all flights from DENVER to BALTIMORE | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMO... |
CREATE TABLE table_4038 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | How many different college/junior/club teams had player John Dzikowski? | SELECT COUNT("College/junior/club team") FROM table_4038 WHERE "Player" = 'John Dzikowski' |
CREATE TABLE dorm (
gender VARCHAR
) | Find the number of distinct gender for dorms. | SELECT COUNT(DISTINCT gender) FROM dorm |
CREATE TABLE table_2467 (
"Week #" text,
"Theme" text,
"Song choice" text,
"Original artist" text,
"Order #" text,
"Result" text
) | Which week is the theme n/a | SELECT "Week #" FROM table_2467 WHERE "Theme" = 'N/A' |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREA... | what is patient 006-21388's minimum respiration value on 06/08/last year? | SELECT MIN(vitalperiodic.respiration) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-21388')) AND NOT vitalperiodic.respiration IS ... |
CREATE TABLE table_38541 (
"Station Code" text,
"Station" text,
"Arrival" text,
"Departure" text,
"Kilometers" real
) | What is listede for Departure that also has a Station Code of CLT? | SELECT "Departure" FROM table_38541 WHERE "Station Code" = 'clt' |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost numbe... | has patient 006-124193 underwent any lab test in 12/2105? | SELECT COUNT(*) > 0 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-124193')) AND STRFTIME('%y-%m', lab.labresulttime) = '2105-12' |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | Give me the comparison about School_ID over the ACC_Road , and group by attribute ACC_Home by a bar chart. | SELECT ACC_Road, School_ID FROM basketball_match GROUP BY ACC_Home, ACC_Road |
CREATE TABLE table_13487 (
"Date" text,
"Japan" text,
"Americas" text,
"Other" text,
"Total" text
) | What are the sales in Japan for the release totaling 1.82 million? | SELECT "Japan" FROM table_13487 WHERE "Total" = '1.82 million' |
CREATE TABLE table_45539 (
"Season" real,
"Premiere" text,
"Finale" text,
"Rank" text,
"Rating" text
) | What was the date of the premiere that had a 20.9 rating? | SELECT "Premiere" FROM table_45539 WHERE "Rating" = '20.9' |
CREATE TABLE film (
Director VARCHAR
) | List the distinct director of all films. | SELECT DISTINCT Director FROM film |
CREATE TABLE table_26242 (
"Episode Title" text,
"Song(s) Title" text,
"Writer" text,
"Singer(s)" text,
"Album(s)" text
) | What album was the song Shimmy Jimmy from the episode titled Toy to the world on? | SELECT "Album(s)" FROM table_26242 WHERE "Episode Title" = 'Toy to the World' AND "Song(s) Title" = 'Shimmy Jimmy' |
CREATE TABLE table_15081 (
"category" text,
"1999" text,
"2000" text,
"2001" text,
"2004" text
) | What car was awarded sub 1 litre in 2000? | SELECT "2000" FROM table_15081 WHERE "category" = 'sub 1 litre' |
CREATE TABLE table_name_41 (
circuit VARCHAR,
winning_team VARCHAR
) | What circuit saw Cabin Racing as the winning team? | SELECT circuit FROM table_name_41 WHERE winning_team = "cabin racing" |
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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | what is maximum age of patients whose insurance is medicaid and ethnicity is black/cape verdean? | SELECT MAX(demographic.age) FROM demographic WHERE demographic.insurance = "Medicaid" AND demographic.ethnicity = "BLACK/CAPE VERDEAN" |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
... | how many hours it's been since the first time patient 006-105495 was prescribed acetaminophen during this hospital visit? | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', medication.drugstarttime)) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-10... |
CREATE TABLE table_27715173_10 (
score VARCHAR,
high_rebounds VARCHAR
) | What was the team score when Tim Duncan (12) got the high rebounds? | SELECT score FROM table_27715173_10 WHERE high_rebounds = "Tim Duncan (12)" |
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... | what is admission time of subject name stephanie suchan? | SELECT demographic.admittime FROM demographic WHERE demographic.name = "Stephanie Suchan" |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | what is primary disease and procedure short title of subject id 4342? | SELECT demographic.diagnosis, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "4342" |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | For those records from the products and each product's manufacturer, find name and price , and group by attribute founder, and visualize them by a bar chart, and I want to rank x-axis in asc order. | SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name ORDER BY T1.Name |
CREATE TABLE table_17040 (
"Player" text,
"Position" text,
"School" text,
"Hometown" text,
"MLB Draft" text
) | What school did the player Ethan Bennett attend? | SELECT "School" FROM table_17040 WHERE "Player" = 'Ethan Bennett' |
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
t... | For which classes could I earn 1 credits ? | SELECT DISTINCT name, number FROM course WHERE credits = 1 AND department = 'EECS' |
CREATE TABLE table_23026 (
"No." real,
"Country" text,
"Local title" text,
"Format" text,
"Start Date" text,
"End Date" text,
"Episodes" text,
"Premiere/Air Dates" text
) | When did the season with 1 team format premiere? | SELECT "Premiere/Air Dates" FROM table_23026 WHERE "Format" = '1 Team' |
CREATE TABLE table_name_22 (
date VARCHAR,
opponent VARCHAR
) | Tell me the date for new orleans saints | SELECT date FROM table_name_22 WHERE opponent = "new orleans saints" |
CREATE TABLE table_name_70 (
tournament VARCHAR
) | What is the 2011 Australian Open and a 2010 QF? | SELECT 2011 FROM table_name_70 WHERE tournament = "australian open" AND 2010 = "qf" |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | Display a pie chart for what are the names and prices of products that cost at least 180, sorted by price decreasing and name ascending? | SELECT Name, Price FROM Products WHERE Price >= 180 ORDER BY Price DESC, Name |
CREATE TABLE table_16066063_1 (
city_1 VARCHAR,
city_2 VARCHAR
) | Which city is listed first when Okinawa is listed as the second city? | SELECT city_1 FROM table_16066063_1 WHERE city_2 = "Okinawa" |
CREATE TABLE table_20684390_1 (
mccain_number VARCHAR,
obama_percentage VARCHAR
) | What is the total number of McCain vote totals where Obama percentages was 17.34%? | SELECT COUNT(mccain_number) FROM table_20684390_1 WHERE obama_percentage = "17.34%" |
CREATE TABLE table_49769 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location/Attendance" text,
"Record" text
) | What were the high points on june 20? | SELECT "High points" FROM table_49769 WHERE "Date" = 'june 20' |
CREATE TABLE gas_station (
station_id number,
open_year number,
location text,
manager_name text,
vice_manager_name text,
representative_name text
)
CREATE TABLE company (
company_id number,
rank number,
company text,
headquarters text,
main_industry text,
sales_billion ... | How many gas station are opened between 2000 and 2005? | SELECT COUNT(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005 |
CREATE TABLE table_23177573_1 (
original_air_date VARCHAR,
rank__week_ VARCHAR
) | What is the original air date of the episode that had a week ranking of 21? | SELECT original_air_date FROM table_23177573_1 WHERE rank__week_ = 21 |
CREATE TABLE table_73472 (
"States" text,
"No. of MLA/MPs" real,
"Value of each Vote" real,
"K.R. Narayanan (Votes)" real,
"K.R. Narayanan (Values)" real,
"T.N. Seshan (Votes)" real,
"T.N. Seshan (Values)" real,
"Invalid (Votes)" real,
"Invalid (Values)" real
) | Name the most kr votes for value of each vote for 208 | SELECT MAX("K.R. Narayanan (Votes)") FROM table_73472 WHERE "Value of each Vote" = '208' |
CREATE TABLE table_28627 (
"Region" text,
"Population" real,
"% of countrys population" text,
"Change in population since 1993" real,
"Change in % of countrys population since 1993" text
) | In what region was the change in % of the country's population since 1993 at 0.3? | SELECT "Region" FROM table_28627 WHERE "Change in % of countrys population since 1993" = '0.3' |
CREATE TABLE table_30238 (
"Round" text,
"Clubs remaining" real,
"Clubs involved" real,
"Winners from previous round" text,
"New entries this round" text,
"Leagues entering at this round" text
) | How many clubs were involved in the second round? | SELECT "Clubs involved" FROM table_30238 WHERE "Round" = 'Second round' |
CREATE TABLE table_14637853_3 (
title VARCHAR,
original_air_date VARCHAR
) | what's the title with original air date being september23,1995 | SELECT title FROM table_14637853_3 WHERE original_air_date = "September23,1995" |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | find out if the patient jerry deberry is still alive. | SELECT demographic.expire_flag FROM demographic WHERE demographic.name = "Jerry Deberry" |
CREATE TABLE table_name_87 (
losses INTEGER,
scored VARCHAR,
points VARCHAR
) | Which Losses has Scored of 9, and Points larger than 8? | SELECT AVG(losses) FROM table_name_87 WHERE scored = 9 AND points > 8 |
CREATE TABLE table_203_191 (
id number,
"year" number,
"group" text,
"award" text,
"result" text,
"notes" text
) | when was the last time rade serbedzija won an award for best actor ? | SELECT "year" FROM table_203_191 WHERE "award" = 'best actor' ORDER BY "year" DESC LIMIT 1 |
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 Lives_in (
stuid INTEGER,
dormid INTEGER,
room_number INTEGER
)
CREATE TABLE Has_amenity (
dormid... | Find the number of students who is older than 20 in each dorm. Visualize by pie chart. | SELECT dorm_name, COUNT(*) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.Age > 20 GROUP BY T3.dorm_name |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugsto... | whats the sex of patient 032-1755? | SELECT DISTINCT patient.gender FROM patient WHERE patient.uniquepid = '032-1755' |
CREATE TABLE table_name_66 (
height__m_ VARCHAR,
city VARCHAR,
height__ft_ VARCHAR
) | What is the height in meters for a building in Frankfurt that is 850 feet tall? | SELECT height__m_ FROM table_name_66 WHERE city = "frankfurt" AND height__ft_ = 850 |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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
)
... | provide the number of patients having catheter based invasive electrophysiologic testing and whose admission type is elective. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND procedures.long_title = "Catheter based invasive electrophysiologic testing" |
CREATE TABLE table_name_58 (
team__number1 VARCHAR
) | What is 1st Leg, when Team #1 is 'San Lorenzo'? | SELECT 1 AS st_leg FROM table_name_58 WHERE team__number1 = "san lorenzo" |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY... | For those employees who did not have any job in the past, return a line chart about the change of manager_id over hire_date , and could you order X-axis in ascending order? | SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY HIRE_DATE |
CREATE TABLE table_2668378_13 (
candidates VARCHAR,
incumbent VARCHAR
) | who was running where the winner is daniel montgomery | SELECT candidates FROM table_2668378_13 WHERE incumbent = "Daniel Montgomery" |
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 jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE locations (
LOCAT... | 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, return a bar chart about the distribution of job_id and the amount of job_id , and group by attribute job_id. | SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID |
CREATE TABLE table_name_18 (
week INTEGER,
game_site VARCHAR
) | What is the lowest week number for the game that was at milwaukee county stadium? | SELECT MIN(week) FROM table_name_18 WHERE game_site = "milwaukee county stadium" |
CREATE TABLE table_name_12 (
decision VARCHAR,
home VARCHAR
) | What was the decision in Minnesota? | SELECT decision FROM table_name_12 WHERE home = "minnesota" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.