instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
What is the overall number for Louisiana Tech college, and a pick more than 10?
CREATE TABLE table_name_59 (overall INTEGER,college VARCHAR,pick__number VARCHAR)
SELECT SUM(overall) FROM table_name_59 WHERE college = "louisiana tech" AND pick__number > 10
How many times has a wrestler whose federation was roh, wwe competed in this event?
CREATE TABLE table_2305948_1 (other_placings VARCHAR,federation VARCHAR)
SELECT COUNT(other_placings) FROM table_2305948_1 WHERE federation = "ROH, WWE"
how many patients have had cont inv mec ven 96+ hrs within 2 months after the diagnosis of thoracic aortic aneurysm this year?
CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)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 procedures_icd (row_id number,subject_id number,hadm_id number,...
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 = 'thoracic aortic an...
What is the status of joe gibbs racing?
CREATE TABLE table_17375 ("Finish" real,"Start" real,"Car No." real,"Driver" text,"Car Name" text,"Car Make" text,"Entrant" text,"Laps" real,"Status" text)
SELECT "Status" FROM table_17375 WHERE "Entrant" = 'Joe Gibbs Racing'
Which tournament was runner-up paul annacone eric korita?
CREATE TABLE table_29296103_10 (tournament VARCHAR,runner_up VARCHAR)
SELECT tournament FROM table_29296103_10 WHERE runner_up = "Paul Annacone Eric Korita"
what is the minimum rockhampton
CREATE TABLE table_12570207_1 (rockhampton INTEGER)
SELECT MIN(rockhampton) FROM table_12570207_1
Find the name of each user and number of tweets tweeted by each of them Visualize by bar chart, and I want to list by the total number in desc.
CREATE TABLE tweets (id bigint(20),uid int(11),text char(140),createdate datetime)CREATE TABLE follows (f1 int(11),f2 int(11))CREATE TABLE user_profiles (uid int(11),name varchar(255),email varchar(255),partitionid int(11),followers int(11))
SELECT name, COUNT(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid ORDER BY COUNT(*) DESC
When was the coin with the mass of 3.7 g first minted?
CREATE TABLE table_1307572_1 (first_minting VARCHAR,mass VARCHAR)
SELECT first_minting FROM table_1307572_1 WHERE mass = "3.7 g"
How many days did the patient Jerry Deberry stay in the hospital?
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 (subject_id text,hadm_id text,name text,marital_status text,age text,dob...
SELECT demographic.days_stay FROM demographic WHERE demographic.name = "Jerry Deberry"
give me the number of patients who are divorced and had the lab test named vancomycin.
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 text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ...
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 = "Vancomycin"
What is Surface, when Date is 2 May 1999?
CREATE TABLE table_48300 ("Outcome" text,"Date" text,"Location" text,"Surface" text,"Opponent in final" text,"Score" text)
SELECT "Surface" FROM table_48300 WHERE "Date" = '2 may 1999'
Name the province with rank more than 49
CREATE TABLE table_70047 ("Rank" real,"Mountain Peak" text,"Province" text,"Mountain Range" text,"Location" text)
SELECT "Province" FROM table_70047 WHERE "Rank" > '49'
i would like to fly to SAN FRANCISCO from WASHINGTON
CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,time_zone_code varchar)CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varchar,minutes_distant int)CREATE TABLE code_description (code varchar,description text)CREATE TABLE fli...
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 = 'WASHINGTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN...
find the total checkins in Moroccan restaurant in ' Los Angeles ' per day
CREATE TABLE checkin (cid int,business_id varchar,count int,day varchar)CREATE TABLE neighborhood (id int,business_id varchar,neighborhood_name varchar)CREATE TABLE user (uid int,user_id varchar,name varchar)CREATE TABLE category (id int,business_id varchar,category_name varchar)CREATE TABLE tip (tip_id int,business_id...
SELECT checkin.day, SUM(checkin.count) FROM business, category AS CATEGORY_0, category AS CATEGORY_1, checkin WHERE business.city = 'Los Angeles' AND CATEGORY_0.business_id = business.business_id AND CATEGORY_0.category_name = 'Moroccan' AND CATEGORY_1.business_id = business.business_id AND CATEGORY_1.category_name = '...
what is the place when losses is less than 12 and points is less than 19?
CREATE TABLE table_name_12 (place INTEGER,lost VARCHAR,points VARCHAR)
SELECT SUM(place) FROM table_name_12 WHERE lost < 12 AND points < 19
which position is listed the least amount of times on this chart ?
CREATE TABLE table_204_159 (id number,"name" text,"nation" text,"position" text,"league apps" number,"league goals" number,"fa cup apps" number,"fa cup goals" number,"total apps" number,"total goals" number)
SELECT "position" FROM table_204_159 GROUP BY "position" ORDER BY COUNT(*) LIMIT 1
name the only relay with a bbcb over 55 ?
CREATE TABLE table_204_270 (id number,"transmitter" text,"kw" number,"bbca" number,"bbcb" number,"d3&4" number,"sdn" number,"arqa" number,"arqb" number,"pol." text,"a.g." text)
SELECT "transmitter" FROM table_204_270 WHERE "bbcb" > 55
specify the discharge location and insurance details of patients id 15898
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 (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ...
SELECT demographic.insurance, demographic.discharge_location FROM demographic WHERE demographic.subject_id = "15898"
on the first hospital encounter, did patient 18866 go to an er?
CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance text,language text,marital_status text,ethnicity text,age number)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABL...
SELECT COUNT(*) > 0 FROM admissions WHERE admissions.subject_id = 18866 AND admissions.admission_location = 'emergency room admit' AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1
How many entries are shown for school colors for the location of naga , camarines sur?
CREATE TABLE table_24827 ("Institution" text,"Location" text,"Enrollment" text,"Athletic nickname" text,"School Colors" text,"Founded" real)
SELECT COUNT("School Colors") FROM table_24827 WHERE "Location" = 'Naga , Camarines Sur'
What is the total number of Rating(s), when Weekly Rank is 76/88?
CREATE TABLE table_name_7 (rating VARCHAR,weekly_rank VARCHAR)
SELECT COUNT(rating) FROM table_name_7 WHERE weekly_rank = "76/88"
Khalil chawka has a gender of , a religion of , and how many votes?
CREATE TABLE table_52157 ("Rank" real,"List" text,"Candidate name" text,"Gender" text,"Religion" text,"Votes" real)
SELECT "Votes" FROM table_52157 WHERE "Gender" = '♂' AND "Religion" = '☪' AND "Candidate name" = 'khalil chawka'
find the religion of subject id 2560.
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 text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ...
SELECT demographic.religion FROM demographic WHERE demographic.subject_id = "2560"
count the number of patients whose admission type is elective and procedure icd9 code is 17?
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 (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 ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND procedures.icd9_code = "17"
Which player has a Position of defence, and a Pick # of 6?
CREATE TABLE table_79873 ("Pick #" text,"Player" text,"Position" text,"Nationality" text,"NHL team" text,"College/junior/club team" text)
SELECT "Player" FROM table_79873 WHERE "Position" = 'defence' AND "Pick #" = '6'
how many white patients were born before the year 2056?
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,admission_type text,days_stay text,insurance text,ethnicity text,expire_fla...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "WHITE" AND demographic.dob_year < "2056"
What office is Jon Huntsman a candidate for?
CREATE TABLE table_23631 ("Candidate" text,"Office" text,"Home state" text,"Popular vote" real,"States \u2013 first place" real,"States \u2013 second place" real,"States \u2013 third place" text)
SELECT "Office" FROM table_23631 WHERE "Candidate" = 'Jon Huntsman'
Name the Total which has a Silver larger than 19?
CREATE TABLE table_name_70 (total INTEGER,silver INTEGER)
SELECT MAX(total) FROM table_name_70 WHERE silver > 19
Which person whose friends have the oldest average age?
CREATE TABLE Person (age INTEGER,name VARCHAR)CREATE TABLE PersonFriend (name VARCHAR,friend VARCHAR)
SELECT T2.name, AVG(T1.age) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend GROUP BY T2.name ORDER BY AVG(T1.age) DESC LIMIT 1
Which position is player bernie doan?
CREATE TABLE table_22402438_7 (position VARCHAR,player VARCHAR)
SELECT position FROM table_22402438_7 WHERE player = "Bernie Doan"
Which incumbent was first elected in 1987?
CREATE TABLE table_59880 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Results" text)
SELECT "Incumbent" FROM table_59880 WHERE "First elected" = '1987'
Name the competition for motherwell opponents
CREATE TABLE table_name_17 (competition VARCHAR,opponents VARCHAR)
SELECT competition FROM table_name_17 WHERE opponents = "motherwell"
What's the series number of the episode whose writer is David North?
CREATE TABLE table_22078972_2 (no_in_series INTEGER,written_by VARCHAR)
SELECT MAX(no_in_series) FROM table_22078972_2 WHERE written_by = "David North"
From what country did someone score 71?
CREATE TABLE table_44390 ("Place" text,"Player" text,"Country" text,"Score" real,"To par" text)
SELECT "Country" FROM table_44390 WHERE "Score" = '71'
What was the score of the game when the record was 18 43?
CREATE TABLE table_72033 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Record" text)
SELECT "Score" FROM table_72033 WHERE "Record" = '18–43'
count the number of patients whose admission year is less than 2108 and item id is 50998?
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)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime tex...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2108" AND lab.itemid = "50998"
exactly what has the change in the anion gap of patient 26156 last measured on the first hospital visit compared to the value first measured on the first hospital visit?
CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,valuenum number,valueuom text)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,subject_id number,had...
SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 26156 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label ...
how many patients admitted to the hospital before year 2180 had the diagnosis icd9 code 3671?
CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,la...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2180" AND diagnoses.icd9_code = "3671"
What is the Total with a Player named robbie winters?
CREATE TABLE table_6507 ("Position" text,"Player" text,"Premiership" text,"Norwegian Cup" text,"UEFA" text,"Total" text)
SELECT "Total" FROM table_6507 WHERE "Player" = 'robbie winters'
Which region has a date of 1970?
CREATE TABLE table_name_58 (region VARCHAR,date VARCHAR)
SELECT region FROM table_name_58 WHERE date = "1970"
What is the sum of the to par with a 76-77-74-75=302 score?
CREATE TABLE table_13194 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" real,"Money ($)" text)
SELECT SUM("To par") FROM table_13194 WHERE "Score" = '76-77-74-75=302'
Which away team has a tie number of 3?
CREATE TABLE table_name_28 (away_team VARCHAR,tie_no VARCHAR)
SELECT away_team FROM table_name_28 WHERE tie_no = "3"
when did patient 51177 receive a test for cholesterol, total for the last time since 02/2103?
CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careunit text,last_careunit text,first_wa...
SELECT labevents.charttime FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'cholesterol, total') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 51177) AND STRFTIME('%y-%m', labevents.charttime) >= '2103-02' OR...
Which level has marvin gaye as artist 1 and david bowie as artist 2?
CREATE TABLE table_26216 ("Song 1 title" text,"Artist 1" text,"Song 2 title" text,"Artist 2" text,"Mix artist" text,"Guitar part?" text,"Level" text)
SELECT "Level" FROM table_26216 WHERE "Artist 1" = 'Marvin Gaye' AND "Artist 2" = 'David Bowie'
What's the name of the album from 2012 with a Hammer Music / Nail Records label?
CREATE TABLE table_name_50 (album VARCHAR,label VARCHAR,year VARCHAR)
SELECT album FROM table_name_50 WHERE label = "hammer music / nail records" AND year = 2012
How many platforms have celsius calibur as mystic arte?
CREATE TABLE table_30343 ("Character" text,"Game" text,"Platform" text,"Status" text,"Mystic Arte" text,"Character Voice" text)
SELECT COUNT("Platform") FROM table_30343 WHERE "Mystic Arte" = 'Celsius Calibur'
What is the position of United States' player Brett Lawrence?
CREATE TABLE table_name_74 (position VARCHAR,nationality VARCHAR,player VARCHAR)
SELECT position FROM table_name_74 WHERE nationality = "united states" AND player = "brett lawrence"
what 's the fare from WASHINGTON to BOSTON
CREATE TABLE days (days_code varchar,day_name varchar)CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE airport_service (city_c...
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'WASHINGTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.c...
What are the student IDs for everybody who worked for more than 10 hours per week on all sports?
CREATE TABLE video_games (gameid number,gname text,gtype text)CREATE TABLE student (stuid number,lname text,fname text,age number,sex text,major number,advisor number,city_code text)CREATE TABLE sportsinfo (stuid number,sportname text,hoursperweek number,gamesplayed number,onscholarship text)CREATE TABLE plays_games (s...
SELECT stuid FROM sportsinfo GROUP BY stuid HAVING SUM(hoursperweek) > 10
When fitzroy was the home team, how much did the away team score?
CREATE TABLE table_name_76 (away_team VARCHAR,home_team VARCHAR)
SELECT away_team AS score FROM table_name_76 WHERE home_team = "fitzroy"
What is the date of the 279 wheels?
CREATE TABLE table_15412381_5 (date VARCHAR,wheels VARCHAR)
SELECT date FROM table_15412381_5 WHERE wheels = 279
In what Venue was Surrey the Opposition in the 2nd Wicket?
CREATE TABLE table_6059 ("Wicket" text,"Score" real,"Batting partners" text,"Opposition" text,"Venue" text,"City" text,"Year" real)
SELECT "Venue" FROM table_6059 WHERE "Opposition" = 'surrey' AND "Wicket" = '2nd'
what is average age of patients whose primary disease is squamous cell carcinoma oral tongue/sda and days of hospital stay is 5?
CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marita...
SELECT AVG(demographic.age) FROM demographic WHERE demographic.diagnosis = "SQUAMOUS CELL CARCINOMA ORAL TONGUE/SDA" AND demographic.days_stay = "5"
@ Chicago had a high points of what?
CREATE TABLE table_17355408_7 (high_points VARCHAR,team VARCHAR)
SELECT high_points FROM table_17355408_7 WHERE team = "@ Chicago"
What is the greatest lane that David Payne was in when he ran longer than 13.17?
CREATE TABLE table_name_99 (lane INTEGER,athlete VARCHAR,time VARCHAR)
SELECT MAX(lane) FROM table_name_99 WHERE athlete = "david payne" AND time > 13.17
Most popular StackOverflow tags from 2020-1-18 to 2013-1-18.
CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,Predefined boolean,PostNoticeDurationId number)CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE Comments (Id number,PostId number,Score number,Te...
SELECT num.TagName AS Tag, ROW_NUMBER() OVER (ORDER BY rate.Rate DESC) AS Rank, ROW_NUMBER() OVER (ORDER BY num.Num DESC) AS TotalRank, rate.Rate AS QuestionsInTimePeriod, num.Num AS QuestionsTotal FROM (SELECT COUNT(PostId) AS Rate, TagName FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostI...
what is the number of names listed ?
CREATE TABLE table_204_577 (id number,"name" text,"first operational" text,"numeral system" text,"computing mechanism" text,"programming" text,"turing complete" text)
SELECT COUNT("name") FROM table_204_577
What is the highest enrollment for an unversity whose nickname is the Golden Bears and had fewer than 32 NCAA championships as of July 4, 2012?
CREATE TABLE table_12337 ("Institution" text,"Location" text,"Founded" real,"Affiliation" text,"Enrollment" real,"Nickname" text,"NCAA Team Championships (through July 4,2012)" real)
SELECT MAX("Enrollment") FROM table_12337 WHERE "Nickname" = 'golden bears' AND "NCAA Team Championships (through July 4, 2012)" < '32'
How many accounts for each customer? Show a bar chart that groups by customer's last name, sort in descending by the customer_last_name please.
CREATE TABLE Order_Items (order_item_id INTEGER,order_id INTEGER,product_id INTEGER,product_quantity VARCHAR(50),other_order_item_details VARCHAR(255))CREATE TABLE Accounts (account_id INTEGER,customer_id INTEGER,date_account_opened DATETIME,account_name VARCHAR(50),other_account_details VARCHAR(255))CREATE TABLE Custo...
SELECT customer_last_name, COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY customer_last_name DESC
What was the French title of the story published in 1968?
CREATE TABLE table_2976 ("French Title" text,"Date of Publication" real,"English Translation" text,"Writer" text,"Artist" text)
SELECT "French Title" FROM table_2976 WHERE "Date of Publication" = '1968'
Which manufacturer made Shoya Tomizawa's motorcycle?
CREATE TABLE table_68368 ("Rider" text,"Manufacturer" text,"Laps" real,"Time/Retired" text,"Grid" real)
SELECT "Manufacturer" FROM table_68368 WHERE "Rider" = 'shoya tomizawa'
What status of school is the school represented by the baby olympians?
CREATE TABLE table_28180 ("Institution" text,"Seniors" text,"Juniors" text,"Women" text,"Status" text,"Founded" real,"Affiliation (Population)" text,"Color" text,"Location" text)
SELECT "Status" FROM table_28180 WHERE "Juniors" = 'Baby Olympians'
what is the number of patients with replaced route of drug administration?
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 (subject_id text,hadm_id text,name text,marital_status text,age text,do...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.route = "REPLACE"
what is the crown entity listed before the takeovers panel ?
CREATE TABLE table_204_988 (id number,"responsible minister(s)" text,"crown entities" text,"monitoring department(s)" text,"category / type" text,"empowering legislation" text)
SELECT "crown entities" FROM table_204_988 WHERE id = (SELECT id FROM table_204_988 WHERE "crown entities" = 'takeovers panel') - 1
what is the total amount of urine output patient 011-57670 has since 908 days ago?
CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE patient (uniquepid text,patienthealthsy...
SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-57670')) AND intakeoutput.celllabel = 'urine...
How many gold medals does the Choctawhatchee High School have?
CREATE TABLE table_1305623_12 (gold_medals INTEGER,ensemble VARCHAR)
SELECT MAX(gold_medals) FROM table_1305623_12 WHERE ensemble = "Choctawhatchee High School"
What is the Burmese term associated with a cardinal direction of west?
CREATE TABLE table_14850099_18 (burmese VARCHAR,cardinal_direction VARCHAR)
SELECT burmese FROM table_14850099_18 WHERE cardinal_direction = "West"
how many hours had passed since patient 5828 had been admitted to the icu?
CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,chartt...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', icustays.intime)) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 5828) AND icustays.outtime IS NULL
What is Score, when Player is 'Tom Lehman'?
CREATE TABLE table_name_1 (score VARCHAR,player VARCHAR)
SELECT score FROM table_name_1 WHERE player = "tom lehman"
what was patient 23436 last height during the current hospital visit?
CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE microbio...
SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 23436 AND admissions.dischtime IS NULL)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items...
How many points did Nigel Connell have?
CREATE TABLE table_name_44 (points VARCHAR,performer VARCHAR)
SELECT points FROM table_name_44 WHERE performer = "nigel connell"
What is the total number of averages where the played is more than 38, the 1990-91 is 39, and the 1989-90 is 34?
CREATE TABLE table_34867 ("Team" text,"Average" real,"Points" real,"Played" real,"1989-90" text,"1990-91" text,"1991-1992" real)
SELECT SUM("Average") FROM table_34867 WHERE "Played" > '38' AND "1990-91" = '39' AND "1989-90" = '34'
How many stages were there where the winner and the points classification were Alberto Contador?
CREATE TABLE table_15294880_2 (stage VARCHAR,winner VARCHAR,points_classification VARCHAR)
SELECT COUNT(stage) FROM table_15294880_2 WHERE winner = "Alberto Contador" AND points_classification = "Alberto Contador"
How many patients are with black/cape verdan ethnicity and lab test id 51249?
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 (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND lab.itemid = "51249"
What time was the race for the country of france with fb listed under notes?
CREATE TABLE table_66484 ("Rank" real,"Athlete" text,"Country" text,"Time" text,"Notes" text)
SELECT "Time" FROM table_66484 WHERE "Notes" = 'fb' AND "Country" = 'france'
What are the years when the ranking is less than 8 with less than 66 goals and name is Paul McGee?
CREATE TABLE table_69467 ("Ranking" real,"Nationality" text,"Name" text,"Years" text,"Goals" real)
SELECT "Years" FROM table_69467 WHERE "Ranking" < '8' AND "Goals" < '66' AND "Name" = 'paul mcgee'
Which event is located in Northfield, Mn?
CREATE TABLE table_51071 ("Date" text,"Distance" text,"Handler" text,"Event" text,"Location" text)
SELECT "Event" FROM table_51071 WHERE "Location" = 'northfield, mn'
how much patient 18457 weighs on their last hospital encounter for the first time?
CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careunit text,last_careunit text,first_wardid number,last_wardid number,intime time,outtime time)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount...
SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 18457 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1)) AND chartevent...
What is the lowest car number sponsored by UPS before 2001?
CREATE TABLE table_name_22 (car__number INTEGER,sponsor VARCHAR,season VARCHAR)
SELECT MIN(car__number) FROM table_name_22 WHERE sponsor = "ups" AND season < 2001
Usuarios con 10 o m s preguntas sin aceptar.
CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE ReviewTaskResults (Id number,Re...
SELECT U.Id, U.DisplayName, COUNT(CASE WHEN P.AcceptedAnswerId IS NULL THEN 1 ELSE NULL END) AS PreguntasSinAceptar, COUNT(CASE WHEN NOT P.AcceptedAnswerId IS NULL THEN 1 ELSE NULL END) AS PreguntasAceptadas FROM Users AS U INNER JOIN Posts AS P ON U.Id = P.OwnerUserId WHERE P.PostTypeId = 1 AND P.AnswerCount > 0 GROUP...
Name the total number of series for april 26
CREATE TABLE table_1728 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Series" text)
SELECT COUNT("Series") FROM table_1728 WHERE "Date" = 'April 26'
how many districts are there in virginia ?
CREATE TABLE table_204_109 (id number,"district" text,"incumbent" text,"party" text,"first\nelected" text,"result" text,"candidates" text)
SELECT COUNT("district") FROM table_204_109
how many asian patients are less than 47 years?
CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,la...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "ASIAN" AND demographic.age < "47"
How many qualifying start dates for the Concacaf confederation?
CREATE TABLE table_26468 ("Confederation" text,"Teams started" text,"Teams that have secured qualification" text,"Teams that can still qualify" text,"Teams that have been eliminated" text,"Remaining places in finals" text,"Total places in finals" text,"Qualifying start date" text,"Qualifying end date" text)
SELECT COUNT("Qualifying start date") FROM table_26468 WHERE "Confederation" = 'CONCACAF'
What is the least game that was played in Alexander Memorial Coliseum on October 16?
CREATE TABLE table_name_98 (game INTEGER,location_attendance VARCHAR,date VARCHAR)
SELECT MIN(game) FROM table_name_98 WHERE location_attendance = "alexander memorial coliseum" AND date = "october 16"
What Attendance has a Result of l12 21?
CREATE TABLE table_name_13 (attendance VARCHAR,result VARCHAR)
SELECT attendance FROM table_name_13 WHERE result = "l12–21"
how many patients are diagnosed with primary disease chest pain and stayed in hospital for more than 1 day?
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 text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CHEST PAIN" AND demographic.days_stay > "1"
What nation has a total more than 3, with more than 5 for bronze, and less than 4 for the silver?
CREATE TABLE table_name_29 (nation VARCHAR,silver VARCHAR,total VARCHAR,bronze VARCHAR)
SELECT nation FROM table_name_29 WHERE total > 3 AND bronze > 5 AND silver < 4
how many prions have been characterized ?
CREATE TABLE table_203_589 (id number,"protein" text,"natural host" text,"normal function" text,"prion state" text,"prion phenotype" text,"year identified" number)
SELECT COUNT("protein") FROM table_203_589
Which party was elected first in 1998?
CREATE TABLE table_1805191_34 (party VARCHAR,first_elected VARCHAR)
SELECT party FROM table_1805191_34 WHERE first_elected = 1998
What is the number of position where the pick number is 43?
CREATE TABLE table_10975034_5 (position VARCHAR,pick__number VARCHAR)
SELECT COUNT(position) FROM table_10975034_5 WHERE pick__number = 43
When did Chetan Anand win his first men's single?
CREATE TABLE table_12275654_1 (year INTEGER,mens_singles VARCHAR)
SELECT MIN(year) FROM table_12275654_1 WHERE mens_singles = "Chetan Anand"
Name the total number of points for beta team march 1975 and chassis of march 751
CREATE TABLE table_15127 ("Year" real,"Entrant" text,"Chassis" text,"Engine" text,"Points" real)
SELECT COUNT("Points") FROM table_15127 WHERE "Entrant" = 'beta team march' AND "Year" = '1975' AND "Chassis" = 'march 751'
what is the amount of bisacodyl dose prescribed to patient 16554 since 01/2105?
CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)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 ...
SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 16554) AND prescriptions.drug = 'bisacodyl' AND STRFTIME('%y-%m', prescriptions.startdate) >= '2105-01'
What is the Score with a Home of colorado, and a Date with may 11?
CREATE TABLE table_57752 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Series" text)
SELECT "Score" FROM table_57752 WHERE "Home" = 'colorado' AND "Date" = 'may 11'
Which 1st Party has an election in 1847?
CREATE TABLE table_71749 ("Election" text,"1st Member" text,"1st Party" text,"2nd Member" text,"2nd Party" text)
SELECT "1st Party" FROM table_71749 WHERE "Election" = '1847'
What nation has more than 0 silver medals and is ranked 1?
CREATE TABLE table_name_27 (nation VARCHAR,silver VARCHAR,rank VARCHAR)
SELECT nation FROM table_name_27 WHERE silver > 0 AND rank = "1"
what is the to par when the score is 67-68-76=211?
CREATE TABLE table_name_42 (to_par VARCHAR,score VARCHAR)
SELECT to_par FROM table_name_42 WHERE score = 67 - 68 - 76 = 211
how many papers in emnlp 2016
CREATE TABLE writes (paperid int,authorid int)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TABLE venue (venueid int,venuename varchar)CREATE TABLE author (authorid int,authorname varchar)CREATE TABLE paperkeyphrase (paperid int,keyphraseid int)CREA...
SELECT DISTINCT COUNT(paper.paperid) FROM paper, venue WHERE paper.year = 2016 AND venue.venueid = paper.venueid AND venue.venuename = 'emnlp'
What is the Club, when the value for Lost is 9, and when the value for Tries is 55?
CREATE TABLE table_67688 ("Club" text,"Played" text,"Drawn" text,"Lost" text,"Points for" text,"Points against" text,"Tries for" text,"Tries against" text,"Try bonus" text,"Losing bonus" text,"Points" text)
SELECT "Club" FROM table_67688 WHERE "Lost" = '9' AND "Tries for" = '55'