instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What is the record time at the Nascar Camping World Truck Series? | CREATE TABLE table_53128 ("Record" text,"Date" text,"Driver" text,"Time" text,"Speed/Avg. Speed" text) | SELECT "Time" FROM table_53128 WHERE "Record" = 'nascar camping world truck series' |
Which circuit was Delage the winning constructor for? | CREATE TABLE table_name_44 (circuit VARCHAR,winning_constructor VARCHAR) | SELECT circuit FROM table_name_44 WHERE winning_constructor = "delage" |
what was the total amount of output patient 92846 had in the previous day? | CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance text,language text,marital_status text,ethnicit... | SELECT SUM(outputevents.value) 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 = 92846)) AND DATETIME(outputevents.charttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of... |
what is the number of patients whose drug code is busp10? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "BUSP10" |
What is the screen size and pixel amount of model p5000 when the dimensions are 98 64.5 41? | CREATE TABLE table_name_28 (screen_size VARCHAR,pixels VARCHAR,dimensions_w×h×d__mm_ VARCHAR,model VARCHAR) | SELECT screen_size, pixels FROM table_name_28 WHERE dimensions_w×h×d__mm_ = "98×64.5×41" AND model = "p5000" |
which player had the most receptions but no touchdowns ? | CREATE TABLE table_203_8 (id number,"player" text,"rec." number,"yards" number,"avg." number,"td's" number,"long" number) | SELECT "player" FROM table_203_8 WHERE "td's" = 0 ORDER BY "rec." DESC LIMIT 1 |
give the number of newborns who were born before the year 2121. | 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_type = "NEWBORN" AND demographic.dob_year < "2121" |
which is the only ship used as a work boat ? | CREATE TABLE table_203_774 (id number,"name" text,"dates" text,"grt" number,"propulsion" text,"port" text,"notes" text) | SELECT "name" FROM table_203_774 WHERE "notes" = 'work boat' |
What's the wheelbase (in mm/inch) of the model with model designation 97G00? | CREATE TABLE table_23976 ("Model Type" text,"Model Designation" text,"Engine" text,"Wheelbase (mm/inch)" text,"GVW (kg/ton)" text,"Axle Ratio" text) | SELECT "Wheelbase (mm/inch)" FROM table_23976 WHERE "Model Designation" = '97G00' |
How many wins when there are more than 19 points, place smaller than 12, and fewer than 30 played? | CREATE TABLE table_name_36 (wins INTEGER,played VARCHAR,points VARCHAR,position VARCHAR) | SELECT SUM(wins) FROM table_name_36 WHERE points > 19 AND position < 12 AND played < 30 |
What was the composition of the state assembly in 2008? | CREATE TABLE table_1803 ("Year" text,"Governor" text,"Lieutenant Governor" text,"Secretary of State" text,"Attorney General" text,"Treasurer" text,"State Senate" text,"State Assembly" text,"U.S. Senator (Class I)" text,"U.S. Senator (Class III)" text,"U.S. House" text,"Electoral College votes" text) | SELECT "State Assembly" FROM table_1803 WHERE "Year" = '2008' |
Visualize a bar chart for how many students are older than average for each gender?, could you order Sex in ascending order please? | CREATE TABLE Lives_in (stuid INTEGER,dormid INTEGER,room_number INTEGER)CREATE TABLE Has_amenity (dormid INTEGER,amenid INTEGER)CREATE TABLE Dorm_amenity (amenid INTEGER,amenity_name VARCHAR(25))CREATE TABLE Student (StuID INTEGER,LName VARCHAR(12),Fname VARCHAR(12),Age INTEGER,Sex VARCHAR(1),Major INTEGER,Advisor INTE... | SELECT Sex, COUNT(*) FROM Student WHERE Age > (SELECT AVG(Age) FROM Student) GROUP BY Sex ORDER BY Sex |
What is the width feet in meeters for the truss with a source of nbi (2009)? | CREATE TABLE table_name_63 (width_feet__m_ VARCHAR,source__year_ VARCHAR) | SELECT width_feet__m_ FROM table_name_63 WHERE source__year_ = "nbi (2009)" |
How many numbers were recorded points against when the tries were for 43? | CREATE TABLE table_13564637_5 (points_against VARCHAR,tries_for VARCHAR) | SELECT COUNT(points_against) FROM table_13564637_5 WHERE tries_for = "43" |
Which Season has a Year of 2005 06? | CREATE TABLE table_name_63 (season VARCHAR,year VARCHAR) | SELECT season FROM table_name_63 WHERE year = "2005–06" |
Show all the ranks and the number of male and female faculty for each rank in a bar chart, list by the bar in desc. | CREATE TABLE Activity (actid INTEGER,activity_name varchar(25))CREATE TABLE Participates_in (stuid INTEGER,actid INTEGER)CREATE TABLE Student (StuID INTEGER,LName VARCHAR(12),Fname VARCHAR(12),Age INTEGER,Sex VARCHAR(1),Major INTEGER,Advisor INTEGER,city_code VARCHAR(3))CREATE TABLE Faculty (FacID INTEGER,Lname VARCHAR... | SELECT Rank, COUNT(*) FROM Faculty GROUP BY Sex, Rank ORDER BY Rank DESC |
What horizontal bar score also has a pommel horse score of 15.250? | CREATE TABLE table_name_60 (horizontal_bar VARCHAR,pommel_horse VARCHAR) | SELECT horizontal_bar FROM table_name_60 WHERE pommel_horse = "15.250" |
What is the sum of the difference for 9 draws and over 18 played? | CREATE TABLE table_56155 ("Team" text,"Points" real,"Played" real,"Drawn" real,"Lost" real,"Against" real,"Diff" real) | SELECT SUM("Diff") FROM table_56155 WHERE "Drawn" = '9' AND "Played" > '18' |
Which IHSAA Class has a Mascot of wildcats? | CREATE TABLE table_name_2 (ihsaa_class VARCHAR,mascot VARCHAR) | SELECT ihsaa_class FROM table_name_2 WHERE mascot = "wildcats" |
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and code , and group by attribute headquarter, and rank from low to high by the Code. | 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 |
Where is the player Davis Love III? | CREATE TABLE table_name_82 (place VARCHAR,player VARCHAR) | SELECT place FROM table_name_82 WHERE player = "davis love iii" |
what is primary disease and admission time of subject id 29767? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT demographic.diagnosis, demographic.admittime FROM demographic WHERE demographic.subject_id = "29767" |
Find the names of students who have taken any course in the fall semester of year 2003. | CREATE TABLE advisor (s_id text,i_id text)CREATE TABLE course (course_id text,title text,dept_name text,credits number)CREATE TABLE teaches (id text,course_id text,sec_id text,semester text,year number)CREATE TABLE department (dept_name text,building text,budget number)CREATE TABLE student (id text,name text,dept_name ... | SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester = 'Fall' AND year = 2003) |
What year did Canada get a silver in the olympics in the Men's Coxless Pair event? | CREATE TABLE table_66608 ("Year" real,"Championship" text,"Event" text,"Nation" text,"Result" text) | SELECT MIN("Year") FROM table_66608 WHERE "Nation" = 'canada' AND "Result" = 'silver' AND "Championship" = 'olympics' AND "Event" = 'men''s coxless pair' |
Tell me the constructor for zolder | CREATE TABLE table_51681 ("Race" text,"Date" text,"Location" text,"Pole Position" text,"Fastest Lap" text,"Race Winner" text,"Constructor" text,"Report" text) | SELECT "Constructor" FROM table_51681 WHERE "Location" = 'zolder' |
In what Town/City is Nana Museum of The Arctic located? | CREATE TABLE table_name_45 (town_city VARCHAR,name VARCHAR) | SELECT town_city FROM table_name_45 WHERE name = "nana museum of the arctic" |
Let me know the number of patients with guillain barre syndrome who died in or before 2111. | 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 lab (subject_id text,hadm_id text,itemid text,charttime te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "GUILLAIN BARRE SYNDROME" AND demographic.dod_year <= "2111.0" |
How many students are older than 20 in each dorm Visualize by bar chart, and could you display by the y axis in descending please? | CREATE TABLE Has_amenity (dormid INTEGER,amenid INTEGER)CREATE TABLE Lives_in (stuid INTEGER,dormid INTEGER,room_number INTEGER)CREATE TABLE Student (StuID INTEGER,LName VARCHAR(12),Fname VARCHAR(12),Age INTEGER,Sex VARCHAR(1),Major INTEGER,Advisor INTEGER,city_code VARCHAR(3))CREATE TABLE Dorm_amenity (amenid INTEGER,... | SELECT dorm_name, COUNT(*) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.Age > 20 GROUP BY T3.dorm_name ORDER BY COUNT(*) DESC |
what was the total number of medals won by portugal ? | CREATE TABLE table_203_374 (id number,"rank" number,"nation" text,"gold" number,"silver" number,"bronze" number,"total" number) | SELECT "total" FROM table_203_374 WHERE "nation" = 'portugal' |
What is Tries Against, when Points For is 98? | CREATE TABLE table_45358 ("Team" text,"Tries for" text,"Tries against" text,"Try diff" text,"Points for" text,"Points against" text,"Points diff" text) | SELECT "Tries against" FROM table_45358 WHERE "Points for" = '98' |
What is the Losing bonus, when the value for Points is 43? | CREATE TABLE table_67687 ("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_67687 WHERE "Points" = '43' |
What is the tournament in 2012 results that has a 2003 results of 2r and played at Wimbledon? | CREATE TABLE table_name_6 (tournament VARCHAR) | SELECT 2012 FROM table_name_6 WHERE 2003 = "2r" AND tournament = "wimbledon" |
How many values of free float for the BSE code of 4EH? | CREATE TABLE table_20667854_1 (free_float VARCHAR,bse_code VARCHAR) | SELECT COUNT(free_float) FROM table_20667854_1 WHERE bse_code = "4EH" |
For those records from the products and each product's manufacturer, give me the comparison about the sum of manufacturer over the headquarter , and group by attribute headquarter by a bar chart, and could you order x axis in desc order? | CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL) | SELECT Headquarter, SUM(Manufacturer) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY Headquarter DESC |
What is the number of hispanic or latino - puerto rican patients who were given the drug named latanoprost 0.005% ophth.soln.? | 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.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND prescriptions.drug = "Latanoprost 0.005% Ophth. Soln." |
Which 2007 has a 2008 of 1r, and a Tournament of wimbledon? | CREATE TABLE table_name_53 (tournament VARCHAR) | SELECT 2007 FROM table_name_53 WHERE 2008 = "1r" AND tournament = "wimbledon" |
For those employees who was hired before 2002-06-21, visualize a line chart about the change of salary over hire_date . | CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_PROVINCE varchar(25),COUNTRY_ID varchar(2))CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE jobs (JOB_I... | SELECT HIRE_DATE, SALARY FROM employees WHERE HIRE_DATE < '2002-06-21' |
What is the method when the opponent is Andre Roberts? | CREATE TABLE table_8727 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" text) | SELECT "Method" FROM table_8727 WHERE "Opponent" = 'andre roberts' |
Voivodeship or city of nowogr dzkie has what capital? | CREATE TABLE table_name_75 (capital VARCHAR,voivodeship_or_city VARCHAR) | SELECT capital FROM table_name_75 WHERE voivodeship_or_city = "nowogródzkie" |
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and the average of price , and group by attribute name, and order Y from high to low order. | CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL) | SELECT T2.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Price DESC |
Who made high points on games of score w 106 104 (ot) | CREATE TABLE table_17340355_6 (high_assists VARCHAR,score VARCHAR) | SELECT high_assists FROM table_17340355_6 WHERE score = "W 106–104 (OT)" |
Name the number of party for richard l. hanna (r) 53.1% mike arcuri (d) 46.9% | CREATE TABLE table_19753079_35 (party VARCHAR,candidates VARCHAR) | SELECT COUNT(party) FROM table_19753079_35 WHERE candidates = "Richard L. Hanna (R) 53.1% Mike Arcuri (D) 46.9%" |
What is the Dismissals with a Venue with source: cricinfo.com? | CREATE TABLE table_name_43 (dismissals VARCHAR,venue VARCHAR) | SELECT dismissals FROM table_name_43 WHERE venue = "source: cricinfo.com" |
For those records from the products and each product's manufacturer, find name and manufacturer , and group by attribute name, and visualize them by a bar chart, and display y-axis in asc order. | CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL) | SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Manufacturer |
what is the total dose of ns that patient 63781 was prescribed until 03/2103? | CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE admissions (row_id number,subject_id number,hadm_id... | SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 63781) AND prescriptions.drug = 'ns' AND STRFTIME('%y-%m', prescriptions.startdate) <= '2103-03' |
How many incumbents are there in the georgia 8 district when the party is democratic? | CREATE TABLE table_19753079_13 (incumbent VARCHAR,party VARCHAR,district VARCHAR) | SELECT COUNT(incumbent) FROM table_19753079_13 WHERE party = "Democratic" AND district = "Georgia 8" |
What is the sum of the rank of the rower with an r note from Australia? | CREATE TABLE table_64713 ("Rank" real,"Rowers" text,"Country" text,"Time" text,"Notes" text) | SELECT SUM("Rank") FROM table_64713 WHERE "Notes" = 'r' AND "Country" = 'australia' |
Find the name of the department that has the biggest number of students minored in? | CREATE TABLE DEPARTMENT (DName VARCHAR,DNO VARCHAR)CREATE TABLE MINOR_IN (DNO VARCHAR) | SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY COUNT(*) DESC LIMIT 1 |
(fout) Average amount of answers per question. | CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Com... | SELECT Year = DATEADD(MONTH, DATEDIFF(MONTH, 0, CreationDate), 0), Average_answers_per_question = SUM(CASE WHEN PostTypeId = 2 THEN 1 ELSE 0 END) / CAST(SUM(CASE WHEN PostTypeId = 1 THEN 1 ELSE 0 END) AS FLOAT) FROM Posts GROUP BY DATEADD(MONTH, DATEDIFF(MONTH, 0, CreationDate), 0) ORDER BY DATEADD(MONTH, DATEDIFF(MONT... |
What was the score of the game when the record was 32 19 7? | CREATE TABLE table_name_40 (score VARCHAR,record VARCHAR) | SELECT score FROM table_name_40 WHERE record = "32–19–7" |
provide the number of patients whose discharge location is dead/expired and days of hospital stay is greater than 1? | 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 prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "DEAD/EXPIRED" AND demographic.days_stay > "1" |
i would like to see flights from DENVER to PHILADELPHIA | CREATE TABLE time_interval (period text,begin_time int,end_time int)CREATE TABLE state (state_code text,state_name text,country_name text)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)C... | 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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADE... |
What is the record of the game on February 21, 2008? | CREATE TABLE table_51973 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Leading scorer" text,"Attendance" real,"Record" text) | SELECT "Record" FROM table_51973 WHERE "Date" = 'february 21, 2008' |
Tell me the player with points larger than 36 and goals more than 0 with tries of 12 | CREATE TABLE table_53867 ("Player" text,"Position" text,"Tries" real,"Goals" real,"Points" real) | SELECT "Player" FROM table_53867 WHERE "Points" > '36' AND "Goals" > '0' AND "Tries" = '12' |
Which Visiting Team has a Stadium of servus centre? | CREATE TABLE table_56761 ("Date" text,"Home Team" text,"Score" text,"Visiting Team" text,"Stadium" text) | SELECT "Visiting Team" FROM table_56761 WHERE "Stadium" = 'servus centre' |
What is the value for 2012 when the value for 2009 is 1R and the vale for 2007 is 2R? | CREATE TABLE table_name_51 (Id VARCHAR) | SELECT 2012 FROM table_name_51 WHERE 2009 = "1r" AND 2007 = "2r" |
Show the number of patients with procedure icd9 code 3612 who died in or before 2126. | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2126.0" AND procedures.icd9_code = "3612" |
What was the position of the player who played for the Rockets during 1981? | CREATE TABLE table_56262 ("Player" text,"No.(s)" real,"Height in Ft." text,"Position" text,"Years for Rockets" text,"School/Club Team/Country" text) | SELECT "Position" FROM table_56262 WHERE "Years for Rockets" = '1981' |
What is the Established date of the Brian Timmis Stadium? | CREATE TABLE table_38445 ("Club" text,"League" text,"Venue" text,"Established" real,"Championships" real) | SELECT COUNT("Established") FROM table_38445 WHERE "Venue" = 'brian timmis stadium' |
What's the compression ratio of the model with L35 RPO and 5 applications? | CREATE TABLE table_20007413_6 (compression_ratio VARCHAR,rpo VARCHAR,applications VARCHAR) | SELECT compression_ratio FROM table_20007413_6 WHERE rpo = "L35" AND applications = 5 |
how many different teams did the broncos play against ? | CREATE TABLE table_203_371 (id number,"round" number,"opponent" text,"result" text,"bro." number,"opp." number,"date" text,"venue" text,"crowd" number,"position" text) | SELECT COUNT(DISTINCT "opponent") FROM table_203_371 |
What is the theme when the printing process is litho in 3 cols and intaglio? | CREATE TABLE table_25468520_1 (theme VARCHAR,printing_process VARCHAR) | SELECT theme FROM table_25468520_1 WHERE printing_process = "Litho in 3 cols and intaglio" |
When 2011/ 12 is non-ranking, what is the 2009/ 10? | CREATE TABLE table_79707 ("2008/ 09" text,"2009/ 10" text,"2010/ 11" text,"2011/ 12" text,"2012/ 13" text) | SELECT "2009/ 10" FROM table_79707 WHERE "2011/ 12" = 'non-ranking' |
what is the admission time and lab test name of patient with patient id 22377? | 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 demographic.admittime, lab.label FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.subject_id = "22377" |
what is march 27-29 when november 3 is 133? | CREATE TABLE table_27588 ("June 10-11" text,"March 27-29" text,"January 15-16" text,"November 3" text,"August 21-22" text) | SELECT "March 27-29" FROM table_27588 WHERE "November 3" = '133' |
Who got high assists for team @ Indiana? | CREATE TABLE table_29732 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "High assists" FROM table_29732 WHERE "Team" = '@ Indiana' |
how many international goals did teeratep winothai make in 2009 ? | CREATE TABLE table_203_14 (id number,"#" number,"date" text,"venue" text,"opponent" text,"score" text,"result" text,"competition" text) | SELECT COUNT(*) FROM table_203_14 WHERE "date" = 2009 |
What is the nationality of the player in round 4? | CREATE TABLE table_5191 ("Round" real,"Player" text,"Position" text,"Nationality" text,"College/Junior/Club Team" text) | SELECT "Nationality" FROM table_5191 WHERE "Round" = '4' |
provide the number of patients whose drug code is mago140 and lab test category is hematology. | 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 = "MAGO140" AND lab."CATEGORY" = "Hematology" |
Which position did the player from the hometown of Dallas, TX play? | CREATE TABLE table_11677100_12 (position VARCHAR,hometown VARCHAR) | SELECT position FROM table_11677100_12 WHERE hometown = "Dallas, TX" |
What day is collingwood the home side? | CREATE TABLE table_name_79 (date VARCHAR,home_team VARCHAR) | SELECT date FROM table_name_79 WHERE home_team = "collingwood" |
How many people were in the Crowd when the Home team scored 10.7 (67)? | CREATE TABLE table_55727 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT COUNT("Crowd") FROM table_55727 WHERE "Home team score" = '10.7 (67)' |
what is the number of films in tamil ? | CREATE TABLE table_204_57 (id number,"year" number,"film" text,"role" text,"language" text,"notes" text) | SELECT COUNT("film") FROM table_204_57 WHERE "language" = 'tamil' |
Number of up votes in past 30 days. | CREATE TABLE Users (Id number,Reputation number,CreationDate time,DisplayName text,LastAccessDate time,WebsiteUrl text,Location text,AboutMe text,Views number,UpVotes number,DownVotes number,ProfileImageUrl text,EmailHash text,AccountId number)CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)CRE... | SELECT COUNT(*) FROM Votes WHERE Votes.VoteTypeId IN (2) AND Votes.CreationDate >= DATEADD(DAY, -30, GETDATE()) |
Show different carriers of phones together with the number of phones with each carrier by a pie chart. | CREATE TABLE market (Market_ID int,District text,Num_of_employees int,Num_of_shops real,Ranking int)CREATE TABLE phone_market (Market_ID int,Phone_ID text,Num_of_stock int)CREATE TABLE phone (Name text,Phone_ID int,Memory_in_G int,Carrier text,Price real) | SELECT Carrier, COUNT(*) FROM phone GROUP BY Carrier |
what is the number of patients whose days of hospital stay is greater than 4 and lab test category is hematology? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "4" AND lab."CATEGORY" = "Hematology" |
Give me the number of patients born before 2043 who had a urine lab test. | 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 text,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2043" AND lab.fluid = "Urine" |
What district is incumbent elmer j. holland from? | CREATE TABLE table_18415 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT "District" FROM table_18415 WHERE "Incumbent" = 'Elmer J. Holland' |
what is age of subject id 14755? | 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 lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid ... | SELECT demographic.age FROM demographic WHERE demographic.subject_id = "14755" |
When winter pines is the fcsl team how many mlb teams are there? | CREATE TABLE table_18373863_2 (mlb_team VARCHAR,fcsl_team VARCHAR) | SELECT COUNT(mlb_team) FROM table_18373863_2 WHERE fcsl_team = "Winter Pines" |
What is the id of the reviewer named Daniel Lewis? | CREATE TABLE rating (rid number,mid number,stars number,ratingdate time)CREATE TABLE movie (mid number,title text,year number,director text)CREATE TABLE reviewer (rid number,name text) | SELECT rid FROM reviewer WHERE name = "Daniel Lewis" |
Who recorded the loss on august 7? | CREATE TABLE table_54938 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" real,"Record" text) | SELECT "Loss" FROM table_54938 WHERE "Date" = 'august 7' |
Show the product ids and the number of unique orders containing each product. | CREATE TABLE financial_transactions (transaction_id number,account_id number,invoice_number number,transaction_type text,transaction_date time,transaction_amount number,transaction_comment text,other_transaction_details text)CREATE TABLE products (product_id number,parent_product_id number,production_type_code text,uni... | SELECT product_id, COUNT(DISTINCT order_id) FROM order_items GROUP BY product_id |
For those employees who was hired before 2002-06-21, draw a scatter chart about the correlation between salary and commission_pct . | CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,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 decima... | SELECT SALARY, COMMISSION_PCT FROM employees WHERE HIRE_DATE < '2002-06-21' |
Which City has 600kw 500kw ERP (Analog/ Digital)? | CREATE TABLE table_34616 ("Region served" text,"City" text,"Channels (Analog / Digital)" text,"First air date" text,"ERP (Analog/ Digital)" text,"HAAT (Analog/ Digital) 1" text,"Transmitter Location" text) | SELECT "City" FROM table_34616 WHERE "ERP (Analog/ Digital)" = '600kw 500kw' |
Which 2nd leg came after a 1st leg of 0-3? | CREATE TABLE table_71484 ("Team 1" text,"Agg." text,"Team 2" text,"1st leg" text,"2nd leg" text) | SELECT "2nd leg" FROM table_71484 WHERE "1st leg" = '0-3' |
how many patients whose lab test name is nonsquamous epithelial cell? | CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag text,admission_location text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.label = "NonSquamous Epithelial Cell" |
Draw a bar chart for how many players played each position?, rank from high to low by the total number. | CREATE TABLE country (Country_id int,Country_name text,Capital text,Official_native_language text)CREATE TABLE player (Player_ID int,Player text,Years_Played text,Total_WL text,Singles_WL text,Doubles_WL text,Team int)CREATE TABLE match_season (Season real,Player text,Position text,Country int,Team int,Draft_Pick_Numbe... | SELECT Position, COUNT(*) FROM match_season GROUP BY Position ORDER BY COUNT(*) DESC |
how many patients whose discharge location is home health care and days of hospital stay is greater than 10? | 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 WHERE demographic.discharge_location = "HOME HEALTH CARE" AND demographic.days_stay > "10" |
How many draws have rumba/tango dance styles? | CREATE TABLE table_name_79 (draw VARCHAR,dance_styles VARCHAR) | SELECT COUNT(draw) FROM table_name_79 WHERE dance_styles = "rumba/tango" |
For all employees who have the letters D or S in their first name, draw a bar chart about the distribution of hire_date and the sum of employee_id bin hire_date by time, and I want to order y-axis in asc order. | CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_PROVINCE varchar(25),COUNTRY_ID varchar(2))CREATE TABLE employees (EMP... | SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(EMPLOYEE_ID) |
Which classes are offered in the next 6 semesters ? | CREATE TABLE jobs (job_id int,job_title varchar,description varchar,requirement varchar,city varchar,state varchar,country varchar,zip int)CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)CREATE TABLE ... | SELECT DISTINCT course.name, course.number, semester.semester, semester.year FROM course, course_offering, semester WHERE ((semester.semester = 'FA' AND semester.year = 2016) OR (semester.semester = 'FA' AND semester.year = 2017) OR (semester.semester = 'FA' AND semester.year = 2018) OR (semester.semester = 'WN' AND se... |
Tags that are more popular than the Solaris tag. | CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,OwnerDisplayName text,LastEditorUserId number,LastEditorDisplayName text,LastEditDate time,LastActivityDate time,Title text,Tags text,Ans... | WITH cnt AS (SELECT Count FROM Tags WHERE TagName = 'solaris') SELECT COUNT(*) FROM Tags WHERE Count > (SELECT Count FROM cnt) |
What opened with a drop height of 272feet? | CREATE TABLE table_71833 ("Park" text,"Tower height" text,"Drop height*" text,"Speed" text,"Model" text,"Opened" text,"Height requirement" text) | SELECT "Opened" FROM table_71833 WHERE "Drop height*" = '272feet' |
What Player has less than 10 Touchdowns and 0 Extra points and more than 5 Points? | CREATE TABLE table_name_77 (player VARCHAR,points VARCHAR,touchdowns VARCHAR,extra_points VARCHAR) | SELECT player FROM table_name_77 WHERE touchdowns < 10 AND extra_points = 0 AND points > 5 |
If the establishment is 49319, what is the sales, receipts or shipments maximum amount? | CREATE TABLE table_26328 ("Sector" text,"Establishments" real,"Sales,receipts,or shipments ($1,000)" real,"Annual payroll ($1,000)" real,"Paid employees" real) | SELECT MAX("Sales, receipts, or shipments ($1,000)") FROM table_26328 WHERE "Establishments" = '49319' |
Who is the operator to Highbury & Islington? | CREATE TABLE table_20580 ("Platform" real,"Frequency (per hour)" real,"Destination" text,"Service Pattern" text,"Operator" text,"Line" text) | SELECT "Operator" FROM table_20580 WHERE "Destination" = 'Highbury & Islington' |
what number of patients were primarily admitted for sepsis before the year 2162? | 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 WHERE demographic.diagnosis = "SEPSIS" AND demographic.admityear < "2162" |
What is the number of each allergie type? Return a bar chart, and list in descending by the how many allergytype. | CREATE TABLE Allergy_Type (Allergy VARCHAR(20),AllergyType VARCHAR(20))CREATE TABLE Student (StuID INTEGER,LName VARCHAR(12),Fname VARCHAR(12),Age INTEGER,Sex VARCHAR(1),Major INTEGER,Advisor INTEGER,city_code VARCHAR(3))CREATE TABLE Has_Allergy (StuID INTEGER,Allergy VARCHAR(20)) | SELECT AllergyType, COUNT(AllergyType) FROM Allergy_Type GROUP BY AllergyType ORDER BY COUNT(AllergyType) DESC |
how many total courthouses have there been in mississippi ? | CREATE TABLE table_204_87 (id number,"courthouse" text,"city" text,"street address" text,"jurisdiction" text,"dates of use" text,"named for" text) | SELECT COUNT("courthouse") FROM table_204_87 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.