instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
How many patients tested for other body fluid were born before the year 2043? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2043" AND lab.fluid = "Other Body Fluid" |
How many distinct users have asked questions. | CREATE TABLE ReviewTaskStates (Id number,Name text,Description text)CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,Creati... | SELECT COUNT(DISTINCT p.AcceptedAnswerId), p2.OwnerUserId FROM Posts AS p, Posts AS p2 GROUP BY p2.OwnerUserId ORDER BY COUNT(DISTINCT p.AcceptedAnswerId) DESC |
Which Democratic has a District smaller than 7, and a Republican of dan mansell? | CREATE TABLE table_37324 ("District" real,"Incumbent" text,"2008 Status" text,"Democratic" text,"Republican" text) | SELECT "Democratic" FROM table_37324 WHERE "District" < '7' AND "Republican" = 'dan mansell' |
what is the average age for a male in each job?, rank X in desc order. | CREATE TABLE PersonFriend (name varchar(20),friend varchar(20),year INTEGER)CREATE TABLE Person (name varchar(20),age INTEGER,city TEXT,gender TEXT,job TEXT) | SELECT job, AVG(age) FROM Person WHERE gender = 'male' GROUP BY job ORDER BY job DESC |
What was the time of the match with a record of 9-0 and used the tko (doctor stoppage) method? | CREATE TABLE table_name_75 (time VARCHAR,method VARCHAR,record VARCHAR) | SELECT time FROM table_name_75 WHERE method = "tko (doctor stoppage)" AND record = "9-0" |
Who is the athlete with a run 1 less than 54.13 and a 55.21 run 3? | CREATE TABLE table_name_47 (athlete VARCHAR,run_1 VARCHAR,run_3 VARCHAR) | SELECT athlete FROM table_name_47 WHERE run_1 < 54.13 AND run_3 = 55.21 |
what is average age of patients whose gender is f and primary disease is coronary artery disease\coronary artery bypass graft; myomectomy/sda? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,do... | SELECT AVG(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT; MYOMECTOMY/SDA" |
What is the date for the episode performed by Sue Manchester? | CREATE TABLE table_22815 ("Episode title" text,"Subject" text,"Music by" text,"Lyrics by" text,"Performed by" text,"First aired" text) | SELECT "First aired" FROM table_22815 WHERE "Performed by" = 'Sue Manchester' |
SebasSBM's custom filter (test phase). | CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReviewTaskId number)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId nu... | SELECT Id FROM Posts WHERE ViewCount = 9999 |
How many games have a Result of 4 0, and an Attendance larger than 12,256? | CREATE TABLE table_name_29 (game VARCHAR,result VARCHAR,attendance VARCHAR) | SELECT COUNT(game) FROM table_name_29 WHERE result = "4–0" AND attendance > 12 OFFSET 256 |
On what date was the match played in Victoria Park? | CREATE TABLE table_4819 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Date" FROM table_4819 WHERE "Venue" = 'victoria park' |
how many games did this team win this season ? | CREATE TABLE table_204_755 (id number,"week" number,"date" text,"opponent" text,"result" text,"attendance" number) | SELECT COUNT(*) FROM table_204_755 WHERE "result" = 'w' |
what is the team when the driver is viktor jensen? | CREATE TABLE table_name_64 (team VARCHAR,driver VARCHAR) | SELECT team FROM table_name_64 WHERE driver = "viktor jensen" |
What year was Jamboree made? | CREATE TABLE table_name_26 (year VARCHAR,movie_title VARCHAR) | SELECT year FROM table_name_26 WHERE movie_title = "jamboree" |
What Nation has a Gold entry that is greater than 0, a Total that is greater than 2, a Silver entry that is larger than 1, and 0 Bronze? | CREATE TABLE table_name_28 (nation VARCHAR,silver VARCHAR,bronze VARCHAR,gold VARCHAR,total VARCHAR) | SELECT nation FROM table_name_28 WHERE gold > 0 AND total > 2 AND bronze = 0 AND silver > 1 |
report the number of patients with procedure icd9 code 5781 who were admitted in hospital before 2138. | 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.admityear < "2138" AND procedures.icd9_code = "5781" |
When Ryan Anderson won the mountains classification, and Michael Rogers won the general classification, who won the sprint classification? | CREATE TABLE table_73727 ("Stage" real,"Winner" text,"General Classification" text,"Youth Classification" text,"Mountains Classification" text,"Sprint Classification" text,"Most Courageous" text,"Team Classification" text) | SELECT "Sprint Classification" FROM table_73727 WHERE "Mountains Classification" = 'Ryan Anderson' AND "General Classification" = 'Michael Rogers' |
how many films grossed over five million in their first week ? | CREATE TABLE table_203_180 (id number,"#" number,"weekend end date" text,"film" text,"weekend gross (millions)" text,"notes" text) | SELECT COUNT(DISTINCT "film") FROM table_203_180 WHERE "weekend gross (millions)" > 5 |
What was the first year that the artist of every little thing ranked lower than 10? | CREATE TABLE table_name_56 (year INTEGER,artist VARCHAR,rank VARCHAR) | SELECT MIN(year) FROM table_name_56 WHERE artist = "every little thing" AND rank < 10 |
what were the top four most common procedures that were followed within 2 months for patients who were diagnosed with oth inf vena cava thromb since 2104? | 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 admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_locatio... | 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, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissi... |
who put on the show where the numbers were 227412 | CREATE TABLE table_27716091_1 (directed_by VARCHAR,production_code VARCHAR) | SELECT directed_by FROM table_27716091_1 WHERE production_code = 227412 |
What was the attendance on may 21? | CREATE TABLE table_name_75 (attendance INTEGER,date VARCHAR) | SELECT MAX(attendance) FROM table_name_75 WHERE date = "may 21" |
The person who is on the Democratic ticket for the position of Office of U.S. Senator was who? | CREATE TABLE table_6926 ("Office" text,"Democratic ticket" text,"Republican ticket" text,"Conservative ticket" text,"Liberal ticket" text,"Free Libertarian ticket" text,"Socialist Labor ticket" text) | SELECT "Democratic ticket" FROM table_6926 WHERE "Office" = 'u.s. senator' |
what's the won with points for being 643 | CREATE TABLE table_19117 ("Club" text,"Played" text,"Won" 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 "Won" FROM table_19117 WHERE "Points for" = '643' |
How many Laps Did Driver David Coulthard have on a Grid smaller than 11? | CREATE TABLE table_name_89 (laps VARCHAR,grid VARCHAR,driver VARCHAR) | SELECT laps FROM table_name_89 WHERE grid < 11 AND driver = "david coulthard" |
what is the average races when points is 9 and poles is less than 0? | CREATE TABLE table_name_61 (races INTEGER,points VARCHAR,poles VARCHAR) | SELECT AVG(races) FROM table_name_61 WHERE points = "9" AND poles < 0 |
What is the report for the team with a home ground of MCG and a home team score of 6.5 (41)? | CREATE TABLE table_37520 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Ground" text,"Crowd" real,"Date" text,"Report" text) | SELECT "Report" FROM table_37520 WHERE "Ground" = 'mcg' AND "Home team score" = '6.5 (41)' |
What is the company from Greece with author Aeschylus? | CREATE TABLE table_name_45 (company VARCHAR,country VARCHAR,author VARCHAR) | SELECT company FROM table_name_45 WHERE country = "greece" AND author = "aeschylus" |
What were the winnings for the Chevrolet with a number larger than 29 and scored 102 points? | CREATE TABLE table_name_65 (winnings VARCHAR,points VARCHAR,make VARCHAR,car__number VARCHAR) | SELECT winnings FROM table_name_65 WHERE make = "chevrolet" AND car__number > 29 AND points = 102 |
For all employees who have the letters D or S in their first name, what is the relationship between employee_id 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 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 dec... | SELECT EMPLOYEE_ID, COMMISSION_PCT FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' |
Find the name of the scientist who worked on both a project named 'Matter of Time' and a project named 'A Puzzling Parallax'. | CREATE TABLE projects (code VARCHAR,name VARCHAR)CREATE TABLE scientists (name VARCHAR,SSN VARCHAR)CREATE TABLE assignedto (project VARCHAR,scientist VARCHAR) | SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'Matter of Time' INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'A Pu... |
please give me direct morning flights from PITTSBURGH to ATLANTA | 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 flight (aircraft_code_sequence text,airline_code varchar,airline_flight text,arrival_time int,connections int,departure_time i... | 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 = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'A... |
Which Round has a Method of decision (unanimous), and an Event of ufc 145? | CREATE TABLE table_name_32 (round VARCHAR,method VARCHAR,event VARCHAR) | SELECT round FROM table_name_32 WHERE method = "decision (unanimous)" AND event = "ufc 145" |
What is the start of the race with 676 laps? | CREATE TABLE table_80179 ("Year" text,"Start" text,"Qual" text,"Rank" text,"Finish" text,"Laps" text) | SELECT "Start" FROM table_80179 WHERE "Laps" = '676' |
WHICH SITES were Questions MIGRATED TO? (Enter number of years to query). Produces a ranked count of questions migrated away from this site. Enter the number of years back to query in the prompt. | 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 SUBSTRING(Comment, CHARINDEX('//', Comment) + 2, CHARINDEX('.com', Comment) - CHARINDEX('//', Comment) + 2) AS "sentto", COUNT(Id) AS "count" FROM PostHistory WHERE PostHistoryTypeId = 35 AND CreationDate >= DATEADD(dd, -365 * 2, GETDATE()) GROUP BY SUBSTRING(Comment, CHARINDEX('//', Comment) + 2, CHARINDEX('.co... |
what was the name of the procedure that's been performed to patient 25965 two times until 40 months ago? | CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance text,language text,marital_status text,ethnicity text,age number)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,i... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 259... |
what are the five most common laboratory tests that a patient had within 2 months after being diagnosed with s/p hysterectomy - abdominal since 3 years ago? | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE lab (labid number,patientunitstayid number,lab... | SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 's/p hysterectomy - abdominal' AND DATETIME(diagnosis... |
Which winner has a Challenge Loser of alexcy? | CREATE TABLE table_9342 ("Episode" text,"7 Deadly Sin" text,"Challenge Winner" text,"Challenge Loser" text,"Voted In To 'El Duelo'" text,"Eliminated" text) | SELECT "Challenge Winner" FROM table_9342 WHERE "Challenge Loser" = 'alexcy' |
What is the highest series number with 9.17 million US viewers? | CREATE TABLE table_29376 ("No. in Series" real,"No. in Season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"U.S. viewers (millions)" text) | SELECT MAX("No. in Series") FROM table_29376 WHERE "U.S. viewers (millions)" = '9.17' |
what's the won with points for being 643 | CREATE TABLE table_14058433_5 (won VARCHAR,points_for VARCHAR) | SELECT won FROM table_14058433_5 WHERE points_for = "643" |
What name ran for the Prohibition ticket when the Progressive ticket was Eugene M. Travis? | CREATE TABLE table_40130 ("Office" text,"Republican ticket" text,"Democratic ticket" text,"Socialist ticket" text,"Prohibition ticket" text,"Progressive ticket" text,"Independence League ticket" text) | SELECT "Prohibition ticket" FROM table_40130 WHERE "Progressive ticket" = 'eugene m. travis' |
On what date was James P. Buchanan (d)'s successor seated? | CREATE TABLE table_24501 ("District" text,"Vacator" text,"Reason for change" text,"Successor" text,"Date successor seated" text) | SELECT "Date successor seated" FROM table_24501 WHERE "Vacator" = 'James P. Buchanan (D)' |
Name the republican steve sauerberg where dates administered september 15-september 18, 2008 | CREATE TABLE table_16751596_2 (republican VARCHAR,dates_administered VARCHAR) | SELECT republican AS :_steve_sauerberg FROM table_16751596_2 WHERE dates_administered = "September 15-September 18, 2008" |
What year did Carolina Marin win the Women's singles? | CREATE TABLE table_80151 ("Year" text,"Men's singles" text,"Women's singles" text,"Men's doubles" text,"Women's doubles" text,"Mixed doubles" text) | SELECT "Year" FROM table_80151 WHERE "Women's singles" = 'carolina marin' |
how many members in total ? | CREATE TABLE table_204_659 (id number,"seat" text,"state" text,"majority" number,"member" text,"party" text) | SELECT COUNT("member") FROM table_204_659 |
Name the opponent with loss of sanderson (9-8) | CREATE TABLE table_name_80 (opponent VARCHAR,loss VARCHAR) | SELECT opponent FROM table_name_80 WHERE loss = "sanderson (9-8)" |
in how many games did one of the teams score below 100 points ? | CREATE TABLE table_204_941 (id number,"#" number,"date" text,"visitor" text,"score" text,"home" text,"record" text) | SELECT COUNT(*) FROM table_204_941 WHERE "score" < 100 OR "score" < 100 |
How many different items appear in the television column when the results where Iowa State 14, Minnesota 13? | CREATE TABLE table_26292 ("Bowl Game" text,"Date" text,"Stadium" text,"City" text,"Television" text,"Matchup/Results" text,"Attendance" real,"Payout (US$)" text) | SELECT COUNT("Television") FROM table_26292 WHERE "Matchup/Results" = 'Iowa State 14, Minnesota 13' |
what datasets do papers at ACL use most ? | CREATE TABLE writes (paperid int,authorid int)CREATE TABLE paperfield (fieldid int,paperid int)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE keyphrase (keyphraseid int,keyphrasename varchar)CREATE TABLE venue (venueid int,venuename varchar)CREATE TABLE author (authorid int,authorname varchar)CREA... | SELECT DISTINCT dataset.datasetid FROM dataset, paper, paperdataset, venue WHERE paperdataset.datasetid = dataset.datasetid AND paper.paperid = paperdataset.paperid AND venue.venueid = paper.venueid AND venue.venuename = 'ACL' |
Draw a bar chart about the distribution of Name and Weight , display Y in ascending order. | CREATE TABLE candidate (Candidate_ID int,People_ID int,Poll_Source text,Date text,Support_rate real,Consider_rate real,Oppose_rate real,Unsure_rate real)CREATE TABLE people (People_ID int,Sex text,Name text,Date_of_Birth text,Height real,Weight real) | SELECT Name, Weight FROM people ORDER BY Weight |
give me the number of hispanic or latino ethnic background patients who were hospitalized for more than 23 days. | 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 WHERE demographic.ethnicity = "HISPANIC OR LATINO" AND demographic.days_stay > "23" |
flights between MILWAUKEE and ORLANDO one way | CREATE TABLE food_service (meal_code text,meal_number int,compartment text,meal_description varchar)CREATE TABLE time_interval (period text,begin_time int,end_time int)CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,time_zone_code varchar)CREATE TABLE airport_service (city... | 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, fare, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ORLANDO' AND fare.round_trip_required = 'NO' AND flight_fare.fare_id =... |
Users previous names based on their edit history. | CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,RejectionDate time,OwnerUserId number,Comment text,Text text,Title text,Tags text,RevisionGUID other)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId nu... | SELECT UserId, UserDisplayName, COUNT(*) OVER (PARTITION BY UserId) AS No FROM (SELECT DISTINCT UserId, UserDisplayName FROM PostHistory WHERE NOT UserId IS NULL AND NOT UserDisplayName IS NULL) AS p ORDER BY No DESC, UserId |
what is maximum age of patients whose insurance is private and discharge location is disc-tran cancer/chldrn h? | CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag text,admission_location text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ... | SELECT MAX(demographic.age) FROM demographic WHERE demographic.insurance = "Private" AND demographic.discharge_location = "DISC-TRAN CANCER/CHLDRN H" |
What is the title of the episode no. 16 by season? | CREATE TABLE table_27250813_1 (title VARCHAR,no_in_season VARCHAR) | SELECT title FROM table_27250813_1 WHERE no_in_season = 16 |
Which building has more than 34 floors? | CREATE TABLE table_59947 ("Rank" text,"Name" text,"Height ft (m)" text,"Floors" real,"Year" real) | SELECT "Name" FROM table_59947 WHERE "Floors" > '34' |
When was Pablo And jar the opponent? | CREATE TABLE table_49245 ("Date" text,"Tournament" text,"Surface" text,"Opponent" text,"Score" text) | SELECT "Date" FROM table_49245 WHERE "Opponent" = 'pablo andújar' |
Year larger than 1975, and a Record of 13 11 is what playoffs? | CREATE TABLE table_67973 ("Year" real,"Record" text,"Regular Season Finish" text,"Playoffs" text,"Avg. Attendance" real) | SELECT "Playoffs" FROM table_67973 WHERE "Year" > '1975' AND "Record" = '13–11' |
pregnant female with pre _ eclampsia during current pregnancy. | CREATE TABLE table_train_253 ("id" int,"pregnancy_or_lactation" bool,"pre_eclampsia" bool,"acute_ischemia" bool,"pre_gestational_hypertension" bool,"diabetic" string,"smoking" bool,"coronary_artery_disease_cad" bool,"NOUSE" float) | SELECT * FROM table_train_253 WHERE pregnancy_or_lactation = 1 AND pre_eclampsia = 1 |
What is the sum of the years when the winner was prof. priyambada mohanty hejmadi from orissa? | CREATE TABLE table_44280 ("Year" real,"Name" text,"Field" text,"State" text,"Country" text) | SELECT SUM("Year") FROM table_44280 WHERE "State" = 'orissa' AND "Name" = 'prof. priyambada mohanty hejmadi' |
What region is the ALCA-272 Catalog? | CREATE TABLE table_71461 ("Region" text,"Date" text,"Label" text,"Format" text,"Catalog" text) | SELECT "Region" FROM table_71461 WHERE "Catalog" = 'alca-272' |
Scores vs Views (whole site). | CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE PostsWithDeleted (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,LastEditD... | SELECT Score, AVG(ViewCount) AS "average_views" FROM Posts GROUP BY Score ORDER BY Score DESC |
What is the maximum founded year of the Worcester Tornadoes? | CREATE TABLE table_24334261_1 (founded INTEGER,team VARCHAR) | SELECT MAX(founded) FROM table_24334261_1 WHERE team = "Worcester Tornadoes" |
what's the score with date oct 1 | CREATE TABLE table_11621915_1 (score VARCHAR,date VARCHAR) | SELECT score FROM table_11621915_1 WHERE date = "Oct 1" |
What position went lower than 106 from the College of Virginia? | CREATE TABLE table_70045 ("Round" real,"Pick #" real,"Overall" real,"Name" text,"Position" text,"College" text) | SELECT "Position" FROM table_70045 WHERE "Overall" < '106' AND "College" = 'virginia' |
What is the smallest height (ft) of a building in Frankfurt with a height (m) of 257 and less than 55 floors? | CREATE TABLE table_name_24 (height__ft_ INTEGER,floors VARCHAR,city VARCHAR,height__m_ VARCHAR) | SELECT MIN(height__ft_) FROM table_name_24 WHERE city = "frankfurt" AND height__m_ = 257 AND floors < 55 |
count the number of patients whose diagnoses short title is mv collision nos-driver? | 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 diagnoses.short_title = "Mv collision NOS-driver" |
What is the largest 1st prize( $ ) at the South Carolina location? | CREATE TABLE table_277 ("Date" text,"Tournament" text,"Location" text,"Purse($)" real,"Winner" text,"Score" text,"1st Prize($)" real) | SELECT MAX("1st Prize( $ )") FROM table_277 WHERE "Location" = 'South Carolina' |
Show me the correlation about how many distinct order ids correspond to each product? | CREATE TABLE Order_Items (order_item_id INTEGER,order_id INTEGER,product_id INTEGER,product_quantity VARCHAR(50),other_order_item_details VARCHAR(255))CREATE TABLE Invoices (invoice_number INTEGER,order_id INTEGER,invoice_date DATETIME)CREATE TABLE Orders (order_id INTEGER,customer_id INTEGER,date_order_placed DATETIME... | SELECT product_id, COUNT(DISTINCT order_id) FROM Order_Items |
what are the top five most frequent lab tests ordered for patients in the same hospital encounter after the diagnosis of cellulitis - extremity. | CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,observationtime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,orga... | SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'cellulitis - extr... |
what is procedure long title of subject name jane dillard? | 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 procedures.long_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Jane Dillard" |
Name the number of package options for music box italia | CREATE TABLE table_15887683_10 (package_option VARCHAR,television_service VARCHAR) | SELECT COUNT(package_option) FROM table_15887683_10 WHERE television_service = "Music Box Italia" |
What is the time/retired for damon hill? | CREATE TABLE table_58541 ("Driver" text,"Constructor" text,"Laps" real,"Time/Retired" text,"Grid" real) | SELECT "Time/Retired" FROM table_58541 WHERE "Driver" = 'damon hill' |
Name the district for tim lee hall | CREATE TABLE table_1341672_14 (district VARCHAR,incumbent VARCHAR) | SELECT district FROM table_1341672_14 WHERE incumbent = "Tim Lee Hall" |
What was the year of the World Half Marathon Championships with a result of 3rd? | CREATE TABLE table_65048 ("Year" real,"Tournament" text,"Venue" text,"Result" text,"Event" text) | SELECT "Year" FROM table_65048 WHERE "Tournament" = 'world half marathon championships' AND "Result" = '3rd' |
What is the diameter of the feature with longitude 8.0e? | CREATE TABLE table_21084 ("Name" text,"Latitude" text,"Longitude" text,"Diameter (km)" text,"Year named" real,"Name origin" text) | SELECT "Diameter (km)" FROM table_21084 WHERE "Longitude" = '8.0E' |
What was the loss of the game that had a record of 63-52? | CREATE TABLE table_name_7 (loss VARCHAR,record VARCHAR) | SELECT loss FROM table_name_7 WHERE record = "63-52" |
How many women doubles teams competed in the same year as when Jamie van Hooijdonk competed in men singles? | CREATE TABLE table_17553 ("Season" real,"Mens singles" text,"Womens singles" text,"Mens doubles" text,"Womens doubles" text,"Mixed doubles" text) | SELECT COUNT("Womens doubles") FROM table_17553 WHERE "Mens singles" = 'Jamie van Hooijdonk' |
During Spring semester what BA upper level classes are there ? | CREATE TABLE course_offering (offering_id int,course_id int,semester int,section_number int,start_time time,end_time time,monday varchar,tuesday varchar,wednesday varchar,thursday varchar,friday varchar,saturday varchar,sunday varchar,has_final_project varchar,has_final_exam varchar,textbook varchar,class_address varch... | 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.department = 'BA' AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'Spring' ... |
Which ordinary value has a Russian value of ? | CREATE TABLE table_37332 ("Unit" text,"Russian" text,"Translation" text,"Ratio" real,"Metric value" text,"Avoirdupois value" text,"Ordinary value" text) | SELECT "Ordinary value" FROM table_37332 WHERE "Russian" = 'унция' |
when patient 77053 received for the last time a procedure? | CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttim... | SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 77053) ORDER BY procedures_icd.charttime DESC LIMIT 1 |
Name all the tournaments that took place in Rhode Island. | CREATE TABLE table_16959 ("Date" text,"Tournament" text,"Location" text,"Purse($)" real,"Winner" text,"Score" text,"1st Prize($)" real) | SELECT "Tournament" FROM table_16959 WHERE "Location" = 'Rhode Island' |
Name the total number of cars for panther racing and grid of 9 | CREATE TABLE table_72876 ("Fin. Pos" real,"Car No." real,"Driver" text,"Team" text,"Laps" real,"Time/Retired" text,"Grid" real,"Laps Led" real,"Points" text) | SELECT COUNT("Car No.") FROM table_72876 WHERE "Team" = 'Panther Racing' AND "Grid" = '9' |
What was the highest amount of episodes for the season with 5.74 million viewers? | CREATE TABLE table_22837363_1 (episodes INTEGER,viewers__in_millions_ VARCHAR) | SELECT MAX(episodes) FROM table_22837363_1 WHERE viewers__in_millions_ = "5.74" |
What week was the tournament at Cincinnati? | CREATE TABLE table_name_57 (week VARCHAR,tournament VARCHAR) | SELECT week FROM table_name_57 WHERE tournament = "cincinnati" |
Who was the opponent on september 10, 1979? | CREATE TABLE table_name_28 (opponent VARCHAR,date VARCHAR) | SELECT opponent FROM table_name_28 WHERE date = "september 10, 1979" |
Who was the home team on February 18 that had a visitor of the Chicago Black Hawks? | CREATE TABLE table_name_56 (home VARCHAR,visitor VARCHAR,date VARCHAR) | SELECT home FROM table_name_56 WHERE visitor = "chicago black hawks" AND date = "february 18" |
What is the top round for the baltimore bullets with a Pick larger than 6? | CREATE TABLE table_name_46 (round INTEGER,team VARCHAR,pick VARCHAR) | SELECT MAX(round) FROM table_name_46 WHERE team = "baltimore bullets" AND pick > 6 |
Chukwubuikem Maduabuchi is what gender? | CREATE TABLE table_78041 ("Full Name" text,"Nickname" text,"Gender" text,"Weight at birth" text,"Meaning" text) | SELECT "Gender" FROM table_78041 WHERE "Full Name" = 'chukwubuikem maduabuchi' |
What is the number of career caps for a full back, when tour Apps is smaller than 29? | CREATE TABLE table_name_78 (career_caps VARCHAR,position VARCHAR,tour_apps VARCHAR) | SELECT COUNT(career_caps) FROM table_name_78 WHERE position = "full back" AND tour_apps < 29 |
What is the date amer sulaiman won? | CREATE TABLE table_name_50 (date VARCHAR,winner VARCHAR) | SELECT date FROM table_name_50 WHERE winner = "amer sulaiman" |
SO criteria population - review adjustments. | CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE T... | SELECT * FROM Users |
how many times does philanthropist appear in the position column on this chart ? | CREATE TABLE table_203_509 (id number,"year" number,"laetare medalist" text,"position" text) | SELECT COUNT(*) FROM table_203_509 WHERE "position" = 'philanthropist' |
What date was week 2? | CREATE TABLE table_14971788_1 (date VARCHAR,week VARCHAR) | SELECT date FROM table_14971788_1 WHERE week = 2 |
THe audio book with ISBN 978-1-4084-6879-1 is read by whom? | CREATE TABLE table_2950964_5 (read_by VARCHAR,isbn VARCHAR) | SELECT read_by FROM table_2950964_5 WHERE isbn = "isbn 978-1-4084-6879-1" |
What is the highest Psychological Dependence, when Pleasure is less than 2.3, when Drug is 'Cannabis', and when Physical Dependence is less than 0.8? | CREATE TABLE table_name_55 (psychological_dependence INTEGER,physical_dependence VARCHAR,pleasure VARCHAR,drug VARCHAR) | SELECT MAX(psychological_dependence) FROM table_name_55 WHERE pleasure < 2.3 AND drug = "cannabis" AND physical_dependence < 0.8 |
What are the assets for company who's headquarters are located in Brazil? | CREATE TABLE table_1545 ("Rank" real,"Company" text,"Headquarters" text,"Industry" text,"Sales (billion $)" text,"Profits (billion $)" text,"Assets (billion $)" text,"Market Value (billion $)" text) | SELECT "Assets (billion $)" FROM table_1545 WHERE "Headquarters" = 'Brazil' |
count the number of patients whose diagnoses long title is morbid obesity and lab test category is chemistry? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,la... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Morbid obesity" AND lab."CATEGORY" = "Chemistry" |
Who played in the semi finals matches at the Buick WCT finals? | CREATE TABLE table_26614 ("Date Final" text,"Tournament" text,"Commercial Name" text,"Category" text,"Prize Money/ Surface" text,"Final Match" text,"Semifinal Matches" text) | SELECT "Semifinal Matches" FROM table_26614 WHERE "Commercial Name" = 'Buick WCT Finals' |
Time Series of R highest rated questions. | CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE Tags (Id number,TagName text,Count number,ExcerptPostId number,WikiPostId number)CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number... | SELECT Id, Title, Score, creation_year, creation_month FROM (SELECT p.Id, p.Title, p.Score, YEAR(p.CreationDate) AS creation_year, MONTH(p.CreationDate) AS creation_month, RANK() OVER (PARTITION BY YEAR(p.CreationDate), MONTH(p.CreationDate) ORDER BY p.Score DESC) AS rnk FROM Posts AS p JOIN PostTags AS pt ON pt.PostId... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.