instruction stringlengths 0 1.06k | input stringlengths 33 7.14k | response stringlengths 2 4.44k | source stringclasses 25
values | text stringlengths 302 8.5k |
|---|---|---|---|---|
Please show the different statuses, ordered by the number of cities that have each. | CREATE TABLE city (
Status VARCHAR
) | SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Please show the different statuses, ordered by the number of cities that have each. ### Input: CREATE TABLE city (
Statu... |
How much Long has a Loss larger than 2, and a Gain of 157, and an Avg/G smaller than 129? | CREATE TABLE table_name_58 (
long INTEGER,
avg_g VARCHAR,
loss VARCHAR,
gain VARCHAR
) | SELECT SUM(long) FROM table_name_58 WHERE loss > 2 AND gain = 157 AND avg_g < 129 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How much Long has a Loss larger than 2, and a Gain of 157, and an Avg/G smaller than 129? ### Input: CREATE TABLE table_name... |
What are the different ship flags, and how many ships have each. Show a pie chart. | CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
)
CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
) | SELECT Flag, COUNT(*) FROM Ship GROUP BY Flag | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the different ship flags, and how many ships have each. Show a pie chart. ### Input: CREATE TABLE Ship (
Ship_I... |
What is the perfect stem for the word that has a future stem of emango? | CREATE TABLE table_name_79 (
perfect_stem VARCHAR,
future_stem VARCHAR
) | SELECT perfect_stem FROM table_name_79 WHERE future_stem = "emango" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the perfect stem for the word that has a future stem of emango? ### Input: CREATE TABLE table_name_79 (
perfect_... |
For each position, what is the average number of points for players in that position Plot them as bar chart, could you show y axis from low to high order? | CREATE TABLE competition_result (
Competition_ID int,
Club_ID_1 int,
Club_ID_2 int,
Score text
)
CREATE TABLE club (
Club_ID int,
name text,
Region text,
Start_year text
)
CREATE TABLE competition (
Competition_ID int,
Year real,
Competition_type text,
Country text
)
C... | SELECT Position, AVG(Points) FROM player GROUP BY Position ORDER BY AVG(Points) | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For each position, what is the average number of points for players in that position Plot them as bar chart, could you show ... |
What is his low win total when he has over 3 top 25s and under 9 cuts made? | CREATE TABLE table_75591 (
"Tournament" text,
"Wins" real,
"Top-10" real,
"Top-25" real,
"Events" real,
"Cuts made" real
) | SELECT MIN("Wins") FROM table_75591 WHERE "Top-25" = '3' AND "Cuts made" < '9' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is his low win total when he has over 3 top 25s and under 9 cuts made? ### Input: CREATE TABLE table_75591 (
"Tourn... |
how much does a FIRST class ticket cost from BOSTON to SAN FRANCISCO round trip | CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_... | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, fare_basis, flight, flight_fare WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND... | atis | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how much does a FIRST class ticket cost from BOSTON to SAN FRANCISCO round trip ### Input: CREATE TABLE equipment_sequence (... |
What is the lowest price of product, grouped by product type? Show a bar chart. | CREATE TABLE Addresses (
address_id INTEGER,
address_details VARCHAR(255)
)
CREATE TABLE Customer_Orders (
order_id INTEGER,
customer_id INTEGER,
order_status_code VARCHAR(10),
order_date DATETIME
)
CREATE TABLE Department_Store_Chain (
dept_store_chain_id INTEGER,
dept_store_chain_nam... | SELECT product_type_code, MIN(product_price) FROM Products GROUP BY product_type_code ORDER BY product_type_code | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest price of product, grouped by product type? Show a bar chart. ### Input: CREATE TABLE Addresses (
addr... |
Game smaller than 34, and a December smaller than 14, and a Score of 10 - 6 has what opponent? | CREATE TABLE table_75388 (
"Game" real,
"December" real,
"Opponent" text,
"Score" text,
"Record" text
) | SELECT "Opponent" FROM table_75388 WHERE "Game" < '34' AND "December" < '14' AND "Score" = '10 - 6' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Game smaller than 34, and a December smaller than 14, and a Score of 10 - 6 has what opponent? ### Input: CREATE TABLE table... |
What is the margin at the Nabisco Championship? | CREATE TABLE table_31649 (
"Year" real,
"Championship" text,
"Winning score" text,
"Margin" text,
"Runner(s)-up" text
) | SELECT "Margin" FROM table_31649 WHERE "Championship" = 'nabisco championship' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the margin at the Nabisco Championship? ### Input: CREATE TABLE table_31649 (
"Year" real,
"Championship" te... |
Name the average bronze with silver more than 0, total of 6 and gold more than 0 | CREATE TABLE table_name_27 (
bronze INTEGER,
gold VARCHAR,
silver VARCHAR,
total VARCHAR
) | SELECT AVG(bronze) FROM table_name_27 WHERE silver > 0 AND total = 6 AND gold > 0 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the average bronze with silver more than 0, total of 6 and gold more than 0 ### Input: CREATE TABLE table_name_27 (
... |
What block has a COSPAR ID of 1995-060a? | CREATE TABLE table_57476 (
"Name" text,
"Block" text,
"Launch date/time (UTC)" text,
"COSPAR ID" text,
"Rocket" text
) | SELECT "Block" FROM table_57476 WHERE "COSPAR ID" = '1995-060a' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What block has a COSPAR ID of 1995-060a? ### Input: CREATE TABLE table_57476 (
"Name" text,
"Block" text,
"Launc... |
On what date is Jerilyn Britz the runner-up? | CREATE TABLE table_45790 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
) | SELECT "Date" FROM table_45790 WHERE "Runner(s)-up" = 'jerilyn britz' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: On what date is Jerilyn Britz the runner-up? ### Input: CREATE TABLE table_45790 (
"Date" text,
"Tournament" text,
... |
Name the number of conference tournament for james madison | CREATE TABLE table_2718 (
"Conference" text,
"Regular Season Winner" text,
"Conference Player of the Year" text,
"Conference Tournament" text,
"Tournament Venue (City)" text,
"Tournament Winner" text
) | SELECT COUNT("Conference Tournament") FROM table_2718 WHERE "Tournament Winner" = 'James Madison' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the number of conference tournament for james madison ### Input: CREATE TABLE table_2718 (
"Conference" text,
"... |
count the number of patients whose diagnosis short title is ath ext ntv at w claudct. | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Ath ext ntv at w claudct" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients whose diagnosis short title is ath ext ntv at w claudct. ### Input: CREATE TABLE demographic (
... |
body mass index ( bmi ) of 27 to 45 kg / m2 with weight < / = 136 kg ( 300 lbs. | CREATE TABLE table_train_273 (
"id" int,
"systolic_blood_pressure_sbp" int,
"hemoglobin_a1c_hba1c" float,
"body_weight" float,
"hba1c" float,
"insulin_requirement" float,
"body_mass_index_bmi" float,
"NOUSE" float
) | SELECT * FROM table_train_273 WHERE body_mass_index_bmi >= 27 AND body_mass_index_bmi <= 45 AND body_weight <= 136 | criteria2sql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: body mass index ( bmi ) of 27 to 45 kg / m2 with weight < / = 136 kg ( 300 lbs. ### Input: CREATE TABLE table_train_273 (
... |
For those payments processed with Visa, bin the payment day into Year interval and compute the average amount payment as the Y-axis. | CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER,
Customer_Policy_ID INTEGER
)
CREATE TABLE Payments (
Payment_ID INTEGER,
Settlement_ID INTEGER,
Payment_Method_Code ... | SELECT Date_Payment_Made, AVG(Amount_Payment) FROM Payments WHERE Payment_Method_Code = 'Visa' | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those payments processed with Visa, bin the payment day into Year interval and compute the average amount payment as the... |
Show all payment method codes and the number of orders for each code in a bar chart, show by the payment_method_code in descending please. | CREATE TABLE Order_Items (
Order_Item_ID INTEGER,
Order_ID INTEGER,
Product_ID INTEGER,
Order_Quantity VARCHAR(288),
Other_Item_Details VARCHAR(255)
)
CREATE TABLE Bookings (
Booking_ID INTEGER,
Customer_ID INTEGER,
Workshop_Group_ID VARCHAR(100),
Status_Code CHAR(15),
Store_ID ... | SELECT payment_method_code, COUNT(*) FROM Invoices GROUP BY payment_method_code ORDER BY payment_method_code DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show all payment method codes and the number of orders for each code in a bar chart, show by the payment_method_code in desc... |
What are the fewest seats with a -3.7% change and more than 4.7% votes? | CREATE TABLE table_name_28 (
seats INTEGER,
_percentage_change VARCHAR,
_percentage_votes VARCHAR
) | SELECT MIN(seats) FROM table_name_28 WHERE _percentage_change = -3.7 AND _percentage_votes > 4.7 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the fewest seats with a -3.7% change and more than 4.7% votes? ### Input: CREATE TABLE table_name_28 (
seats IN... |
In the year 1992 for the Seibu Lions, the BB + HBP which is larger than 49 was this as a BA (Place)? | CREATE TABLE table_69873 (
"Year" text,
"Team" text,
"Number" text,
"BB +HBP" real,
"BA (Place)" text
) | SELECT "BA (Place)" FROM table_69873 WHERE "BB +HBP" > '49' AND "Team" = 'seibu lions' AND "Year" = '1992' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: In the year 1992 for the Seibu Lions, the BB + HBP which is larger than 49 was this as a BA (Place)? ### Input: CREATE TABLE... |
What is the Year of the Film Klondike Annie? | CREATE TABLE table_76915 (
"Year" real,
"Film" text,
"Role" text,
"Director" text,
"Studio" text
) | SELECT SUM("Year") FROM table_76915 WHERE "Film" = 'klondike annie' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Year of the Film Klondike Annie? ### Input: CREATE TABLE table_76915 (
"Year" real,
"Film" text,
"Ro... |
what is drug name and drug route of drug code asa325? | 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... | SELECT prescriptions.drug, prescriptions.route FROM prescriptions WHERE prescriptions.formulary_drug_cd = "ASA325" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is drug name and drug route of drug code asa325? ### Input: CREATE TABLE diagnoses (
subject_id text,
hadm_id t... |
give the number of patients who were admitted before the year 2158 and whose diagnosis long title is unspecified pleural effusion. | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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 (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2158" AND diagnoses.long_title = "Unspecified pleural effusion" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give the number of patients who were admitted before the year 2158 and whose diagnosis long title is unspecified pleural eff... |
What is the displacement & configuration with CO2 of 204 g/km emissions? | CREATE TABLE table_46528 (
"car model" text,
"displacement & configuration" text,
"max. motive power @ rpm" text,
"max. torque @ rpm" text,
"max. speed" text,
"emissions CO2" text
) | SELECT "displacement & configuration" FROM table_46528 WHERE "emissions CO2" = '204 g/km' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the displacement & configuration with CO2 of 204 g/km emissions? ### Input: CREATE TABLE table_46528 (
"car mode... |
What show had a nomination for best actor in a lead role female (popular) in 2006? | CREATE TABLE table_51708 (
"Year" real,
"Category" text,
"Character" text,
"For The Show" text,
"Result" text
) | SELECT "For The Show" FROM table_51708 WHERE "Category" = 'best actor in a lead role – female (popular)' AND "Year" = '2006' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What show had a nomination for best actor in a lead role female (popular) in 2006? ### Input: CREATE TABLE table_51708 (
... |
What home team has had a crowd bigger than 20,000? | CREATE TABLE table_name_95 (
home_team VARCHAR,
crowd INTEGER
) | SELECT home_team FROM table_name_95 WHERE crowd > 20 OFFSET 000 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What home team has had a crowd bigger than 20,000? ### Input: CREATE TABLE table_name_95 (
home_team VARCHAR,
crowd ... |
Of the courses being offered this Fall , which are upper-level CHEMBIO classes ? | 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,
test_id varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND course.department = 'CHEMBIO' AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'Fal... | advising | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Of the courses being offered this Fall , which are upper-level CHEMBIO classes ? ### Input: CREATE TABLE student_record (
... |
When Nashville was the visiting team what was the lowest Attendance shown? | CREATE TABLE table_56287 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
) | SELECT MIN("Attendance") FROM table_56287 WHERE "Visitor" = 'nashville' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When Nashville was the visiting team what was the lowest Attendance shown? ### Input: CREATE TABLE table_56287 (
"Date" ... |
What is the name of episode number 77 in the series? | CREATE TABLE table_26548 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
) | SELECT "Title" FROM table_26548 WHERE "No. in series" = '77' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of episode number 77 in the series? ### Input: CREATE TABLE table_26548 (
"No. in series" real,
"No... |
Who is the Colourist that has a Story Title of Broken Glass (part 3) and a Letterer of Albers? | CREATE TABLE table_60959 (
"Cover Date" text,
"Story Title" text,
"Writer/s" text,
"Letterer/s" text,
"Colourist/s" text
) | SELECT "Colourist/s" FROM table_60959 WHERE "Letterer/s" = 'albers' AND "Story Title" = 'broken glass (part 3)' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the Colourist that has a Story Title of Broken Glass (part 3) and a Letterer of Albers? ### Input: CREATE TABLE table... |
what is the drug patient 013-3028 was prescribed for within 2 days after being diagnosed with acute renal failure until 09/2105? | 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 t2.drugname FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-3028') AND diagnosis.diagnosi... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the drug patient 013-3028 was prescribed for within 2 days after being diagnosed with acute renal failure until 09/2... |
Find the names of stadiums that some Australian swimmers have been to, and count them by a bar chart | CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE swimme... | SELECT T4.Name, COUNT(T4.Name) FROM swimmer AS t1 JOIN record AS t2 ON t1.ID = t2.Swimmer_ID JOIN event AS t3 ON t2.Event_ID = t3.ID JOIN stadium AS t4 ON t4.ID = t3.Stadium_ID WHERE t1.Nationality = 'Australia' GROUP BY T4.Name | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the names of stadiums that some Australian swimmers have been to, and count them by a bar chart ### Input: CREATE TABLE... |
Who was the player for Japan when the to par was smaller than 7? | CREATE TABLE table_13139 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" real
) | SELECT "Player" FROM table_13139 WHERE "To par" < '7' AND "Country" = 'japan' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was the player for Japan when the to par was smaller than 7? ### Input: CREATE TABLE table_13139 (
"Place" text,
... |
which of elizabeth berkley 's films got her the most award nominations ? | CREATE TABLE table_201_44 (
id number,
"year" number,
"title" text,
"role" text,
"notes" text
) | SELECT "title" FROM table_201_44 ORDER BY "notes" DESC LIMIT 1 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which of elizabeth berkley 's films got her the most award nominations ? ### Input: CREATE TABLE table_201_44 (
id numbe... |
what is the number of patients whose gender is m and procedure icd9 code is 102? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "M" AND procedures.icd9_code = "102" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients whose gender is m and procedure icd9 code is 102? ### Input: CREATE TABLE demographic (
s... |
Who is the Second when Michel Gribi is the lead? | CREATE TABLE table_name_90 (
second VARCHAR,
lead VARCHAR
) | SELECT second FROM table_name_90 WHERE lead = "michel gribi" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the Second when Michel Gribi is the lead? ### Input: CREATE TABLE table_name_90 (
second VARCHAR,
lead VARCHA... |
Which away team plays at Arden Street Oval? | CREATE TABLE table_53294 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Away team" FROM table_53294 WHERE "Venue" = 'arden street oval' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which away team plays at Arden Street Oval? ### Input: CREATE TABLE table_53294 (
"Home team" text,
"Home team score... |
Which Game has a Series of bruins lead 3 1? | CREATE TABLE table_39182 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Series" text
) | SELECT SUM("Game") FROM table_39182 WHERE "Series" = 'bruins lead 3–1' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Game has a Series of bruins lead 3 1? ### Input: CREATE TABLE table_39182 (
"Game" real,
"Date" text,
"Opp... |
How many tournament titles for iowa state with 3 total titles? | CREATE TABLE table_name_90 (
tournament INTEGER,
total VARCHAR,
team VARCHAR
) | SELECT MAX(tournament) FROM table_name_90 WHERE total = 3 AND team = "iowa state" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many tournament titles for iowa state with 3 total titles? ### Input: CREATE TABLE table_name_90 (
tournament INTEGE... |
what is the name of the procedure that patient 5887 has undergone two times the last month? | CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE cost (
row_id number,
subject_... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 588... | mimic_iii | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the name of the procedure that patient 5887 has undergone two times the last month? ### Input: CREATE TABLE outputev... |
what was the name of the drug that patient 007-9853 was prescribed for the first time in 10/2102 via inhale route? | 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,
... | SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-9853')) AND medication.routeadmin = 'inhale' AND STRFTIME('%y-%... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the name of the drug that patient 007-9853 was prescribed for the first time in 10/2102 via inhale route? ### Input... |
What is the most recent season when Fernando Alonso had more than 13 podiums in a car with a Ferrari engine? | CREATE TABLE table_32421 (
"Season" real,
"Driver" text,
"Team" text,
"Engine" text,
"Poles" real,
"Wins" real,
"Podiums" real,
"Points" real,
"Margin of defeat" real
) | SELECT MAX("Season") FROM table_32421 WHERE "Engine" = 'ferrari' AND "Driver" = 'fernando alonso' AND "Podiums" > '13' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the most recent season when Fernando Alonso had more than 13 podiums in a car with a Ferrari engine? ### Input: CREA... |
Which Average Cards a game has a Season of 2004/2005, and a Red Cards larger than 3? | CREATE TABLE table_name_22 (
average_cards_a_game INTEGER,
season VARCHAR,
red_cards VARCHAR
) | SELECT MIN(average_cards_a_game) FROM table_name_22 WHERE season = "2004/2005" AND red_cards > 3 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Average Cards a game has a Season of 2004/2005, and a Red Cards larger than 3? ### Input: CREATE TABLE table_name_22 (... |
When was set 3 of 18-25? | CREATE TABLE table_40013 (
"Date" text,
"Score" text,
"Set 1" text,
"Set 2" text,
"Set 3" text,
"Set 4" text,
"Set 5" text,
"Total" text
) | SELECT "Date" FROM table_40013 WHERE "Set 3" = '18-25' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When was set 3 of 18-25? ### Input: CREATE TABLE table_40013 (
"Date" text,
"Score" text,
"Set 1" text,
"Set... |
what was the top publishing year ? | CREATE TABLE table_204_549 (
id number,
"series\nnumber" text,
"key" text,
"composed" text,
"published" text,
"opus no." text,
"brown" text,
"kobylanska" text,
"chominski" text,
"dedication" text,
"notes" text
) | SELECT "published" FROM table_204_549 GROUP BY "published" ORDER BY COUNT(*) DESC LIMIT 1 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the top publishing year ? ### Input: CREATE TABLE table_204_549 (
id number,
"series\nnumber" text,
"ke... |
Is 463 for undergraduates ? | CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABL... | SELECT DISTINCT advisory_requirement, enforced_requirement, name FROM course WHERE department = 'EECS' AND number = 463 | advising | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Is 463 for undergraduates ? ### Input: CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE pro... |
A bar chart showing the sum of capacity of cinemas open for each year, could you sort in desc by the x-axis? | CREATE TABLE schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_season int,
Title text,
Directed_by text,
Original_air_date text,
Production_code text
)
CREATE TABLE cine... | SELECT Openning_year, SUM(Capacity) FROM cinema GROUP BY Openning_year ORDER BY Openning_year DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: A bar chart showing the sum of capacity of cinemas open for each year, could you sort in desc by the x-axis? ### Input: CREA... |
How many widow patients have had an albumin urine lab test done? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "WIDOWED" AND lab.label = "Albumin, Urine" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many widow patients have had an albumin urine lab test done? ### Input: CREATE TABLE procedures (
subject_id text,
... |
give me the number of patients whose ethnicity is american indian/alaska native and admission year is less than 2148? | 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,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND demographic.admityear < "2148" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients whose ethnicity is american indian/alaska native and admission year is less than 2148? ### In... |
Possibly, an answer in comments. | CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden ... | SELECT p.Id AS "post_link", c.Text FROM Posts AS p INNER JOIN Comments AS c ON c.PostId = p.Id WHERE c.Text LIKE '%answer%' AND p.AnswerCount = 0 AND p.ClosedDate IS NULL ORDER BY p.CreationDate | sede | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Possibly, an answer in comments. ### Input: CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE Vot... |
What is the highest Shooting Total with a Bronze less than 0? | CREATE TABLE table_55379 (
"Sport" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT MAX("Total") FROM table_55379 WHERE "Sport" = 'shooting' AND "Bronze" < '0' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest Shooting Total with a Bronze less than 0? ### Input: CREATE TABLE table_55379 (
"Sport" text,
"G... |
what is the first flight that travels from ATLANTA to BALTIMORE that serves LUNCH | CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_... | 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, food_service WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code AND food... | atis | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the first flight that travels from ATLANTA to BALTIMORE that serves LUNCH ### Input: CREATE TABLE equipment_sequence... |
What was the lowest crowd size when the away team scored 11.17 (83)? | CREATE TABLE table_32690 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT MIN("Crowd") FROM table_32690 WHERE "Away team score" = '11.17 (83)' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the lowest crowd size when the away team scored 11.17 (83)? ### Input: CREATE TABLE table_32690 (
"Home team" t... |
Which brigade has a population of 190? | CREATE TABLE table_8268 (
"Name" text,
"Date" text,
"Defending forces" text,
"Brigade" text,
"Population" text
) | SELECT "Brigade" FROM table_8268 WHERE "Population" = '190' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which brigade has a population of 190? ### Input: CREATE TABLE table_8268 (
"Name" text,
"Date" text,
"Defending... |
What is the traffic direction of 97th street? | CREATE TABLE table_name_94 (
traffic_direction VARCHAR,
street VARCHAR
) | SELECT traffic_direction FROM table_name_94 WHERE street = "97th street" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the traffic direction of 97th street? ### Input: CREATE TABLE table_name_94 (
traffic_direction VARCHAR,
str... |
which state has the largest amount of judges to serve ? | CREATE TABLE table_203_563 (
id number,
"#" number,
"judge" text,
"state" text,
"born/died" text,
"active" text,
"chief" text,
"senior" text,
"appointed by" text,
"reason for\ntermination" text
) | SELECT "state" FROM table_203_563 GROUP BY "state" ORDER BY COUNT("judge") DESC LIMIT 1 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which state has the largest amount of judges to serve ? ### Input: CREATE TABLE table_203_563 (
id number,
"#" numbe... |
This semester who is teaching Upper-Level Writing ? | CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category 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,... | 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 INNER JOIN semester... | advising | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: This semester who is teaching Upper-Level Writing ? ### Input: CREATE TABLE program_course (
program_id int,
course_... |
tell me the name of the medication that patient 14397 was last prescribed via the oral route during their last hospital visit? | CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
val... | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14397 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND prescriptions.route = 'oral' ORDER BY prescriptions.startdate DESC LIMIT 1 | mimic_iii | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: tell me the name of the medication that patient 14397 was last prescribed via the oral route during their last hospital visi... |
Which wins have less than 1 bye? | CREATE TABLE table_59569 (
"Club" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Against" real
) | SELECT MAX("Wins") FROM table_59569 WHERE "Byes" < '1' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which wins have less than 1 bye? ### Input: CREATE TABLE table_59569 (
"Club" text,
"Wins" real,
"Byes" real,
... |
What was the amount of 000s when Germany had 16.6? | CREATE TABLE table_70343 (
"Year" text,
"Total (000s)" real,
"Israel" real,
"Germany" real,
"Jews (Halakha) in Israel" text
) | SELECT "Total (000s)" FROM table_70343 WHERE "Germany" = '16.6' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the amount of 000s when Germany had 16.6? ### Input: CREATE TABLE table_70343 (
"Year" text,
"Total (000s)"... |
Who did they lose to 3-17? | CREATE TABLE table_54289 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
) | SELECT "Opponent" FROM table_54289 WHERE "Score" = '3-17' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who did they lose to 3-17? ### Input: CREATE TABLE table_54289 (
"Date" text,
"Opponent" text,
"Score" text,
... |
give me the duration of the last stay of patient 28484 in the icu. | 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
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
... | SELECT STRFTIME('%j', icustays.outtime) - STRFTIME('%j', icustays.intime) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 28484) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1 | mimic_iii | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the duration of the last stay of patient 28484 in the icu. ### Input: CREATE TABLE transfers (
row_id number,
... |
how many patients have been discharged from hospital since 2 years ago. | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE vitalperiodic (
vitalperio... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE NOT patient.hospitaldischargetime IS NULL AND DATETIME(patient.hospitaldischargetime) >= DATETIME(CURRENT_TIME(), '-2 year') | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients have been discharged from hospital since 2 years ago. ### Input: CREATE TABLE treatment (
treatmentid ... |
Who is the guest 2 in the episode where guest 4 is Iyare Igiehon and guest 3 is John Oliver? | CREATE TABLE table_23725 (
"Date" text,
"Presenter" text,
"Guest 1" text,
"Guest 2" text,
"Guest 3" text,
"Guest 4" text
) | SELECT "Guest 2" FROM table_23725 WHERE "Guest 4" = 'Iyare Igiehon' AND "Guest 3" = 'John Oliver' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the guest 2 in the episode where guest 4 is Iyare Igiehon and guest 3 is John Oliver? ### Input: CREATE TABLE table_2... |
when is the hire date for those employees whose first name does not containing the letter M, and count them by a bar chart | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date... | SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE NOT FIRST_NAME LIKE '%M%' | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when is the hire date for those employees whose first name does not containing the letter M, and count them by a bar chart #... |
what were the five most frequently prescribed medications for the peptic ulcer disease female patients of the 30s during the same hospital encounter after they had been diagnosed with peptic ulcer disease? | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime t... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'peptic ulcer di... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what were the five most frequently prescribed medications for the peptic ulcer disease female patients of the 30s during the... |
Name the team 1 for round 3 | CREATE TABLE table_name_64 (
team_1 VARCHAR,
round VARCHAR
) | SELECT team_1 FROM table_name_64 WHERE round = "3" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the team 1 for round 3 ### Input: CREATE TABLE table_name_64 (
team_1 VARCHAR,
round VARCHAR
) ### Response: SE... |
How many field goals were scored by the player that got 7 touchdowns? | CREATE TABLE table_25711913_14 (
field_goals__4_points_ VARCHAR,
touchdowns__5_points_ VARCHAR
) | SELECT field_goals__4_points_ FROM table_25711913_14 WHERE touchdowns__5_points_ = 7 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many field goals were scored by the player that got 7 touchdowns? ### Input: CREATE TABLE table_25711913_14 (
field_... |
What is the name of the school with a decile of 1, a state authority, and located in Otahuhu? | CREATE TABLE table_52272 (
"Name" text,
"Years" text,
"Area" text,
"Authority" text,
"Decile" text,
"Roll" real
) | SELECT "Name" FROM table_52272 WHERE "Decile" = '1' AND "Authority" = 'state' AND "Area" = 'otahuhu' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of the school with a decile of 1, a state authority, and located in Otahuhu? ### Input: CREATE TABLE table_... |
For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of job_id and employee_id in a bar chart, and rank Y-axis from low to high order. | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE T... | SELECT JOB_ID, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMPLOYEE_ID | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distri... |
Tell me the stages for 1981 | CREATE TABLE table_31596 (
"Year" real,
"Date" text,
"Event" text,
"Days" text,
"Stages" text,
"Acts" text
) | SELECT "Stages" FROM table_31596 WHERE "Year" = '1981' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Tell me the stages for 1981 ### Input: CREATE TABLE table_31596 (
"Year" real,
"Date" text,
"Event" text,
"D... |
what language is seethaiah in | CREATE TABLE table_name_27 (
language VARCHAR,
film_name VARCHAR
) | SELECT language FROM table_name_27 WHERE film_name = "seethaiah" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what language is seethaiah in ### Input: CREATE TABLE table_name_27 (
language VARCHAR,
film_name VARCHAR
) ### Resp... |
give me the number of patients whose gender is m and year of birth is less than 2103? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.dob_year < "2103" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients whose gender is m and year of birth is less than 2103? ### Input: CREATE TABLE procedures (
... |
Tell me the date of stade des martyrs, dr congo | CREATE TABLE table_name_89 (
date VARCHAR,
venue VARCHAR
) | SELECT date FROM table_name_89 WHERE venue = "stade des martyrs, dr congo" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Tell me the date of stade des martyrs, dr congo ### Input: CREATE TABLE table_name_89 (
date VARCHAR,
venue VARCHAR
... |
What is the sum for the week with the date october 30, 1994? | CREATE TABLE table_45257 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | SELECT SUM("Week") FROM table_45257 WHERE "Date" = 'october 30, 1994' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the sum for the week with the date october 30, 1994? ### Input: CREATE TABLE table_45257 (
"Week" real,
"Dat... |
How many averages were listed for the couple who had 12 dances? | CREATE TABLE table_23662356_3 (
average VARCHAR,
number_of_dances VARCHAR
) | SELECT COUNT(average) FROM table_23662356_3 WHERE number_of_dances = 12 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many averages were listed for the couple who had 12 dances? ### Input: CREATE TABLE table_23662356_3 (
average VARCH... |
What was the school type for Los Angeles, California? | CREATE TABLE table_name_51 (
type VARCHAR,
location VARCHAR
) | SELECT type FROM table_name_51 WHERE location = "los angeles, california" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the school type for Los Angeles, California? ### Input: CREATE TABLE table_name_51 (
type VARCHAR,
location... |
what is the number of songs sung by two singers ? | CREATE TABLE table_203_267 (
id number,
"no." number,
"song" text,
"singers" text,
"length (m:ss)" text
) | SELECT COUNT("song") FROM table_203_267 WHERE "singers" >= 2 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of songs sung by two singers ? ### Input: CREATE TABLE table_203_267 (
id number,
"no." number,
... |
Who is the pick with the height of 6'9' and weighs (lbs) 215? | CREATE TABLE table_70625 (
"Position" text,
"Name" text,
"Height" text,
"Weight (lbs.)" real,
"Hometown" text,
"Draft Year" real,
"Pick" text,
"All-Stars" text,
"NBA Championships" text,
"NBA Team" text
) | SELECT "Pick" FROM table_70625 WHERE "Height" = '6''9' AND "Weight (lbs.)" = '215' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the pick with the height of 6'9' and weighs (lbs) 215? ### Input: CREATE TABLE table_70625 (
"Position" text,
... |
What is the current venue for the Miami Masters tournament? | CREATE TABLE table_14903081_1 (
current_venue VARCHAR,
tournament VARCHAR
) | SELECT current_venue FROM table_14903081_1 WHERE tournament = "Miami Masters" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the current venue for the Miami Masters tournament? ### Input: CREATE TABLE table_14903081_1 (
current_venue VAR... |
after december 29 what is the score? | CREATE TABLE table_75294 (
"Game" real,
"December" real,
"Opponent" text,
"Score" text,
"Record" text,
"Points" real
) | SELECT "Score" FROM table_75294 WHERE "December" > '29' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: after december 29 what is the score? ### Input: CREATE TABLE table_75294 (
"Game" real,
"December" real,
"Oppone... |
How much money did gaming alerts ask for? | CREATE TABLE table_68431 (
"Episode" text,
"First aired" text,
"Entrepreneur(s)" text,
"Company or product name" text,
"Money requested (\u00a3)" real,
"Investing Dragon(s)" text
) | SELECT COUNT("Money requested (\u00a3)") FROM table_68431 WHERE "Company or product name" = 'gaming alerts' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How much money did gaming alerts ask for? ### Input: CREATE TABLE table_68431 (
"Episode" text,
"First aired" text,
... |
If the episode was number 234, what was it's timeslot? | CREATE TABLE table_2639433_4 (
timeslot VARCHAR,
episodes VARCHAR
) | SELECT timeslot FROM table_2639433_4 WHERE episodes = 234 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: If the episode was number 234, what was it's timeslot? ### Input: CREATE TABLE table_2639433_4 (
timeslot VARCHAR,
e... |
What is the highest Car with more than 155 yards? | CREATE TABLE table_name_56 (
car INTEGER,
yards INTEGER
) | SELECT MAX(car) FROM table_name_56 WHERE yards > 155 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest Car with more than 155 yards? ### Input: CREATE TABLE table_name_56 (
car INTEGER,
yards INTEGER... |
What school has a public nickname, founded after 1838 in Harrisonburg, Va? | CREATE TABLE table_46120 (
"School" text,
"Location" text,
"Founded" real,
"Affiliation" text,
"Nickname" text
) | SELECT "Nickname" FROM table_46120 WHERE "Affiliation" = 'public' AND "Founded" > '1838' AND "Location" = 'harrisonburg, va' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What school has a public nickname, founded after 1838 in Harrisonburg, Va? ### Input: CREATE TABLE table_46120 (
"School... |
Top 10 answerers by score for a tag. | CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
Deletio... | SELECT Users.Id AS "user_link", SUM(Posts.Score) AS Score FROM Users JOIN Posts ON Users.Id = Posts.OwnerUserId JOIN PostTags ON PostTags.PostId = Posts.Id GROUP BY Users.Id, DisplayName ORDER BY SUM(Posts.Score) LIMIT 10 | sede | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Top 10 answerers by score for a tag. ### Input: CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name t... |
What is the average rating of songs for each language? | CREATE TABLE files (
f_id number,
artist_name text,
file_size text,
duration text,
formats text
)
CREATE TABLE artist (
artist_name text,
country text,
gender text,
preferred_genre text
)
CREATE TABLE song (
song_name text,
artist_name text,
country text,
f_id numbe... | SELECT AVG(rating), languages FROM song GROUP BY languages | spider | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the average rating of songs for each language? ### Input: CREATE TABLE files (
f_id number,
artist_name text... |
Which recording has a Track larger than 2, and a Translation of the last meal? | CREATE TABLE table_name_31 (
recorded VARCHAR,
track VARCHAR,
translation VARCHAR
) | SELECT recorded FROM table_name_31 WHERE track > 2 AND translation = "the last meal" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which recording has a Track larger than 2, and a Translation of the last meal? ### Input: CREATE TABLE table_name_31 (
r... |
Answers in a given period. | CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT COUNT(*) FROM Posts, Users WHERE Posts.OwnerUserId = Users.Id AND Users.Id = '##UserID##' AND Posts.CreationDate BETWEEN '##StartDate##' AND '##EndDate##' | sede | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Answers in a given period. ### Input: CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
... |
If the English translation is hello girl, what was the language? | CREATE TABLE table_22907 (
"Draw" real,
"Country" text,
"Language" text,
"Artist" text,
"Song" text,
"English translation" text,
"Result" text
) | SELECT "Language" FROM table_22907 WHERE "English translation" = 'Hello girl' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: If the English translation is hello girl, what was the language? ### Input: CREATE TABLE table_22907 (
"Draw" real,
... |
Which opponent had a time of 0:29? | CREATE TABLE table_name_71 (
opponent VARCHAR,
time VARCHAR
) | SELECT opponent FROM table_name_71 WHERE time = "0:29" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which opponent had a time of 0:29? ### Input: CREATE TABLE table_name_71 (
opponent VARCHAR,
time VARCHAR
) ### Resp... |
Show the names of aircrafts and the number of times it won matches. Visualize by pie chart. | CREATE TABLE aircraft (
Aircraft_ID int(11),
Aircraft varchar(50),
Description varchar(50),
Max_Gross_Weight varchar(50),
Total_disk_area varchar(50),
Max_disk_Loading varchar(50)
)
CREATE TABLE match (
Round real,
Location text,
Country text,
Date text,
Fastest_Qualifying t... | SELECT Aircraft, COUNT(*) FROM aircraft AS T1 JOIN match AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the names of aircrafts and the number of times it won matches. Visualize by pie chart. ### Input: CREATE TABLE aircraft... |
Which customer had at least 2 policies but did not file any claims? List the customer details and id. | CREATE TABLE payments (
payment_id number,
settlement_id number,
payment_method_code text,
date_payment_made time,
amount_payment number
)
CREATE TABLE settlements (
settlement_id number,
claim_id number,
date_claim_made time,
date_claim_settled time,
amount_claimed number,
... | SELECT T1.customer_details, T1.customer_id FROM customers AS T1 JOIN customer_policies AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 2 EXCEPT SELECT T1.customer_details, T1.customer_id FROM customers AS T1 JOIN customer_policies AS T2 ON T1.customer_id = T2.customer_id JOIN claims ... | spider | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which customer had at least 2 policies but did not file any claims? List the customer details and id. ### Input: CREATE TABL... |
how many teams are listed ? | CREATE TABLE table_204_506 (
id number,
"seasons" number,
"team" text,
"ch.wins" number,
"promotions" number,
"relegations" number
) | SELECT COUNT("team") FROM table_204_506 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many teams are listed ? ### Input: CREATE TABLE table_204_506 (
id number,
"seasons" number,
"team" text,
... |
what is drug route of drug name nitroglycerin sl? | 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
)
... | SELECT prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Nitroglycerin SL" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is drug route of drug name nitroglycerin sl? ### Input: CREATE TABLE procedures (
subject_id text,
hadm_id text... |
what procedure did patient 008-39015 receive the first time during the last year. | CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE patient (
uniquep... | SELECT treatment.treatmentname FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '008-39015')) AND DATETIME(treatment.treatmenttime, 'start of year... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what procedure did patient 008-39015 receive the first time during the last year. ### Input: CREATE TABLE vitalperiodic (
... |
What Label has a Catalog of 486 136-2? | CREATE TABLE table_name_13 (
label VARCHAR,
catalog VARCHAR
) | SELECT label FROM table_name_13 WHERE catalog = "486 136-2" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What Label has a Catalog of 486 136-2? ### Input: CREATE TABLE table_name_13 (
label VARCHAR,
catalog VARCHAR
) ### ... |
Is there an ORALHEAL 400 -level class that is 9 -credit ? | CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE offering_instructor (
... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE program_course.catego... | advising | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Is there an ORALHEAL 400 -level class that is 9 -credit ? ### Input: CREATE TABLE gsi (
course_offering_id int,
stud... |
Questions by users with rep>1000. | CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDispl... | SELECT Users.Id AS "user_link", Posts.Title, 'http://english.stackexchange.com/questions/' + CAST(Posts.Id AS TEXT) AS Hyperlink, Posts.LastEditDate, Posts.CreationDate, Posts.ClosedDate, Posts.AcceptedAnswerId FROM Users INNER JOIN Posts ON Users.Id = OwnerUserId WHERE Reputation >= 1000 AND Title != '' AND Posts.Crea... | sede | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Questions by users with rep>1000. ### Input: CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
Accep... |
For my MDE , which classes count toward it ? | CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE ta (
campus_job_id int,... | SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id | advising | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For my MDE , which classes count toward it ? ### Input: CREATE TABLE comment_instructor (
instructor_id int,
student... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.