instruction
stringlengths
0
1.06k
input
stringlengths
33
7.14k
response
stringlengths
2
4.44k
source
stringclasses
25 values
text
stringlengths
302
8.5k
Create a bar chart showing how many location across location
CREATE TABLE stock ( Shop_ID int, Device_ID int, Quantity int ) CREATE TABLE device ( Device_ID int, Device text, Carrier text, Package_Version text, Applications text, Software_Platform text ) CREATE TABLE shop ( Shop_ID int, Shop_Name text, Location text, Open_Dat...
SELECT Location, COUNT(Location) FROM shop GROUP BY Location
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: Create a bar chart showing how many location across location ### Input: CREATE TABLE stock ( Shop_ID int, Device_ID ...
DBA - Total Posts by Database Server Per Month - MongoDB.
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, Acc...
SELECT CONCAT(YEAR(P.CreationDate), '-', MONTH(P.CreationDate)) AS YearMonth, 'MongoDB' AS TagName, COUNT(*) AS PostCount FROM Posts AS P INNER JOIN PostTags AS PT ON (P.Id = PT.PostId) INNER JOIN Tags AS T ON (PT.TagId = T.Id) WHERE T.TagName LIKE 'mongodb%' GROUP BY YEAR(P.CreationDate), MONTH(P.CreationDate) ORDER B...
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: DBA - Total Posts by Database Server Per Month - MongoDB. ### Input: CREATE TABLE PostHistory ( Id number, PostHisto...
Name the launch date for vladimir lyakhov , aleksandr pavlovich aleksandrov
CREATE TABLE table_245801_1 ( launch_date VARCHAR, crew VARCHAR )
SELECT launch_date FROM table_245801_1 WHERE crew = "Vladimir Lyakhov , Aleksandr Pavlovich Aleksandrov"
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 launch date for vladimir lyakhov , aleksandr pavlovich aleksandrov ### Input: CREATE TABLE table_245801_1 ( lau...
When has an Opponent of at Seattle mariners?
CREATE TABLE table_38927 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Save" text )
SELECT "Date" FROM table_38927 WHERE "Opponent" = 'at seattle mariners'
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 has an Opponent of at Seattle mariners? ### Input: CREATE TABLE table_38927 ( "Date" text, "Opponent" text, ...
How many different services are provided by all stations?
CREATE TABLE station ( id number, network_name text, services text, local_authority text ) CREATE TABLE train ( id number, train_number number, name text, origin text, destination text, time text, interval text ) CREATE TABLE weekly_weather ( station_id number, day_...
SELECT COUNT(DISTINCT services) FROM station
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 different services are provided by all stations? ### Input: CREATE TABLE station ( id number, network_name ...
The common of Chieri has what population density?
CREATE TABLE table_1449176_1 ( density__inhabitants_km_2__ VARCHAR, common_of VARCHAR )
SELECT density__inhabitants_km_2__ FROM table_1449176_1 WHERE common_of = "Chieri"
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: The common of Chieri has what population density? ### Input: CREATE TABLE table_1449176_1 ( density__inhabitants_km_2__ ...
What is the largest Area (msr) that has an Area less than 291.045, is part of the Per family, and has a rank higher than 78?
CREATE TABLE table_12824 ( "Rank" real, "Family" text, "Abbre\u00adviation" text, "Constellation" text, "Area (sq.deg.)" real, "Area (msr)" real, "Per\u00adcent\u00adage" text, "Right ascension (hm)" real, "Decli\u00adnation (dm)" text, "Quad" text )
SELECT MAX("Area (msr)") FROM table_12824 WHERE "Area (sq.deg.)" < '291.045' AND "Family" = 'per' AND "Rank" > '78'
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 largest Area (msr) that has an Area less than 291.045, is part of the Per family, and has a rank higher than 78?...
What team has 137 points?
CREATE TABLE table_25318033_1 ( team VARCHAR, points VARCHAR )
SELECT team FROM table_25318033_1 WHERE points = "137"
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 team has 137 points? ### Input: CREATE TABLE table_25318033_1 ( team VARCHAR, points VARCHAR ) ### Response: SE...
What is the Attendance on august 15?
CREATE TABLE table_name_99 ( attendance VARCHAR, date VARCHAR )
SELECT attendance FROM table_name_99 WHERE date = "august 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 is the Attendance on august 15? ### Input: CREATE TABLE table_name_99 ( attendance VARCHAR, date VARCHAR ) ### ...
What is the total of the game that the team was @ new york?
CREATE TABLE table_44155 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT COUNT("Game") FROM table_44155 WHERE "Team" = '@ new york'
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 of the game that the team was @ new york? ### Input: CREATE TABLE table_44155 ( "Game" real, "Date...
how many patients aged below 56 years had bowel obstruction as the primary disease?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "BOWEL OBSTRUCTION" AND demographic.age < "56"
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 patients aged below 56 years had bowel obstruction as the primary disease? ### Input: CREATE TABLE procedures ( ...
What is the time with FB notes for Canada?
CREATE TABLE table_name_43 ( time VARCHAR, notes VARCHAR, country VARCHAR )
SELECT time FROM table_name_43 WHERE notes = "fb" AND country = "canada"
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 time with FB notes for Canada? ### Input: CREATE TABLE table_name_43 ( time VARCHAR, notes VARCHAR, ...
how many black/haitian patients had the drug route ed?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "BLACK/HAITIAN" AND prescriptions.route = "ED"
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 black/haitian patients had the drug route ed? ### Input: CREATE TABLE prescriptions ( subject_id text, hadm...
find the names of people who are taller than 200 or lower than 190.
CREATE TABLE candidate ( candidate_id number, people_id number, poll_source text, date text, support_rate number, consider_rate number, oppose_rate number, unsure_rate number ) CREATE TABLE people ( people_id number, sex text, name text, date_of_birth text, height nu...
SELECT name FROM people WHERE height > 200 OR height < 190
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: find the names of people who are taller than 200 or lower than 190. ### Input: CREATE TABLE candidate ( candidate_id num...
what is the number of patients whose gender is m and insurance is government?
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 text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.insurance = "Government"
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 insurance is government? ### Input: CREATE TABLE procedures ( subje...
WHAT NAME HAS A FREE TRANSFER FREE AND RETIRED?
CREATE TABLE table_59699 ( "Nat." text, "Name" text, "Moving to" text, "Type" text, "Transfer window" text, "Transfer fee" text, "Source" text )
SELECT "Name" FROM table_59699 WHERE "Transfer fee" = 'free' AND "Moving to" = 'retired'
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 NAME HAS A FREE TRANSFER FREE AND RETIRED? ### Input: CREATE TABLE table_59699 ( "Nat." text, "Name" text, ...
What was the score on 1/10/1974?
CREATE TABLE table_79682 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Record" text )
SELECT "Score" FROM table_79682 WHERE "Date" = '1/10/1974'
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 score on 1/10/1974? ### Input: CREATE TABLE table_79682 ( "Game" real, "Date" text, "Opponent" text...
Tell me the total quantity of products bought by the customer called 'Rodrick Heaney'.
CREATE TABLE products ( product_id number, product_details text ) CREATE TABLE customer_addresses ( customer_id number, address_id number, date_address_from time, address_type text, date_address_to time ) CREATE TABLE customers ( customer_id number, payment_method text, custome...
SELECT SUM(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = "Rodrick Heaney"
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: Tell me the total quantity of products bought by the customer called 'Rodrick Heaney'. ### Input: CREATE TABLE products ( ...
What was the record when Vancouver was the visitor?
CREATE TABLE table_name_9 ( record VARCHAR, visitor VARCHAR )
SELECT record FROM table_name_9 WHERE visitor = "vancouver"
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 when Vancouver was the visitor? ### Input: CREATE TABLE table_name_9 ( record VARCHAR, visitor V...
Name the june when it has july of 84 f / 28.9 c
CREATE TABLE table_name_28 ( jun VARCHAR, jul VARCHAR )
SELECT jun FROM table_name_28 WHERE jul = "84 °f / 28.9 °c"
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 june when it has july of 84 f / 28.9 c ### Input: CREATE TABLE table_name_28 ( jun VARCHAR, jul VARCHAR ) #...
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, find hire_date and the average of salary bin hire_date by weekday, and visualize them by a bar chart, I want to order in asc by the Y-axis.
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0...
SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY AVG(SALARY)
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 whose salary is in the range of 8000 and 12000 and commission is not null or department number does not ...
Count the number of divorced patients who had tacrofk lab tests 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 demographic ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "DIVORCED" AND lab.label = "tacroFK"
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 divorced patients who had tacrofk lab tests done. ### Input: CREATE TABLE procedures ( subject_id te...
what is average age of patients whose primary disease is aortic insufficiency\re-do sternotomy; aortic valve replacement and days of hospital stay is 10?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT AVG(demographic.age) FROM demographic WHERE demographic.diagnosis = "AORTIC INSUFFICIENCY\RE-DO STERNOTOMY; AORTIC VALVE REPLACEMENT " AND demographic.days_stay = "10"
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 average age of patients whose primary disease is aortic insufficiency\re-do sternotomy; aortic valve replacement and...
Which winning driver of the Roussillon Grand Prix had an Alfa Romeo?
CREATE TABLE table_32875 ( "Name" text, "Circuit" text, "Date" text, "Winning driver" text, "Winning constructor" text, "Report" text )
SELECT "Winning driver" FROM table_32875 WHERE "Winning constructor" = 'alfa romeo' AND "Name" = 'roussillon grand prix'
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 winning driver of the Roussillon Grand Prix had an Alfa Romeo? ### Input: CREATE TABLE table_32875 ( "Name" text, ...
What is the Purpose of the Callsign with a Freq currently of 4gld?
CREATE TABLE table_50345 ( "Callsign" text, "Area served" text, "Band" text, "Freq currently" text, "Purpose" text )
SELECT "Purpose" FROM table_50345 WHERE "Freq currently" = '4gld'
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 Purpose of the Callsign with a Freq currently of 4gld? ### Input: CREATE TABLE table_50345 ( "Callsign" text...
Number of users created per month.
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate ti...
SELECT * FROM Users 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: Number of users created per month. ### Input: CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, R...
What is the 1st leg of the team with a 2-1 agg.?
CREATE TABLE table_6141 ( "Team 1" text, "Agg." text, "Team 2" text, "1st leg" text, "2nd leg" text )
SELECT "1st leg" FROM table_6141 WHERE "Agg." = '2-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 1st leg of the team with a 2-1 agg.? ### Input: CREATE TABLE table_6141 ( "Team 1" text, "Agg." text, ...
top 10 users by post score.
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 Users.Id AS "user_link", MAX(Age) AS Age, MAX(Location) AS Location, MAX(WebsiteUrl) AS Website, MAX(Reputation) AS Rep, COUNT(Answers.Id) AS Answers, SUM(Answers.Score) AS Score, CAST(AVG(CAST(Answers.Score AS FLOAT)) AS FLOAT(6, 1)) AS "avg" FROM Tags JOIN PostTags ON PostTags.TagId = Tags.Id JOIN Posts ON Pos...
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 users by post score. ### Input: CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, ...
What are all the the participant ids, type code and details?
CREATE TABLE participants ( participant_id number, participant_type_code text, participant_details text ) CREATE TABLE services ( service_id number, service_type_code text ) CREATE TABLE events ( event_id number, service_id number, event_details text ) CREATE TABLE participants_in_eve...
SELECT participant_id, participant_type_code, participant_details FROM participants
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 the participant ids, type code and details? ### Input: CREATE TABLE participants ( participant_id numbe...
when was patient 015-52724 last prescribed both lorazepam and methylprednisolone at the same time since 54 months ago?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime t...
SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'lorazepam' AND patient.uniquepid = '015-52724' AND DATETIME(medication.drugstarttime) >= DATETIME(CURRENT_TIME(), '-54 mo...
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 patient 015-52724 last prescribed both lorazepam and methylprednisolone at the same time since 54 months ago? ### I...
In what district was the representative first elected in 1916?
CREATE TABLE table_1342370_10 ( district VARCHAR, first_elected VARCHAR )
SELECT district FROM table_1342370_10 WHERE first_elected = 1916
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 what district was the representative first elected in 1916? ### Input: CREATE TABLE table_1342370_10 ( district VARCH...
What is the party for the representative who was first elected before 2002 and the results were re-elected?
CREATE TABLE table_61823 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Results" text )
SELECT "Party" FROM table_61823 WHERE "Results" = 're-elected' AND "First elected" < '2002'
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 party for the representative who was first elected before 2002 and the results were re-elected? ### Input: CREAT...
What time in eastern standard time was game held at denver broncos?
CREATE TABLE table_14433719_1 ( time___et__ VARCHAR, opponent VARCHAR )
SELECT time___et__ FROM table_14433719_1 WHERE opponent = "at Denver Broncos"
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 time in eastern standard time was game held at denver broncos? ### Input: CREATE TABLE table_14433719_1 ( time___et...
Which margin of defeats had points of 30?
CREATE TABLE table_10753917_1 ( margin_of_defeat VARCHAR, points VARCHAR )
SELECT margin_of_defeat FROM table_10753917_1 WHERE points = "30"
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 margin of defeats had points of 30? ### Input: CREATE TABLE table_10753917_1 ( margin_of_defeat VARCHAR, point...
Questions with No accepted answer where I have the highest score.
CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
SELECT q.Id AS "post_link" FROM Posts AS a INNER JOIN Posts AS q ON q.Id = a.ParentId WHERE a.OwnerUserId = '##UserID##' AND (SELECT MAX(p.Score) FROM Posts AS p WHERE p.ParentId = q.Id AND p.Id != a.Id) < a.Score ORDER BY q.ViewCount 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: Questions with No accepted answer where I have the highest score. ### Input: CREATE TABLE Users ( Id number, Reputat...
Which DOB has a Surname of cresswell?
CREATE TABLE table_name_40 ( dob VARCHAR, surname VARCHAR )
SELECT dob FROM table_name_40 WHERE surname = "cresswell"
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 DOB has a Surname of cresswell? ### Input: CREATE TABLE table_name_40 ( dob VARCHAR, surname VARCHAR ) ### Res...
How many season premieres had 15.27 million viewers?
CREATE TABLE table_29636 ( "Season" text, "Episodes" real, "Timeslot ( EST )" text, "Season premiere" text, "Season finale" text, "TV season" text, "Rank" text, "Viewers (in millions)" text )
SELECT COUNT("Season premiere") FROM table_29636 WHERE "Viewers (in millions)" = '15.27'
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 many season premieres had 15.27 million viewers? ### Input: CREATE TABLE table_29636 ( "Season" text, "Episodes"...
how many patients since 2105 have received a sputum, tracheal specimen microbiological test?
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellv...
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT microlab.patientunitstayid FROM microlab WHERE microlab.culturesite = 'sputum, tracheal specimen' AND STRFTIME('%y', microlab.culturetakentime) >= '2105')
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 since 2105 have received a sputum, tracheal specimen microbiological test? ### Input: CREATE TABLE medicat...
Which County has a Mascot of pacers?
CREATE TABLE table_name_36 ( county VARCHAR, mascot VARCHAR )
SELECT county FROM table_name_36 WHERE mascot = "pacers"
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 County has a Mascot of pacers? ### Input: CREATE TABLE table_name_36 ( county VARCHAR, mascot VARCHAR ) ### Re...
when was patient 20693's first operation since 3 years ago?
CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE tra...
SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20693) AND DATETIME(procedures_icd.charttime) >= DATETIME(CURRENT_TIME(), '-3 year') ORDER BY procedures_icd.charttime 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: when was patient 20693's first operation since 3 years ago? ### Input: CREATE TABLE prescriptions ( row_id number, s...
During st kilda's home game, what was the number of people in the crowd?
CREATE TABLE table_78481 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Crowd" FROM table_78481 WHERE "Home team" = 'st kilda'
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: During st kilda's home game, what was the number of people in the crowd? ### Input: CREATE TABLE table_78481 ( "Home tea...
Automation Test Engineer - Lisbon.
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAno...
SELECT u.Id AS "user_link", CONCAT('https://stackoverflow.com/users/', u.Id) AS "profile_link", u.DisplayName, u.Location, u.WebsiteUrl, u.AboutMe, u.Views, u.UpVotes, u.DownVotes FROM Users AS u JOIN (SELECT DISTINCT UserId FROM Badges WHERE LOWER(Name) IN ('android-espresso') AND Class IN (1, 2, 3) AND TagBased = 1) ...
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: Automation Test Engineer - Lisbon. ### Input: CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE Co...
What is the lowest Gold, when Silver is 0, and when Bronze is 2?
CREATE TABLE table_50302 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT MIN("Gold") FROM table_50302 WHERE "Silver" = '0' AND "Bronze" = '2'
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 Gold, when Silver is 0, and when Bronze is 2? ### Input: CREATE TABLE table_50302 ( "Rank" text, ...
What percentage of people polled aligned with the Liberal party according to the August 2008 poll that reported 36% aligning with New Democratic party?
CREATE TABLE table_14045 ( "Polling firm" text, "Dates" text, "Prog. Cons." text, "New Democratic" text, "Liberal" text )
SELECT "Liberal" FROM table_14045 WHERE "New Democratic" = '36%' AND "Dates" = 'august 2008'
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 percentage of people polled aligned with the Liberal party according to the August 2008 poll that reported 36% aligning...
Name the number of clock rate mhz when bandwidth mb/s is 2400
CREATE TABLE table_142573_1 ( clock_rate__mhz_ VARCHAR, bandwidth__mb_s_ VARCHAR )
SELECT COUNT(clock_rate__mhz_) FROM table_142573_1 WHERE bandwidth__mb_s_ = 2400
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 number of clock rate mhz when bandwidth mb/s is 2400 ### Input: CREATE TABLE table_142573_1 ( clock_rate__mhz_ ...
Currently Protected Questions, simple search.
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TA...
SELECT ph.PostId AS "post_link", ph.CreationDate AS "protected_date", CASE ph.UserId WHEN NULL THEN ph.UserDisplayName ELSE ph.UserId END AS "user_link" FROM PostHistory AS ph WHERE ph.PostHistoryTypeId = 19 ORDER BY ph.PostId, ph.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: Currently Protected Questions, simple search. ### Input: CREATE TABLE ReviewTaskStates ( Id number, Name text, D...
What district was the city with an area smaller than 12 square kilometers and a serial number of 35?
CREATE TABLE table_64012 ( "Serial No." real, "District" text, "Headquartered City" text, "City Population (2009)" real, "City Area(km 2 )" real )
SELECT "District" FROM table_64012 WHERE "City Area(km 2 )" < '12' AND "Serial No." = '35'
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 district was the city with an area smaller than 12 square kilometers and a serial number of 35? ### Input: CREATE TABLE...
How many races were in the Mallala Motor Sport Park circuit?
CREATE TABLE table_70335 ( "Race" real, "Circuit" text, "Location / State" text, "Date" text, "Winner" text, "Team" text )
SELECT COUNT("Race") FROM table_70335 WHERE "Circuit" = 'mallala motor sport park'
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 many races were in the Mallala Motor Sport Park circuit? ### Input: CREATE TABLE table_70335 ( "Race" real, "Cir...
Return a bar chart about the number of companies for each industry.
CREATE TABLE company ( Company_ID real, Name text, Headquarters text, Industry text, Sales_in_Billion real, Profits_in_Billion real, Assets_in_Billion real, Market_Value_in_Billion real ) CREATE TABLE people ( People_ID int, Age int, Name text, Nationality text, Grad...
SELECT Industry, COUNT(Industry) FROM company GROUP BY Industry
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: Return a bar chart about the number of companies for each industry. ### Input: CREATE TABLE company ( Company_ID real, ...
The distribution of answerer's reputation over the most recent N answers.
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TA...
SELECT q.Id, q.CreationDate, u.Reputation FROM Posts AS q INNER JOIN Users AS u ON u.Id = q.OwnerUserId WHERE q.PostTypeId = 2 ORDER BY q.CreationDate DESC LIMIT 100
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: The distribution of answerer's reputation over the most recent N answers. ### Input: CREATE TABLE ReviewTaskStates ( Id ...
A bar chart about how many captains are in each rank?, and could you order by the X-axis from high to low?
CREATE TABLE captain ( Captain_ID int, Name text, Ship_ID int, age text, Class text, Rank text ) CREATE TABLE Ship ( Ship_ID int, Name text, Type text, Built_Year real, Class text, Flag text )
SELECT Rank, COUNT(*) FROM captain GROUP BY Rank ORDER BY Rank 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 about how many captains are in each rank?, and could you order by the X-axis from high to low? ### Input: CREATE...
What is Date, when Label is Jugoton?
CREATE TABLE table_47955 ( "Date" text, "Region" text, "Label" text, "Catalogue" text, "Format" text )
SELECT "Date" FROM table_47955 WHERE "Label" = 'jugoton'
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 Date, when Label is Jugoton? ### Input: CREATE TABLE table_47955 ( "Date" text, "Region" text, "Label" t...
What is the Tie no when Swansea City is the Away team with a Score of 2 2?
CREATE TABLE table_61081 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
SELECT "Tie no" FROM table_61081 WHERE "Score" = '2–2' AND "Away team" = 'swansea city'
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 Tie no when Swansea City is the Away team with a Score of 2 2? ### Input: CREATE TABLE table_61081 ( "Tie no...
how many more passengers flew to los angeles than to saskatoon from manzanillo airport in 2013 ?
CREATE TABLE table_203_515 ( id number, "rank" number, "city" text, "passengers" number, "ranking" number, "airline" text )
SELECT (SELECT "passengers" FROM table_203_515 WHERE "city" = 'los angeles') - (SELECT "passengers" FROM table_203_515 WHERE "city" = 'saskatoon')
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 more passengers flew to los angeles than to saskatoon from manzanillo airport in 2013 ? ### Input: CREATE TABLE tab...
What is the largest capacity for a stadium?
CREATE TABLE table_25129482_1 ( capacity INTEGER )
SELECT MAX(capacity) FROM table_25129482_1
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 largest capacity for a stadium? ### Input: CREATE TABLE table_25129482_1 ( capacity INTEGER ) ### Response: ...
Where did Geelong play as the away team?
CREATE TABLE table_4545 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Venue" FROM table_4545 WHERE "Away team" = 'geelong'
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: Where did Geelong play as the away team? ### Input: CREATE TABLE table_4545 ( "Home team" text, "Home team score" te...
list all the takeoffs and landings at MKE
CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE flight_leg ( flight_id int, ...
SELECT DISTINCT flight.flight_id FROM airport AS AIRPORT_0, airport AS AIRPORT_1, flight WHERE (flight.to_airport = AIRPORT_0.airport_code AND AIRPORT_0.airport_code = 'MKE') OR (flight.from_airport = AIRPORT_1.airport_code AND AIRPORT_1.airport_code = 'MKE')
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 all the takeoffs and landings at MKE ### Input: CREATE TABLE days ( days_code varchar, day_name varchar ) CREA...
until 2104 what are the five most common diagnoses that patients are given within the same month after being diagnosed with convulsions nec?
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, ...
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions...
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: until 2104 what are the five most common diagnoses that patients are given within the same month after being diagnosed with ...
Where was the game and what was the attendance on April 3?
CREATE TABLE table_74160 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT "Location Attendance" FROM table_74160 WHERE "Date" = 'April 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: Where was the game and what was the attendance on April 3? ### Input: CREATE TABLE table_74160 ( "Game" real, "Date"...
tell me the number of patients with lab test item id 50802 who had delta abnormal lab test status.
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "50802" AND lab.flag = "delta"
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: tell me the number of patients with lab test item id 50802 who had delta abnormal lab test status. ### Input: CREATE TABLE l...
For the race Champion Spark Plug 300, what is the report?
CREATE TABLE table_4653 ( "Race Name" text, "Circuit" text, "City/Location" text, "Date" text, "Pole position" text, "Winning driver" text, "Winning team" text, "Report" text )
SELECT "Report" FROM table_4653 WHERE "Race Name" = 'champion spark plug 300'
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: For the race Champion Spark Plug 300, what is the report? ### Input: CREATE TABLE table_4653 ( "Race Name" text, "Ci...
what was the name of the medicine patient 013-28507 was prescribed during the same day after having received a cpap/peep therapy - 5-10 cm h2o procedure in their current hospital encounter?
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime...
SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-28507' AND patient.hospitaldi...
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 medicine patient 013-28507 was prescribed during the same day after having received a cpap/peep the...
If the score is 62-70, what are the high points?
CREATE TABLE table_21330 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location/Attendance" text, "Record" text )
SELECT "High points" FROM table_21330 WHERE "Score" = '62-70'
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 score is 62-70, what are the high points? ### Input: CREATE TABLE table_21330 ( "Game" real, "Date" text, ...
Are there Friday classes for SM 470 ?
CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE program_requirement ( program_id int, category varchar, min_cred...
SELECT DISTINCT course_offering.friday FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course.department = 'SM' AND course.number = 470 AND semester.semester = 'WN' AND semester.year = 2016
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: Are there Friday classes for SM 470 ? ### Input: CREATE TABLE program_course ( program_id int, course_id int, wo...
How many Top 10s have Wins larger than 0, and Poles larger than 0?
CREATE TABLE table_38441 ( "Year" real, "Starts" real, "Wins" real, "Top 5" real, "Top 10" real, "Poles" real, "Avg. Start" real, "Avg. Finish" real, "Winnings" text, "Position" text )
SELECT COUNT("Top 10") FROM table_38441 WHERE "Wins" > '0' AND "Poles" > '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: How many Top 10s have Wins larger than 0, and Poles larger than 0? ### Input: CREATE TABLE table_38441 ( "Year" real, ...
What was the result of the game after week 6 against the cleveland browns?
CREATE TABLE table_8614 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "Attendance" text )
SELECT "Result" FROM table_8614 WHERE "Week" < '6' AND "Opponent" = 'cleveland browns'
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 result of the game after week 6 against the cleveland browns? ### Input: CREATE TABLE table_8614 ( "Week" r...
since 1 year ago, patient 029-30149 has undergone a procedure?
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREA...
SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '029-30149')) AND DATETIME(treatment.treatmenttime) >= 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: since 1 year ago, patient 029-30149 has undergone a procedure? ### Input: CREATE TABLE medication ( medicationid number,...
Which smallest swimsuit number's interview was less than 8.574 when the average number was bigger than 8.532?
CREATE TABLE table_name_87 ( swimsuit INTEGER, interview VARCHAR, average VARCHAR )
SELECT MIN(swimsuit) FROM table_name_87 WHERE interview < 8.574 AND average > 8.532
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 smallest swimsuit number's interview was less than 8.574 when the average number was bigger than 8.532? ### Input: CRE...
Name the tournament for top-5 more thn 1 and top-25 of 13 with wins of 3
CREATE TABLE table_name_4 ( tournament VARCHAR, wins VARCHAR, top_5 VARCHAR, top_25 VARCHAR )
SELECT tournament FROM table_name_4 WHERE top_5 > 1 AND top_25 = 13 AND wins = 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 tournament for top-5 more thn 1 and top-25 of 13 with wins of 3 ### Input: CREATE TABLE table_name_4 ( tourname...
What was the nationality of a point guard position in 1999-2001?
CREATE TABLE table_name_89 ( nationality VARCHAR, position VARCHAR, years_for_grizzlies VARCHAR )
SELECT nationality FROM table_name_89 WHERE position = "point guard" AND years_for_grizzlies = "1999-2001"
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 nationality of a point guard position in 1999-2001? ### Input: CREATE TABLE table_name_89 ( nationality VAR...
What is the highest number won with a difference of 1?
CREATE TABLE table_20037 ( "Position" real, "Team" text, "Points" real, "Played" real, "Won" real, "Drawn" real, "Lost" real, "For" real, "Against" real, "Difference" text )
SELECT MAX("Won") FROM table_20037 WHERE "Difference" = '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 highest number won with a difference of 1? ### Input: CREATE TABLE table_20037 ( "Position" real, "Team"...
what is the laps when the driver is tony rolt and the grid is less than 10?
CREATE TABLE table_55433 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
SELECT SUM("Laps") FROM table_55433 WHERE "Driver" = 'tony rolt' AND "Grid" < '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: what is the laps when the driver is tony rolt and the grid is less than 10? ### Input: CREATE TABLE table_55433 ( "Drive...
Who drove the car with the n175 chassis in round 13?
CREATE TABLE table_53386 ( "Constructor" text, "Chassis" text, "Engine" text, "Tyre" text, "Driver" text, "Rounds" text )
SELECT "Driver" FROM table_53386 WHERE "Chassis" = 'n175' AND "Rounds" = '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: Who drove the car with the n175 chassis in round 13? ### Input: CREATE TABLE table_53386 ( "Constructor" text, "Chas...
How many total pounds were purchased in the year 2018 at all London branches?
CREATE TABLE purchase ( member_id number, branch_id text, year text, total_pounds number ) CREATE TABLE membership_register_branch ( member_id number, branch_id text, register_year text ) CREATE TABLE branch ( branch_id number, name text, open_year text, address_road text, ...
SELECT SUM(total_pounds) FROM purchase AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T2.city = 'London' AND T1.year = 2018
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 total pounds were purchased in the year 2018 at all London branches? ### Input: CREATE TABLE purchase ( member_...
What model number has part number cl8064701510101?
CREATE TABLE table_name_69 ( model_number VARCHAR, part_number_s_ VARCHAR )
SELECT model_number FROM table_name_69 WHERE part_number_s_ = "cl8064701510101"
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 model number has part number cl8064701510101? ### Input: CREATE TABLE table_name_69 ( model_number VARCHAR, par...
Give me a histogram for what are the names of the technicians and how many machines are they assigned to repair?, display the total number in ascending order.
CREATE TABLE repair ( repair_ID int, name text, Launch_Date text, Notes text ) CREATE TABLE technician ( technician_id real, Name text, Team text, Starting_Year real, Age int ) CREATE TABLE machine ( Machine_ID int, Making_Year int, Class text, Team text, Machin...
SELECT Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_id = T2.technician_id GROUP BY T2.Name ORDER BY COUNT(*)
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: Give me a histogram for what are the names of the technicians and how many machines are they assigned to repair?, display th...
count the number of patients who received their sputum, tracheal specimen microbiology test since 2103.
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TAB...
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT microlab.patientunitstayid FROM microlab WHERE microlab.culturesite = 'sputum, tracheal specimen' AND STRFTIME('%y', microlab.culturetakentime) >= '2103')
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: count the number of patients who received their sputum, tracheal specimen microbiology test since 2103. ### Input: CREATE TA...
What is Team, when Position is 'LHP', and when Pick is '23'?
CREATE TABLE table_name_16 ( team VARCHAR, position VARCHAR, pick VARCHAR )
SELECT team FROM table_name_16 WHERE position = "lhp" AND pick = 23
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 Team, when Position is 'LHP', and when Pick is '23'? ### Input: CREATE TABLE table_name_16 ( team VARCHAR, p...
How many Total matches happened in 2003?
CREATE TABLE table_name_20 ( total_matches VARCHAR, year VARCHAR )
SELECT total_matches FROM table_name_20 WHERE year = "2003"
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 Total matches happened in 2003? ### Input: CREATE TABLE table_name_20 ( total_matches VARCHAR, year VARCHAR...
Name the total number of rank for percentage change yoy 13.1%
CREATE TABLE table_30153 ( "State Rank" real, "National Rank" real, "Institution" text, "Location" text, "Public or Private" text, "Endowment Funds" text, "Percentage Change YOY" text )
SELECT COUNT("National Rank") FROM table_30153 WHERE "Percentage Change YOY" = '13.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: Name the total number of rank for percentage change yoy 13.1% ### Input: CREATE TABLE table_30153 ( "State Rank" real, ...
For all employees who have the letters D or S in their first name, a line chart shows the change of salary over hire_date, and could you sort HIRE_DATE from high to low order?
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE...
SELECT HIRE_DATE, SALARY FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_DATE 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: For all employees who have the letters D or S in their first name, a line chart shows the change of salary over hire_date, a...
What procedures cost less than 5000 and have John Wen as a trained physician?
CREATE TABLE medication ( code number, name text, brand text, description text ) CREATE TABLE nurse ( employeeid number, name text, position text, registered boolean, ssn number ) CREATE TABLE procedures ( code number, name text, cost number ) CREATE TABLE trained_in (...
SELECT name FROM procedures WHERE cost < 5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = "John Wen"
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 procedures cost less than 5000 and have John Wen as a trained physician? ### Input: CREATE TABLE medication ( code ...
What is the founding of parsu cimmarons?
CREATE TABLE table_11604804_5 ( founded INTEGER, nickname VARCHAR )
SELECT MIN(founded) FROM table_11604804_5 WHERE nickname = "ParSU Cimmarons"
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 founding of parsu cimmarons? ### Input: CREATE TABLE table_11604804_5 ( founded INTEGER, nickname VARCHA...
who served a term before mannerheim ?
CREATE TABLE table_204_488 ( id number, "order in\nposition" number, "president of\nthe republic" text, "length of\nthe presidential\naction" text, "rank by\nlength\nof term(s)" number, "notes" text )
SELECT "president of\nthe republic" FROM table_204_488 WHERE "order in\nposition" < (SELECT "order in\nposition" FROM table_204_488 WHERE "president of\nthe republic" = 'gustaf mannerheim') ORDER BY "order in\nposition" 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: who served a term before mannerheim ? ### Input: CREATE TABLE table_204_488 ( id number, "order in\nposition" number...
what is average age of patients whose discharge location is home health care and primary disease is angioedema?
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 lab ( subject_id text, hadm_id text, ...
SELECT AVG(demographic.age) FROM demographic WHERE demographic.discharge_location = "HOME HEALTH CARE" AND demographic.diagnosis = "ANGIOEDEMA"
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 average age of patients whose discharge location is home health care and primary disease is angioedema? ### Input: C...
For franklin of class aa, which school years does this occur?
CREATE TABLE table_19435 ( "School Year" text, "Class A" text, "Class AA" text, "Class AAA" text, "Class AAAA" text, "Class AAAAA" text )
SELECT "School Year" FROM table_19435 WHERE "Class AA" = 'Franklin'
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: For franklin of class aa, which school years does this occur? ### Input: CREATE TABLE table_19435 ( "School Year" text, ...
when did patient 031-3355 get the last other microbiology test on the current hospital encounter.
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugsto...
SELECT microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-3355' AND patient.hospitaldischargetime IS NULL)) AND microla...
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 did patient 031-3355 get the last other microbiology test on the current hospital encounter. ### Input: CREATE TABLE mi...
what is the procedure short title and long title of procedure icd9 code 45?
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 procedures.short_title, procedures.long_title FROM procedures WHERE procedures.icd9_code = "45"
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 procedure short title and long title of procedure icd9 code 45? ### Input: CREATE TABLE demographic ( subjec...
Who is the opponent in 1992?
CREATE TABLE table_68868 ( "Rank" text, "Score" text, "Player" text, "Club" text, "Opponent" text, "Year" text, "Round" text, "Venue" text )
SELECT "Opponent" FROM table_68868 WHERE "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: Who is the opponent in 1992? ### Input: CREATE TABLE table_68868 ( "Rank" text, "Score" text, "Player" text, ...
What was the highest place result in 2010 with a Clean and Jerk weight of 224kg?
CREATE TABLE table_14265 ( "Year" real, "Competition" text, "Location" text, "Weight Category" text, "Snatch" text, "Clean and Jerk" text, "Total" text, "Place" real )
SELECT MAX("Place") FROM table_14265 WHERE "Year" = '2010' AND "Clean and Jerk" = '224kg'
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 highest place result in 2010 with a Clean and Jerk weight of 224kg? ### Input: CREATE TABLE table_14265 ( "...
What is Original Album, when English Translation is 'With You'?
CREATE TABLE table_60614 ( "English translation" text, "Original album" text, "Lyricist(s)" text, "Composer(s)" text, "Time" text )
SELECT "Original album" FROM table_60614 WHERE "English translation" = 'with you'
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 Original Album, when English Translation is 'With You'? ### Input: CREATE TABLE table_60614 ( "English translati...
Find the accreditation level that more than 3 phones use.
CREATE TABLE phone ( Accreditation_level VARCHAR )
SELECT Accreditation_level FROM phone GROUP BY Accreditation_level HAVING COUNT(*) > 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: Find the accreditation level that more than 3 phones use. ### Input: CREATE TABLE phone ( Accreditation_level VARCHAR ) ...
A bar chart for what are the number of the countries of mountains with height bigger than 5000?, could you show in descending by the Country?
CREATE TABLE climber ( Climber_ID int, Name text, Country text, Time text, Points real, Mountain_ID int ) CREATE TABLE mountain ( Mountain_ID int, Name text, Height real, Prominence real, Range text, Country text )
SELECT Country, COUNT(Country) FROM mountain WHERE Height > 5000 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: A bar chart for what are the number of the countries of mountains with height bigger than 5000?, could you show in descendin...
What was the tail number with 3/3 fatalities?
CREATE TABLE table_name_32 ( tail_number VARCHAR, fatalities VARCHAR )
SELECT tail_number FROM table_name_32 WHERE fatalities = "3/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 was the tail number with 3/3 fatalities? ### Input: CREATE TABLE table_name_32 ( tail_number VARCHAR, fatalitie...
How many locomotives have a livery that is highland railway green
CREATE TABLE table_20331 ( "No." real, "Name" text, "Livery" text, "Locomotive type" text, "Wheel Arrangement" text, "Builder" text, "Year built" real, "Status" text )
SELECT COUNT("Name") FROM table_20331 WHERE "Livery" = 'Highland Railway green'
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 many locomotives have a livery that is highland railway green ### Input: CREATE TABLE table_20331 ( "No." real, ...
List all episode air dates where Luiza Possi was the guest fourth judge?
CREATE TABLE table_27615445_1 ( episode_air_date VARCHAR, guest_fourth_judge VARCHAR )
SELECT episode_air_date FROM table_27615445_1 WHERE guest_fourth_judge = "Luiza Possi"
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: List all episode air dates where Luiza Possi was the guest fourth judge? ### Input: CREATE TABLE table_27615445_1 ( epis...
Game smaller than 70, and a Record of 43 16 8 is what opponent?
CREATE TABLE table_35023 ( "Game" real, "March" real, "Opponent" text, "Score" text, "Record" text, "Points" real )
SELECT "Opponent" FROM table_35023 WHERE "Game" < '70' AND "Record" = '43–16–8'
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 70, and a Record of 43 16 8 is what opponent? ### Input: CREATE TABLE table_35023 ( "Game" real, "...
What was the score of the game with the Broadview Hawks as the home team?
CREATE TABLE table_name_97 ( score VARCHAR, home VARCHAR )
SELECT score FROM table_name_97 WHERE home = "broadview hawks"
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 of the game with the Broadview Hawks as the home team? ### Input: CREATE TABLE table_name_97 ( score ...
Show the number of debates for each person on the affirmative side in a bar chart, and order by the total number in desc please.
CREATE TABLE people ( People_ID int, District text, Name text, Party text, Age int ) CREATE TABLE debate_people ( Debate_ID int, Affirmative int, Negative int, If_Affirmative_Win bool ) CREATE TABLE debate ( Debate_ID int, Date text, Venue text, Num_of_Audience int ...
SELECT Name, COUNT(Name) FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID GROUP BY Name ORDER BY COUNT(Name) 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 the number of debates for each person on the affirmative side in a bar chart, and order by the total number in desc ple...
What is the first season written by joseph hampton & dani renee?
CREATE TABLE table_11630008_4 ( season_no INTEGER, written_by VARCHAR )
SELECT MIN(season_no) FROM table_11630008_4 WHERE written_by = "Joseph Hampton & Dani Renee"
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 first season written by joseph hampton & dani renee? ### Input: CREATE TABLE table_11630008_4 ( season_no IN...