instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
When Richmond is the Away team, what did they score? | CREATE TABLE table_11474 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Away team score" FROM table_11474 WHERE "Away team" = 'richmond' |
What was the 2002 dominant religion when the largest ethnic group (2002) was slovaks and type is village? | CREATE TABLE table_2562572_43 (dominant_religion__2002_ VARCHAR,largest_ethnic_group__2002_ VARCHAR,type VARCHAR) | SELECT dominant_religion__2002_ FROM table_2562572_43 WHERE largest_ethnic_group__2002_ = "Slovaks" AND type = "village" |
For those records from the products and each product's manufacturer, find name and code , and group by attribute headquarter, and visualize them by a bar chart, I want to display by the total number from low to high please. | CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL)CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER) | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Code |
In which championship did John Newcombe play against Ken Rosewall in the final match? | CREATE TABLE table_25822 ("Outcome" text,"Year" real,"Championship" text,"Surface" text,"Opponent in the final" text,"Score in the final" text) | SELECT "Championship" FROM table_25822 WHERE "Opponent in the final" = 'Ken Rosewall' |
For the days with the 3 largest maximum gust speeds, calculate the average mean humidity of each month (bin date into month level). | CREATE TABLE trip (id INTEGER,duration INTEGER,start_date TEXT,start_station_name TEXT,start_station_id INTEGER,end_date TEXT,end_station_name TEXT,end_station_id INTEGER,bike_id INTEGER,subscription_type TEXT,zip_code INTEGER)CREATE TABLE status (station_id INTEGER,bikes_available INTEGER,docks_available INTEGER,time ... | SELECT date, AVG(mean_humidity) FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3 |
What is Finish, when Year(s) Won is '1991'? | CREATE TABLE table_79129 ("Player" text,"Country" text,"Year(s) won" text,"Total" real,"To par" text,"Finish" text) | SELECT "Finish" FROM table_79129 WHERE "Year(s) won" = '1991' |
provide the number of patients whose days of hospital stay is greater than 29 and procedure long title is exteriorization of small intestine? | 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 diagnoses (subject_id text,hadm_id tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "29" AND procedures.long_title = "Exteriorization of small intestine" |
What is the attendance of week 8? | CREATE TABLE table_47819 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" real) | SELECT COUNT("Attendance") FROM table_47819 WHERE "Week" = '8' |
what where the only two submarines that where only damaged ? | CREATE TABLE table_203_268 (id number,"date" text,"name" text,"nationality" text,"tonnage\n(grt)" number,"fate" text) | SELECT "name" FROM table_203_268 WHERE "fate" = 'damaged' |
Which Label has a Catalog of 7243 8 49494 2 6? | CREATE TABLE table_9405 ("Country" text,"Date" text,"Label" text,"Format" text,"Catalog" text) | SELECT "Label" FROM table_9405 WHERE "Catalog" = '7243 8 49494 2 6' |
count the number of patients whose year of birth is less than 1846 and procedure short title is coronary arteriogram nec? | 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 diagnoses (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "1846" AND procedures.short_title = "Coronary arteriogram NEC" |
Which Country has a Place of t9, and a Score of 71-71-72=214, and a Player of ernie els? | CREATE TABLE table_48293 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text) | SELECT "Country" FROM table_48293 WHERE "Place" = 't9' AND "Score" = '71-71-72=214' AND "Player" = 'ernie els' |
What team was the visitor on 3/2? | CREATE TABLE table_name_72 (visitor VARCHAR,date VARCHAR) | SELECT visitor FROM table_name_72 WHERE date = "3/2" |
What time/retired has a Grid larger than 3, and a Driver of kimi r ikk nen? | CREATE TABLE table_name_65 (time_retired VARCHAR,grid VARCHAR,driver VARCHAR) | SELECT time_retired FROM table_name_65 WHERE grid > 3 AND driver = "kimi räikkönen" |
How many viewers watched the episode written by shana goldberg-meehan & greg malins? | CREATE TABLE table_27403436_1 (us_viewers__million_ VARCHAR,written_by VARCHAR) | SELECT us_viewers__million_ FROM table_27403436_1 WHERE written_by = "Shana Goldberg-Meehan & Greg Malins" |
What is south melbourne's scores when they are the away team? | CREATE TABLE table_name_32 (away_team VARCHAR) | SELECT away_team AS score FROM table_name_32 WHERE away_team = "south melbourne" |
what is the date when saros is more than 124, the type is total, the magnitude is more than 1.0535 and the time (greatest) is 20:55:28? | CREATE TABLE table_13934 ("Date" text,"Type" text,"Time (greatest)" text,"Saros" real,"Member" real,"Gamma" real,"Magnitude" real) | SELECT "Date" FROM table_13934 WHERE "Saros" > '124' AND "Type" = 'total' AND "Magnitude" > '1.0535' AND "Time (greatest)" = '20:55:28' |
Draw a bar chart of name versus age, and I want to rank by the y-axis in descending. | CREATE TABLE journal (Journal_ID int,Date text,Theme text,Sales int)CREATE TABLE editor (Editor_ID int,Name text,Age real)CREATE TABLE journal_committee (Editor_ID int,Journal_ID int,Work_Type text) | SELECT Name, Age FROM editor ORDER BY Age DESC |
With a parallel bars score of 14.625 what is the average total? | CREATE TABLE table_64215 ("Position" real,"Gymnast" text,"Floor" text,"Pommel Horse" text,"Rings" text,"Vault" text,"Parallel Bars" text,"Horizontal Bar" text,"Total" real) | SELECT AVG("Total") FROM table_64215 WHERE "Parallel Bars" = '14.625' |
What is the highest vertical drop among the 1,200 meter long tracks? | CREATE TABLE table_name_9 (vertical_drop__m_ INTEGER,length__m_ VARCHAR) | SELECT MAX(vertical_drop__m_) FROM table_name_9 WHERE length__m_ = 1 OFFSET 200 |
What is 17th c., when American is ' '? | CREATE TABLE table_name_25 (american VARCHAR) | SELECT 17 AS th_c FROM table_name_25 WHERE american = "ə" |
how many patients were diagnosed with an unspecified disorder of kidney and ureter and treated with a main drug type? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Unspecified disorder of kidney and ureter" AND prescriptions.drug_type = "MAIN" |
has patient 006-171217 until 2104 received a test of -bands? | CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text... | SELECT COUNT(*) > 0 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-171217')) AND lab.labname = '-bands' AND STRFTIME('%y', lab.labresulttime) <= '2104' |
What was the location of the fight when Gassaway fought kevin knabjian? | CREATE TABLE table_name_66 (location VARCHAR,opponent VARCHAR) | SELECT location FROM table_name_66 WHERE opponent = "kevin knabjian" |
Who was the writer for the song 4:29 in length? | CREATE TABLE table_14778650_1 (writer VARCHAR,length VARCHAR) | SELECT writer FROM table_14778650_1 WHERE length = "4:29" |
Give me a pie chart to reflect the proportion of All_Home and the sum of Team_ID. | CREATE TABLE basketball_match (Team_ID int,School_ID int,Team_Name text,ACC_Regular_Season text,ACC_Percent text,ACC_Home text,ACC_Road text,All_Games text,All_Games_Percent int,All_Home text,All_Road text,All_Neutral text)CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,En... | SELECT All_Home, SUM(Team_ID) FROM basketball_match GROUP BY All_Home |
What is the platform for the latest release 8.4? | CREATE TABLE table_name_28 (platform VARCHAR,latest_stable_release VARCHAR) | SELECT platform FROM table_name_28 WHERE latest_stable_release = "8.4" |
What is the max memory of the t5120 model? | CREATE TABLE table_16339 ("Model" text,"RU" real,"Max processors" text,"Processor frequency" text,"Max memory" text,"Max disk capacity" text,"GA Date" text) | SELECT "Max memory" FROM table_16339 WHERE "Model" = 'T5120' |
What venue is located in Indiana and hosted at Purdue University? | CREATE TABLE table_name_54 (venue VARCHAR,state VARCHAR,host VARCHAR) | SELECT venue FROM table_name_54 WHERE state = "indiana" AND host = "purdue university" |
what ground transportation is available from LGA airport into NEW YORK | CREATE TABLE compartment_class (compartment varchar,class_type varchar)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 city (city_code varchar,city_name varchar,state_code va... | SELECT DISTINCT transport_type FROM ground_service WHERE (airport_code IN (SELECT AIRPORTalias0.airport_code FROM airport AS AIRPORTalias0 WHERE AIRPORTalias0.airport_code = 'LGA') AND city_code IN (SELECT CITYalias0.city_code FROM city AS CITYalias0 WHERE CITYalias0.city_name = 'NEW YORK')) |
When did Brendan Rodgers depart his position? | CREATE TABLE table_47244 ("Name" text,"Club" text,"Date of departure" text,"Replacement" text,"Date of appointment" text) | SELECT "Date of departure" FROM table_47244 WHERE "Name" = 'brendan rodgers' |
Find the number of users in each role. Visualize by pie chart. | CREATE TABLE Functional_Areas (functional_area_code VARCHAR(15),parent_functional_area_code VARCHAR(15),functional_area_description VARCHAR(80))CREATE TABLE Images (image_id INTEGER,image_alt_text VARCHAR(80),image_name VARCHAR(40),image_url VARCHAR(255))CREATE TABLE Document_Sections (section_id INTEGER,document_code ... | SELECT role_code, COUNT(*) FROM Users GROUP BY role_code |
What is the Tries against when lost shows 12 for pontycymmer rfc? | CREATE TABLE table_38287 ("Club" text,"Played" text,"Drawn" text,"Lost" text,"Points for" text,"Points against" text,"Tries for" text,"Tries against" text,"Try bonus" text) | SELECT "Tries against" FROM table_38287 WHERE "Lost" = '12' AND "Club" = 'pontycymmer rfc' |
what album won before borrowed time did in 2006 ? | CREATE TABLE table_204_655 (id number,"year" number,"winner" text,"album" text,"other finalists" text) | SELECT "album" FROM table_204_655 WHERE "year" < (SELECT "year" FROM table_204_655 WHERE "album" = 'borrowed time') ORDER BY "year" DESC LIMIT 1 |
What team played at lake oval while away? | CREATE TABLE table_name_51 (away_team VARCHAR,venue VARCHAR) | SELECT away_team FROM table_name_51 WHERE venue = "lake oval" |
What is the Main span of the bridge from China with a Year to open of 2013 and Main span feet of 2,585? | CREATE TABLE table_name_23 (main_span_metres VARCHAR,main_span_feet VARCHAR,year_to_open VARCHAR,country VARCHAR) | SELECT main_span_metres FROM table_name_23 WHERE year_to_open = 2013 AND country = "china" AND main_span_feet = "2,585" |
What is the attendance of week 12? | CREATE TABLE table_name_63 (attendance INTEGER,week VARCHAR) | SELECT MIN(attendance) FROM table_name_63 WHERE week = 12 |
What was the highest points where there were less than 2 drawn and the games were less than 6? | CREATE TABLE table_name_26 (points INTEGER,drawn VARCHAR,games VARCHAR) | SELECT MAX(points) FROM table_name_26 WHERE drawn < 2 AND games < 6 |
What is Car number 98's lowest grid? | CREATE TABLE table_name_53 (grid INTEGER,car_no VARCHAR) | SELECT MIN(grid) FROM table_name_53 WHERE car_no = 98 |
what is the number of patients who died after diagnosis of hx-ven thrombosis/embols within 2 months until 2104? | CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careunit text,wardid number,intime time,outtime time)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE... | SELECT COUNT(DISTINCT t2.subject_id) FROM (SELECT t1.subject_id, t1.charttime 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_di... |
provide the number of patients whose insurance is government and procedure long title is drug detoxification? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.long_title = "Drug detoxification" |
what is the number of patients whose admission type is urgent and primary disease is pneumonia? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE 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.admission_type = "URGENT" AND demographic.diagnosis = "PNEUMONIA" |
What is the number of Years at Club for the player who has had more games than 28, more Goals than 225, and his Debut year was after 1950? | CREATE TABLE table_name_77 (years_at_club VARCHAR,debut_year VARCHAR,games VARCHAR,goals VARCHAR) | SELECT years_at_club FROM table_name_77 WHERE games > 28 AND goals > 225 AND debut_year > 1950 |
tell me patient 20000's length of stay of the last stay in the icu. | CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careunit text,wardid number,intime time,outtime time)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number... | SELECT STRFTIME('%j', icustays.outtime) - STRFTIME('%j', icustays.intime) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20000) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1 |
Which Away team has the Home team of Carlton? | CREATE TABLE table_name_2 (away_team VARCHAR,home_team VARCHAR) | SELECT away_team FROM table_name_2 WHERE home_team = "carlton" |
Who was the opponent on the game on April 14, 2007? | CREATE TABLE table_69181 ("Date" text,"Opponent" text,"Result" text,"Game Site" text,"Attendance" text) | SELECT "Opponent" FROM table_69181 WHERE "Date" = 'april 14, 2007' |
Name the total number of production code for episode by steve cohen & andrew dettman | CREATE TABLE table_21550870_1 (production_code VARCHAR,written_by VARCHAR) | SELECT COUNT(production_code) FROM table_21550870_1 WHERE written_by = "Steve Cohen & Andrew Dettman" |
how much difference does patient 031-4987 have in heartrate measured at 2104-12-30 22:20:00 compared to the value measured at 2104-12-30 22:15:00? | 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 (SELECT vitalperiodic.heartrate FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-4987')) AND NOT vitalperiodic.heartrate IS NU... |
for patient id 94762, specify the time of admission and discharge | 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.admittime, demographic.dischtime FROM demographic WHERE demographic.subject_id = "94762" |
How many points does driver kosuke matsuura have? | CREATE TABLE table_76618 ("Fin. Pos" text,"Car No." text,"Driver" text,"Team" text,"Laps" text,"Time/Retired" text,"Grid" text,"Laps Led" text,"Points" text) | SELECT "Points" FROM table_76618 WHERE "Driver" = 'kosuke matsuura' |
What is Russia's time with a heat higher than 3? | CREATE TABLE table_name_21 (time VARCHAR,nationality VARCHAR,heat VARCHAR) | SELECT time FROM table_name_21 WHERE nationality = "russia" AND heat > 3 |
When dwhr-tv is the call sign how many station types are there? | CREATE TABLE table_26015 ("Branding" text,"Callsign" text,"Ch. #" text,"Power kW" text,"Station Type" text,"Location (Transmitter site)" text) | SELECT COUNT("Station Type") FROM table_26015 WHERE "Callsign" = 'DWHR-TV' |
If the area is 34.73, what is the census ranking? | CREATE TABLE table_171236_1 (census_ranking VARCHAR,area_km_2 VARCHAR) | SELECT census_ranking FROM table_171236_1 WHERE area_km_2 = "34.73" |
What is the total amount of decile with the authority of state around the Pokuru School and a roll smaller than 109? | CREATE TABLE table_name_44 (decile INTEGER,roll VARCHAR,authority VARCHAR,name VARCHAR) | SELECT SUM(decile) FROM table_name_44 WHERE authority = "state" AND name = "pokuru school" AND roll < 109 |
In what week was the Result L 15-13? | CREATE TABLE table_name_91 (week INTEGER,result VARCHAR) | SELECT AVG(week) FROM table_name_91 WHERE result = "l 15-13" |
What player is from Seton Hall University? | CREATE TABLE table_name_24 (player VARCHAR,school VARCHAR) | SELECT player FROM table_name_24 WHERE school = "seton hall university" |
what is the place when the score is 70-72=142? | CREATE TABLE table_name_48 (place VARCHAR,score VARCHAR) | SELECT place FROM table_name_48 WHERE score = 70 - 72 = 142 |
how many patients whose days of hospital stay is greater than 15 and diagnoses short title is acute pancreatitis? | 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 prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "15" AND diagnoses.short_title = "Acute pancreatitis" |
what were the top four frequently prescribed drugs that were prescribed to patients in the same hospital visit after they had been prescribed doxorubicin since 2101? | CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careunit text,last_careunit text,fir... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate, admissions.hadm_id FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'doxorubicin' AND STRFTIME('%y', prescriptions... |
Which Gold has a Rank of 7, a Nation of italy, and a Silver smaller than 0? | CREATE TABLE table_46041 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT COUNT("Gold") FROM table_46041 WHERE "Rank" = '7' AND "Nation" = 'italy' AND "Silver" < '0' |
What is the score of the match won by Willie Hunter at the Royal Liverpool Golf Club? | CREATE TABLE table_name_21 (score VARCHAR,venue VARCHAR,champion VARCHAR) | SELECT score FROM table_name_21 WHERE venue = "royal liverpool golf club" AND champion = "willie hunter" |
Which document type is described with the prefix 'Initial'? | CREATE TABLE tasks (task_id number,project_id number,task_details text,eg agree objectives text)CREATE TABLE organisations (organisation_id number,organisation_type text,organisation_details text)CREATE TABLE documents (document_id number,document_type_code text,grant_id number,sent_date time,response_received_date tim... | SELECT document_type_code FROM document_types WHERE document_description LIKE 'Initial%' |
What is the lowest Year with an Album that is live love in London? | CREATE TABLE table_7098 ("Year" real,"Album" text,"U.S." text,"U.S. Christian" text,"U.S. Indie" text) | SELECT MIN("Year") FROM table_7098 WHERE "Album" = 'live love in london' |
Name the fsi 2012 for 42.7 cpi | CREATE TABLE table_28576 ("Country" text,"Area (km\u00b2) 2010" real,"Population 2011" real,"GDP (PPP) (Intl. $) 2011" text,"GDP (PPP) per capita (Intl. $) 2011" text,"Income inequality 1992-2010 (latest available)" text,"HDI 2012" text,"FSI 2012" text,"CPI 2012" text,"IEF 2013" text,"GPI 2012" text,"WPFI 2013" text,"D... | SELECT "FSI 2012" FROM table_28576 WHERE "CPI 2012" = '42.7' |
what was the name of the output, which patient 8888 had first in a day before? | CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx text,dose_unit_rx text,route text)CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id nu... | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT outputevents.itemid FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8888)) AND DATETIME(outputevents.charttime... |
On which surface did Mathieu play against Antonio Vei ? | CREATE TABLE table_name_84 (surface VARCHAR,opponent_in_the_final VARCHAR) | SELECT surface FROM table_name_84 WHERE opponent_in_the_final = "antonio veić" |
what is the area where barangay is guadalupe viejo? | CREATE TABLE table_210279_2 (area__km_2__ VARCHAR,barangay VARCHAR) | SELECT area__km_2__ FROM table_210279_2 WHERE barangay = "Guadalupe Viejo" |
whats the first height of patient 032-9230 on their current hospital visit? | CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosis... | SELECT patient.admissionheight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '032-9230' AND patient.hospitaldischargetime IS NULL) AND NOT patient.admissionheight IS NULL ORDER BY patient.unitadmittime LIMIT 1 |
what is the handicap where the distance is 9 lengths? | CREATE TABLE table_27679 ("Position" text,"Number" real,"Horse" text,"Jockey" text,"Age" real,"Handicap" text,"SP" text,"Distance" text) | SELECT "Handicap" FROM table_27679 WHERE "Distance" = '9 lengths' |
A bar chart for what are the number of the dates of the orders made by the customer named 'Jeramie'? | CREATE TABLE Orders (order_id INTEGER,customer_id INTEGER,order_status VARCHAR(10),date_order_placed DATETIME,order_details VARCHAR(255))CREATE TABLE Shipments (shipment_id INTEGER,order_id INTEGER,invoice_number INTEGER,shipment_tracking_number VARCHAR(80),shipment_date DATETIME,other_shipment_details VARCHAR(255))CRE... | SELECT date_order_placed, COUNT(date_order_placed) FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = "Jeramie" |
Which record's march was 26? | CREATE TABLE table_39914 ("Game" real,"March" real,"Opponent" text,"Score" text,"Record" text) | SELECT "Record" FROM table_39914 WHERE "March" = '26' |
Who was in the 2008 club of gabeca montichiari? | CREATE TABLE table_52911 ("Name" text,"Height" text,"Weight" text,"Spike" text,"2008 club" text) | SELECT "Name" FROM table_52911 WHERE "2008 club" = 'gabeca montichiari' |
How many runtimes does episode 53 have? | CREATE TABLE table_26032940_2 (network_tv_run_time VARCHAR,episode__number VARCHAR) | SELECT COUNT(network_tv_run_time) FROM table_26032940_2 WHERE episode__number = 53 |
What was the result of the fight with Tony Halme? | CREATE TABLE table_68881 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Time" text,"Location" text) | SELECT "Res." FROM table_68881 WHERE "Opponent" = 'tony halme' |
which bridge is in delaware and carries de 9 ? | CREATE TABLE table_201_14 (id number,"crossing" text,"carries" text,"location" text,"coordinates" text) | SELECT "crossing" FROM table_201_14 WHERE "location" = 'delaware' AND "carries" = 'de 9' |
Which date has date started from 30 Sep 1913? | CREATE TABLE table_46711 ("Name of System" text,"Location" text,"Traction Type" text,"Date (From)" text,"Date (To)" text) | SELECT "Date (To)" FROM table_46711 WHERE "Date (From)" = '30 sep 1913' |
What is the average 2001 value with a 2010 value greater than 414, a 2011 value of 7192, and a 2005 value larger than 7340? | CREATE TABLE table_name_41 (Id VARCHAR) | SELECT AVG(2001) FROM table_name_41 WHERE 2010 > 414 AND 2011 = 7192 AND 2005 > 7340 |
tell me the number of times retrograde pyelogram is done until 1 year ago? | 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 microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)... | SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'retrograde pyelogram') AND DATETIME(procedures_icd.charttime) <= DATETIME(CURRENT_TIME(), '-1 year') |
What was the date of appointment for javier aguirre's replacement? | CREATE TABLE table_45615 ("Team" text,"Outgoing manager" text,"Manner of departure" text,"Date of vacancy" text,"Replaced by" text,"Date of appointment" text,"Position in table" text) | SELECT "Date of appointment" FROM table_45615 WHERE "Outgoing manager" = 'javier aguirre' |
how many patients whose death status is 0 and diagnoses short title is chordae tendinae rupture? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "0" AND diagnoses.short_title = "Chordae tendinae rupture" |
ground transportation BALTIMORE | CREATE TABLE fare (fare_id int,from_airport varchar,to_airport varchar,fare_basis_code text,fare_airline text,restriction_code text,one_direction_cost int,round_trip_cost int,round_trip_required varchar)CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE dual_carrier (main_ai... | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'BALTIMORE' AND ground_service.city_code = city.city_code |
What is the smallest Year with a Binibining Pilipinas-International of jessie alice salones dixson? | CREATE TABLE table_name_90 (year INTEGER,binibining_pilipinas_international VARCHAR) | SELECT MIN(year) FROM table_name_90 WHERE binibining_pilipinas_international = "jessie alice salones dixson" |
Show each employee's salary using a bar chart, note that use the last name of each employee, and sort by the X-axis in ascending. | CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAI... | SELECT LAST_NAME, SALARY FROM employees ORDER BY LAST_NAME |
How many years in office were served by the person who assumed the office on October 4, 1886? | CREATE TABLE table_name_23 (years_in_office VARCHAR,assumed_office VARCHAR) | SELECT years_in_office FROM table_name_23 WHERE assumed_office = "october 4, 1886" |
Visualize a bar chart for how many students play each sport?, and sort bar in ascending order. | CREATE TABLE SportsInfo (StuID INTEGER,SportName VARCHAR(32),HoursPerWeek INTEGER,GamesPlayed INTEGER,OnScholarship VARCHAR(1))CREATE TABLE Video_Games (GameID INTEGER,GName VARCHAR(40),GType VARCHAR(40))CREATE TABLE Plays_Games (StuID INTEGER,GameID INTEGER,Hours_Played INTEGER)CREATE TABLE Student (StuID INTEGER,LNam... | SELECT SportName, COUNT(*) FROM SportsInfo GROUP BY SportName ORDER BY SportName |
give me the number of patients whose age is less than 68 and lab test name is sodium? | 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.age < "68" AND lab.label = "Sodium" |
What is the Location of the Tapiolan Urheilupuisto Stadium with a Capacity or more than 15,000? | CREATE TABLE table_44186 ("Club" text,"Location" text,"Stadium" text,"Capacity" real,"Manager" text) | SELECT "Location" FROM table_44186 WHERE "Capacity" > '15,000' AND "Stadium" = 'tapiolan urheilupuisto' |
Which college's pick was 14? | CREATE TABLE table_name_86 (college VARCHAR,pick VARCHAR) | SELECT college FROM table_name_86 WHERE pick = "14" |
Name the performance order of the velasco brothers | CREATE TABLE table_26267849_11 (performance_order VARCHAR,artist VARCHAR) | SELECT performance_order FROM table_26267849_11 WHERE artist = "Velasco Brothers" |
What is the Away team when the home team was wycombe wanderers? | CREATE TABLE table_name_9 (away_team VARCHAR,home_team VARCHAR) | SELECT away_team FROM table_name_9 WHERE home_team = "wycombe wanderers" |
provide the number of patients whose diagnosis short title is atrial fibrillation and lab test name is prostate specific antigen. | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Atrial fibrillation" AND lab.label = "Prostate Specific Antigen" |
Which School has a Mascot of squires? | CREATE TABLE table_64855 ("School" text,"Location" text,"Mascot" text,"Enrollment" real,"IHSAA Class" text,"IHSAA Football Class" text,"# / County" text) | SELECT "School" FROM table_64855 WHERE "Mascot" = 'squires' |
What was the venue on the 20th? | CREATE TABLE table_62048 ("Date" text,"Opponent" text,"Venue" text,"Result" text,"Competition" text) | SELECT "Venue" FROM table_62048 WHERE "Date" = '20th' |
For those records from the products and each product's manufacturer, show me about the distribution of founder and the average of code , and group by attribute founder in a bar chart, rank by the X in descending please. | CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL)CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER) | SELECT T2.Founder, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Founder ORDER BY T2.Founder DESC |
count the number of patients whose drug code is zinc220 and lab test fluid is blood? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "ZINC220" AND lab.fluid = "Blood" |
Which chassis has fewer than 2 points, entrants of Goulds' Garage (Bristol), in 1954? | CREATE TABLE table_name_59 (chassis VARCHAR,year VARCHAR,points VARCHAR,entrant VARCHAR) | SELECT chassis FROM table_name_59 WHERE points < 2 AND entrant = "goulds' garage (bristol)" AND year = 1954 |
In which region is the Thompson-Boling arena located? | CREATE TABLE table_name_16 (region VARCHAR,venue VARCHAR) | SELECT region FROM table_name_16 WHERE venue = "thompson-boling arena" |
what is the minimum age of widow patients who have a medicaid insurance? | 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 MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "WIDOWED" AND demographic.insurance = "Medicaid" |
what was the date of the last game of the 1933-1934 season ? | CREATE TABLE table_204_516 (id number,"date" text,"opponents" text,"h / a" text,"result\nf - a" text,"scorers" text,"attendance" number) | SELECT "date" FROM table_204_516 ORDER BY "date" DESC LIMIT 1 |
How many Field goals (5 points) have a Total Points of 123, and Touchdowns (5 points) larger than 13? | CREATE TABLE table_name_59 (field_goals__5_points_ VARCHAR,total_points VARCHAR,touchdowns__5_points_ VARCHAR) | SELECT COUNT(field_goals__5_points_) FROM table_name_59 WHERE total_points = 123 AND touchdowns__5_points_ > 13 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.