table stringlengths 33 7.14k | question stringlengths 4 1.06k | output stringlengths 2 4.44k ⌀ |
|---|---|---|
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,
... | Before I take MODGREEK 101 what classes do you recommend that I take ? | SELECT DISTINCT advisory_requirement FROM course WHERE department = 'MODGREEK' AND number = 101 |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtim... | how many patients received enteral feeds - tube feeding after cultures - urine since 2102 within 2 months? | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'cultures - urine' AND STRFTIME('%y', treatment.treatmenttime) >= '2102') AS t1 JOIN (SELECT patient.uniquepi... |
CREATE TABLE table_10418 (
"7:00 PM" text,
"8:00 PM" text,
"8:30 PM" text,
"9:00 PM" text,
"9:30 PM" text,
"10:00 PM" text
) | What shows for 9:00 PM when the 9:30 PM shows as specials? | SELECT "9:00 PM" FROM table_10418 WHERE "9:30 PM" = 'specials' |
CREATE TABLE table_177766_1 (
percentage VARCHAR,
abbreviation VARCHAR
) | What is the percentage of this constellation abbreviated as 'nor'? | SELECT percentage FROM table_177766_1 WHERE abbreviation = "Nor" |
CREATE TABLE table_28014096_1 (
no_in_season INTEGER,
production_code VARCHAR
) | What is the number of this season's episode that had the production code 2t6206? | SELECT MIN(no_in_season) FROM table_28014096_1 WHERE production_code = "2T6206" |
CREATE TABLE department (
dept_code VARCHAR,
dept_name VARCHAR
)
CREATE TABLE CLASS (
prof_num VARCHAR
)
CREATE TABLE professor (
prof_high_degree VARCHAR,
emp_num VARCHAR,
dept_code VARCHAR
)
CREATE TABLE employee (
emp_fname VARCHAR,
emp_num VARCHAR
) | Find the first names and degree of all professors who are teaching some class in Computer Info. Systems department. | SELECT DISTINCT T2.emp_fname, T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Computer Info. Systems' |
CREATE TABLE table_36445 (
"Year" text,
"Flagship Station" text,
"Play-by-play" text,
"Color commentator(s)" text,
"Studio host" text
) | Name the studio host for glenn ordway and jerry sichting with year of 1993-94 | SELECT "Studio host" FROM table_36445 WHERE "Play-by-play" = 'glenn ordway' AND "Color commentator(s)" = 'jerry sichting' AND "Year" = '1993-94' |
CREATE TABLE table_23211041_5 (
high_points VARCHAR,
game VARCHAR
) | Who had the most points in game 4? | SELECT high_points FROM table_23211041_5 WHERE game = 4 |
CREATE TABLE table_name_36 (
team VARCHAR,
time VARCHAR
) | What is the team when the time is 1:11.19.89? | SELECT team FROM table_name_36 WHERE time = "1:11.19.89" |
CREATE TABLE table_15887683_8 (
n° VARCHAR,
television_service VARCHAR
) | Name the number for fox news channel | SELECT n° FROM table_15887683_8 WHERE television_service = "Fox News Channel" |
CREATE TABLE table_name_79 (
land___sqmi__ INTEGER,
water__sqmi_ VARCHAR,
longitude VARCHAR
) | Which Land (sqmi) has a Water (sqmi) smaller than 0.04, and a Longitude of -96.794706? | SELECT MIN(land___sqmi__) FROM table_name_79 WHERE water__sqmi_ < 0.04 AND longitude = -96.794706 |
CREATE TABLE player (
Player_ID int,
Player text,
Years_Played text,
Total_WL text,
Singles_WL text,
Doubles_WL text,
Team int
)
CREATE TABLE country (
Country_id int,
Country_name text,
Capital text,
Official_native_language text
)
CREATE TABLE match_season (
Season re... | Draw a bar chart for how many players played each position?, order names in desc order. | SELECT Position, COUNT(*) FROM match_season GROUP BY Position ORDER BY Position DESC |
CREATE TABLE table_name_6 (
player VARCHAR,
round VARCHAR,
nationality VARCHAR
) | What player has a round larger than 1 in Austria? | SELECT player FROM table_name_6 WHERE round > 1 AND nationality = "austria" |
CREATE TABLE team (
Team_id VARCHAR,
Name VARCHAR
)
CREATE TABLE match_season (
Position VARCHAR,
Team VARCHAR
) | Show the positions of the players from the team with name 'Ryley Goldner'. | SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Ryley Goldner" |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE fare (
fare_id int,
... | what is the least expensive fare from BOSTON to SALT LAKE CITY | SELECT DISTINCT fare_id FROM fare WHERE (fare_id IN (SELECT FLIGHT_FAREalias1.fare_id FROM flight_fare AS FLIGHT_FAREalias1 WHERE FLIGHT_FAREalias1.flight_id IN (SELECT FLIGHTalias1.flight_id FROM flight AS FLIGHTalias1 WHERE (FLIGHTalias1.from_airport IN (SELECT AIRPORT_SERVICEalias2.airport_code FROM airport_service ... |
CREATE TABLE table_266 (
"Date" text,
"Tournament" text,
"Location" text,
"Purse( $ )" real,
"Winner" text,
"Score" text,
"1st Prize( $ )" real
) | What is the sum of the largest purse? | SELECT MAX("Purse( $ )") FROM table_266 |
CREATE TABLE table_69346 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
) | What was the date of the game that had a loss of Risley (0-1)? | SELECT "Date" FROM table_69346 WHERE "Loss" = 'risley (0-1)' |
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
depart... | what flight do you have from SAN FRANCISCO to PITTSBURGH on the evening of 8 27 | 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, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' AND date_day.day_number = 27 AND date_day.month_number = 8 A... |
CREATE TABLE table_name_94 (
outcome VARCHAR,
partner VARCHAR,
opponents VARCHAR
) | What is Outcome, when Partner is 'Byron Black', and when Opponents is 'Goran Ivani evi Brian Macphie'? | SELECT outcome FROM table_name_94 WHERE partner = "byron black" AND opponents = "goran ivanišević brian macphie" |
CREATE TABLE table_25037577_1 (
superintendent VARCHAR,
year VARCHAR,
middle_school_principal VARCHAR,
gorham_principal VARCHAR
) | Who were the superintendent(s) when the middle school principal was alan degroote, the gorham principal was paul lahue, and the year was 2006-2007? | SELECT superintendent FROM table_25037577_1 WHERE middle_school_principal = "Alan Degroote" AND gorham_principal = "Paul Lahue" AND year = "2006-2007" |
CREATE TABLE table_16367 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Director" text,
"Writer(s)" text,
"Original air date" text,
"Production code" text
) | What are the production codes for the title 'all about brooke | SELECT "Production code" FROM table_16367 WHERE "Title" = 'All About Brooke' |
CREATE TABLE table_name_74 (
second_vice_president VARCHAR,
third_vice_president VARCHAR,
inaugurated VARCHAR
) | What is Second Vice President, when Third Vice President is 'Gen. Juan Alonso', and when Inaugurated is '15 March 1940'? | SELECT second_vice_president FROM table_name_74 WHERE third_vice_president = "gen. juan alonso" AND inaugurated = "15 march 1940" |
CREATE TABLE table_78079 (
"Airing date" text,
"Number of episodes" real,
"HD format" text,
"Highest average point ratings" real,
"Genre" text,
"Official website" text
) | What was the airing date when the number of episodes was larger than 20 and had the genre of costume action? | SELECT "Airing date" FROM table_78079 WHERE "Number of episodes" > '20' AND "Genre" = 'costume action' |
CREATE TABLE entrepreneur (
Entrepreneur_ID int,
People_ID int,
Company text,
Money_Requested real,
Investor text
)
CREATE TABLE people (
People_ID int,
Name text,
Height real,
Weight real,
Date_of_Birth text
) | What are the number of the dates of birth of entrepreneurs with investor 'Simon Woodroffe' or 'Peter Jones'?, sort by the Y-axis from high to low. | SELECT Date_of_Birth, COUNT(Date_of_Birth) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor = "Simon Woodroffe" OR T1.Investor = "Peter Jones" ORDER BY COUNT(Date_of_Birth) DESC |
CREATE TABLE table_52448 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
) | What was the total Attendance for Games while Chicago was the visiting Team? | SELECT SUM("Attendance") FROM table_52448 WHERE "Visitor" = 'chicago' |
CREATE TABLE table_204_422 (
id number,
"rank" number,
"lane" number,
"name" text,
"nationality" text,
"time" text,
"notes" text
) | at the women 's 200 meter individual medley sm10 event at the 2012 summer paralympics , how many people participated in total ? | SELECT COUNT("name") FROM table_204_422 |
CREATE TABLE table_35451 (
"Season" real,
"Game" text,
"Record" text,
"Opponent" text,
"Score" text,
"Result" text
) | Which Game has a Result of win, and an Opponent of new hampshire, and a Season smaller than 2008? | SELECT "Game" FROM table_35451 WHERE "Result" = 'win' AND "Opponent" = 'new hampshire' AND "Season" < '2008' |
CREATE TABLE inst (
instid number,
name text,
country text
)
CREATE TABLE papers (
paperid number,
title text
)
CREATE TABLE authorship (
authid number,
instid number,
paperid number,
authorder number
)
CREATE TABLE authors (
authid number,
lname text,
fname text
) | Which papers have the substring 'Database' in their titles? Show the titles of the papers. | SELECT title FROM papers WHERE title LIKE "%Database%" |
CREATE TABLE table_2190919_1 (
team_s_ VARCHAR,
avg_finish VARCHAR
) | What are the racing teams for which the average finish is 23.3? | SELECT team_s_ FROM table_2190919_1 WHERE avg_finish = "23.3" |
CREATE TABLE table_42847 (
"Year" real,
"Chassis" text,
"Engine" text,
"Start" real,
"Finish" real,
"Entrant" text
) | What is the average finish that has 24 as the start, with a year after 1987? | SELECT AVG("Finish") FROM table_42847 WHERE "Start" = '24' AND "Year" > '1987' |
CREATE TABLE table_16022 (
"Episode #" real,
"Production code" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Airdate" text
) | who directed the movie written by is sib ventress / aydrea ten bosch | SELECT "Directed by" FROM table_16022 WHERE "Written by" = 'Sib Ventress / Aydrea ten Bosch' |
CREATE TABLE table_77330 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" real,
"Finish" text
) | WHAT IS THE TOTAL, OF A TO PAR FOR HUBERT GREEN, AND A TOTAL LARGER THAN 291? | SELECT COUNT("To par") FROM table_77330 WHERE "Player" = 'hubert green' AND "Total" > '291' |
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 ACC_Percent over the All_Neutral . | SELECT All_Neutral, ACC_Percent FROM basketball_match |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id num... | tell me the variation in arterial bp mean of patient 28443 last measured on the current intensive care unit visit compared to the value second to last measured on the current intensive care unit 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 = 28443) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_i... |
CREATE TABLE table_name_21 (
stadium VARCHAR,
score VARCHAR
) | What stadium had the score 1 - 1 dodd 38'? | SELECT stadium FROM table_name_21 WHERE score = "1 - 1 dodd 38'" |
CREATE TABLE table_name_84 (
country VARCHAR,
icao VARCHAR
) | Tell me the country for ICAO of tjig | SELECT country FROM table_name_84 WHERE icao = "tjig" |
CREATE TABLE table_23506 (
"Year" real,
"Date" text,
"Type" text,
"Species" text,
"Author Species" text,
"Value" text,
"Scott" text,
"Yvert" real,
"Mitchell" real,
"Sta. & Gib." real,
"Order" text,
"Family" text
) | Name the date for value 55c | SELECT "Date" FROM table_23506 WHERE "Value" = '55c' |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
... | how many days have it been since the first time that patient 97330 had received a white blood cells lab test during their current hospital visit? | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', labevents.charttime)) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'white blood cells') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 97330 AND a... |
CREATE TABLE table_61215 (
"Date" text,
"Series" text,
"Circuit" text,
"City / State" text,
"Winner" text,
"Team" text
) | what series was in sydney, new south wales? | SELECT "Series" FROM table_61215 WHERE "City / State" = 'sydney, new south wales' |
CREATE TABLE rooms (
roomid text,
roomname text,
beds number,
bedtype text,
maxoccupancy number,
baseprice number,
decor text
)
CREATE TABLE reservations (
code number,
room text,
checkin text,
checkout text,
rate number,
lastname text,
firstname text,
adults... | How many kids stay in the room DAMIEN TRACHSEL checked in on Sep 21, 2010? | SELECT kids FROM reservations WHERE checkin = "2010-09-21" AND firstname = "DAMIEN" AND lastname = "TRACHSEL" |
CREATE TABLE table_37283 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
) | How many draws were there when there were points less than 23, 6 losses, and more than 21 against? | SELECT COUNT("Drawn") FROM table_37283 WHERE "Points" < '23' AND "Lost" = '6' AND "Against" > '21' |
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE T... | what flights from MINNEAPOLIS to PITTSBURGH | 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 = 'MINNEAPOLIS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PI... |
CREATE TABLE inventory (
inventory_id number,
film_id number,
store_id number,
last_update time
)
CREATE TABLE actor (
actor_id number,
first_name text,
last_name text,
last_update time
)
CREATE TABLE store (
store_id number,
manager_staff_id number,
address_id number,
... | Count the number of customers who are active. | SELECT COUNT(*) FROM customer WHERE active = '1' |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE transfers (
row_id number,... | what are the five most commonly prescribed drugs for patients who were also prescribed with adefovir dipivoxil at the same time since 4 years ago? | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'adefovir dipivoxil' AND DATETIME(prescriptions.startdate) >= DATE... |
CREATE TABLE table_name_16 (
tries_for VARCHAR,
try_bonus VARCHAR
) | What is the number of tries for when the try bonus is 0? | SELECT tries_for FROM table_name_16 WHERE try_bonus = "0" |
CREATE TABLE table_8436 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | What country is Nick Price from? | SELECT "Country" FROM table_8436 WHERE "Player" = 'nick price' |
CREATE TABLE table_name_74 (
casualties VARCHAR,
location VARCHAR
) | Name the casualities for kabul area | SELECT casualties FROM table_name_74 WHERE location = "kabul area" |
CREATE TABLE table_name_41 (
qual_1 VARCHAR,
team VARCHAR
) | What is the qual 1 for conquest racing? | SELECT qual_1 FROM table_name_41 WHERE team = "conquest racing" |
CREATE TABLE table_203_397 (
id number,
"series" text,
"launch date" text,
"finale date" text,
"days" number,
"housemates" number,
"winner" text,
"main presenter" text,
"grand prize" text,
"liveshow\naudience\nmillions" number
) | how many seasons lasted more than 100 days ? | SELECT COUNT("series") FROM table_203_397 WHERE "days" > 100 |
CREATE TABLE table_203_185 (
id number,
"season" text,
"a\ntechnical" text,
"b\nscientific" text,
"c\nfine arts" text,
"d\nimprovisational" text,
"e\nstructural" text,
"rising stars!\u00ae" text,
"po\nprojectoutreach\u00ae" text,
"university level" text
) | what was the title of the first improv challenge ? | SELECT "d\nimprovisational" FROM table_203_185 ORDER BY "season" LIMIT 1 |
CREATE TABLE table_name_67 (
venue VARCHAR,
time VARCHAR,
away_team VARCHAR
) | What is the venue of the match with a 14:30 time and sun source as the away team? | SELECT venue FROM table_name_67 WHERE time = "14:30" AND away_team = "sun source" |
CREATE TABLE table_2618072_1 (
directed_by VARCHAR,
production_code VARCHAR
) | Who is the directed by when the production code is 67425? | SELECT directed_by FROM table_2618072_1 WHERE production_code = 67425 |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | what the last height of patient 002-20631 during a month before. | SELECT patient.admissionheight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-20631') AND NOT patient.admissionheight IS NULL AND DATETIME(patient.unitadmittime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', ... |
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments ... | What courses , besides 524 , does Prof. Saumuy Puchala teach ? | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.number <> 524 AND instructor.name LIKE '%Saumuy Puchala%' AND offering_instructor.instructor_id = instructor.instructor_id AND offerin... |
CREATE TABLE table_name_27 (
score VARCHAR,
away_team VARCHAR,
date VARCHAR
) | With a date of Aldershot and Aldershot as the away team what was the score of the game? | SELECT score FROM table_name_27 WHERE away_team = "aldershot" AND date = "aldershot" |
CREATE TABLE table_name_3 (
l3_cache VARCHAR,
release_price___usd__ VARCHAR
) | What is the L3 cache of the processor with a release price of $440? | SELECT l3_cache FROM table_name_3 WHERE release_price___usd__ = "$440" |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE i... | when was the first time on 09/07/this year that patient 009-3149 had the minimum heartrate for? | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-3149')) AND NOT vitalperiodic.heartrate IS NULL... |
CREATE TABLE table_203_237 (
id number,
"n" number,
"p" text,
"nat." text,
"name" text,
"age" number,
"moving from" text,
"type" text,
"transfer\nwindow" text,
"ends" number,
"transfer\nfee" text
) | where did henning berg move from ? | SELECT "moving from" FROM table_203_237 WHERE "name" = 'henning berg' |
CREATE TABLE HOTELS (
hotel_id VARCHAR,
star_rating_code VARCHAR,
price_range VARCHAR
) | Show the id and star rating of each hotel, ordered by its price from low to high. | SELECT hotel_id, star_rating_code FROM HOTELS ORDER BY price_range |
CREATE TABLE mountain (
id VARCHAR,
country VARCHAR
)
CREATE TABLE photos (
camera_lens_id VARCHAR,
mountain_id VARCHAR
) | How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'? | SELECT COUNT(DISTINCT T2.camera_lens_id) FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.country = 'Ethiopia' |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABL... | what is the number of patients in 2104 that morphine sr (ms contin) is prescribed to? | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT prescriptions.hadm_id FROM prescriptions WHERE prescriptions.drug = 'morphine sr (ms contin)' AND STRFTIME('%y', prescriptions.startdate) = '2104') |
CREATE TABLE table_12419 (
"Shooter" text,
"Event" text,
"Rank points" text,
"Score points" text,
"Total" text
) | What were the rank points when the total was 11? | SELECT "Rank points" FROM table_12419 WHERE "Total" = '11' |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | A bar chart shows the distribution of Team_Name and School_ID , and rank total number from high to low order. | SELECT Team_Name, School_ID FROM basketball_match ORDER BY School_ID DESC |
CREATE TABLE table_name_66 (
date VARCHAR,
meet VARCHAR,
time VARCHAR
) | On what Date was the Meet of 2007 Pan American Games with a Time of 1:07.78? | SELECT date FROM table_name_66 WHERE meet = "2007 pan american games" AND time = "1:07.78" |
CREATE TABLE table_75445 (
"Celebrity" text,
"Famous for" text,
"Entered" text,
"Exited" text,
"Finished" text
) | What position did the celebrity finish that entered on day 1 and exited on day 19? | SELECT "Finished" FROM table_75445 WHERE "Exited" = 'day 19' AND "Entered" = 'day 1' |
CREATE TABLE table_75858 (
"Date" text,
"Time" text,
"Home" text,
"Away" text,
"Score" text,
"Ground" text
) | What is the Ground with a Date that is 2008-06-20? | SELECT "Ground" FROM table_75858 WHERE "Date" = '2008-06-20' |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program (
progr... | What department are New Astronomy for Advanced Students a part of ? | SELECT DISTINCT department FROM course WHERE name LIKE '%New Astronomy for Advanced Students%' |
CREATE TABLE table_name_51 (
change___percentage_ INTEGER,
land_area__km²_ VARCHAR,
population_density__per_km²_ VARCHAR
) | What is the average change to have a land area of 546.74 and a population density greater than 0.5? | SELECT AVG(change___percentage_) FROM table_name_51 WHERE land_area__km²_ = 546.74 AND population_density__per_km²_ > 0.5 |
CREATE TABLE table_101 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | What college had a LB in the draft? | SELECT "College" FROM table_101 WHERE "Position" = 'LB' |
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,
additional_req varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semes... | Of all the classes that can fulfill the Other requirement , what 's the easiest ? | SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%Other%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_c... |
CREATE TABLE table_name_81 (
opponent VARCHAR,
round VARCHAR,
record VARCHAR
) | Who is the opponent in the fight of 1 round when the record is 18-7? | SELECT opponent FROM table_name_81 WHERE round = "1" AND record = "18-7" |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
... | how much does the cost of protein, total are? | SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'labevents' AND cost.event_id IN (SELECT labevents.row_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'protein, total')) |
CREATE TABLE table_71787 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | Name the total number of overall for defensive tackle | SELECT COUNT("Overall") FROM table_71787 WHERE "Position" = 'defensive tackle' |
CREATE TABLE table_name_94 (
goal_diff INTEGER,
losses VARCHAR,
wins VARCHAR
) | Which team has a Losses value larger than 1 and a Wins value smaller than 0? | SELECT SUM(goal_diff) FROM table_name_94 WHERE losses > 1 AND wins < 0 |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE ReviewTas... | Usage of Tags per JS-Framework. | SELECT ROW_NUMBER() OVER (ORDER BY rate.Rate DESC) AS Rank, rate.TagName AS Tag, rate.Rate AS QuestionsLastYear FROM (SELECT COUNT(PostId) AS Rate, TagName FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId AND Posts.CreationDate < '2016-08-01' AND Posts.CreationDate > '2015-08-01' AND TagN... |
CREATE TABLE table_name_65 (
attendance VARCHAR,
date VARCHAR
) | On September 10, 1989 how many people attended the game? | SELECT attendance FROM table_name_65 WHERE date = "september 10, 1989" |
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
) | Please visualize a bar chart, that the X-axis is the director and the Y-axis is thier corresponding lowest rating among all movies, and I want to list in ascending by the Y-axis. | SELECT director, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY director ORDER BY MIN(T1.stars) |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CR... | what was the first value of arterial bp [systolic] patient 2514 had on 07/08/this year. | 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 = 2514)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial b... |
CREATE TABLE table_name_72 (
overall VARCHAR,
position VARCHAR
) | What was the overall draft pick for the player selected for the tight end position? | SELECT overall FROM table_name_72 WHERE position = "tight end" |
CREATE TABLE member (
Member_ID int,
Member_Name text,
Party_ID text,
In_office text
)
CREATE TABLE party (
Party_ID int,
Minister text,
Took_office text,
Left_office text,
Region_ID int,
Party_name text
)
CREATE TABLE region (
Region_ID int,
Region_name text,
Date ... | How many events are there for each party. | SELECT Party_name, COUNT(*) FROM party_events AS T1 JOIN party AS T2 ON T1.Party_ID = T2.Party_ID GROUP BY T1.Party_ID |
CREATE TABLE table_name_88 (
score VARCHAR,
player VARCHAR
) | What was the score of Bernhard Langer after 3 rounds? | SELECT score FROM table_name_88 WHERE player = "bernhard langer" |
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... | Provide me the list of white patients with congestive heart failure as the primary disease. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "WHITE" AND demographic.diagnosis = "CONGESTIVE HEART FAILURE" |
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, draw a bar chart about the distribution of name and revenue , and group by attribute headquarter, could you list in asc by the y axis? | SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T2.Revenue |
CREATE TABLE table_27539535_5 (
opponent VARCHAR,
record VARCHAR
) | Against what team did the Islanders have a 5-18-5 record? | SELECT opponent FROM table_27539535_5 WHERE record = "5-18-5" |
CREATE TABLE table_2781227_1 (
college_junior_club_team VARCHAR,
player VARCHAR
) | What is the college/junior/club team name of player Mats Lindgren? | SELECT college_junior_club_team FROM table_2781227_1 WHERE player = "Mats Lindgren" |
CREATE TABLE table_name_73 (
score VARCHAR,
visitor VARCHAR,
date VARCHAR
) | What was the score of the game on November 9 when Atlanta was the visiting team? | SELECT score FROM table_name_73 WHERE visitor = "atlanta" AND date = "november 9" |
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
baseP... | What is the average base price of different bed type? List bed type and average base price Plot them as bar chart, and show in desc by the total number. | SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType ORDER BY AVG(basePrice) DESC |
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTyp... | Comments like 'What have you tried' where an accepted answer is present. | SELECT c.Id AS "comment_link", c.Score, c.CreationDate, LENGTH(Text) FROM Comments AS c INNER JOIN Posts AS p ON c.PostId = p.Id WHERE Text LIKE 'What have you tried%' AND NOT p.AcceptedAnswerId IS NULL AND LENGTH(Text) < 33 AND p.CommentCount < '##CommentThread:int?4##' ORDER BY LENGTH(Text), c.Score DESC, c.CreationD... |
CREATE TABLE table_name_40 (
lane INTEGER,
nationality VARCHAR,
heat VARCHAR
) | What's Great Britain's lane with a heat less than 3? | SELECT AVG(lane) FROM table_name_40 WHERE nationality = "great britain" AND heat < 3 |
CREATE TABLE table_76687 (
"Full name" text,
"Alias" text,
"Age\u00b9" real,
"From" text,
"Occupation\u00b2" text,
"Specialty" text,
"Position/ Eliminated" text
) | What is Position/ Eliminated, when From is 'Kuala Lumpur', and when Specialty is 'Contemporary Lyrical Jazz'? | SELECT "Position/ Eliminated" FROM table_76687 WHERE "From" = 'kuala lumpur' AND "Specialty" = 'contemporary lyrical jazz' |
CREATE TABLE prereq (
course_id varchar(8),
prereq_id varchar(8)
)
CREATE TABLE section (
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
building varchar(15),
room_number varchar(7),
time_slot_id varchar(4)
)
CREATE TABLE student (
ID varchar(5... | Find the number of courses offered by Psychology department in each building with a bar chart, order y axis in desc order. | SELECT building, COUNT(building) FROM course AS T1 JOIN section AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = 'Psychology' GROUP BY building ORDER BY COUNT(building) DESC |
CREATE TABLE table_name_93 (
player VARCHAR,
place VARCHAR
) | What is Player, when Place is 2? | SELECT player FROM table_name_93 WHERE place = "2" |
CREATE TABLE Catalog_Structure (
catalog_level_number INTEGER,
catalog_id INTEGER,
catalog_level_name VARCHAR(50)
)
CREATE TABLE Catalogs (
catalog_id INTEGER,
catalog_name VARCHAR(50),
catalog_publisher VARCHAR(80),
date_of_publication DATETIME,
date_of_latest_revision DATETIME
)
CREA... | Plot date of latest revision by the number of date of latest revision as a line chart, and list date_of_latest_revision from high to low order. | SELECT date_of_latest_revision, COUNT(date_of_latest_revision) FROM Catalogs ORDER BY date_of_latest_revision DESC |
CREATE TABLE table_1816947_2 (
average_attendance_home VARCHAR,
division___section VARCHAR,
average_attendance_away VARCHAR
) | When the average away attendance is 1.889 in the Superettan, what's the average home attendance? | SELECT average_attendance_home FROM table_1816947_2 WHERE division___section = "Superettan" AND average_attendance_away = "1.889" |
CREATE TABLE table_50211 (
"Opposing Team" text,
"Against" real,
"Date" text,
"Venue" text,
"Round" text
) | What is the total number of Against that were played in the H Venue on 26 february 1949? | SELECT COUNT("Against") FROM table_50211 WHERE "Venue" = 'h' AND "Date" = '26 february 1949' |
CREATE TABLE table_67394 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
) | Name the region for cd with catalog of alca-9203 | SELECT "Region" FROM table_67394 WHERE "Format" = 'cd' AND "Catalog" = 'alca-9203' |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime... | has propofol, metoprolol tartrate 25 mg po tabs or sodium chloride 0.9 % iv : 1000 ml been prescribed to patient 012-29464? | SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-29464')) AND medication.drugname IN ('propofol', 'metoprolol tartrate ... |
CREATE TABLE table_33038 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Which venue hosted a home team with a score of 11.16 (82)? | SELECT "Venue" FROM table_33038 WHERE "Home team score" = '11.16 (82)' |
CREATE TABLE table_41743 (
"Date" text,
"Opponent" text,
"Location" text,
"Score" text,
"Loss" text,
"Record" text
) | What is the Location when the Opponent shows vs. #23 south carolina? | SELECT "Location" FROM table_41743 WHERE "Opponent" = 'vs. #23 south carolina' |
CREATE TABLE table_39612 (
"Value" text,
"Color" text,
"Obverse" text,
"Reverse" text,
"First issued" real
) | What reverse has a color of green? | SELECT "Reverse" FROM table_39612 WHERE "Color" = 'green' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.