instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
Who is the producer of ? | CREATE TABLE table_22706 ("Producer" text,"Product" text,"Samples taken" real,"Samples failed" real,"Melamine content(mg/kg)" text) | SELECT "Producer" FROM table_22706 WHERE "Product" = '金必氏牌嬰幼兒配方乳粉' |
What is the pick number for the player playing tackle position, and a round less than 15? | CREATE TABLE table_name_97 (pick INTEGER,position VARCHAR,round VARCHAR) | SELECT SUM(pick) FROM table_name_97 WHERE position = "tackle" AND round < 15 |
Name the malayalam name for leo | CREATE TABLE table_20354_7 (malayalam_name VARCHAR,zodiac_sign VARCHAR) | SELECT malayalam_name FROM table_20354_7 WHERE zodiac_sign = "Leo" |
What party is the delegate of Turner, Frank S. Frank S. Turner of Howard County? | CREATE TABLE table_37233 ("District" text,"Counties Represented" text,"Delegate" text,"Party" text,"First Elected" real,"Committee" text) | SELECT "Party" FROM table_37233 WHERE "Counties Represented" = 'howard' AND "Delegate" = 'turner, frank s. frank s. turner' |
Who wrote the episode for s02 e07? | CREATE TABLE table_20710 ("Number in series" real,"Broadcast Order" text,"Title" text,"Directed by" text,"Written by" text,"Original airdate" text,"Production Code" real) | SELECT "Written by" FROM table_20710 WHERE "Broadcast Order" = 'S02 E07' |
What is the fewest number of losses? | CREATE TABLE table_20834 ("Locale" text,"Skip" text,"W" real,"L" real,"PF" real,"PA" real,"Ends Won" real,"Ends Lost" real,"Blank Ends" real,"Stolen Ends" real,"Shot %" text) | SELECT MIN("L") FROM table_20834 |
what was the last time patient 010-6010 was prescribed medicine? | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,di... | SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-6010')) ORDER BY medication.drugstarttime DESC LIMIT 1 |
Get me the number of unmarried patients who had tonsil and adenoid biopsy. | 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 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "SINGLE" AND procedures.short_title = "Tonsil&adenoid biopsy" |
How many seasons was the losing team Adelaide City? | CREATE TABLE table_17381 ("Season" text,"Cup FinalDate" text,"WinningTeam" text,"Score" text,"LosingTeam" text,"Location" text,"Cup Final Attendance" real) | SELECT COUNT("Season") FROM table_17381 WHERE "LosingTeam" = 'Adelaide City' |
how many patients below 76 years of age are diagnosed with transient neonatal thrombocytopenia? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "76" AND diagnoses.long_title = "Transient neonatal thrombocytopenia" |
what is the latest episode in season 2 directed by jamie babbit? | CREATE TABLE table_16390576_3 (no_in_season INTEGER,directed_by VARCHAR) | SELECT MAX(no_in_season) FROM table_16390576_3 WHERE directed_by = "Jamie Babbit" |
what is the number of patients whose lab test name is bands? | 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 lab.label = "Bands" |
what was patient 006-172277's last output on the current intensive care unit visit? | CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE diagnosis (diagnosi... | SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-172277') AND patient.unitdischargetime IS NULL) AND inta... |
How many Field goals have Points larger than 5, and Touchdowns larger than 2, and an Extra points smaller than 0? | CREATE TABLE table_name_33 (field_goals VARCHAR,extra_points VARCHAR,points VARCHAR,touchdowns VARCHAR) | SELECT COUNT(field_goals) FROM table_name_33 WHERE points > 5 AND touchdowns > 2 AND extra_points < 0 |
What is the theme when the date of issue is 11 january 2010? | CREATE TABLE table_27706 ("Date of Issue" text,"Theme" text,"Denomination" text,"Design" text,"Illustration" text,"Quantity" text,"Printing Process" text,"Paper Type" text,"First Day Cover Cancellation" text) | SELECT "Theme" FROM table_27706 WHERE "Date of Issue" = '11 January 2010' |
What was the smallest production code for August 11's original episode? | CREATE TABLE table_25691838_8 (production_code INTEGER,original_airdate VARCHAR) | SELECT MIN(production_code) FROM table_25691838_8 WHERE original_airdate = "August 11" |
What is the % of seats where the difference is 0.25? | CREATE TABLE table_9094 ("party" text,"% of votes" text,"% of seats" text,"difference" text,"difference squared" real) | SELECT "% of seats" FROM table_9094 WHERE "difference" = '0.25' |
Who did the fastest lap in the race won by Paul Tracy, with Emerson Fittipaldi at the pole position? | CREATE TABLE table_73160 ("Rnd" real,"Race Name" text,"Pole position" text,"Fastest lap" text,"Winning driver" text,"Winning team" text,"Report" text) | SELECT "Fastest lap" FROM table_73160 WHERE "Pole position" = 'Emerson Fittipaldi' AND "Winning driver" = 'Paul Tracy' |
What is the total number of patients who died in or before the year 2111? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.dod_year <= "2111.0" |
How many points were scored on pole services? | CREATE TABLE table_28314 ("Season" real,"Series" text,"Team" text,"Races" real,"Wins" real,"Podiums" real,"Points" text,"Position" text) | SELECT "Points" FROM table_28314 WHERE "Team" = 'Pole Services' |
how many days ago was the first time patient 030-34260 was diagnosed with acute respiratory failure - due to neurological process in their current hospital visit? | CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,observationtime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,orga... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', diagnosis.diagnosistime)) FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-34260'... |
What team did the away team play against when they scored 11.9 (75)? | CREATE TABLE table_52386 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Home team" FROM table_52386 WHERE "Away team score" = '11.9 (75)' |
Name the result in 2010 for bgm cyworld | CREATE TABLE table_54987 ("Year" real,"Award" text,"Category" text,"Nomination" text,"Result" text) | SELECT "Result" FROM table_54987 WHERE "Year" = '2010' AND "Award" = 'bgm cyworld' |
What is the technical number for Jiang Tingting & Jiang Wenwen, and the total was more than 96.334? | CREATE TABLE table_64519 ("Country" text,"Athlete" text,"Technical" real,"Free" real,"Total" real) | SELECT MAX("Technical") FROM table_64519 WHERE "Athlete" = 'jiang tingting & jiang wenwen' AND "Total" > '96.334' |
How many millions of U.S. viewers watched the episode directed by Allison Liddi-Brown? | CREATE TABLE table_1813 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"U.S. viewers (millions)" text) | SELECT "U.S. viewers (millions)" FROM table_1813 WHERE "Directed by" = 'Allison Liddi-Brown' |
Which season has less than 26 points, more than 18 games, and exactly 13 losses? | CREATE TABLE table_55053 ("Season" text,"Team Name" text,"Games" real,"Losses" real,"Points" real) | SELECT "Season" FROM table_55053 WHERE "Points" < '26' AND "Games" > '18' AND "Losses" = '13' |
What year did Yuri Omeltchenko win Silver? | CREATE TABLE table_name_57 (year VARCHAR,silver VARCHAR) | SELECT year FROM table_name_57 WHERE silver = "yuri omeltchenko" |
What position is for Plant high school? | CREATE TABLE table_78129 ("Player" text,"Position" text,"School" text,"Hometown" text,"College" text) | SELECT "Position" FROM table_78129 WHERE "School" = 'plant high school' |
Which suzuki gsx-r1000 k7 has the highest time of retirement? | CREATE TABLE table_name_8 (grid INTEGER,time VARCHAR,bike VARCHAR) | SELECT MAX(grid) FROM table_name_8 WHERE time = "retirement" AND bike = "suzuki gsx-r1000 k7" |
What is the highest game that has april 21 as the date? | CREATE TABLE table_name_64 (game INTEGER,date VARCHAR) | SELECT MAX(game) FROM table_name_64 WHERE date = "april 21" |
Which Location Attendance has a Game larger than 5? | CREATE TABLE table_43010 ("Game" real,"Date" text,"Team" text,"Score" text,"Location Attendance" text,"Record" text) | SELECT "Location Attendance" FROM table_43010 WHERE "Game" > '5' |
Bar chart x axis role code y axis the total number, I want to display in descending by the Role_Code. | CREATE TABLE All_Documents (Document_ID INTEGER,Date_Stored DATETIME,Document_Type_Code CHAR(15),Document_Name CHAR(255),Document_Description CHAR(255),Other_Details VARCHAR(255))CREATE TABLE Employees (Employee_ID INTEGER,Role_Code CHAR(15),Employee_Name VARCHAR(255),Gender_MFU CHAR(1),Date_of_Birth DATETIME,Other_Det... | SELECT Role_Code, COUNT(*) FROM Employees GROUP BY Role_Code ORDER BY Role_Code DESC |
what is the material of the surface in noida , uttar pradesh, india | CREATE TABLE table_29127804_3 (surface VARCHAR,location VARCHAR) | SELECT surface FROM table_29127804_3 WHERE location = "Noida , Uttar Pradesh, India" |
WHAT NAME HAS A FREE TRANSFER FREE AND RETIRED? | CREATE TABLE table_name_74 (name VARCHAR,transfer_fee VARCHAR,moving_to VARCHAR) | SELECT name FROM table_name_74 WHERE transfer_fee = "free" AND moving_to = "retired" |
What is the Gross Revenue (1979) of the Venue, lyceum theatre? | CREATE TABLE table_68531 ("Venue" text,"City" text,"Tickets Sold / Available" text,"Gross Revenue (1979)" text,"Gross Revenue (2012)" text) | SELECT "Gross Revenue (1979)" FROM table_68531 WHERE "Venue" = 'lyceum theatre' |
When 1.12 is the production code what is the original title? | CREATE TABLE table_23552 ("#" text,"Original title" text,"Directed by" text,"Written by" text,"Original airdate" text,"Prod. code" text,"Viewers" real) | SELECT "Original title" FROM table_23552 WHERE "Prod. code" = '1.12' |
Which nominations was the film 27 Stolen Kisses nominated for? | CREATE TABLE table_16003 ("Nomination" text,"Actors Name" text,"Film Name" text,"Director" text,"Country" text) | SELECT "Nomination" FROM table_16003 WHERE "Film Name" = '27 Stolen Kisses' |
For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a bar chart about the distribution of last_name and manager_id . | CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUMBER varchar(20),HIRE_DATE date,JOB_ID varchar(10),SALARY decimal(8,2),COMMISSION_PCT decimal(2,2),MANAGER_ID decimal(6,0),DEPARTMENT_ID decimal(4,0))CREATE TABLE locations (LOCATION_ID decimal(4,0),S... | SELECT LAST_NAME, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) |
what is the latest flight in the day from BALTIMORE to ATLANTA | CREATE TABLE code_description (code varchar,description text)CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE aircraft (aircraft_code varchar,aircraft_description varchar,manufacturer varchar,basic_type varchar,engines int,propulsion varchar,wide_body varchar,wing_span int,length int,we... | 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 = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATL... |
What is the Population density that has a Change (%) higher than 10.4, and a Population (2011) less than 8574, in the County of Queens? | CREATE TABLE table_name_63 (population_density INTEGER,population__2011_ VARCHAR,change___percentage_ VARCHAR,county VARCHAR) | SELECT AVG(population_density) FROM table_name_63 WHERE change___percentage_ > 10.4 AND county = "queens" AND population__2011_ < 8574 |
what is marital status and gender of subject name sheila riley? | 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,route text,drug_dose text)CREATE TABLE procedures (subject_id text,hadm_id te... | SELECT demographic.marital_status, demographic.gender FROM demographic WHERE demographic.name = "Sheila Riley" |
what is patient 030-51920's allergy during the first hospital visit? | CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,observationtime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid... | SELECT allergy.allergyname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-51920' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient... |
Edits in a year, other than of own posts. | CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,LinkTypeId number)CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE Users (Id number,Re... | SELECT MIN(ph.UserDisplayName), COUNT(*) AS edits FROM PostHistory AS ph JOIN Posts AS p ON p.Id = PostId WHERE PostHistoryTypeId = 5 AND PostTypeId IN (1, 2) AND p.DeletionDate IS NULL AND p.OwnerUserId != ph.UserId GROUP BY ph.UserId ORDER BY edits DESC |
what's the country with highest monthly inflation rate being 3.13 10 8 % | CREATE TABLE table_13681_2 (country VARCHAR,highest_monthly_inflation_rate VARCHAR) | SELECT country FROM table_13681_2 WHERE highest_monthly_inflation_rate = "3.13 × 10 8 %" |
What is the most current year signed for separation of and a separation year of 1997? | CREATE TABLE table_name_79 (year_signed INTEGER,reason_for_separation VARCHAR,year_separated VARCHAR) | SELECT MAX(year_signed) FROM table_name_79 WHERE reason_for_separation = "†" AND year_separated = "1997" |
What was the attendance on September 19, 1971, after week 1? | CREATE TABLE table_name_38 (attendance INTEGER,date VARCHAR,week VARCHAR) | SELECT AVG(attendance) FROM table_name_38 WHERE date = "september 19, 1971" AND week > 1 |
I want to know the highest rank with placings more than 123 and points greater than 88.06 | CREATE TABLE table_57159 ("Rank" real,"Name" text,"Nation" text,"Points" real,"Placings" real) | SELECT MAX("Rank") FROM table_57159 WHERE "Placings" > '123' AND "Points" > '88.06' |
Name the equipment for bike number being 3 | CREATE TABLE table_21165 ("Position" real,"Driver / Passenger" text,"Equipment" text,"Bike No" real,"Points" real) | SELECT "Equipment" FROM table_21165 WHERE "Bike No" = '3' |
What round had the opponent Lyon? | CREATE TABLE table_name_1 (round VARCHAR,opposition VARCHAR) | SELECT round FROM table_name_1 WHERE opposition = "lyon" |
what was the name of the lab test that patient 035-1391 last recieved in 05/2103? | CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,disch... | SELECT lab.labname FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-1391')) AND STRFTIME('%y-%m', lab.labresulttime) = '2103-05' ORDER BY lab.labresultti... |
List phone number and email address of customer with more than 2000 outstanding balance. | CREATE TABLE Customers (phone_number VARCHAR,email_address VARCHAR,amount_outstanding INTEGER) | SELECT phone_number, email_address FROM Customers WHERE amount_outstanding > 2000 |
what name has a Rank of lieutenant colonel, and a Begin Date of 1904-02-22 22 february 1904? | CREATE TABLE table_33965 ("Rank" text,"Name" text,"Begin Date" text,"End Date" text,"Notes" text) | SELECT "Name" FROM table_33965 WHERE "Rank" = 'lieutenant colonel' AND "Begin Date" = '1904-02-22 22 february 1904' |
What year has 59th as a finish position? | CREATE TABLE table_6147 ("Year" real,"Finish position" text,"1st day" text,"2nd day" text,"3rd day" text,"4th Day" text) | SELECT "Year" FROM table_6147 WHERE "Finish position" = '59th' |
Show me a bar chart for what is minimum hours of the students playing in different position?, show by the y axis in ascending please. | CREATE TABLE Tryout (pID numeric(5,0),cName varchar(20),pPos varchar(8),decision varchar(3))CREATE TABLE Player (pID numeric(5,0),pName varchar(20),yCard varchar(3),HS numeric(5,0))CREATE TABLE College (cName varchar(20),state varchar(2),enr numeric(5,0)) | SELECT pPos, MIN(T2.HS) FROM Tryout AS T1 JOIN Player AS T2 ON T1.pID = T2.pID GROUP BY pPos ORDER BY MIN(T2.HS) |
what was the last time patient 011-23193 intake time on the first intensive care unit visit? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,c... | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-23193') AND NOT patient.unitdischargetime IS NULL... |
What is the competition in tokyo with the result loss? | CREATE TABLE table_78158 ("Year" text,"Competition" text,"Date" text,"Location" text,"Score" text,"Result" text) | SELECT "Competition" FROM table_78158 WHERE "Location" = 'tokyo' AND "Result" = 'loss' |
Show me about the distribution of Sex and the sum of Height , and group by attribute Sex in a bar chart, could you display from low to high by the y axis? | CREATE TABLE people (People_ID int,Sex text,Name text,Date_of_Birth text,Height real,Weight real)CREATE TABLE candidate (Candidate_ID int,People_ID int,Poll_Source text,Date text,Support_rate real,Consider_rate real,Oppose_rate real,Unsure_rate real) | SELECT Sex, SUM(Height) FROM people GROUP BY Sex ORDER BY SUM(Height) |
what is the number of patients whose insurance is government and lab test name is lactate dehydrogenase, csf? | 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 demographic (subject_id text,hadm_id text,name text,marital... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Government" AND lab.label = "Lactate Dehydrogenase, CSF" |
count the number of patients who had emergency room hospital admission. | 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,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" |
How many people were in attendance when the home shows as Bulls? | CREATE TABLE table_10703 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Leading scorer" text,"Attendance" real,"Record" text) | SELECT COUNT("Attendance") FROM table_10703 WHERE "Home" = 'bulls' |
What is the total number of games lost when 22 have been played, the losing BP number is 2, and the club is Merthyr RFC? | CREATE TABLE table_name_52 (lost VARCHAR,club VARCHAR,played VARCHAR,losing_bp VARCHAR) | SELECT lost FROM table_name_52 WHERE played = "22" AND losing_bp = "2" AND club = "merthyr rfc" |
was patient 006-40255 receiving since 5 years ago any medication? | CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,dischargeweight number,hospitaladmittime time,hospitaladmitsource text,unitadmittime time,unitdischargetime tim... | SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-40255')) AND DATETIME(medication.drugstarttime) >= DATETIME(CURRENT_TI... |
Name The Score of Player of seve ballesteros? | CREATE TABLE table_name_86 (score VARCHAR,player VARCHAR) | SELECT score FROM table_name_86 WHERE player = "seve ballesteros" |
What is the Altitude (meters) associated with a rank smaller than 10, and the range M hlig-Hofmann Mountains? | CREATE TABLE table_63741 ("Rank" real,"Name" text,"Altitude (meters)" real,"Range" text,"Parent Range" text) | SELECT COUNT("Altitude (meters)") FROM table_63741 WHERE "Range" = 'mühlig-hofmann mountains' AND "Rank" < '10' |
What was the partnership in the season of 1928 | CREATE TABLE table_name_91 (wicket_partnership VARCHAR,season VARCHAR) | SELECT wicket_partnership FROM table_name_91 WHERE season = "1928" |
Total score of my non-CW posts. | CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)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 Badges (Id... | SELECT SUM(Score) AS "total_score", COUNT(Score) AS "number_of_posts" FROM Posts WHERE CommunityOwnedDate IS NULL AND OwnerUserId = '##UserId##' |
What are the scores made by Charlotte team | CREATE TABLE table_17311759_4 (score VARCHAR,team VARCHAR) | SELECT score FROM table_17311759_4 WHERE team = "Charlotte" |
What city was the game held in when the opponent was Towson? | CREATE TABLE table_47861 ("Date" text,"Time" text,"Opponent" text,"Site" text,"City" text) | SELECT "City" FROM table_47861 WHERE "Opponent" = 'towson' |
Which Finals have a Pre-Season larger than 0? | CREATE TABLE table_name_52 (finals INTEGER,pre_season INTEGER) | SELECT MIN(finals) FROM table_name_52 WHERE pre_season > 0 |
what is the maximum days of hospital stay for patients primarily diagnosed for sigmoid diverticulitis, colovestical fistula/sda? | 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 MAX(demographic.days_stay) FROM demographic WHERE demographic.diagnosis = "SIGMOID DIVERTICULITIS, COLOVESTICAL FISTULA/SDA" |
What is the record that resulted in a loss at the RSF: Shooto Challenge 2? | CREATE TABLE table_9636 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" text) | SELECT "Record" FROM table_9636 WHERE "Res." = 'loss' AND "Event" = 'rsf: shooto challenge 2' |
What is the Catalog number for the region of Japan? | CREATE TABLE table_name_91 (catalog VARCHAR,region VARCHAR) | SELECT catalog FROM table_name_91 WHERE region = "japan" |
Find the number of patients who died and had a drug code of zosy4fpb. | 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,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.expire_flag = "1" AND prescriptions.formulary_drug_cd = "ZOSY4FPB" |
Find the transaction type descriptions and dates if the share count is smaller than 10, group by transaction type, count the date of transaction, and bin the date into the weekday interval, I want to order by the total number from low to high please. | CREATE TABLE Transactions (transaction_id INTEGER,investor_id INTEGER,transaction_type_code VARCHAR(10),date_of_transaction DATETIME,amount_of_transaction DECIMAL(19,4),share_count VARCHAR(40),other_details VARCHAR(255))CREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR(10),transaction_type_description V... | SELECT T2.date_of_transaction, COUNT(T2.date_of_transaction) FROM Ref_Transaction_Types AS T1 JOIN Transactions AS T2 ON T1.transaction_type_code = T2.transaction_type_code WHERE T2.share_count < 10 GROUP BY transaction_type_description ORDER BY COUNT(date_of_transaction) |
What score has vancouver as the home, and february 16 as the date? | CREATE TABLE table_name_81 (score VARCHAR,home VARCHAR,date VARCHAR) | SELECT score FROM table_name_81 WHERE home = "vancouver" AND date = "february 16" |
What was the margin of the score 52-12? | CREATE TABLE table_name_14 (margin INTEGER,score VARCHAR) | SELECT SUM(margin) FROM table_name_14 WHERE score = "52-12" |
What is the total number of the 1978 Veteran membership that has a late 1943 more than 78,000 and a september 1943 larger than 60,000? | CREATE TABLE table_54186 ("! Late 1941" text,"Late 1942" real,"Sept. 1943" real,"Late 1943" real,"Late 1944" real,"1978 Veteran membership" real) | SELECT COUNT("1978 Veteran membership") FROM table_54186 WHERE "Late 1943" > '78,000' AND "Sept. 1943" > '60,000' |
Speaking of next semester , what classes is Dr. Rosario Aguilar-pariente teaching ? | CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE comment_instru... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Rosario Aguilar-pariente%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_ins... |
What is the low attendance rate against buffalo bills? | CREATE TABLE table_name_98 (attendance INTEGER,opponent VARCHAR) | SELECT MIN(attendance) FROM table_name_98 WHERE opponent = "buffalo bills" |
On the date of June 15 what was the score? | CREATE TABLE table_70382 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Record" text) | SELECT "Score" FROM table_70382 WHERE "Date" = 'june 15' |
Name the vertical for bian | CREATE TABLE table_27728 ("Number" real,"Name" text,"Vertices" text,"Hypotenuse 0 c" text,"Vertical 0 b" text,"Horizontal 0 a" text) | SELECT "Vertical 0 b" FROM table_27728 WHERE "Name" = '边 BIAN' |
List the id of students who registered some courses and the number of their registered courses? | CREATE TABLE student_course_attendance (student_id number,course_id number,date_of_attendance time)CREATE TABLE people (person_id number,first_name text,middle_name text,last_name text,cell_mobile_number text,email_address text,login_name text,password text)CREATE TABLE candidate_assessments (candidate_id number,qualif... | SELECT T1.student_id, COUNT(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id |
Which constructor made the car with a rb1 chassis and which is driven by David Coulthard? | CREATE TABLE table_71458 ("Entrant" text,"Constructor" text,"Chassis" text,"Engine \u2020" text,"Tyre" text,"Driver" text,"Rounds" text) | SELECT "Constructor" FROM table_71458 WHERE "Chassis" = 'rb1' AND "Driver" = 'david coulthard' |
count the number of patients whose admission year is less than 2135 and diagnoses icd9 code is v1009? | 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,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethni... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2135" AND diagnoses.icd9_code = "V1009" |
For all employees who have the letters D or S in their first name, return a bar chart about the distribution of hire_date and the sum of department_id bin hire_date by weekday, show 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 employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUMBER varchar(20),HIRE_DATE date,JOB_ID varchar(10),SALARY decimal(8,2),COMMISSION_PCT decimal(2,2),MANAGE... | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(DEPARTMENT_ID) |
Find the first name and office of history professor who did not get a Ph.D. degree. | CREATE TABLE department (dept_code text,dept_name text,school_code text,emp_num number,dept_address text,dept_extension text)CREATE TABLE course (crs_code text,dept_code text,crs_description text,crs_credit number)CREATE TABLE professor (emp_num number,dept_code text,prof_office text,prof_extension text,prof_high_degre... | SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T1.dept_code = T3.dept_code WHERE T3.dept_name = 'History' AND T1.prof_high_degree <> 'Ph.D.' |
who is the the pole position with rnd being 16 | CREATE TABLE table_14638077_2 (pole_position VARCHAR,rnd VARCHAR) | SELECT pole_position FROM table_14638077_2 WHERE rnd = 16 |
show me flights from PHILADELPHIA to OAKLAND on friday | CREATE TABLE time_interval (period text,begin_time int,end_time int)CREATE TABLE restriction (restriction_code text,advance_purchase int,stopovers text,saturday_stay_required text,minimum_stay int,maximum_stay int,application text,no_discounts text)CREATE TABLE days (days_code varchar,day_name varchar)CREATE TABLE flig... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'OAKLAND' AND date_day.day_number = 25 AND date_day.month_number = 6 AND d... |
Name the Qual 2 of a Team of american spirit team johansson and a Best of 59.073? | CREATE TABLE table_name_15 (qual_2 VARCHAR,team VARCHAR,best VARCHAR) | SELECT qual_2 FROM table_name_15 WHERE team = "american spirit team johansson" AND best = "59.073" |
what is minimum age of patients whose marital status is single and primary disease is colangitis? | 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 MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "COLANGITIS" |
give me a restaurant in mountain view that serves good arabic food ? | CREATE TABLE location (restaurant_id int,house_number int,street_name varchar,city_name varchar)CREATE TABLE geographic (city_name varchar,county varchar,region varchar)CREATE TABLE restaurant (id int,name varchar,food_type varchar,city_name varchar,rating "decimal) | SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'mountain view' AND restaurant.food_type = 'arabic' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5 |
What is the highest GA when GF is 39? | CREATE TABLE table_22657 ("Season" text,"League" text,"Division" text,"GP" real,"W" real,"L" real,"T" real,"OTL" real,"SOL" real,"PTS" real,"PCT" text,"GF" real,"GA" real,"PIM" real,"Coach(es)" text,"Result" text) | SELECT MAX("GA") FROM table_22657 WHERE "GF" = '39' |
If the gun used is the qf 12 pdr 12 cwt, what is the shell weight? | CREATE TABLE table_20821 ("Gun" text,"m/v ft/s" real,"Shell (lb)" text,"Time to ft (m) at 25\u00b0 (seconds)" text,"Time to ft (m) at 40\u00b0 (seconds)" text,"Time to ft (m) at 55\u00b0 (seconds)" text,"Max. height (ft)" real) | SELECT "Shell (lb)" FROM table_20821 WHERE "Gun" = 'QF 12 pdr 12 cwt' |
What is the smallest number of FA Cup Goals for players with 4 FA Cup Appearances, 49 Total Appearances, and more than 17 total goals? | CREATE TABLE table_name_55 (fa_cup_goals INTEGER,total_goals VARCHAR,fa_cup_apps VARCHAR,total_apps VARCHAR) | SELECT MIN(fa_cup_goals) FROM table_name_55 WHERE fa_cup_apps = "4" AND total_apps = "49" AND total_goals > 17 |
WHAT IS THE 2008 PERFORMANCE WITH A 2007 CAREER STATISTICS? | CREATE TABLE table_50694 ("Tournament" text,"2007" text,"2008" text,"2009" text,"2010" text,"2011" text,"2012" text) | SELECT "2008" FROM table_50694 WHERE "2007" = 'career statistics' |
What is the place of plyaer Tim Herron from the United States with a to par of +1? | CREATE TABLE table_name_15 (place VARCHAR,player VARCHAR,country VARCHAR,to_par VARCHAR) | SELECT place FROM table_name_15 WHERE country = "united states" AND to_par = "+1" AND player = "tim herron" |
during the 2010 pre season , who did the la clippers play after utah ? | CREATE TABLE table_204_586 (id number,"game" number,"date" text,"team" text,"score" text,"high points" text,"high rebounds" text,"high assists" text,"location\nattendance" text,"record" text) | SELECT "team" FROM table_204_586 WHERE "date" > (SELECT "date" FROM table_204_586 WHERE "team" = 'utah') ORDER BY "date" LIMIT 1 |
how many songs are less than 4 minutes in length ? | CREATE TABLE table_203_353 (id number,"#" number,"title" text,"producer(s)" text,"featured guest(s)" text,"time" text) | SELECT COUNT("title") FROM table_203_353 WHERE "time" < 4 |
List all tips for ' Cafe Zinho ' in Pennsylvania in 2010 . | CREATE TABLE neighborhood (id int,business_id varchar,neighborhood_name varchar)CREATE TABLE category (id int,business_id varchar,category_name varchar)CREATE TABLE business (bid int,business_id varchar,name varchar,full_address varchar,city varchar,latitude varchar,longitude varchar,review_count bigint,is_open tinyint... | SELECT tip.text FROM business, tip WHERE business.name = 'Cafe Zinho' AND business.state = 'Pennsylvania' AND tip.business_id = business.business_id AND tip.year = 2010 |
What position(s) drafted by the montreal alouettes? | CREATE TABLE table_20170644_5 (position VARCHAR,cfl_team VARCHAR) | SELECT position FROM table_20170644_5 WHERE cfl_team = "Montreal Alouettes" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.