instruction
stringlengths
0
1.06k
input
stringlengths
33
7.14k
response
stringlengths
2
4.44k
source
stringclasses
25 values
text
stringlengths
302
8.5k
What is the location for the game with a score of w 106-81?
CREATE TABLE table_66089 ( "Game" text, "Date" text, "Opponent" text, "Score" text, "Location/Attendance" text, "Record" text )
SELECT "Location/Attendance" FROM table_66089 WHERE "Score" = 'w 106-81'
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 location for the game with a score of w 106-81? ### Input: CREATE TABLE table_66089 ( "Game" text, "Date...
Where is the lowest area with a population of 7,616?
CREATE TABLE table_name_55 ( area__km²_ INTEGER, population__2010_ VARCHAR )
SELECT MIN(area__km²_) FROM table_name_55 WHERE population__2010_ = 7 OFFSET 616
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: Where is the lowest area with a population of 7,616? ### Input: CREATE TABLE table_name_55 ( area__km²_ INTEGER, pop...
What is the number of rank with the viewership of 5.96 million?
CREATE TABLE table_16588 ( "#" real, "Episode" text, "Air Date" text, "Timeslot (EST)" text, "Season" text, "Rating" text, "Share" real, "18\u201349" text, "Viewers (m)" text, "Rank (#)" text )
SELECT COUNT("Rank (#)") FROM table_16588 WHERE "Viewers (m)" = '5.96'
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 number of rank with the viewership of 5.96 million? ### Input: CREATE TABLE table_16588 ( "#" real, "Epi...
What day did the person who finished in 12th place leave on?
CREATE TABLE table_6104 ( "Celebrity" text, "Known for" text, "Entered" text, "Exited" text, "Finished" text )
SELECT "Exited" FROM table_6104 WHERE "Finished" = '12th'
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 day did the person who finished in 12th place leave on? ### Input: CREATE TABLE table_6104 ( "Celebrity" text, ...
Show all publishers which do not have a book in 1989.
CREATE TABLE book_club ( publisher VARCHAR, YEAR VARCHAR )
SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989
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: Show all publishers which do not have a book in 1989. ### Input: CREATE TABLE book_club ( publisher VARCHAR, YEAR VA...
Position of defensive tackle, and a Round of 4, and a Pick # smaller than 36 has what overall average?
CREATE TABLE table_name_47 ( overall INTEGER, pick__number VARCHAR, position VARCHAR, round VARCHAR )
SELECT AVG(overall) FROM table_name_47 WHERE position = "defensive tackle" AND round = 4 AND pick__number < 36
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: Position of defensive tackle, and a Round of 4, and a Pick # smaller than 36 has what overall average? ### Input: CREATE TAB...
What was the Record of the game in which the Trail Blazers was the visiting team?
CREATE TABLE table_name_24 ( record VARCHAR, visitor VARCHAR )
SELECT record FROM table_name_24 WHERE visitor = "trail blazers"
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 Record of the game in which the Trail Blazers was the visiting team? ### Input: CREATE TABLE table_name_24 ( ...
Which Date has a Home of montreal canadiens, and Points larger than 9, and a Decision of price?
CREATE TABLE table_name_99 ( date VARCHAR, decision VARCHAR, home VARCHAR, points VARCHAR )
SELECT date FROM table_name_99 WHERE home = "montreal canadiens" AND points > 9 AND decision = "price"
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 Date has a Home of montreal canadiens, and Points larger than 9, and a Decision of price? ### Input: CREATE TABLE tabl...
What classes next semester are being taught by Dr. Scott Baron ?
CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Scott Baron%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offer...
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: What classes next semester are being taught by Dr. Scott Baron ? ### Input: CREATE TABLE semester ( semester_id int, ...
What are all the labels?
CREATE TABLE Albums ( label VARCHAR )
SELECT DISTINCT label FROM Albums
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 all the labels? ### Input: CREATE TABLE Albums ( label VARCHAR ) ### Response: SELECT DISTINCT label FROM Album...
Which river had 26 points?
CREATE TABLE table_name_72 ( driver VARCHAR, points VARCHAR )
SELECT driver FROM table_name_72 WHERE points = 26
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 river had 26 points? ### Input: CREATE TABLE table_name_72 ( driver VARCHAR, points VARCHAR ) ### Response: SE...
What's the Issue Date for an Eric Prydz song with a no available Download information?
CREATE TABLE table_70184 ( "Week" real, "Issue Date" text, "Artist" text, "Single" text, "Download" text, "Title" text )
SELECT "Issue Date" FROM table_70184 WHERE "Download" = 'no available' AND "Artist" = 'eric prydz'
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's the Issue Date for an Eric Prydz song with a no available Download information? ### Input: CREATE TABLE table_70184 (...
Show each state and the number of addresses in each state.
CREATE TABLE customer_orders ( order_id number, customer_id number, order_date time, order_status_code text ) CREATE TABLE addresses ( address_id number, line_1_number_building text, city text, zip_postcode text, state_province_county text, country text ) CREATE TABLE customers...
SELECT state_province_county, COUNT(*) FROM addresses GROUP BY state_province_county
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: Show each state and the number of addresses in each state. ### Input: CREATE TABLE customer_orders ( order_id number, ...
what were the allergies that patient 006-153198 has had since 119 months ago?
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 allergy.allergyname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-153198')) AND DATETIME(allergy.allergytime) >= DATETIME(CURRENT_TIME(...
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 allergies that patient 006-153198 has had since 119 months ago? ### Input: CREATE TABLE medication ( medic...
What is the sum for December against the vancouver canucks earlier than game 33?
CREATE TABLE table_name_59 ( december INTEGER, opponent VARCHAR, game VARCHAR )
SELECT SUM(december) FROM table_name_59 WHERE opponent = "vancouver canucks" AND game < 33
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 sum for December against the vancouver canucks earlier than game 33? ### Input: CREATE TABLE table_name_59 ( ...
list the flights arriving in BALTIMORE from DENVER on 8 3
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airli...
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, state WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND date_day.day_number = 2 AND date_day.month_number =...
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: list the flights arriving in BALTIMORE from DENVER on 8 3 ### Input: CREATE TABLE code_description ( code varchar, d...
How many vuts made for a player with 2 wins and under 7 top 5s?
CREATE TABLE table_name_96 ( cuts_made INTEGER, wins VARCHAR, top_5 VARCHAR )
SELECT AVG(cuts_made) FROM table_name_96 WHERE wins = 2 AND top_5 < 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 vuts made for a player with 2 wins and under 7 top 5s? ### Input: CREATE TABLE table_name_96 ( cuts_made INTEGE...
When the opponent was Brechin City and the attendance was 656, what was the Result?
CREATE TABLE table_name_47 ( result VARCHAR, opponent VARCHAR, attendance VARCHAR )
SELECT result FROM table_name_47 WHERE opponent = "brechin city" AND attendance = 656
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: When the opponent was Brechin City and the attendance was 656, what was the Result? ### Input: CREATE TABLE table_name_47 ( ...
Monthly active users in StackOverflow / StackExchange.
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ...
SELECT COUNT(*) AS ActivePosters5 FROM Posts AS p WHERE p.Score >= 0 AND DATEDIFF(day, p.CreationDate, GETDATE()) <= 30 GROUP BY p.OwnerUserId HAVING COUNT(p.Id) >= 5
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: Monthly active users in StackOverflow / StackExchange. ### Input: CREATE TABLE Votes ( Id number, PostId number, ...
what is the population estimate 2005 for the with the area (km2) 3,034.08?
CREATE TABLE table_11224 ( "Name" text, "Area (km 2 )" real, "Population Estimate 2005" real, "Population Census 2010" real, "Capital" text )
SELECT AVG("Population Estimate 2005") FROM table_11224 WHERE "Area (km 2 )" = '3,034.08'
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 population estimate 2005 for the with the area (km2) 3,034.08? ### Input: CREATE TABLE table_11224 ( "Name" ...
I want the name for rank less than 6 and year more than 1974
CREATE TABLE table_name_75 ( name VARCHAR, rank VARCHAR, year VARCHAR )
SELECT name FROM table_name_75 WHERE rank < 6 AND year > 1974
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: I want the name for rank less than 6 and year more than 1974 ### Input: CREATE TABLE table_name_75 ( name VARCHAR, r...
What is the lowest numbered division Cleveland played in?
CREATE TABLE table_26156 ( "Year" real, "Division" real, "League" text, "Regular Season" text, "Playoffs" text, "Open Cup" text )
SELECT MIN("Division") FROM table_26156
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 lowest numbered division Cleveland played in? ### Input: CREATE TABLE table_26156 ( "Year" real, "Divisi...
What is the highest Attendance with a Result that is w 24-21?
CREATE TABLE table_name_50 ( attendance INTEGER, result VARCHAR )
SELECT MAX(attendance) FROM table_name_50 WHERE result = "w 24-21"
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 Attendance with a Result that is w 24-21? ### Input: CREATE TABLE table_name_50 ( attendance INTEGER...
how many times did patient 3929 come to icu during their current hospital visit?
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 d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE proce...
SELECT COUNT(DISTINCT icustays.icustay_id) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3929 AND admissions.dischtime IS NULL)
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: how many times did patient 3929 come to icu during their current hospital visit? ### Input: CREATE TABLE transfers ( row...
what is the frequency of part number tmn550dcr23gm?
CREATE TABLE table_10885 ( "Model number" text, "Frequency" text, "L2 cache" text, "FPU width" text, "Multiplier 1" text, "Socket" text, "Release date" text, "Order part number" text )
SELECT "Frequency" FROM table_10885 WHERE "Order part number" = 'tmn550dcr23gm'
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 frequency of part number tmn550dcr23gm? ### Input: CREATE TABLE table_10885 ( "Model number" text, "Freq...
Name the speed for andy reynolds
CREATE TABLE table_57294 ( "Rank" real, "Rider" text, "Team" text, "Speed" text, "Time" text )
SELECT "Speed" FROM table_57294 WHERE "Rider" = 'andy reynolds'
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 speed for andy reynolds ### Input: CREATE TABLE table_57294 ( "Rank" real, "Rider" text, "Team" text, ...
How many Barangays lived in the municipality with area coordinator of 110.95?
CREATE TABLE table_2402209_1 ( no_of_barangays VARCHAR, area_coordinator VARCHAR )
SELECT no_of_barangays FROM table_2402209_1 WHERE area_coordinator = "110.95"
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 Barangays lived in the municipality with area coordinator of 110.95? ### Input: CREATE TABLE table_2402209_1 ( ...
What is Caps, when Province / Club is DRFC, and when Position is Center?
CREATE TABLE table_41530 ( "Player" text, "Position" text, "Date of Birth (Age)" text, "Caps" text, "Province / Club" text )
SELECT "Caps" FROM table_41530 WHERE "Province / Club" = 'drfc' AND "Position" = 'center'
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 Caps, when Province / Club is DRFC, and when Position is Center? ### Input: CREATE TABLE table_41530 ( "Player" ...
modified hachinski less than or equal to 4
CREATE TABLE table_train_107 ( "id" int, "systolic_blood_pressure_sbp" int, "body_weight" float, "modified_hachinski_ischemia_scale" int, "diastolic_blood_pressure_dbp" int, "body_mass_index_bmi" float, "clinical_dementia_rating_cdr" float, "NOUSE" float )
SELECT * FROM table_train_107 WHERE modified_hachinski_ischemia_scale <= 4
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: modified hachinski less than or equal to 4 ### Input: CREATE TABLE table_train_107 ( "id" int, "systolic_blood_press...
creatinine level ( a measure of kidney function is greater than 1.4 mg / dl ( for female ) or greater than 1.5 mg / dl ( for male ) or your estimated gfr is under 60 .
CREATE TABLE table_train_277 ( "id" int, "gender" string, "cholesterol" float, "blood_platelet_counts" int, "creatinine_clearance_cl" float, "estimated_glomerular_filtration_rate_egfr" int, "severe_dyslipidemia" bool, "fasting_triglyceride" int, "body_mass_index_bmi" float, "trig...
SELECT * FROM table_train_277 WHERE (creatinine_clearance_cl > 1.4 AND gender = 'female') OR (creatinine_clearance_cl > 1.5 AND gender = 'male') OR estimated_glomerular_filtration_rate_egfr < 60
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: creatinine level ( a measure of kidney function is greater than 1.4 mg / dl ( for female ) or greater than 1.5 mg / dl ( for...
Name the total number of results for octubre
CREATE TABLE table_20963074_1 ( result VARCHAR, original_title VARCHAR )
SELECT COUNT(result) FROM table_20963074_1 WHERE original_title = "Octubre"
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 total number of results for octubre ### Input: CREATE TABLE table_20963074_1 ( result VARCHAR, original_tit...
When did the ship that was commissioned July 1948 with a bow number of ps-31 launch?
CREATE TABLE table_name_22 ( launched VARCHAR, commissioned VARCHAR, bow_number VARCHAR )
SELECT launched FROM table_name_22 WHERE commissioned = "july 1948" AND bow_number = "ps-31"
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: When did the ship that was commissioned July 1948 with a bow number of ps-31 launch? ### Input: CREATE TABLE table_name_22 (...
Which streak before game 12 had a team points larger than 113 on November 16?
CREATE TABLE table_44259 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Team points" real, "Opponent score" real, "Record" text, "Streak" text )
SELECT "Streak" FROM table_44259 WHERE "Team points" > '113' AND "Game" < '12' AND "Date" = 'november 16'
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 streak before game 12 had a team points larger than 113 on November 16? ### Input: CREATE TABLE table_44259 ( "Gam...
what are the new prescriptions of patient 021-111547 of today compared to the prescription yesterday?
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetake...
SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '021-111547') AND DATETIME(medication.drugstarttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT medication.drugname FROM medic...
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 are the new prescriptions of patient 021-111547 of today compared to the prescription yesterday? ### Input: CREATE TABL...
What is the smallest ansi code?
CREATE TABLE table_18600760_13 ( ansi_code INTEGER )
SELECT MIN(ansi_code) FROM table_18600760_13
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 smallest ansi code? ### Input: CREATE TABLE table_18600760_13 ( ansi_code INTEGER ) ### Response: SELECT MIN...
What are the NFL Teams in College North Texas State?
CREATE TABLE table_27359 ( "Pick #" real, "NFL Team" text, "Player" text, "Position" text, "College" text )
SELECT "NFL Team" FROM table_27359 WHERE "College" = 'North Texas State'
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 are the NFL Teams in College North Texas State? ### Input: CREATE TABLE table_27359 ( "Pick #" real, "NFL Team"...
since 2102 patient 003-50177 has undergone antibiotics - cephalosporin in other hospitals?
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE l...
SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '003-50177' AND patient.hospitalid <> (SELECT DISTINCT patient.hospitalid FROM patient WHERE patient.uniquepid = '003-50177' AND patient.hospitaldischargetime IS NULL)) AND tr...
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: since 2102 patient 003-50177 has undergone antibiotics - cephalosporin in other hospitals? ### Input: CREATE TABLE treatment...
WHAT DATE HAD A GAME SMALLER THAN 58, AND FROM BOSTON?
CREATE TABLE table_51165 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT "Date" FROM table_51165 WHERE "Game" < '58' AND "Team" = 'boston'
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 DATE HAD A GAME SMALLER THAN 58, AND FROM BOSTON? ### Input: CREATE TABLE table_51165 ( "Game" real, "Date" tex...
What is Round 4 when Round 6+ is triple, Round 5 is triple and Round 3 is single?
CREATE TABLE table_40927 ( "From" real, "Goal" text, "Round 1" text, "Round 2" text, "Round 3" text, "Round 4" text, "Round 5" text, "Round 6+" text )
SELECT "Round 4" FROM table_40927 WHERE "Round 6+" = 'triple' AND "Round 5" = 'triple' AND "Round 3" = 'single'
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 Round 4 when Round 6+ is triple, Round 5 is triple and Round 3 is single? ### Input: CREATE TABLE table_40927 ( ...
Top 200 users from Iran. Lists the top 200 users (ranked by reputation) that are located in Iran according to their profile information.
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, ...
SELECT Id, DisplayName, Reputation, WebsiteUrl, Location FROM Users WHERE Location LIKE '%Iran%' ORDER BY Reputation DESC LIMIT 200
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 200 users from Iran. Lists the top 200 users (ranked by reputation) that are located in Iran according to their profile ...
What are all the different start station names for a trip that lasted less than 100?
CREATE TABLE trip ( id number, duration number, start_date text, start_station_name text, start_station_id number, end_date text, end_station_name text, end_station_id number, bike_id number, subscription_type text, zip_code number ) CREATE TABLE station ( id number, ...
SELECT DISTINCT start_station_name FROM trip WHERE duration < 100
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 are all the different start station names for a trip that lasted less than 100? ### Input: CREATE TABLE trip ( id n...
What is the date when Richmond was the home team?
CREATE TABLE table_10432 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Date" FROM table_10432 WHERE "Home team" = 'richmond'
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 date when Richmond was the home team? ### Input: CREATE TABLE table_10432 ( "Home team" text, "Home team...
List all areas within 1000 km in the city of Lubelskie?
CREATE TABLE table_279 ( "car plates (since 1937)" text, "Voivodeship Separate city" text, "Capital" text, "Area in 1000km\u00b2 (1930)" text, "Population in 1000 (1931)" text )
SELECT "Area in 1000km\u00b2 (1930)" FROM table_279 WHERE "Voivodeship Separate city" = 'lubelskie'
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: List all areas within 1000 km in the city of Lubelskie? ### Input: CREATE TABLE table_279 ( "car plates (since 1937)" te...
Which Events have a Player of tom kite, and Earnings ($) smaller than 760,405?
CREATE TABLE table_name_60 ( events INTEGER, player VARCHAR, earnings___$__ VARCHAR )
SELECT AVG(events) FROM table_name_60 WHERE player = "tom kite" AND earnings___$__ < 760 OFFSET 405
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 Events have a Player of tom kite, and Earnings ($) smaller than 760,405? ### Input: CREATE TABLE table_name_60 ( e...
When Grand Rapids's fare was $377.29, what is the fare to Detroit?
CREATE TABLE table_1637981_7 ( detroit__dtw_ VARCHAR, grand_rapids__grr_ VARCHAR )
SELECT detroit__dtw_ FROM table_1637981_7 WHERE grand_rapids__grr_ = "$377.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: When Grand Rapids's fare was $377.29, what is the fare to Detroit? ### Input: CREATE TABLE table_1637981_7 ( detroit__dt...
What was the surface for the opponent Marcos Baghdatis?
CREATE TABLE table_name_3 ( surface VARCHAR, opponent VARCHAR )
SELECT surface FROM table_name_3 WHERE opponent = "marcos baghdatis"
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 surface for the opponent Marcos Baghdatis? ### Input: CREATE TABLE table_name_3 ( surface VARCHAR, oppo...
What is the average rank for Group A athlete Yanina Karolchyk, and a result higher than 18?
CREATE TABLE table_name_59 ( rank INTEGER, result VARCHAR, group VARCHAR, athlete VARCHAR )
SELECT AVG(rank) FROM table_name_59 WHERE group = "a" AND athlete = "yanina karolchyk" AND result > 18
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 average rank for Group A athlete Yanina Karolchyk, and a result higher than 18? ### Input: CREATE TABLE table_na...
What is the smallest finish time for a race where start was less than 3, buick was the manufacturer, and the race was held after 1978?
CREATE TABLE table_name_45 ( finish INTEGER, start VARCHAR, year VARCHAR, manufacturer VARCHAR )
SELECT MIN(finish) FROM table_name_45 WHERE year > 1978 AND manufacturer = "buick" AND start < 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: What is the smallest finish time for a race where start was less than 3, buick was the manufacturer, and the race was held a...
What division did the Nashville Metros play in during the year that they did not qualify for the Playoffs, where in the USL PDL League, and had the Regular Season 7th, Southeast?
CREATE TABLE table_66952 ( "Year" real, "Division" text, "League" text, "Regular Season" text, "Playoffs" text, "Open Cup" text )
SELECT "Division" FROM table_66952 WHERE "Playoffs" = 'did not qualify' AND "League" = 'usl pdl' AND "Regular Season" = '7th, southeast'
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 division did the Nashville Metros play in during the year that they did not qualify for the Playoffs, where in the USL ...
give me the number of patients whose days of hospital stay is greater than 20 and drug name is neo*iv*fat emulsion?
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "20" AND prescriptions.drug = "NEO*IV*Fat Emulsion"
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 days of hospital stay is greater than 20 and drug name is neo*iv*fat emulsion? ### Inpu...
What is the bleeding time for glanzmann's thrombasthenia?
CREATE TABLE table_238124_1 ( bleeding_time VARCHAR, condition VARCHAR )
SELECT bleeding_time FROM table_238124_1 WHERE condition = "Glanzmann's thrombasthenia"
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 bleeding time for glanzmann's thrombasthenia? ### Input: CREATE TABLE table_238124_1 ( bleeding_time VARCHAR...
What is the qualifying end date when the qualifying start date is qualifying start date?
CREATE TABLE table_26464 ( "Confederation" text, "Teams started" text, "Teams that have secured qualification" text, "Teams that can still qualify" text, "Teams that have been eliminated" text, "Remaining places in finals" text, "Total places in finals" text, "Qualifying start date" text...
SELECT "Qualifying end date" FROM table_26464 WHERE "Qualifying start date" = 'Qualifying start date'
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 qualifying end date when the qualifying start date is qualifying start date? ### Input: CREATE TABLE table_26464...
how many patients were diagnosed with sepsis and they didn't return to the hospital in a year before within 2 months?
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 (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'sepsis' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of ...
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 were diagnosed with sepsis and they didn't return to the hospital in a year before within 2 months? ### In...
For CS majors , name the classes that are available this Winter .
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 student_record ( student_id int, course_id int, semester int, grade varc...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program, program_course, semester WHERE program_course.course_id = course.course_id AND program_course.course_id = course.course_id AND program.name LIKE '%CS%' AND program.program_id = program_course.program_id AND semester.sem...
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 CS majors , name the classes that are available this Winter . ### Input: CREATE TABLE requirement ( requirement_id i...
What was the score where the total points was 50?
CREATE TABLE table_name_34 ( score VARCHAR, total_points VARCHAR )
SELECT score FROM table_name_34 WHERE total_points = 50
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 score where the total points was 50? ### Input: CREATE TABLE table_name_34 ( score VARCHAR, total_point...
What is the Elevator of the Elected Elevated on September 21, 1179?
CREATE TABLE table_name_50 ( elevator VARCHAR, elevated VARCHAR )
SELECT elevator FROM table_name_50 WHERE elevated = "september 21, 1179"
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 Elevator of the Elected Elevated on September 21, 1179? ### Input: CREATE TABLE table_name_50 ( elevator VAR...
1) Top 15 Posts, Ranked. Show post id, FavoriteCount (use column label votes), CommentCount (label:answers), ViewCount (label: views), and title
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 TOP(15) AS Id, FavoriteCount AS Votes, CommentCount AS Answers, ViewCount AS Views, Title FROM Posts WHERE NOT Title IS NULL ORDER BY Score DESC
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: 1) Top 15 Posts, Ranked. Show post id, FavoriteCount (use column label votes), CommentCount (label:answers), ViewCount (labe...
Attendance larger than 55,189 is which average game?
CREATE TABLE table_69496 ( "Game" real, "Date" text, "Score" text, "Location" text, "Time" text, "Attendance" real )
SELECT AVG("Game") FROM table_69496 WHERE "Attendance" > '55,189'
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: Attendance larger than 55,189 is which average game? ### Input: CREATE TABLE table_69496 ( "Game" real, "Date" text,...
during the current hospital visit how many times did patient 016-9636 get a ptt test?
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate n...
SELECT COUNT(*) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-9636' AND patient.hospitaldischargetime IS NULL)) AND lab.labname = 'ptt'
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: during the current hospital visit how many times did patient 016-9636 get a ptt test? ### Input: CREATE TABLE cost ( cos...
What is the total overall in round 1, in which Charles White was a player?
CREATE TABLE table_32200 ( "Round" real, "Overall" real, "Player" text, "Position" text, "School/Club Team" text )
SELECT SUM("Overall") FROM table_32200 WHERE "Player" = 'charles white' AND "Round" < '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: What is the total overall in round 1, in which Charles White was a player? ### Input: CREATE TABLE table_32200 ( "Round"...
What's the lowest number of total passengers (millions) for an annual entry/exit of 36.609?
CREATE TABLE table_62659 ( "Rank" real, "Railway Station" text, "Annual entry/exit (millions) 2011\u201312" real, "Annual interchanges (millions) 2011\u201312" real, "Total Passengers (millions) 2011\u201312" real, "Location" text, "Number of Platforms" real )
SELECT MIN("Total Passengers (millions) 2011\u201312") FROM table_62659 WHERE "Annual entry/exit (millions) 2011\u201312" = '36.609'
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's the lowest number of total passengers (millions) for an annual entry/exit of 36.609? ### Input: CREATE TABLE table_62...
what is the flash size difference in the at90s8515 chip and the at90s4414 ?
CREATE TABLE table_204_416 ( id number, "chip" text, "flash size" text, "eeprom" number, "sram" number, "frequency\n[mhz]" number, "package" text )
SELECT ABS((SELECT "flash size" FROM table_204_416 WHERE "chip" = 'at90s8515') - (SELECT "flash size" FROM table_204_416 WHERE "chip" = 'at90s4414'))
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 flash size difference in the at90s8515 chip and the at90s4414 ? ### Input: CREATE TABLE table_204_416 ( id n...
Name the score for december 5
CREATE TABLE table_57402 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
SELECT "Score" FROM table_57402 WHERE "Date" = 'december 5'
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 score for december 5 ### Input: CREATE TABLE table_57402 ( "Date" text, "Visitor" text, "Score" text, ...
What is the average crowd to watch Hawthorn as the away team?
CREATE TABLE table_name_29 ( crowd INTEGER, away_team VARCHAR )
SELECT AVG(crowd) FROM table_name_29 WHERE away_team = "hawthorn"
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 average crowd to watch Hawthorn as the away team? ### Input: CREATE TABLE table_name_29 ( crowd INTEGER, ...
2007 of 8 4 is involved in what 2002?
CREATE TABLE table_name_69 ( Id VARCHAR )
SELECT 2002 FROM table_name_69 WHERE 2007 = "8–4"
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: 2007 of 8 4 is involved in what 2002? ### Input: CREATE TABLE table_name_69 ( Id VARCHAR ) ### Response: SELECT 2002 FRO...
What was the attendance when the opposing team was the Ottawa Senators and the record was 24-35-17?
CREATE TABLE table_17360840_9 ( attendance INTEGER, opponent VARCHAR, record VARCHAR )
SELECT MAX(attendance) FROM table_17360840_9 WHERE opponent = "Ottawa Senators" AND record = "24-35-17"
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 attendance when the opposing team was the Ottawa Senators and the record was 24-35-17? ### Input: CREATE TABLE ...
when was the first time patient 013-38992 was having less than 93.0 sao2 on the current icu visit?
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE intakeoutput ( i...
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 = '013-38992') AND patient.unitdischargetime IS NULL) ...
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: when was the first time patient 013-38992 was having less than 93.0 sao2 on the current icu visit? ### Input: CREATE TABLE m...
what was the win for the 6 matches?
CREATE TABLE table_42341 ( "Year" text, "Matches" text, "Wins" text, "Losses" text, "No Result" text, "Success Rate" text )
SELECT "Wins" FROM table_42341 WHERE "Matches" = '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 win for the 6 matches? ### Input: CREATE TABLE table_42341 ( "Year" text, "Matches" text, "Wins" te...
Which show was sent to syndication for its new/returning/same network.
CREATE TABLE table_169766_13 ( show VARCHAR, new_returning_same_network VARCHAR )
SELECT show FROM table_169766_13 WHERE new_returning_same_network = "Syndication"
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 show was sent to syndication for its new/returning/same network. ### Input: CREATE TABLE table_169766_13 ( show VA...
how many wrestlers had a time of 6:47 ?
CREATE TABLE table_203_277 ( id number, "entered" number, "wrestler" text, "place" text, "eliminated by" text, "time" text )
SELECT COUNT("wrestler") FROM table_203_277 WHERE "time" = '06:47'
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 wrestlers had a time of 6:47 ? ### Input: CREATE TABLE table_203_277 ( id number, "entered" number, "wr...
What is the number of countries in the artist table?, I want to order from high to low by the x-axis.
CREATE TABLE artist ( Artist_ID int, Name text, Country text, Year_Join int, Age int ) CREATE TABLE exhibition_record ( Exhibition_ID int, Date text, Attendance int ) CREATE TABLE exhibition ( Exhibition_ID int, Year int, Theme text, Artist_ID int, Ticket_Price real...
SELECT Country, COUNT(Country) FROM artist GROUP BY Country ORDER BY Country 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: What is the number of countries in the artist table?, I want to order from high to low by the x-axis. ### Input: CREATE TABL...
On which week was the beatles the original artist and the order # smaller than 10?
CREATE TABLE table_40292 ( "Week #" text, "Theme" text, "Song choice" text, "Original artist" text, "Order #" real, "Result" text )
SELECT "Week #" FROM table_40292 WHERE "Original artist" = 'the beatles' AND "Order #" < '10'
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 which week was the beatles the original artist and the order # smaller than 10? ### Input: CREATE TABLE table_40292 ( ...
Which game did was Bud Eley a player in?
CREATE TABLE table_52202 ( "Rank" real, "Name" text, "Team" text, "Games" real, "Rebounds" real )
SELECT "Games" FROM table_52202 WHERE "Name" = 'bud eley'
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 did was Bud Eley a player in? ### Input: CREATE TABLE table_52202 ( "Rank" real, "Name" text, "Team" ...
Which tournament has a 2011 of 1r?
CREATE TABLE table_54432 ( "Tournament" text, "2009" text, "2010" text, "2011" text, "2012" text, "2013" text )
SELECT "Tournament" FROM table_54432 WHERE "2011" = '1r'
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 tournament has a 2011 of 1r? ### Input: CREATE TABLE table_54432 ( "Tournament" text, "2009" text, "2010" ...
Name the number of families for uk30
CREATE TABLE table_23409 ( "No. overall" text, "No. in series" real, "Family/families" text, "Location(s)" text, "Original air date" text )
SELECT COUNT("Family/families") FROM table_23409 WHERE "No. overall" = 'UK30'
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 families for uk30 ### Input: CREATE TABLE table_23409 ( "No. overall" text, "No. in series" real,...
What place had 14:11.15 as the performance?
CREATE TABLE table_name_33 ( place VARCHAR, performance VARCHAR )
SELECT place FROM table_name_33 WHERE performance = "14:11.15"
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 place had 14:11.15 as the performance? ### Input: CREATE TABLE table_name_33 ( place VARCHAR, performance VARCH...
Band of am, and a Frequency of 0 846 has what purpose?
CREATE TABLE table_name_18 ( purpose VARCHAR, band VARCHAR, frequency VARCHAR )
SELECT purpose FROM table_name_18 WHERE band = "am" AND frequency = "0 846"
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: Band of am, and a Frequency of 0 846 has what purpose? ### Input: CREATE TABLE table_name_18 ( purpose VARCHAR, band...
Which clubs have players with height 2.14m?
CREATE TABLE table_23670057_5 ( current_club VARCHAR, height__m_ VARCHAR )
SELECT current_club FROM table_23670057_5 WHERE height__m_ = "2.14"
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 clubs have players with height 2.14m? ### Input: CREATE TABLE table_23670057_5 ( current_club VARCHAR, height_...
What is the name of the dorm with both a TV Lounge and Study Room listed as amenities?
CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE dorm_amenity ( amenid number, amenity_name text ) CREATE TABLE dorm ( dormid number, dorm_name text, student_capacity numbe...
SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' INTERSECT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3...
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 name of the dorm with both a TV Lounge and Study Room listed as amenities? ### Input: CREATE TABLE student ( ...
What is the Clubs when there are 4 for the number of fixtures?
CREATE TABLE table_name_3 ( clubs VARCHAR, number_of_fixtures VARCHAR )
SELECT clubs FROM table_name_3 WHERE number_of_fixtures = 4
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 Clubs when there are 4 for the number of fixtures? ### Input: CREATE TABLE table_name_3 ( clubs VARCHAR, ...
find the name of people whose height is lower than the average.
CREATE TABLE people ( name VARCHAR, height INTEGER )
SELECT name FROM people WHERE height < (SELECT AVG(height) FROM people)
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: find the name of people whose height is lower than the average. ### Input: CREATE TABLE people ( name VARCHAR, heigh...
Who is the winner when the st kilda score is 13.10.88?
CREATE TABLE table_28211103_1 ( winner VARCHAR, st_kilda_score VARCHAR )
SELECT winner FROM table_28211103_1 WHERE st_kilda_score = "13.10.88"
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 winner when the st kilda score is 13.10.88? ### Input: CREATE TABLE table_28211103_1 ( winner VARCHAR, st...
Which locomotives 12' x 17' are both ex-industrial and built by Manning Wardle?
CREATE TABLE table_1157867_2 ( name VARCHAR, notes VARCHAR, builder VARCHAR )
SELECT name FROM table_1157867_2 WHERE notes = "Ex-industrial" AND builder = "Manning Wardle"
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 locomotives 12' x 17' are both ex-industrial and built by Manning Wardle? ### Input: CREATE TABLE table_1157867_2 ( ...
How many classes are professor whose last name is Graztevski has?
CREATE TABLE course ( crs_code text, dept_code text, crs_description text, crs_credit number ) CREATE TABLE department ( dept_code text, dept_name text, school_code text, emp_num number, dept_address text, dept_extension text ) CREATE TABLE employee ( emp_num number, em...
SELECT COUNT(*) FROM employee AS T1 JOIN class AS T2 ON T1.emp_num = T2.prof_num WHERE T1.emp_lname = 'Graztevski'
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: How many classes are professor whose last name is Graztevski has? ### Input: CREATE TABLE course ( crs_code text, de...
Who had highest points in game 5?
CREATE TABLE table_2730 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT "High points" FROM table_2730 WHERE "Game" = '5'
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 had highest points in game 5? ### Input: CREATE TABLE table_2730 ( "Game" real, "Date" text, "Team" text, ...
What was the season record when the location attendance was Air Canada Centre 19,800?
CREATE TABLE table_name_26 ( record VARCHAR, location_attendance VARCHAR )
SELECT record FROM table_name_26 WHERE location_attendance = "air canada centre 19,800"
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 season record when the location attendance was Air Canada Centre 19,800? ### Input: CREATE TABLE table_name_26 ...
Orbital period of 89 to 128 min has what specific orbital energy?
CREATE TABLE table_name_73 ( specific_orbital_energy VARCHAR, orbital_period VARCHAR )
SELECT specific_orbital_energy FROM table_name_73 WHERE orbital_period = "89 to 128 min"
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: Orbital period of 89 to 128 min has what specific orbital energy? ### Input: CREATE TABLE table_name_73 ( specific_orbit...
count the number of patients whose diagnoses short title is dmii oth uncntrld and drug route is pr?
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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "DMII oth uncntrld" AND prescriptions.route = "PR"
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 diagnoses short title is dmii oth uncntrld and drug route is pr? ### Input: CREATE TABLE ...
Which Current Club has a Player of bassem balaa?
CREATE TABLE table_62126 ( "Player" text, "Height" real, "Position" text, "Year born (Age)" text, "Current Club" text )
SELECT "Current Club" FROM table_62126 WHERE "Player" = 'bassem balaa'
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 Current Club has a Player of bassem balaa? ### Input: CREATE TABLE table_62126 ( "Player" text, "Height" real,...
How many votes for the candidate after 1992, 1.59% of the vote, and the office of us representative 4?
CREATE TABLE table_name_2 ( popular_votes INTEGER, year VARCHAR, office VARCHAR, percentage VARCHAR )
SELECT AVG(popular_votes) FROM table_name_2 WHERE office = "us representative 4" AND percentage = "1.59%" AND year > 1992
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 votes for the candidate after 1992, 1.59% of the vote, and the office of us representative 4? ### Input: CREATE TAB...
count the number of patients who have already received the esophagoscopy nec two or more times in 2102.
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE labevents ( row_id number, subje...
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, COUNT(*) AS c1 FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'esophagoscopy nec') A...
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: count the number of patients who have already received the esophagoscopy nec two or more times in 2102. ### Input: CREATE TA...
Name the attendance for 4 january 2004
CREATE TABLE table_67944 ( "Date" text, "Round" text, "Opponents" text, "Result F\u2013A" text, "Attendance" real )
SELECT "Attendance" FROM table_67944 WHERE "Date" = '4 january 2004'
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 attendance for 4 january 2004 ### Input: CREATE TABLE table_67944 ( "Date" text, "Round" text, "Opponen...
What is the cost per capita in the Courtenay municipality?
CREATE TABLE table_17627 ( "Municipality" text, "Population" real, "Police officers" real, "Residents per officer" real, "Total costs (2005)" text, "Cost per capita" text, "Case burden" real, "Crime rate per 1,000 people" real, "Police force" text )
SELECT "Cost per capita" FROM table_17627 WHERE "Municipality" = 'Courtenay'
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 cost per capita in the Courtenay municipality? ### Input: CREATE TABLE table_17627 ( "Municipality" text, ...
What is the highest entry in November for the game 20?
CREATE TABLE table_74129 ( "Game" real, "November" real, "Opponent" text, "Score" text, "Location/Attendance" text, "Record" text, "Points" real )
SELECT MAX("November") FROM table_74129 WHERE "Game" = '20'
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 entry in November for the game 20? ### Input: CREATE TABLE table_74129 ( "Game" real, "November"...
In the race involving Billy Lee Evans as the seated Representative, was he elected again?
CREATE TABLE table_1341663_11 ( result VARCHAR, incumbent VARCHAR )
SELECT result FROM table_1341663_11 WHERE incumbent = "Billy Lee Evans"
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: In the race involving Billy Lee Evans as the seated Representative, was he elected again? ### Input: CREATE TABLE table_1341...
Which Score has a Home of quebec nordiques, and a Visitor of vancouver blazers on february 28?
CREATE TABLE table_name_52 ( score VARCHAR, date VARCHAR, home VARCHAR, visitor VARCHAR )
SELECT score FROM table_name_52 WHERE home = "quebec nordiques" AND visitor = "vancouver blazers" AND date = "february 28"
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 Score has a Home of quebec nordiques, and a Visitor of vancouver blazers on february 28? ### Input: CREATE TABLE table...
Which author is located in Mexico?
CREATE TABLE table_40087 ( "Name" text, "Status" text, "Authors" text, "Unit" text, "Location" text )
SELECT "Authors" FROM table_40087 WHERE "Location" = 'mexico'
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 author is located in Mexico? ### Input: CREATE TABLE table_40087 ( "Name" text, "Status" text, "Authors" t...
On what date was the team Philadelphia?
CREATE TABLE table_17001658_10 ( date VARCHAR, team VARCHAR )
SELECT date FROM table_17001658_10 WHERE team = "Philadelphia"
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: On what date was the team Philadelphia? ### Input: CREATE TABLE table_17001658_10 ( date VARCHAR, team VARCHAR ) ###...
Retrieve Answered Questions Tagged as 'Java' Created In The Month of January 2018.
CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostHistory...
SELECT Q.Id, Q.AcceptedAnswerId, Q.CreationDate, Q.Score, Q.Body AS "Question Body", Q.Title AS "Question Title", A.Body AS "Answer Body", Q.Tags FROM Posts AS Q INNER JOIN Posts AS A ON Q.AcceptedAnswerId = A.Id WHERE Q.Tags = '<##tag?java##>' AND Q.CreationDate BETWEEN '2018-01-01' AND '2018-01-31' AND Q.Score >= 0 O...
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: Retrieve Answered Questions Tagged as 'Java' Created In The Month of January 2018. ### Input: CREATE TABLE ReviewTasks ( ...
Interest groups, user affinity Tagvector.
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, Rejection...
SELECT TOP(200) AS TagName, ROUND(10 * MIN(merit) * (AVG(merit) - STDEVP(merit)) / (AVG(merit) + STDEVP(merit)), 0) AS affinity_index, MAX(merit) AS mx, MIN(merit) AS mn FROM (SELECT Posts.OwnerUserId AS userId, TagName, ROUND(SQRT(COUNT(*)), 0) AS merit FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER J...
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: Interest groups, user affinity Tagvector. ### Input: CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId nu...