instruction
stringlengths
0
1.06k
input
stringlengths
33
7.14k
response
stringlengths
2
4.44k
source
stringclasses
25 values
text
stringlengths
302
8.5k
anemia ( hgb < 11 )
CREATE TABLE table_train_248 ( "id" int, "anemia" bool, "prostate_specific_antigen_psa" float, "hemoglobin_a1c_hba1c" float, "body_weight" float, "fasting_triglycerides" int, "hyperlipidemia" bool, "hgb" int, "fasting_total_cholesterol" int, "fasting_ldl_cholesterol" int, "bo...
SELECT * FROM table_train_248 WHERE anemia = 1 OR hgb < 11
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: anemia ( hgb < 11 ) ### Input: CREATE TABLE table_train_248 ( "id" int, "anemia" bool, "prostate_specific_antige...
Tell me the average units sold for square enix
CREATE TABLE table_31537 ( "Place" real, "Title" text, "Platform" text, "Publisher" text, "Units sold" real )
SELECT AVG("Units sold") FROM table_31537 WHERE "Publisher" = 'square enix'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Tell me the average units sold for square enix ### Input: CREATE TABLE table_31537 ( "Place" real, "Title" text, ...
What is the position of the song thar genjor mcnell performed?
CREATE TABLE table_23585197_3 ( position VARCHAR, artist VARCHAR )
SELECT position FROM table_23585197_3 WHERE artist = "Genjor McNell"
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 position of the song thar genjor mcnell performed? ### Input: CREATE TABLE table_23585197_3 ( position VARCH...
What is the year for the United Arab Emirates?
CREATE TABLE table_name_19 ( year VARCHAR, country VARCHAR )
SELECT COUNT(year) FROM table_name_19 WHERE country = "united arab emirates"
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 year for the United Arab Emirates? ### Input: CREATE TABLE table_name_19 ( year VARCHAR, country VARCHAR...
who was the longest head coach ?
CREATE TABLE table_204_11 ( id number, "year" number, "fbs opponent" text, "result" text, "opponent's conference" text, "opponent's head coach" text, "charleston southern's head coach" text )
SELECT "charleston southern's head coach" FROM table_204_11 GROUP BY "charleston southern's head coach" ORDER BY COUNT(*) DESC LIMIT 1
squall
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: who was the longest head coach ? ### Input: CREATE TABLE table_204_11 ( id number, "year" number, "fbs opponent"...
what time does the train that arrives in lonavla at 22:22 depart pune
CREATE TABLE table_31075 ( "Train Number" real, "Train Name" text, "Departure Pune" text, "Arrival Lonavla" text, "Frequency" text, "Origin" text )
SELECT "Departure Pune" FROM table_31075 WHERE "Arrival Lonavla" = '22:22'
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 time does the train that arrives in lonavla at 22:22 depart pune ### Input: CREATE TABLE table_31075 ( "Train Numbe...
What is every value for top 5 if average start is 21.9?
CREATE TABLE table_3459 ( "Year" real, "Starts" real, "Wins" real, "Top 5" real, "Top 10" real, "Poles" real, "Avg. Start" text, "Avg. Finish" text, "Winnings" text, "Position" text, "Team(s)" text )
SELECT "Top 5" FROM table_3459 WHERE "Avg. Start" = '21.9'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is every value for top 5 if average start is 21.9? ### Input: CREATE TABLE table_3459 ( "Year" real, "Starts" r...
What conference does Gonzaga University play in?
CREATE TABLE table_20527 ( "Institution" text, "Location" text, "Founded" real, "Affiliation" text, "Enrollment" real, "Team Nickname" text, "Primary conference" text )
SELECT "Primary conference" FROM table_20527 WHERE "Institution" = 'Gonzaga University'
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 conference does Gonzaga University play in? ### Input: CREATE TABLE table_20527 ( "Institution" text, "Location...
How much money did James Seddon request?
CREATE TABLE table_67637 ( "Episode" text, "First aired" text, "Entrepreneur(s)" text, "Company or product name" text, "Money requested (\u00a3)" text, "Investing Dragon(s)" text )
SELECT "Money requested (\u00a3)" FROM table_67637 WHERE "Entrepreneur(s)" = 'james seddon'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How much money did James Seddon request? ### Input: CREATE TABLE table_67637 ( "Episode" text, "First aired" text, ...
Which rank has a team of Suzuki with under 16 points?
CREATE TABLE table_39275 ( "Year" real, "Class" text, "Team" text, "Points" real, "Rank" text, "Wins" real )
SELECT "Rank" FROM table_39275 WHERE "Team" = 'suzuki' AND "Points" < '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 rank has a team of Suzuki with under 16 points? ### Input: CREATE TABLE table_39275 ( "Year" real, "Class" tex...
how many patients whose procedure long title is other closed [endoscopic] biopsy of biliary duct or sphincter of oddi and lab test fluid is cerebrospinal fluid (csf)?
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 prescription...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Other closed [endoscopic] biopsy of biliary duct or sphincter of Oddi" AND lab.fluid = "Cerebrospinal Fluid ...
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 whose procedure long title is other closed [endoscopic] biopsy of biliary duct or sphincter of oddi and la...
Where was the third bridge over panama canal?
CREATE TABLE table_43987 ( "Name" text, "Location" text, "Country" text, "Longest span" text, "Pylons" real )
SELECT "Location" FROM table_43987 WHERE "Name" = 'third bridge over panama canal'
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 third bridge over panama canal? ### Input: CREATE TABLE table_43987 ( "Name" text, "Location" text, ...
What's the average total cargo in metric tonnes that has an 11.8% Change?
CREATE TABLE table_37600 ( "Rank" real, "Airport" text, "Code (IATA/ICAO)" text, "Total Cargo (Metric Tonnes)" real, "% Change" text )
SELECT AVG("Total Cargo (Metric Tonnes)") FROM table_37600 WHERE "% Change" = '11.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: What's the average total cargo in metric tonnes that has an 11.8% Change? ### Input: CREATE TABLE table_37600 ( "Rank" r...
Which Opponent has a Time of 2:31?
CREATE TABLE table_36964 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text )
SELECT "Opponent" FROM table_36964 WHERE "Time" = '2:31'
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 Opponent has a Time of 2:31? ### Input: CREATE TABLE table_36964 ( "Res." text, "Record" text, "Opponent" ...
what is the crude birth rate (per 1000) when the live births 1 is 356 013?
CREATE TABLE table_49351 ( "Average population (x 1000)" text, "Live births 1" text, "Deaths 1" text, "Natural change 1" text, "Crude birth rate (per 1000)" real, "Crude death rate (per 1000)" real, "Natural change (per 1000)" real )
SELECT SUM("Crude birth rate (per 1000)") FROM table_49351 WHERE "Live births 1" = '356 013'
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 crude birth rate (per 1000) when the live births 1 is 356 013? ### Input: CREATE TABLE table_49351 ( "Averag...
For those employees who did not have any job in the past, find hire_date and the average of manager_id bin hire_date by weekday, and visualize them by a bar chart, show by the y-axis from high to low.
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NA...
SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY AVG(MANAGER_ID) 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 those employees who did not have any job in the past, find hire_date and the average of manager_id bin hire_date by week...
provide the number of patients whose admission type is elective and lab test fluid is ascites?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND lab.fluid = "Ascites"
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: provide the number of patients whose admission type is elective and lab test fluid is ascites? ### Input: CREATE TABLE demog...
what is the total dose of sc 24 fe ng that patient 6170 received on the current intensive care unit visit?
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE diagnoses_icd ( row_id number, subject_i...
SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 6170) AND icustays.outtime IS NULL) AND inputevents_cv.itemid IN (SELECT d_items.itemid FR...
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the total dose of sc 24 fe ng that patient 6170 received on the current intensive care unit visit? ### Input: CREATE...
what are the flights between PITTSBURGH and SAN FRANCISCO
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN...
atis
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the flights between PITTSBURGH and SAN FRANCISCO ### Input: CREATE TABLE code_description ( code varchar, d...
provide the number of patients whose admission type is urgent and admission location is trsf within this facility?
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 WHERE demographic.admission_type = "URGENT" AND demographic.admission_location = "TRSF WITHIN THIS FACILITY"
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: provide the number of patients whose admission type is urgent and admission location is trsf within this facility? ### Input...
What school did the player attend who's hometown was Montvale, NJ?
CREATE TABLE table_11677100_18 ( school VARCHAR, hometown VARCHAR )
SELECT school FROM table_11677100_18 WHERE hometown = "Montvale, NJ"
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 school did the player attend who's hometown was Montvale, NJ? ### Input: CREATE TABLE table_11677100_18 ( school VA...
Which player placed t10?
CREATE TABLE table_name_72 ( player VARCHAR, place VARCHAR )
SELECT player FROM table_name_72 WHERE place = "t10"
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 player placed t10? ### Input: CREATE TABLE table_name_72 ( player VARCHAR, place VARCHAR ) ### Response: SELEC...
count the number of patients whose insurance is medicare and diagnosis short title is hydronephrosis
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Medicare" AND diagnoses.short_title = "Hydronephrosis"
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 insurance is medicare and diagnosis short title is hydronephrosis ### Input: CREATE TABLE...
What is the highest number of wins for club Cd Orense, with points greater than 36 and more than 4 draws?
CREATE TABLE table_name_82 ( wins INTEGER, points VARCHAR, draws VARCHAR, club VARCHAR )
SELECT MAX(wins) FROM table_name_82 WHERE draws > 4 AND club = "cd orense" AND points > 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: What is the highest number of wins for club Cd Orense, with points greater than 36 and more than 4 draws? ### Input: CREATE ...
What was the total score for january 18?
CREATE TABLE table_22883210_7 ( score VARCHAR, date VARCHAR )
SELECT COUNT(score) FROM table_22883210_7 WHERE date = "January 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 was the total score for january 18? ### Input: CREATE TABLE table_22883210_7 ( score VARCHAR, date VARCHAR ) ##...
What is the highest losses for more than 11 wins, a goal difference greater than 5, a 3 position, and more than 3 draws?
CREATE TABLE table_7858 ( "Position" real, "Club" text, "Played" real, "Points" real, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real )
SELECT MAX("Losses") FROM table_7858 WHERE "Wins" > '11' AND "Goal Difference" > '5' AND "Position" = '3' AND "Draws" > '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: What is the highest losses for more than 11 wins, a goal difference greater than 5, a 3 position, and more than 3 draws? ###...
What's China's heat for Zhang Lin in a lane after 6?
CREATE TABLE table_65133 ( "Heat" real, "Lane" real, "Name" text, "Nationality" text, "Time" text )
SELECT SUM("Heat") FROM table_65133 WHERE "Nationality" = 'china' AND "Name" = 'zhang lin' AND "Lane" > '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's China's heat for Zhang Lin in a lane after 6? ### Input: CREATE TABLE table_65133 ( "Heat" real, "Lane" real,...
Can you show me which courses involve parts of Modern Dance and Restoration Ecology .
CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE instructor ( instructo...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id WHERE (area.area LIKE '%Restoration Ecology%' OR course.description LIKE '%Restoration Ecology%' OR course.name LIKE '%Restoration Ecology%') AND (area.area LIKE '%Modern Dance%' OR course.desc...
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: Can you show me which courses involve parts of Modern Dance and Restoration Ecology . ### Input: CREATE TABLE gsi ( cour...
What's the largest amount of wins Texas has?
CREATE TABLE table_16225511_2 ( wins INTEGER, school VARCHAR )
SELECT MAX(wins) FROM table_16225511_2 WHERE school = "Texas"
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's the largest amount of wins Texas has? ### Input: CREATE TABLE table_16225511_2 ( wins INTEGER, school VARCHAR...
How many schools are in Bloomington, IN?
CREATE TABLE table_10082596_1 ( founded VARCHAR, location VARCHAR )
SELECT COUNT(founded) FROM table_10082596_1 WHERE location = "Bloomington, IN"
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 schools are in Bloomington, IN? ### Input: CREATE TABLE table_10082596_1 ( founded VARCHAR, location VARCHA...
Which venue was fouded before 2000 for basketball?
CREATE TABLE table_name_31 ( venue VARCHAR, founded VARCHAR, sport VARCHAR )
SELECT venue FROM table_name_31 WHERE founded < 2000 AND sport = "basketball"
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 venue was fouded before 2000 for basketball? ### Input: CREATE TABLE table_name_31 ( venue VARCHAR, founded VA...
What is the average Frequency, when Type is 'Norte o', and when Brand is 'La Cotorra'?
CREATE TABLE table_name_87 ( frequency INTEGER, type VARCHAR, brand VARCHAR )
SELECT AVG(frequency) FROM table_name_87 WHERE type = "norteño" AND brand = "la cotorra"
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 Frequency, when Type is 'Norte o', and when Brand is 'La Cotorra'? ### Input: CREATE TABLE table_name_87...
When mixed quad singles is the event what is the final/bronze medal match?
CREATE TABLE table_22495 ( "Athlete" text, "Class" text, "Event" text, "Round of 64" text, "Round of 32" text, "Round of 16" text, "Quarterfinals" text, "Semifinals" text, "Final/ Bronze medal match" text )
SELECT "Final/ Bronze medal match" FROM table_22495 WHERE "Event" = 'Mixed Quad Singles'
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 mixed quad singles is the event what is the final/bronze medal match? ### Input: CREATE TABLE table_22495 ( "Athlet...
count the number of patients with lab test item id 51259 who had abnormal lab test status.
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "51259" 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: count the number of patients with lab test item id 51259 who had abnormal lab test status. ### Input: CREATE TABLE diagnoses...
What's the highest league of the Nova Scotia Clippers with a total season of less than 4?
CREATE TABLE table_51046 ( "Team" text, "City" text, "Total Seasons" real, "Seasons" text, "Highest League" text )
SELECT "Highest League" FROM table_51046 WHERE "Total Seasons" < '4' AND "Team" = 'nova scotia clippers'
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 highest league of the Nova Scotia Clippers with a total season of less than 4? ### Input: CREATE TABLE table_5104...
What is the latest year with more than 0 points?
CREATE TABLE table_name_13 ( year INTEGER, points INTEGER )
SELECT MAX(year) FROM table_name_13 WHERE points > 0
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the latest year with more than 0 points? ### Input: CREATE TABLE table_name_13 ( year INTEGER, points INTEGE...
who came in last ?
CREATE TABLE table_204_433 ( id number, "rank" number, "name" text, "nationality" text, "time" text )
SELECT "name" FROM table_204_433 ORDER BY id 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 came in last ? ### Input: CREATE TABLE table_204_433 ( id number, "rank" number, "name" text, "nationali...
Top Users from Indian, Kolkata.
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 Posts ( Id number, PostTypeId number, AcceptedAnswer...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, LastAccessDate FROM Users WHERE LOWER(Location) LIKE '%kolkata%' OR LOWER(Location) LIKE '%india%' ORDER BY Reputation DESC LIMIT 300
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 Users from Indian, Kolkata. ### Input: CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostI...
What is the total likes on tips from Niloofar about ' Cafe Zinho
CREATE TABLE review ( rid int, business_id varchar, user_id varchar, rating float, text longtext, year int, month varchar ) CREATE TABLE neighborhood ( id int, business_id varchar, neighborhood_name varchar ) CREATE TABLE user ( uid int, user_id varchar, name varcha...
SELECT SUM(tip.likes) FROM business, tip, user WHERE business.name = 'Cafe Zinho' AND tip.business_id = business.business_id AND user.name = 'Niloofar' AND user.user_id = tip.user_id
yelp
Below are sql tables 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 likes on tips from Niloofar about ' Cafe Zinho ### Input: CREATE TABLE review ( rid int, business_...
What date was the game that resulted in L 30-27?
CREATE TABLE table_44301 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
SELECT "Date" FROM table_44301 WHERE "Result" = 'l 30-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: What date was the game that resulted in L 30-27? ### Input: CREATE TABLE table_44301 ( "Week" real, "Date" text, ...
Questions in the [row] tag with positive scores in the past year.
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE Users ( Id number, Reputation number, CreationD...
SELECT Id AS "post_link", Score, Tags, CreationDate FROM Posts WHERE Tags LIKE '%<row>%' AND PostTypeId = 1 AND Score > 0 AND CreationDate >= DATEADD(year, -1, GETDATE()) 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: Questions in the [row] tag with positive scores in the past year. ### Input: CREATE TABLE SuggestedEdits ( Id number, ...
What country in Kunlong in?
CREATE TABLE table_name_46 ( country VARCHAR, location VARCHAR )
SELECT country FROM table_name_46 WHERE location = "kunlong"
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 country in Kunlong in? ### Input: CREATE TABLE table_name_46 ( country VARCHAR, location VARCHAR ) ### Response...
When shinya nakano's kawasaki ninja zx-rr is the example what is the graphical?
CREATE TABLE table_25557 ( "Engine" text, "Crankshaft" text, "Ignition timing" text, "Graphical" text, "Example" text )
SELECT "Graphical" FROM table_25557 WHERE "Example" = 'Shinya Nakano''s Kawasaki Ninja ZX-RR'
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 shinya nakano's kawasaki ninja zx-rr is the example what is the graphical? ### Input: CREATE TABLE table_25557 ( "E...
What is Date, when Runner(s)-Up is 'Bo-Mee Lee'?
CREATE TABLE table_name_65 ( date VARCHAR, runner_s__up VARCHAR )
SELECT date FROM table_name_65 WHERE runner_s__up = "bo-mee lee"
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 Date, when Runner(s)-Up is 'Bo-Mee Lee'? ### Input: CREATE TABLE table_name_65 ( date VARCHAR, runner_s__up ...
WHAT POSITION DOES THE PLAYER FROM SOUTH POINTE HIGH SCHOOL PLAY?
CREATE TABLE table_17071 ( "Player" text, "Position" text, "School" text, "Hometown" text, "College" text )
SELECT "Position" FROM table_17071 WHERE "School" = 'South Pointe High School'
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 POSITION DOES THE PLAYER FROM SOUTH POINTE HIGH SCHOOL PLAY? ### Input: CREATE TABLE table_17071 ( "Player" text, ...
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and the sum of code , and group by attribute name, and show from low to high by the total number.
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
SELECT T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Code
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and t...
What is the local/network with an Ad frequency of 15 minutes?
CREATE TABLE table_name_1 ( local_networked VARCHAR, ad_freq VARCHAR )
SELECT local_networked FROM table_name_1 WHERE ad_freq = "15 minutes"
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 local/network with an Ad frequency of 15 minutes? ### Input: CREATE TABLE table_name_1 ( local_networked VAR...
What was the away team when the home team scored 9.8 (62)?
CREATE TABLE table_33147 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Away team" FROM table_33147 WHERE "Home team score" = '9.8 (62)'
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 away team when the home team scored 9.8 (62)? ### Input: CREATE TABLE table_33147 ( "Home team" text, "...
Which Draws has Points smaller than 15, and a Conceded larger than 10, and a Position larger than 8, and Wins of 1?
CREATE TABLE table_66362 ( "Position" real, "Team" text, "Played" real, "Wins" real, "Draws" real, "Losses" real, "Scored" real, "Conceded" real, "Points" real )
SELECT MIN("Draws") FROM table_66362 WHERE "Points" < '15' AND "Conceded" > '10' AND "Position" > '8' AND "Wins" = '1'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Draws has Points smaller than 15, and a Conceded larger than 10, and a Position larger than 8, and Wins of 1? ### Inpu...
A bar chart for finding the number of the parties associated with the delegates from district 1 or 2 Who served as comptrollers of the parties?, I want to list by the x-axis in ascending.
CREATE TABLE election ( Election_ID int, Counties_Represented text, District int, Delegate text, Party int, First_Elected real, Committee text ) CREATE TABLE county ( County_Id int, County_name text, Population real, Zip_code text ) CREATE TABLE party ( Party_ID int, ...
SELECT Comptroller, COUNT(Comptroller) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2 GROUP BY Comptroller ORDER BY Comptroller
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 finding the number of the parties associated with the delegates from district 1 or 2 Who served as comptroll...
How many people tuned in to the finale on May 16, 2007?
CREATE TABLE table_46305 ( "Season" text, "Timeslot" text, "Premiere" text, "Finale" text, "TV season" text, "Ranking" text, "Viewers (in millions)" real )
SELECT COUNT("Viewers (in millions)") FROM table_46305 WHERE "Finale" = 'may 16, 2007'
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 people tuned in to the finale on May 16, 2007? ### Input: CREATE TABLE table_46305 ( "Season" text, "Timesl...
give me the top four most frequently prescribed drugs for patients with 50s in this year.
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 t1.drugname FROM (SELECT medication.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 50 AND 59) AND DATETIME(medication.drugstarttime, 'start of year') = 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: give me the top four most frequently prescribed drugs for patients with 50s in this year. ### Input: CREATE TABLE medication...
What is the main legion base that disbanded 70 xx?
CREATE TABLE table_242785_3 ( main_legion_base VARCHAR, date_disband VARCHAR )
SELECT main_legion_base FROM table_242785_3 WHERE date_disband = "70 XX"
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 main legion base that disbanded 70 xx? ### Input: CREATE TABLE table_242785_3 ( main_legion_base VARCHAR, ...
How many data are on points for if the percentage is 94.29?
CREATE TABLE table_25229283_4 ( points_for VARCHAR, percentage___percentage_ VARCHAR )
SELECT COUNT(points_for) FROM table_25229283_4 WHERE percentage___percentage_ = "94.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: How many data are on points for if the percentage is 94.29? ### Input: CREATE TABLE table_25229283_4 ( points_for VARCHA...
How many people attended the game of a.f.c. totton?
CREATE TABLE table_name_47 ( attendance VARCHAR, home_team VARCHAR )
SELECT attendance FROM table_name_47 WHERE home_team = "a.f.c. totton"
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 people attended the game of a.f.c. totton? ### Input: CREATE TABLE table_name_47 ( attendance VARCHAR, home...
Provide the number of patients who have sigmoid diverticulitis, colovestical fistula/sda and died in or before the year 2112.
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "SIGMOID DIVERTICULITIS, COLOVESTICAL FISTULA/SDA" AND demographic.dod_year <= "2112.0"
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: Provide the number of patients who have sigmoid diverticulitis, colovestical fistula/sda and died in or before the year 2112...
What is the minimum capacity of Dundee United's stadium?
CREATE TABLE table_153 ( "Team" text, "Stadium" text, "Capacity" real, "Lowest" real, "Highest" real, "Average" real )
SELECT MIN("Capacity") FROM table_153 WHERE "Team" = 'Dundee United'
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 minimum capacity of Dundee United's stadium? ### Input: CREATE TABLE table_153 ( "Team" text, "Stadium" ...
Name the result for south carolina 4
CREATE TABLE table_1341930_40 ( result VARCHAR, district VARCHAR )
SELECT result FROM table_1341930_40 WHERE district = "South Carolina 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: Name the result for south carolina 4 ### Input: CREATE TABLE table_1341930_40 ( result VARCHAR, district VARCHAR ) #...
what date was giulia casoni the partner?
CREATE TABLE table_69706 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Partner" text, "Score" text )
SELECT "Date" FROM table_69706 WHERE "Partner" = 'giulia casoni'
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 was giulia casoni the partner? ### Input: CREATE TABLE table_69706 ( "Outcome" text, "Date" text, "Tou...
What is the least amount of points?
CREATE TABLE table_74134 ( "Game" real, "November" real, "Opponent" text, "Score" text, "Location/Attendance" text, "Record" text, "Points" real )
SELECT MIN("Points") FROM table_74134
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 least amount of points? ### Input: CREATE TABLE table_74134 ( "Game" real, "November" real, "Opponen...
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, show me the trend about manager_id over hire_date with a line chart, list by the x-axis from high to low please.
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE countries ( COUNTRY_ID...
SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 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 those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not ...
Which major has least number of students? List the major and the number of students.
CREATE TABLE restaurant_type ( restypeid number, restypename text, restypedescription text ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE type_of_restaurant ( resid number,...
SELECT major, COUNT(*) FROM student GROUP BY major ORDER BY COUNT(major) LIMIT 1
spider
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which major has least number of students? List the major and the number of students. ### Input: CREATE TABLE restaurant_type...
Which Opponent has a Surface of hardcourt, an Outcome of runner-up, and a Tournament of honolulu?
CREATE TABLE table_68761 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text )
SELECT "Opponent" FROM table_68761 WHERE "Surface" = 'hardcourt' AND "Outcome" = 'runner-up' AND "Tournament" = 'honolulu'
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 Opponent has a Surface of hardcourt, an Outcome of runner-up, and a Tournament of honolulu? ### Input: CREATE TABLE ta...
In the game in which the Jacksonville Jaguars were hosts, what was the name of the visiting team?
CREATE TABLE table_71821 ( "Date" text, "Visiting Team" text, "Final Score" text, "Host Team" text, "Stadium" text )
SELECT "Visiting Team" FROM table_71821 WHERE "Host Team" = 'jacksonville jaguars'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: In the game in which the Jacksonville Jaguars were hosts, what was the name of the visiting team? ### Input: CREATE TABLE ta...
Which year is that has a Entrant of belond equa-flow / calif. muffler?
CREATE TABLE table_68100 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real )
SELECT "Year" FROM table_68100 WHERE "Entrant" = 'belond equa-flow / calif. muffler'
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 year is that has a Entrant of belond equa-flow / calif. muffler? ### Input: CREATE TABLE table_68100 ( "Year" real...
How many years was the country Belgium?
CREATE TABLE table_27441210_13 ( year VARCHAR, country VARCHAR )
SELECT COUNT(year) FROM table_27441210_13 WHERE country = "Belgium"
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 years was the country Belgium? ### Input: CREATE TABLE table_27441210_13 ( year VARCHAR, country VARCHAR ) ...
Tell me the highest series # for september 22, 1976
CREATE TABLE table_32077 ( "Series #" real, "Season #" real, "Title" text, "Original air date" text, "Tape date" text )
SELECT MAX("Series #") FROM table_32077 WHERE "Original air date" = 'september 22, 1976'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Tell me the highest series # for september 22, 1976 ### Input: CREATE TABLE table_32077 ( "Series #" real, "Season #...
What was the record for the game on April 9, 2008?
CREATE TABLE table_name_9 ( record VARCHAR, date VARCHAR )
SELECT record FROM table_name_9 WHERE date = "april 9, 2008"
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 for the game on April 9, 2008? ### Input: CREATE TABLE table_name_9 ( record VARCHAR, date VARCH...
what is the number of patients diagnosed with assault-firearm nec who did not come back to the hospital within 2 months?
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE inputevents_cv ( row_id number, ...
SELECT (SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'assault-fi...
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients diagnosed with assault-firearm nec who did not come back to the hospital within 2 months? ###...
How many gold have a silver of 1 and a bronze of 0?
CREATE TABLE table_name_12 ( gold INTEGER, silver VARCHAR, bronze VARCHAR )
SELECT SUM(gold) FROM table_name_12 WHERE silver = 1 AND bronze < 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: How many gold have a silver of 1 and a bronze of 0? ### Input: CREATE TABLE table_name_12 ( gold INTEGER, silver VAR...
What time has humber college north as the ground, and toronto downtown dingos as the home?
CREATE TABLE table_name_58 ( time VARCHAR, ground VARCHAR, home VARCHAR )
SELECT time FROM table_name_58 WHERE ground = "humber college north" AND home = "toronto downtown dingos"
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 has humber college north as the ground, and toronto downtown dingos as the home? ### Input: CREATE TABLE table_nam...
For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of job_id and employee_id , and sort in asc by the X-axis.
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), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(...
SELECT JOB_ID, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY JOB_ID
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the di...
how many of the patients diagnosed with ac/chr syst/dia hrt fail received drug via iv route?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Ac/chr syst/dia hrt fail" AND prescriptions.route = "ID"
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 of the patients diagnosed with ac/chr syst/dia hrt fail received drug via iv route? ### Input: CREATE TABLE demogra...
Cape Town developers asking questions with NODE Tag.
CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text...
SELECT DISTINCT U.* FROM Users AS U JOIN Posts AS P ON P.OwnerUserId = U.Id JOIN PostTypes AS PT ON PT.Id = P.PostTypeId WHERE UPPER(U.Location) LIKE '%CAPE TOWN%' AND (U.WebsiteUrl != '' OR U.AboutMe != '') AND PT.Name IN ('Question', 'Answer') AND UPPER(P.Tags) LIKE '%NODE%' ORDER BY U.Reputation 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: Cape Town developers asking questions with NODE Tag. ### Input: CREATE TABLE Posts ( Id number, PostTypeId number, ...
what is the name of the place listed last on this chart ?
CREATE TABLE table_204_279 ( id number, "name of place" text, "number\nof\ncounties" number, "principal\ncounty" text, "zip code\nlower" number, "zip code\nupper" number )
SELECT "name of place" FROM table_204_279 ORDER BY id DESC LIMIT 1
squall
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the name of the place listed last on this chart ? ### Input: CREATE TABLE table_204_279 ( id number, "name o...
Show different nominees and the number of musicals they have been nominated Plot them as bar chart, show in desc by the X.
CREATE TABLE actor ( Actor_ID int, Name text, Musical_ID int, Character text, Duration text, age int ) CREATE TABLE musical ( Musical_ID int, Name text, Year int, Award text, Category text, Nominee text, Result text )
SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee ORDER BY Nominee 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 different nominees and the number of musicals they have been nominated Plot them as bar chart, show in desc by the X. #...
had the heart rate of patient 5828 been on the current icu visit ever less than 72.0?
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE prescriptions ( row_id number, subject_id number,...
SELECT COUNT(*) > 0 FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 5828) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_item...
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: had the heart rate of patient 5828 been on the current icu visit ever less than 72.0? ### Input: CREATE TABLE labevents ( ...
Which match had the largest crowd size where the away team was North Melbourne?
CREATE TABLE table_name_43 ( crowd INTEGER, away_team VARCHAR )
SELECT MAX(crowd) FROM table_name_43 WHERE away_team = "north melbourne"
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 match had the largest crowd size where the away team was North Melbourne? ### Input: CREATE TABLE table_name_43 ( ...
all flights to BALTIMORE after 1800
CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE ground...
SELECT DISTINCT flight.flight_id FROM airport_service, city, flight WHERE city.city_code = airport_service.city_code AND city.city_name = 'BALTIMORE' AND flight.departure_time > 1800 AND flight.to_airport = airport_service.airport_code
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: all flights to BALTIMORE after 1800 ### Input: CREATE TABLE month ( month_number int, month_name text ) CREATE TABL...
What state was the president who was elected earlier than 1848 born in?
CREATE TABLE table_name_43 ( birth_state VARCHAR, election_year INTEGER )
SELECT birth_state FROM table_name_43 WHERE election_year < 1848
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 state was the president who was elected earlier than 1848 born in? ### Input: CREATE TABLE table_name_43 ( birth_st...
Name the Venue which has a Score of 8 1?
CREATE TABLE table_name_61 ( venue VARCHAR, score VARCHAR )
SELECT venue FROM table_name_61 WHERE score = "8 – 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: Name the Venue which has a Score of 8 1? ### Input: CREATE TABLE table_name_61 ( venue VARCHAR, score VARCHAR ) ### ...
For those employees who did not have any job in the past, return a bar chart about the distribution of hire_date and the sum of department_id bin hire_date by weekday, and I want to rank by the Y from low to high.
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE T...
SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(DEPARTMENT_ID)
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who did not have any job in the past, return a bar chart about the distribution of hire_date and the sum...
What is the sum of Agricultural panels that have an Industrial and Commercial Panel smaller than 0?
CREATE TABLE table_name_46 ( agricultural_panel INTEGER, industrial_and_commercial_panel INTEGER )
SELECT SUM(agricultural_panel) FROM table_name_46 WHERE industrial_and_commercial_panel < 0
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the sum of Agricultural panels that have an Industrial and Commercial Panel smaller than 0? ### Input: CREATE TABLE ...
What is the grid with a Toyota constructor and +1:09.718 as time/retired?
CREATE TABLE table_57597 ( "Driver" text, "Constructor" text, "Laps" text, "Time/Retired" text, "Grid" text )
SELECT "Grid" FROM table_57597 WHERE "Constructor" = 'toyota' AND "Time/Retired" = '+1:09.718'
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 grid with a Toyota constructor and +1:09.718 as time/retired? ### Input: CREATE TABLE table_57597 ( "Driver"...
what has changed in weight of patient 007-8317 second measured on the first hospital visit compared to the value first measured on the first hospital visit?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, sy...
SELECT (SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-8317' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1) AND NOT patient.admissionweight IS NULL ORD...
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 has changed in weight of patient 007-8317 second measured on the first hospital visit compared to the value first measu...
What is the 2012 club for the Billy Miller Category:Articles with hcards (Name)?
CREATE TABLE table_33384 ( "Name" text, "Pos." text, "Height" text, "Weight" text, "2012 club" text )
SELECT "2012 club" FROM table_33384 WHERE "Name" = 'billy miller category:articles with hcards'
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 2012 club for the Billy Miller Category:Articles with hcards (Name)? ### Input: CREATE TABLE table_33384 ( "...
A bar chart about how many hosts does each nationality have? List the nationality and the count, and display by the Y in ascending.
CREATE TABLE party_host ( Party_ID int, Host_ID int, Is_Main_in_Charge bool ) CREATE TABLE host ( Host_ID int, Name text, Nationality text, Age text ) CREATE TABLE party ( Party_ID int, Party_Theme text, Location text, First_year text, Last_year text, Number_of_host...
SELECT Nationality, COUNT(*) FROM host GROUP BY Nationality 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: A bar chart about how many hosts does each nationality have? List the nationality and the count, and display by the Y in asc...
what is procedure icd9 code of subject id 2560?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( ...
SELECT procedures.icd9_code FROM procedures WHERE procedures.subject_id = "2560"
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 procedure icd9 code of subject id 2560? ### Input: CREATE TABLE procedures ( subject_id text, hadm_id text, ...
What was the score of the draw in the 2005 FIFA Confederations Cup?
CREATE TABLE table_67494 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
SELECT "Score" FROM table_67494 WHERE "Competition" = '2005 fifa confederations cup' AND "Result" = 'draw'
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 of the draw in the 2005 FIFA Confederations Cup? ### Input: CREATE TABLE table_67494 ( "Date" text, ...
Show the country names and the corresponding number of players Show bar chart, order total number from low to high order.
CREATE TABLE team ( Team_id int, Name text ) CREATE TABLE match_season ( Season real, Player text, Position text, Country int, Team int, Draft_Pick_Number int, Draft_Class text, College text ) CREATE TABLE player ( Player_ID int, Player text, Years_Played text, ...
SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_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: Show the country names and the corresponding number of players Show bar chart, order total number from low to high order. ##...
How many games did Palmeiras win?
CREATE TABLE table_20009 ( "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_20009 WHERE "Team" = 'Palmeiras'
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 games did Palmeiras win? ### Input: CREATE TABLE table_20009 ( "Position" real, "Team" text, "Points" r...
When was the game before week 15 with the result of bye?
CREATE TABLE table_35177 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text )
SELECT "Date" FROM table_35177 WHERE "Week" < '15' AND "Result" = 'bye'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When was the game before week 15 with the result of bye? ### Input: CREATE TABLE table_35177 ( "Week" real, "Date" t...
What was the theme for week 3?
CREATE TABLE table_5830 ( "Week" text, "Song choice" text, "Theme" text, "Performance Order" text, "Result" text )
SELECT "Theme" FROM table_5830 WHERE "Week" = 'week 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: What was the theme for week 3? ### Input: CREATE TABLE table_5830 ( "Week" text, "Song choice" text, "Theme" tex...
What is the total number in 2006, which has an official foundation of municipality of 1918?
CREATE TABLE table_45531 ( "Rank" real, "City" text, "Province" text, "Date of Official Foundation of Municipality" real, "2006" real, "1996" real, "1986" real, "1976" real, "1966" real, "1956" real )
SELECT COUNT("2006") FROM table_45531 WHERE "Date of Official Foundation of Municipality" = '1918'
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 number in 2006, which has an official foundation of municipality of 1918? ### Input: CREATE TABLE table_45...
What is the most sets won with less than 1 legs won?
CREATE TABLE table_35075 ( "Player" text, "Played" real, "Sets Won" real, "Sets Lost" real, "Legs Won" real, "Legs Lost" real, "100+" real, "140+" real, "180s" real, "High Checkout" real, "3-dart Average" real )
SELECT MAX("Sets Won") FROM table_35075 WHERE "Legs Won" < '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 most sets won with less than 1 legs won? ### Input: CREATE TABLE table_35075 ( "Player" text, "Played" r...
What is the amount of viewers if the series number is 14?
CREATE TABLE table_73690 ( "Series #" real, "Season #" text, "Episode" text, "Directed by" text, "Written by" text, "Original air date" text, "Viewers (in millions)" text )
SELECT "Viewers (in millions)" FROM table_73690 WHERE "Series #" = '14'
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 amount of viewers if the series number is 14? ### Input: CREATE TABLE table_73690 ( "Series #" real, "Se...
What was the final score of Game #4?
CREATE TABLE table_name_14 ( score VARCHAR, game VARCHAR )
SELECT score FROM table_name_14 WHERE game = 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 was the final score of Game #4? ### Input: CREATE TABLE table_name_14 ( score VARCHAR, game VARCHAR ) ### Respo...
What's the Proto Germanic when then German is /s/ or /ts/?
CREATE TABLE table_name_41 ( proto_germanic VARCHAR, german VARCHAR )
SELECT proto_germanic FROM table_name_41 WHERE german = "/s/ or /ts/"
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's the Proto Germanic when then German is /s/ or /ts/? ### Input: CREATE TABLE table_name_41 ( proto_germanic VARCHA...
What is the most gold when the rank is 7 and bronze is less than 0?
CREATE TABLE table_name_40 ( gold INTEGER, rank VARCHAR, bronze VARCHAR )
SELECT MAX(gold) FROM table_name_40 WHERE rank = "7" AND bronze < 0
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the most gold when the rank is 7 and bronze is less than 0? ### Input: CREATE TABLE table_name_40 ( gold INTEGER...
what is age and discharge time of subject id 2560?
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 demographic.age, demographic.dischtime FROM demographic WHERE demographic.subject_id = "2560"
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 age and discharge time of subject id 2560? ### Input: CREATE TABLE procedures ( subject_id text, hadm_id tex...