instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What was the LOA when the elapsed time was 3:06:41:37? | CREATE TABLE table_27782 ("Position" real,"Race number" text,"Sail number" text,"Yacht" text,"State/country" text,"Yacht type" text,"LOA (Metres)" text,"Skipper" text,"Elapsed time d:hh:mm:ss" text) | SELECT "LOA (Metres)" FROM table_27782 WHERE "Elapsed time d:hh:mm:ss" = '3:06:41:37' |
what is days of hospital stay and primary disease of subject id 8440? | 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 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 te... | SELECT demographic.days_stay, demographic.diagnosis FROM demographic WHERE demographic.subject_id = "8440" |
What average week has october 8, 1950 as the date? | CREATE TABLE table_name_8 (week INTEGER,date VARCHAR) | SELECT AVG(week) FROM table_name_8 WHERE date = "october 8, 1950" |
Which Casualties have a Location of kunduz, and Circumstances of suicide? | CREATE TABLE table_68829 ("Date" text,"Location" text,"Nature of incident" text,"Circumstances" text,"Casualties" text) | SELECT "Casualties" FROM table_68829 WHERE "Location" = 'kunduz' AND "Circumstances" = 'suicide' |
Questions that have ever contained this tag. | CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReviewTaskId number)CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,... | SELECT Posts.Id AS "post_link", Tags FROM Posts INNER JOIN PostHistory ON Posts.Id = PostHistory.PostId WHERE (PostHistoryTypeId = 3 OR PostHistoryTypeId = 6) AND PostHistory.Text LIKE '%##Tag##%' GROUP BY Posts.Id, Tags |
What is the status of the institution that was founded in 1996? | CREATE TABLE table_name_64 (status VARCHAR,founded VARCHAR) | SELECT status FROM table_name_64 WHERE founded = 1996 |
What's the nationality of Cardinal-Bishop of Albano? | CREATE TABLE table_14122 ("Elector" text,"Nationality" text,"Cardinalatial order and title" text,"Elevated" text,"Elevator" text,"Notes" text) | SELECT "Nationality" FROM table_14122 WHERE "Cardinalatial order and title" = 'cardinal-bishop of albano' |
What is the average year for Wallenstein with 1a1 design? | CREATE TABLE table_15142 ("Name" text,"Design" text,"Manufacturer" text,"Acquired" real,"Disposed" text) | SELECT AVG("Acquired") FROM table_15142 WHERE "Design" = '1a1' AND "Name" = 'wallenstein' |
What was the losing bonus that had 1 draw and a 10 try bonus? | CREATE TABLE table_70627 ("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 "Losing bonus" FROM table_70627 WHERE "Drawn" = '1' AND "Try bonus" = '10' |
What date was the game where Texas Southern was the visiting team? | CREATE TABLE table_28298589_4 (date VARCHAR,visiting_team VARCHAR) | SELECT date FROM table_28298589_4 WHERE visiting_team = "Texas Southern" |
since 2103, what are the top three most frequent drugs prescribed to patients within 2 months after the prescription of sodium chloride 0.9% 250 ml pb? | CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,dr... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'sodium chloride 0.9% 250 ml pb' AND STRFTIME('%y', ... |
had the calcium gluconate, fosphenytoin or vancomycin been prescribed for patient 2498 until 1 year ago? | CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE admissions (row_id number,subject_id number,hadm_id ... | SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 2498) AND prescriptions.drug IN ('calcium gluconate', 'fosphenytoin', 'vancomycin') AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-1 year') |
Name the lost for % won of 55.37 | CREATE TABLE table_71867 ("Team" text,"1st Match" text,"Matches" text,"Lost" text,"% Won" text) | SELECT "Lost" FROM table_71867 WHERE "% Won" = '55.37' |
What was the attendance when VFL played MCG? | CREATE TABLE table_32306 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT MAX("Crowd") FROM table_32306 WHERE "Venue" = 'mcg' |
What year was the most recent US Open championship? | CREATE TABLE table_19864 ("Outcome" text,"Year" real,"Championship" text,"Surface" text,"Partner" text,"Opponents in the final" text,"Score in the final" text) | SELECT MAX("Year") FROM table_19864 WHERE "Championship" = 'US Open' |
Who was the opponent with a points for of 177? | CREATE TABLE table_25229283_4 (opponent VARCHAR,points_for VARCHAR) | SELECT opponent FROM table_25229283_4 WHERE points_for = 177 |
how much patient 22449's weight differs second measured on the last hospital visit compared to the value first measured on the last hospital visit? | 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_wardid number,last_wardid number,intime time,outtime time)CREATE TABLE patients (row_id number,... | SELECT (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 = 22449 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1)) AND ch... |
what is the last date on the chart ? | CREATE TABLE table_204_686 (id number,"date" text,"pos." text,"name" text,"from" text,"fee" text) | SELECT "date" FROM table_204_686 ORDER BY id DESC LIMIT 1 |
what is the minimum amount of hospital cost that includes uric acid until 3 years ago? | CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid numbe... | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = 'uric acid')) AND DATETIME(cost.chargetime) <= DATETIME(CURRENT_TIME(... |
what is the date of birth for the patient name tina henderson? | 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 demographic.dob FROM demographic WHERE demographic.name = "Tina Henderson" |
Who were the opponents when the record was 11-2? | CREATE TABLE table_22862203_2 (opponent VARCHAR,record VARCHAR) | SELECT opponent FROM table_22862203_2 WHERE record = "11-2" |
how many patients whose insurance is medicare and diagnoses short title is dementia w/o behav dist? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Medicare" AND diagnoses.short_title = "Dementia w/o behav dist" |
Name the episode(s) that featured Duncan James and Johnny Vegas as Jason's team. | CREATE TABLE table_25926 ("Episode" text,"First broadcast" text,"Seans team" text,"Jasons team" text,"Scores" text) | SELECT "Episode" FROM table_25926 WHERE "Jasons team" = 'Duncan James and Johnny Vegas' |
Which opponent played in game 3 before October 18? | CREATE TABLE table_name_72 (opponent VARCHAR,october VARCHAR,game VARCHAR) | SELECT opponent FROM table_name_72 WHERE october < 18 AND game = 3 |
Name the home for 16 april 2008 | CREATE TABLE table_name_11 (home VARCHAR,date VARCHAR) | SELECT home FROM table_name_11 WHERE date = "16 april 2008" |
what is the score on 24 january 1976 with the tie no of 1? | CREATE TABLE table_65256 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Date" text) | SELECT "Score" FROM table_65256 WHERE "Date" = '24 january 1976' AND "Tie no" = '1' |
Most prolific upvoters: Weighted upvote ratio. | CREATE TABLE Tags (Id number,TagName text,Count number,ExcerptPostId number,WikiPostId number)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,OwnerDisplayName text,LastEditorUserId numb... | SELECT Id AS "user_link", Reputation, UpVotes, DownVotes, ROUND(CAST(UpVotes AS FLOAT) / (UpVotes + DownVotes), 1) * UpVotes AS Weighted FROM Users WHERE UpVotes > 0 AND Id > -1 ORDER BY Weighted DESC LIMIT 50 |
what type of ground transportation is there at the LAS VEGAS airport | CREATE TABLE airline (airline_code varchar,airline_name text,note text)CREATE TABLE compartment_class (compartment varchar,class_type varchar)CREATE TABLE equipment_sequence (aircraft_code_sequence varchar,aircraft_code varchar)CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE days (days... | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'LAS VEGAS' AND ground_service.city_code = city.city_code |
in 2105, had lorazepam ever been prescribed to patient 11095? | 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 inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE admissions (row_id n... | SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 11095) AND prescriptions.drug = 'lorazepam' AND STRFTIME('%y', prescriptions.startdate) = '2105' |
SO highest accept rate of answers. | CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE Users (Id number,Reputation number,Creati... | SELECT u.Id AS "user_link", COUNT(*) AS NumAnswers, SUM(CASE WHEN q.AcceptedAnswerId = a.Id THEN 1 ELSE 0 END) AS NumAccepted, (SUM(CASE WHEN q.AcceptedAnswerId = a.Id THEN 1 ELSE 0 END) * 100.0 / COUNT(*)) AS AcceptedPercent FROM Posts AS a INNER JOIN Users AS u ON u.Id = a.OwnerUserId INNER JOIN Posts AS q ON a.Paren... |
What nation has 187.84 points? | CREATE TABLE table_name_83 (nation VARCHAR,points VARCHAR) | SELECT nation FROM table_name_83 WHERE points = 187.84 |
Which Rank has a Total of 12? | CREATE TABLE table_name_72 (rank INTEGER,total VARCHAR) | SELECT AVG(rank) FROM table_name_72 WHERE total = 12 |
What is the Tie no when Chester is the away team? | CREATE TABLE table_65348 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Date" text) | SELECT "Tie no" FROM table_65348 WHERE "Away team" = 'chester' |
What date was the game played at the venue of Hrazdan Stadium, Yerevan, Armenia? | CREATE TABLE table_35915 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text) | SELECT "Date" FROM table_35915 WHERE "Venue" = 'hrazdan stadium, yerevan, armenia' |
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, draw a bar chart about the distribution of hire_date and the sum of salary bin hire_date by weekday, and order y-axis in asc order. | 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 regions (REGION_ID decimal(5,0),REGIO... | SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY SUM(SALARY) |
Which races have #2 podiums? | CREATE TABLE table_32251 ("Season" real,"Series" text,"Team" text,"Races" text,"Wins" text,"Poles" text,"Podiums" text,"Points" text,"Final Placing" text) | SELECT "Races" FROM table_32251 WHERE "Podiums" = '2' |
What was the stadium that had the regular season game? | CREATE TABLE table_21436373_4 (stadium VARCHAR,type_of_record VARCHAR) | SELECT stadium FROM table_21436373_4 WHERE type_of_record = "Regular season game" |
Where did they play against Clemson? | CREATE TABLE table_name_8 (location VARCHAR,opponent VARCHAR) | SELECT location FROM table_name_8 WHERE opponent = "clemson" |
What is the most silver won by Norway? | CREATE TABLE table_63717 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT MAX("Silver") FROM table_63717 WHERE "Nation" = 'norway' |
For those employees who did not have any job in the past, find hire_date and the average of manager_id bin hire_date by weekday, and visualize them by a bar chart, and I want to list in ascending by the the average of 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 HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY AVG(MANAGER_ID) |
What is the lowest Nick production number? | CREATE TABLE table_28769 ("Season #" real,"Series #" real,"Episode title" text,"Original air date" text,"Nick prod. #" real) | SELECT MIN("Nick prod. #") FROM table_28769 |
tell me the number of patients taking drug via po/ng route who have diagnoses icd9 code v1581. | 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.icd9_code = "V1581" AND prescriptions.route = "PO/NG" |
How powerful is the model before 1999? | CREATE TABLE table_69439 ("Engine" text,"Displacement" text,"Power" text,"Torque" text,"Year" real) | SELECT "Power" FROM table_69439 WHERE "Year" < '1999' |
What is the highest Total Foreign-born (1000) from a non EU state (1000) of 685 and a population (1000) smaller than 10,666? | CREATE TABLE table_name_53 (total_foreign_born__1000_ INTEGER,born_in_a_non_eu_state__1000_ VARCHAR,total_population__1000_ VARCHAR) | SELECT MAX(total_foreign_born__1000_) FROM table_name_53 WHERE born_in_a_non_eu_state__1000_ = 685 AND total_population__1000_ > 10 OFFSET 666 |
What is the Frequency for Model Number c3 850? | CREATE TABLE table_46636 ("Model Number" text,"Frequency" text,"L2-Cache" text,"Front Side Bus" text,"Multiplier" text,"Voltage" text,"Socket" text) | SELECT "Frequency" FROM table_46636 WHERE "Model Number" = 'c3 850' |
What is the average rank for players with under 205 matches and under 100 goals? | CREATE TABLE table_40847 ("Rank" real,"Name" text,"Years" text,"Matches" real,"Goals" real) | SELECT AVG("Rank") FROM table_40847 WHERE "Matches" < '205' AND "Goals" < '100' |
what are the four most frequent drugs that were prescribed to male patients in their 30s during the same month after they had been diagnosed with chf nos during the last year? | CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id numbe... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ... |
What is the maximum price of wines in each year? | CREATE TABLE appellations (No INTEGER,Appelation TEXT,County TEXT,State TEXT,Area TEXT,isAVA TEXT)CREATE TABLE wine (No INTEGER,Grape TEXT,Winery TEXT,Appelation TEXT,State TEXT,Name TEXT,Year INTEGER,Price INTEGER,Score INTEGER,Cases INTEGER,Drink TEXT)CREATE TABLE grapes (ID INTEGER,Grape TEXT,Color TEXT) | SELECT Year, MAX(Price) FROM wine GROUP BY Year |
What are the average points for an engine of ford zetec-r v8? | CREATE TABLE table_name_63 (points INTEGER,engine VARCHAR) | SELECT AVG(points) FROM table_name_63 WHERE engine = "ford zetec-r v8" |
Which score has an Attendance of 31,178? | CREATE TABLE table_69102 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" text,"Record" text) | SELECT "Score" FROM table_69102 WHERE "Attendance" = '31,178' |
Which air date had an 11 share | CREATE TABLE table_11244302_1 (air_date VARCHAR,share VARCHAR) | SELECT air_date FROM table_11244302_1 WHERE share = 11 |
What is the highest league cup of danny collins, who has more than 1 premier league? | CREATE TABLE table_name_97 (league_cup INTEGER,name VARCHAR,premier_league VARCHAR) | SELECT MAX(league_cup) FROM table_name_97 WHERE name = "danny collins" AND premier_league > 1 |
what is the days of hospital stay and admission location of patient id 65759? | 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 prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug tex... | SELECT demographic.days_stay, demographic.admission_location FROM demographic WHERE demographic.subject_id = "65759" |
What is the population of the nation that has a GDP per capita (US$) of 11,929? | CREATE TABLE table_71505 ("Member countries" text,"Population" text,"Area (km\u00b2)" text,"GDP (billion US$)" text,"GDP per capita (US$)" text) | SELECT "Population" FROM table_71505 WHERE "GDP per capita (US$)" = '11,929' |
Close as offtopic reason dist. | CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)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 PostTags (PostId number,TagId number)CREATE TABLE... | SELECT MAX(CreationDate) FROM Votes AS v WHERE VoteTypeId = 6 AND NOT UserId IS NULL |
What is the last season that the Scottish Rocks played? | CREATE TABLE table_55107 ("Team" text,"City/Area" text,"Arena" text,"Capacity" text,"Last season" text) | SELECT "Last season" FROM table_55107 WHERE "Team" = 'scottish rocks' |
What is Res., when Round is greater than 2, and when Event is 'Midwest Cage Championships 25: Inferno'? | CREATE TABLE table_12699 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Time" text,"Location" text) | SELECT "Res." FROM table_12699 WHERE "Round" > '2' AND "Event" = 'midwest cage championships 25: inferno' |
What round on average was a defensive tackle selected? | CREATE TABLE table_name_87 (round INTEGER,position VARCHAR) | SELECT AVG(round) FROM table_name_87 WHERE position = "defensive tackle" |
What is 's Label? | CREATE TABLE table_name_92 (label VARCHAR,chinese__simplified_ VARCHAR) | SELECT label FROM table_name_92 WHERE chinese__simplified_ = "你 朋友" |
What is the name of the person with more than 299 games during the 1995 07 period? | CREATE TABLE table_43919 ("Rank" real,"Name" text,"Period" text,"Games" real,"Goals" text) | SELECT "Name" FROM table_43919 WHERE "Games" > '299' AND "Period" = '1995–07' |
who shot the most at 91 m | CREATE TABLE table_204_234 (id number,"round" text,"100 yd (91 m)" text,"80 yd (73 m)" text,"60 yd (55 m)" text,"50 yd (46 m)" text,"40 yd (37 m)" text) | SELECT "round" FROM table_204_234 ORDER BY "100 yd (91 m)" DESC LIMIT 1 |
Name the district for rep. warren r. davis died during previous congress | CREATE TABLE table_25101 ("District" text,"Vacator" text,"Reason for change" text,"Successor" text,"Date successor seated" text) | SELECT "District" FROM table_25101 WHERE "Reason for change" = 'Rep. Warren R. Davis died during previous congress' |
What is the Stadium held on november 29? | CREATE TABLE table_name_41 (stadium VARCHAR,date VARCHAR) | SELECT stadium FROM table_name_41 WHERE date = "november 29" |
Name the poles for 25th position | CREATE TABLE table_72838 ("Year" real,"Starts" real,"Wins" real,"Top 5" real,"Top 10" real,"Poles" real,"Avg. Start" text,"Avg. Finish" text,"Winnings" text,"Position" text,"Team(s)" text) | SELECT "Poles" FROM table_72838 WHERE "Position" = '25th' |
Who had the highest rebounds of the game with A. Johnson (6) as the highest assist? | CREATE TABLE table_51534 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "High rebounds" FROM table_51534 WHERE "High assists" = 'a. johnson (6)' |
Which Opponent has a Score of 2 6? | CREATE TABLE table_39533 ("Game" real,"Date" text,"Opponent" text,"Score" text,"Series" text) | SELECT "Opponent" FROM table_39533 WHERE "Score" = '2–6' |
When was there a game against the Indianapolis colts? | CREATE TABLE table_name_72 (date VARCHAR,opponent VARCHAR) | SELECT date FROM table_name_72 WHERE opponent = "indianapolis colts" |
Which Pos has a Car # of 33? | CREATE TABLE table_name_72 (pos INTEGER,car__number VARCHAR) | SELECT SUM(pos) FROM table_name_72 WHERE car__number = 33 |
What is the role name and role description for employee called Ebba? | CREATE TABLE ROLES (role_name VARCHAR,role_description VARCHAR,role_code VARCHAR)CREATE TABLE Employees (role_code VARCHAR,employee_name VARCHAR) | SELECT T2.role_name, T2.role_description FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T1.employee_name = "Ebba" |
What is the Set 3 when the Set 2 is 21 25, and a Set 1 is 25 21? | CREATE TABLE table_name_70 (set_3 VARCHAR,set_2 VARCHAR,set_1 VARCHAR) | SELECT set_3 FROM table_name_70 WHERE set_2 = "21–25" AND set_1 = "25–21" |
How many millions of U.S. viewers watched episode 185? | CREATE TABLE table_13301516_1 (us_viewers__millions_ VARCHAR,no_in_series VARCHAR) | SELECT us_viewers__millions_ FROM table_13301516_1 WHERE no_in_series = 185 |
how many male patients are diagnosed for seroma complicating a procedure? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.long_title = "Seroma complicating a procedure" |
how many hours have elapsed since patient 20898 first received an intake of criticare hn on the current intensive care unit visit? | CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)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 transfers (row_id nu... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', inputevents_cv.charttime)) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20898) AND icustays.outtime IS NULL)... |
What is Country, when Year is '1994'? | CREATE TABLE table_name_93 (country VARCHAR,year VARCHAR) | SELECT country FROM table_name_93 WHERE year = 1994 |
which jockey is before tm jones | CREATE TABLE table_204_561 (id number,"fence" number,"name" text,"jockey" text,"age" number,"handicap (st-lb)" text,"starting price" text,"fate" text) | SELECT "jockey" FROM table_204_561 WHERE id = (SELECT id FROM table_204_561 WHERE "jockey" = 'tm jones') - 1 |
Will there be a 3 -credit upper level class in Winter 2018 ? | CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE area (course_id int,area varchar)CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE ... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND course.credits = 3 AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'Winter' AND se... |
what procedure did patient 015-15167 receive for the first time in 2100? | 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 medication (medicationid number,patientunitstayid number,drugname text,dosag... | SELECT treatment.treatmentname FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-15167')) AND STRFTIME('%y', treatment.treatmenttime) = '2100'... |
What is the name of the place with 582.20 square km area? | CREATE TABLE table_21865 ("Official Name" text,"Status" text,"Area km 2" text,"Population" real,"Census Ranking" text) | SELECT "Official Name" FROM table_21865 WHERE "Area km 2" = '582.20' |
Which Object type has a NGC number of 2787? | CREATE TABLE table_name_19 (object_type VARCHAR,ngc_number VARCHAR) | SELECT object_type FROM table_name_19 WHERE ngc_number = 2787 |
What sport was played before 2006 with a loser of france b? | CREATE TABLE table_32852 ("Date" real,"Sport" text,"Winner" text,"Score" text,"Loser" text) | SELECT "Sport" FROM table_32852 WHERE "Date" < '2006' AND "Loser" = 'france b' |
Which steal/intercept ball has no for both the sliding tackle and dump tackle? | CREATE TABLE table_name_37 (steal_intercept_ball VARCHAR,sliding_tackle VARCHAR,dump_tackle VARCHAR) | SELECT steal_intercept_ball FROM table_name_37 WHERE sliding_tackle = "no" AND dump_tackle = "no" |
How many export volume of goods and services values are associated with GDP at current prices of 161.340? | CREATE TABLE table_30133_1 (export_volume_of_goods_and_services__percent_change_ VARCHAR,gdp_at_current_prices__usd_billions_ VARCHAR) | SELECT COUNT(export_volume_of_goods_and_services__percent_change_) FROM table_30133_1 WHERE gdp_at_current_prices__usd_billions_ = "161.340" |
What is the weekday of birth of professors teaching course ACCT-211? Show a bar chart, and rank total number from high to low order. | CREATE TABLE CLASS (CLASS_CODE varchar(5),CRS_CODE varchar(10),CLASS_SECTION varchar(2),CLASS_TIME varchar(20),CLASS_ROOM varchar(8),PROF_NUM int)CREATE TABLE COURSE (CRS_CODE varchar(10),DEPT_CODE varchar(10),CRS_DESCRIPTION varchar(35),CRS_CREDIT float(8))CREATE TABLE DEPARTMENT (DEPT_CODE varchar(10),DEPT_NAME varch... | SELECT EMP_DOB, COUNT(EMP_DOB) FROM EMPLOYEE AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE CRS_CODE = "ACCT-211" ORDER BY COUNT(EMP_DOB) DESC |
What is the LGA name where the 2006 census population is bigger than 425208.9417698913 and administrative capital is port harcourt? | CREATE TABLE table_23152 ("LGA Name" text,"Area (km 2)" real,"Census 2006 population" real,"Administrative capital" text,"Postal Code" real) | SELECT "LGA Name" FROM table_23152 WHERE "Census 2006 population" > '425208.9417698913' AND "Administrative capital" = 'Port Harcourt' |
Who was the home team for tie number 16? | CREATE TABLE table_42510 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Date" text) | SELECT "Home team" FROM table_42510 WHERE "Tie no" = '16' |
What is the ISBN of Japanese Title of (kiri no h monsha)? | CREATE TABLE table_name_54 (isbn VARCHAR,japanese_title VARCHAR) | SELECT isbn FROM table_name_54 WHERE japanese_title = "霧の訪問者 (kiri no hōmonsha)" |
Number of answers per question. | CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserId number,ContentLicense text)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId numb... | SELECT q.AnswerCount AS "Nb Answers", q.Id AS "post_link", u.Id AS "user_link" FROM Posts AS q INNER JOIN Users AS u ON u.Id = q.OwnerUserId WHERE q.PostTypeId = 1 ORDER BY q.AnswerCount DESC, u.Id |
A scatter chart shows the correlation between student_id and monthly_rental , and group by attribute other_details. | CREATE TABLE Assessment_Notes (notes_id INTEGER,student_id INTEGER,teacher_id INTEGER,date_of_notes DATETIME,text_of_notes VARCHAR(255),other_details VARCHAR(255))CREATE TABLE Ref_Detention_Type (detention_type_code VARCHAR(10),detention_type_description VARCHAR(80))CREATE TABLE Addresses (address_id INTEGER,line_1 VAR... | SELECT student_id, monthly_rental FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC |
what flights from LAS VEGAS to MONTREAL on saturday | CREATE TABLE code_description (code varchar,description text)CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,time_zone_code varchar)CREATE TABLE flight_stop (flight_id int,stop_number int,stop_days text,stop_airport text,arrival_time int,arrival_airline text,arrival_flight... | 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 = 'MONTREAL' AND date_day.day_number = 26 AND date_day.month_number = 7 AND ... |
did austria or russia rank higher ? | CREATE TABLE table_204_835 (id number,"rank" number,"lane" number,"name" text,"nationality" text,"time" text,"notes" text) | SELECT "nationality" FROM table_204_835 WHERE "nationality" IN ('austria', 'russia') ORDER BY id LIMIT 1 |
What date was the Monsanto open located in Florida? | CREATE TABLE table_37504 ("Date" text,"Tournament" text,"Location" text,"Winner" text,"Score" text,"1st prize ($)" text) | SELECT "Date" FROM table_37504 WHERE "Location" = 'florida' AND "Tournament" = 'monsanto open' |
Name the base 10 for shortscale comparison for billion | CREATE TABLE table_260938_1 (base_10 VARCHAR,shortscale_comparison VARCHAR) | SELECT base_10 FROM table_260938_1 WHERE shortscale_comparison = "Billion" |
known renal insufficiency ( prior s _ creatinine > 2.5 mg % ( > 220 umol / l ) for male and 2 mg % ( > 175 umol / l ) ) for female | CREATE TABLE table_test_20 ("id" int,"ejection_fraction_ef" int,"anemia" bool,"gender" string,"bleeding" int,"systolic_blood_pressure_sbp" int,"left_main_coronary_artery_stenosis" int,"hemoglobin_a1c_hba1c" float,"renal_disease" bool,"creatinine_clearance_cl" float,"prior_creatinine" float,"diastolic_blood_pressure_dbp... | SELECT * FROM table_test_20 WHERE renal_disease = 1 OR ((gender = 'male' AND prior_creatinine > 2.5) OR (gender = 'female' AND prior_creatinine > 2)) |
What is the lowest drawn for entries with a lost of 13? | CREATE TABLE table_name_38 (drawn INTEGER,lost VARCHAR) | SELECT MIN(drawn) FROM table_name_38 WHERE lost = 13 |
since 2101, what are the four most frequent interventions that patients were given in the same month after receiving aortocor bypas-3 cor art? | CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admi... |
What is the sum of Rank, when Name is Will Solomon, and when Games is greater than 21? | CREATE TABLE table_41924 ("Rank" real,"Name" text,"Team" text,"Games" real,"Points" real) | SELECT SUM("Rank") FROM table_41924 WHERE "Name" = 'will solomon' AND "Games" > '21' |
who directed the episode entitled 'home is where the hospital is'? | CREATE TABLE table_74229 ("Series no." real,"Season no." real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" real,"U.S. viewers (millions)" text) | SELECT "Directed by" FROM table_74229 WHERE "Title" = 'Home Is Where the Hospital Is' |
What's the location when the notes area is notes? | CREATE TABLE table_38836 ("Distance" text,"Time" text,"Date" text,"Location" text,"Notes" text) | SELECT "Location" FROM table_38836 WHERE "Notes" = 'notes' |
What was the score for the game on December 20? | CREATE TABLE table_name_49 (score VARCHAR,date VARCHAR) | SELECT score FROM table_name_49 WHERE date = "december 20" |
Which Opponent has a Score of 4 5 ot? | CREATE TABLE table_5418 ("Game" real,"December" real,"Opponent" text,"Score" text,"Record" text,"Points" real) | SELECT "Opponent" FROM table_5418 WHERE "Score" = '4–5 ot' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.