instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
Who is the captain of the team in Southampton? | CREATE TABLE table_18461635_1 (captain VARCHAR,location VARCHAR) | SELECT captain FROM table_18461635_1 WHERE location = "Southampton" |
Who was the director of the episode originally aired on 26 October 1969? | CREATE TABLE table_19324 ("Episode no." real,"Title" text,"Director" text,"Writer(s)" text,"Original Air Date (ATV)" text,"Production no." real) | SELECT "Director" FROM table_19324 WHERE "Original Air Date (ATV)" = '26 October 1969' |
What is the low lap total for henri pescarolo with a grad larger than 6? | CREATE TABLE table_name_20 (laps INTEGER,grid VARCHAR,driver VARCHAR) | SELECT MIN(laps) FROM table_name_20 WHERE grid > 6 AND driver = "henri pescarolo" |
What was the final score of the game with gerald wallace (14) as the High Rebound? | CREATE TABLE table_21197 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Record" FROM table_21197 WHERE "High rebounds" = 'Gerald Wallace (14)' |
Is DANCE 335 a hard course ? | CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE course (course_id int,name varchar,department varchar,number varchar,credits varchar,advisory_requirement varchar,enforced_requirement varchar,description varchar,num_semesters int,num_enrolled int,has_d... | SELECT COUNT(*) > 0, program_course.workload FROM course, program_course WHERE course.department = 'DANCE' AND course.number = 335 AND program_course.course_id = course.course_id AND program_course.workload > 3 |
What is the weight is the name is Stuart Craig? | CREATE TABLE table_24924 ("Name" text,"Position" text,"Height" text,"Weight" text,"Date of Birth" text,"Home Team" text) | SELECT "Weight" FROM table_24924 WHERE "Name" = 'Stuart Craig' |
For those records from the products and each product's manufacturer, give me the comparison about the average of code over the name , and group by attribute name, I want to sort by the the average of code in desc. | 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 T1.Name ORDER BY T1.Code DESC |
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, a bar chart shows the distribution of hire_date and the average of department_id bin hire_date by weekday. | 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 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),... | SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 |
WHAT IS THE RESULT WITH A FILM TITLE FIREDANCER? | CREATE TABLE table_name_3 (result VARCHAR,film_title_used_in_nomination VARCHAR) | SELECT result FROM table_name_3 WHERE film_title_used_in_nomination = "firedancer" |
what is minimum age of patients whose language is russ and primary disease is st elevated myocardial infarction\cardiac cath? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marita... | SELECT MIN(demographic.age) FROM demographic WHERE demographic.language = "RUSS" AND demographic.diagnosis = "ST ELEVATED MYOCARDIAL INFARCTION\CARDIAC CATH" |
Does Detroit have a soccer team? | CREATE TABLE table_44557 ("School" text,"Bask" text,"Golf" text,"Soccer" text,"Soft" text,"Swimming" text,"Tennis" text,"Indoor track" text,"Volleyball" text) | SELECT "Soccer" FROM table_44557 WHERE "School" = 'detroit' |
What is the Name of the Multiple Type museum in Anchorage? | CREATE TABLE table_name_54 (name VARCHAR,town_city VARCHAR,type VARCHAR) | SELECT name FROM table_name_54 WHERE town_city = "anchorage" AND type = "multiple" |
how many goals did ismail isa score this season ? | CREATE TABLE table_204_784 (id number,"player" text,"league" number,"cup" number,"europa league" number,"total" number) | SELECT "total" FROM table_204_784 WHERE "player" = 'ismail isa' |
What character does Italian voice actor Emanuela Damasio play? | CREATE TABLE table_5918 ("Character" text,"French voice actor" text,"Italian voice actor" text,"German voice actor" text,"Spanish voice actor" text) | SELECT "Character" FROM table_5918 WHERE "Italian voice actor" = 'emanuela damasio' |
since 102 months ago patient 016-17669's heartrate was less than 116.0? | CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE diagnosis (diagnosi... | SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-17669')) AND vitalperiodic.heartrate < 116.0 AND NOT vitalperiod... |
until 2 years ago, what were the top five most frequent specimen tests ordered for patients during the same month after they were diagnosed with angio stm/dudn w hmrhg? | CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE patients (row_id number,subject_id number,gender tex... | SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, 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_... |
when's the last time that patient 010-17950 had a vasopressors - vasopressin in the last hospital visit? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicm... | SELECT treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-17950' AND NOT patient.hospitaldischargetime IS NULL ORDER BY... |
How many tries against for the team with 67 tries for? | CREATE TABLE table_59235 ("Club" text,"Played" text,"Drawn" text,"Lost" text,"Points for" text,"Points against" text,"Tries for" text,"Tries against" text,"Try bonus" text) | SELECT "Tries against" FROM table_59235 WHERE "Tries for" = '67' |
What is the Company Name, when the Accreditation Level is Joyn Hot Fixes, and when the Accreditation Status is Approved (Awarded 17.05.13)? | CREATE TABLE table_name_13 (company_name VARCHAR,accreditation_level VARCHAR,accreditation_status VARCHAR) | SELECT company_name FROM table_name_13 WHERE accreditation_level = "joyn hot fixes" AND accreditation_status = "approved (awarded 17.05.13)" |
What is Country of Origin, when Year of Intro is greater than 1985, and when Primary Cartridge is 125mm? | CREATE TABLE table_name_27 (country_of_origin VARCHAR,year_of_intro VARCHAR,primary_cartridge VARCHAR) | SELECT country_of_origin FROM table_name_27 WHERE year_of_intro > 1985 AND primary_cartridge = "125mm" |
let me know the location of admission and gender of patient jane dillard. | 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 demographic (subject_id text,hadm_id t... | SELECT demographic.gender, demographic.admission_location FROM demographic WHERE demographic.name = "Jane Dillard" |
what is the date above 19 october 2013 ? | CREATE TABLE table_204_130 (id number,"#" number,"date" text,"venue" text,"opponent" text,"score" text,"result" text,"competition" text) | SELECT "date" FROM table_204_130 WHERE id = (SELECT id FROM table_204_130 WHERE "date" = '19 october 2013') - 1 |
Name the number of regular season for 2007 | CREATE TABLE table_2361788_1 (regular_season VARCHAR,year VARCHAR) | SELECT COUNT(regular_season) FROM table_2361788_1 WHERE year = 2007 |
What is the average rank of the record on 2007-06-21 with a mark less than 91.29? | CREATE TABLE table_name_31 (rank INTEGER,date VARCHAR,mark VARCHAR) | SELECT AVG(rank) FROM table_name_31 WHERE date = "2007-06-21" AND mark < 91.29 |
If a radius is 10, what is the lowest possible mass? | CREATE TABLE table_10432351_1 (mass__m___ INTEGER,radius__r___ VARCHAR) | SELECT MIN(mass__m___) FROM table_10432351_1 WHERE radius__r___ = 10 |
among the patients diagnosed with accident in home, calculate the five year survival probability. | CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE d_icd_procedures (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 ... | SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t2.charttime) > 5 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id... |
Which 2006 has a 2007 of A? | CREATE TABLE table_33984 ("Tournament" text,"2006" text,"2007" text,"2008-12" text,"2013" text) | SELECT "2006" FROM table_33984 WHERE "2007" = 'a' |
what was the cost to patient 011-31229's hospital stay? | CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE lab (labid number,patientunitstayid num... | SELECT SUM(cost.cost) FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-31229') |
Average reputation per post by user. | 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 Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE Rev... | SELECT Users.AccountId AS Id, Users.Reputation AS rep, COUNT(Posts.Id) AS Answers, CAST(AVG(CAST(Score AS FLOAT)) AS FLOAT(6, 2)) AS "average_answer_score" FROM Posts INNER JOIN Users ON Users.Id = OwnerUserId GROUP BY Users.AccountId, Users.Reputation ORDER BY 'reputation' DESC LIMIT 38000 |
count the number of people who had been admitted until 1 year ago to hospital. | CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx text,dose_unit_rx text,route text)CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careunit text,last_careunit text,first_wardid number,last_wardid nu... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE DATETIME(admissions.admittime) <= DATETIME(CURRENT_TIME(), '-1 year') |
who was the last pick in round four ? | CREATE TABLE table_203_676 (id number,"pick #" number,"cfl team" text,"player" text,"position" text,"college" text) | SELECT "player" FROM table_203_676 ORDER BY "pick #" DESC LIMIT 1 |
What is off-topic in aviation?. | CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,LinkTypeId number)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 Tags (Id num... | SELECT q.Id AS Id, q.Score AS Score, q.Id AS "post_link" FROM Posts AS q INNER JOIN PostHistory AS h ON q.Id = h.PostId WHERE h.PostHistoryTypeId = 10 AND h.Comment = '102' AND NOT q.ClosedDate IS NULL ORDER BY q.ViewCount DESC |
Name the winner for date of nov 5, 1987 | CREATE TABLE table_20457 ("S No" real,"Team (A)" text,"Team (B)" text,"Winner" text,"Margin" text,"Match Date" text) | SELECT "Winner" FROM table_20457 WHERE "Match Date" = 'Nov 5, 1987' |
What team has an against more than 8, lost of 7, and the position is 5? | CREATE TABLE table_75775 ("Position" real,"Team" text,"Points" real,"Played" real,"Drawn" real,"Lost" real,"Against" real,"Difference" text) | SELECT "Team" FROM table_75775 WHERE "Against" > '8' AND "Lost" = '7' AND "Position" = '5' |
Who has a grid smaller than 24, less than 61 laps, and a ferrari constructor? | CREATE TABLE table_name_74 (driver VARCHAR,constructor VARCHAR,grid VARCHAR,laps VARCHAR) | SELECT driver FROM table_name_74 WHERE grid < 24 AND laps < 61 AND constructor = "ferrari" |
What is the total attendance for Candlestick Park? | CREATE TABLE table_8660 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Game site" text,"Record" text,"Attendance" real) | SELECT COUNT("Attendance") FROM table_8660 WHERE "Game site" = 'candlestick park' |
For those records from the products and each product's manufacturer, a bar chart shows the distribution of name and the sum of code , and group by attribute name, rank bars in descending order. | 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 T1.Name ORDER BY T1.Name DESC |
what is the number of patients whose age is less than 48 and item id is 51438? | 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.age < "48" AND lab.itemid = "51438" |
Who is born on 1982-01-29? | CREATE TABLE table_60243 ("Name" text,"Pos." text,"Height" text,"Weight" text,"Date of Birth" text,"Club" text) | SELECT "Name" FROM table_60243 WHERE "Date of Birth" = '1982-01-29' |
What was the date of the tournament held in Indonesia? | CREATE TABLE table_name_23 (date VARCHAR,country VARCHAR) | SELECT date FROM table_name_23 WHERE country = "indonesia" |
Which candidates were in the election where Frank W. Boykin was an incumbent? | CREATE TABLE table_18468 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT "Candidates" FROM table_18468 WHERE "Incumbent" = 'Frank W. Boykin' |
What is the sum of the positions for the player who had less than 25 losses, a goal difference of +20, 10 draws, and played less than 42? | CREATE TABLE table_name_36 (position INTEGER,played VARCHAR,goal_difference VARCHAR,drawn VARCHAR,lost VARCHAR) | SELECT SUM(position) FROM table_name_36 WHERE drawn = 10 AND lost < 25 AND goal_difference = "+20" AND played < 42 |
How many losses are there with 5 goal differences, drew more than 10 times, and 43 goals against? | CREATE TABLE table_71293 ("Position" real,"Club" text,"Played" real,"Points" text,"Wins" real,"Draws" real,"Losses" real,"Goals for" real,"Goals against" real,"Goal Difference" real) | SELECT COUNT("Losses") FROM table_71293 WHERE "Goal Difference" = '5' AND "Draws" > '10' AND "Goals against" = '43' |
What is the Status when Henry I is the Monarch and the Reason is succession unclear 1100-1103? | CREATE TABLE table_58174 ("Heir" text,"Status" text,"Relationship to Monarch" text,"Became heir" text,"Reason" text,"Ceased to be heir" text,"Monarch" text) | SELECT "Status" FROM table_58174 WHERE "Monarch" = 'henry i' AND "Reason" = 'succession unclear 1100-1103' |
What is the total Until when the Titles was 5? | CREATE TABLE table_name_80 (until INTEGER,titles VARCHAR) | SELECT SUM(until) FROM table_name_80 WHERE titles = "5" |
when was the last time on 08/29/last year that patient 2498 had the maximum temperature c (calc) for? | CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)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 t... | SELECT chartevents.charttime 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 = 2498)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'temperatu... |
College of boston college has what pick? | CREATE TABLE table_name_61 (pick VARCHAR,college VARCHAR) | SELECT pick FROM table_name_61 WHERE college = "boston college" |
The record of 7-3 had the largest attendance of what? | CREATE TABLE table_16064 ("Game" real,"Date" text,"Opponent" text,"Result" text,"Vikings points" real,"Opponents" real,"Record" text,"Attendance" real) | SELECT MAX("Attendance") FROM table_16064 WHERE "Record" = '7-3' |
What player placed t6 for the United States with a score of 67-69=136? | CREATE TABLE table_name_71 (player VARCHAR,country VARCHAR,place VARCHAR,score VARCHAR) | SELECT player FROM table_name_71 WHERE country = "united states" AND place = "t6" AND score = 67 - 69 = 136 |
What is the date made that has an associated fleet number of 4? | CREATE TABLE table_67781 ("Type" text,"Fleet numbers" text,"Quantity made" real,"Manufacturer" text,"Date made" text,"Date withdrawn" text) | SELECT "Date made" FROM table_67781 WHERE "Fleet numbers" = '4' |
How many Latin Americans were there in 2001 in the province with 0.0% 2001 and 0.2% 2011? | CREATE TABLE table_1939405_2 (latin_americans_2001 INTEGER,_percentage_2001 VARCHAR,_percentage_2011 VARCHAR) | SELECT MAX(latin_americans_2001) FROM table_1939405_2 WHERE _percentage_2001 = "0.0%" AND _percentage_2011 = "0.2%" |
What branch was involved when the term began in January 3, 1985? | CREATE TABLE table_197446_1 (branch VARCHAR,term_began VARCHAR) | SELECT branch FROM table_197446_1 WHERE term_began = "January 3, 1985" |
I need to prep for DUTCH 339 , can I take a course to help me ? | CREATE TABLE course_tags_count (course_id int,clear_grading int,pop_quiz int,group_projects int,inspirational int,long_lectures int,extra_credit int,few_tests int,good_feedback int,tough_tests int,heavy_papers int,cares_for_students int,heavy_assignments int,respected int,participation int,heavy_reading int,tough_grade... | SELECT DISTINCT advisory_requirement FROM course WHERE department = 'DUTCH' AND number = 339 |
What is the total time that it took for the driver to finish 14 laps? | CREATE TABLE table_name_52 (time VARCHAR,laps VARCHAR) | SELECT time FROM table_name_52 WHERE laps = 14 |
What results in 2012 also has 2013 results of 2r and the tournament was Wimbledon? | CREATE TABLE table_41425 ("Tournament" text,"2003" text,"2004" text,"2012" text,"2013" text) | SELECT "2012" FROM table_41425 WHERE "2013" = '2r' AND "Tournament" = 'wimbledon' |
What was the score on April 6, 2008? | CREATE TABLE table_name_12 (score VARCHAR,date VARCHAR) | SELECT score FROM table_name_12 WHERE date = "april 6, 2008" |
What is the completion schedule for himachal pradesh state with a total capacity (MW) of 800? | CREATE TABLE table_61443 ("S.no." real,"Power Plant" text,"State" text,"Total Capacity (MW)" real,"Completion Schedule" text) | SELECT "Completion Schedule" FROM table_61443 WHERE "State" = 'himachal pradesh' AND "Total Capacity (MW)" = '800' |
Tell me the nationality for rudolf vercik | CREATE TABLE table_name_51 (nationality VARCHAR,player VARCHAR) | SELECT nationality FROM table_name_51 WHERE player = "rudolf vercik" |
What age group has a time of 6:37.73 at the 200m breaststroke? | CREATE TABLE table_32538 ("Pool" text,"Age Group" text,"Time" text,"Event" text,"Date" text) | SELECT "Age Group" FROM table_32538 WHERE "Event" = '200m breaststroke' AND "Time" = '6:37.73' |
Which Nationality has a Round of 4? | CREATE TABLE table_name_17 (nationality VARCHAR,round VARCHAR) | SELECT nationality FROM table_name_17 WHERE round = 4 |
What is the 1981 value at the Tournament of Wimbledon? | CREATE TABLE table_55045 ("Tournament" text,"1980" text,"1981" text,"1982" text,"1983" text,"1984" text,"1985" text,"1986" text,"1987" text,"1988" text,"1989" text,"1990" text,"1991" text,"1992" text,"1993" text,"1994" text,"1995" text,"1996" text) | SELECT "1981" FROM table_55045 WHERE "Tournament" = 'wimbledon' |
What company constructed the vehicle in the location not held in 1933? | CREATE TABLE table_name_99 (constructor VARCHAR,location VARCHAR,year VARCHAR) | SELECT constructor FROM table_name_99 WHERE location = "not held" AND year = "1933" |
WHAT IS THE APPOINTMENT DATE FOR AC HORSENS? | CREATE TABLE table_name_33 (date_of_appointment VARCHAR,team VARCHAR) | SELECT date_of_appointment FROM table_name_33 WHERE team = "ac horsens" |
what is the number of patients whose days of hospital stay is greater than 16 and item id is 50976? | 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.days_stay > "16" AND lab.itemid = "50976" |
What is the average Game, when Date is 'December 23'? | CREATE TABLE table_name_58 (game INTEGER,date VARCHAR) | SELECT AVG(game) FROM table_name_58 WHERE date = "december 23" |
What is the fewest number of top-25s for events with more than 0 wins? | CREATE TABLE table_name_17 (top_25 INTEGER,wins INTEGER) | SELECT MIN(top_25) FROM table_name_17 WHERE wins > 0 |
Show the number of products with price higher than 1000 or lower than 500 for each product name in a bar chart. | CREATE TABLE Products (product_id INTEGER,product_type_code VARCHAR(15),product_name VARCHAR(80),product_price DOUBLE)CREATE TABLE Customer_Address_History (customer_id INTEGER,address_id INTEGER,date_from DATETIME,date_to DATETIME)CREATE TABLE Customers (customer_id INTEGER,payment_method_code VARCHAR(15),customer_num... | SELECT product_name, COUNT(product_name) FROM Products WHERE product_price > 1000 OR product_price < 500 GROUP BY product_name |
What was the highest score for round 2? | CREATE TABLE table_21098 ("Rank" real,"Team" text,"Round1" real,"Round2" real,"Round3" real,"Round4" real,"Round5" real,"Total Points" real) | SELECT MAX("Round2") FROM table_21098 |
after the 1990/91 season , which place was earned in the next season ? | CREATE TABLE table_204_79 (id number,"season" text,"tier" number,"division" text,"place" text) | SELECT "place" FROM table_204_79 WHERE "season" > '1990/91' ORDER BY "season" LIMIT 1 |
What were the ratings for host Chris Economaki who had 12.3 million viewers? | CREATE TABLE table_52445 ("Year" real,"Network" text,"Lap-by-lap" text,"Color commentator(s)" text,"Pit reporters" text,"Host" text,"Ratings" text,"Viewers" text) | SELECT "Ratings" FROM table_52445 WHERE "Host" = 'chris economaki' AND "Viewers" = '12.3 million' |
In what week was the attendance 25,000? | CREATE TABLE table_34096 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Game site" text,"Record" text,"Attendance" text) | SELECT "Week" FROM table_34096 WHERE "Attendance" = '25,000' |
Which Points is the lowest one that has Touchdowns smaller than 1? | CREATE TABLE table_name_51 (points INTEGER,touchdowns INTEGER) | SELECT MAX(points) FROM table_name_51 WHERE touchdowns < 1 |
Date of december 29 has what visitor? | CREATE TABLE table_name_9 (visitor VARCHAR,date VARCHAR) | SELECT visitor FROM table_name_9 WHERE date = "december 29" |
How many points did the away team score at Arden Street Oval? | CREATE TABLE table_name_59 (away_team VARCHAR,venue VARCHAR) | SELECT away_team AS score FROM table_name_59 WHERE venue = "arden street oval" |
Get me the number of patients with a primary disease of hyperglycemia who died in or before 2164. | 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.diagnosis = "HYPERGLYCEMIA" AND demographic.dod_year <= "2164.0" |
Who was Director John Ramster's Composer? | CREATE TABLE table_7034 ("Year" real,"Production" text,"Composer" text,"Conductor" text,"Director" text) | SELECT "Composer" FROM table_7034 WHERE "Director" = 'john ramster' |
WHTA IS THE SNATCH WITH A TOTAL OF LARGER THAN 318 KG AND BODY WEIGHT OF 84.15? | CREATE TABLE table_name_19 (snatch INTEGER,total__kg_ VARCHAR,bodyweight VARCHAR) | SELECT AVG(snatch) FROM table_name_19 WHERE total__kg_ > 318 AND bodyweight = 84.15 |
Successes smaller than 6, and Launches larger than 1, and a Failures of 2 is what sum of the partial failures? | CREATE TABLE table_name_35 (partial_failures INTEGER,failures VARCHAR,successes VARCHAR,launches VARCHAR) | SELECT SUM(partial_failures) FROM table_name_35 WHERE successes < 6 AND launches > 1 AND failures = 2 |
Which Democrat was selected in the poll with a sample size smaller than 516 where the Republican chosen was Ron Paul? | CREATE TABLE table_76528 ("Poll Source" text,"Sample Size" real,"Margin of Error" real,"Date" text,"Democrat" text,"Republican" text) | SELECT "Democrat" FROM table_76528 WHERE "Sample Size" < '516' AND "Republican" = 'ron paul' |
Where did the player who won in 1965 finish? | CREATE TABLE table_name_92 (finish VARCHAR,year_s__won VARCHAR) | SELECT finish FROM table_name_92 WHERE year_s__won = "1965" |
What was the score of the game when the record was 50-85? | CREATE TABLE table_name_73 (score VARCHAR,record VARCHAR) | SELECT score FROM table_name_73 WHERE record = "50-85" |
What is the Name for 1997 99? | CREATE TABLE table_name_76 (name VARCHAR,year VARCHAR) | SELECT name FROM table_name_76 WHERE year = "1997–99" |
what are the new prescriptions of patient 25733 today compared to the ones yesterday? | CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)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)CREA... | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25733) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT prescriptions.drug FROM prescriptions WHERE... |
search deleted questions in terms of their tagname/title. | CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,RejectionDate time,OwnerUserId number,Comment text,Text text,Title text,Tags text,R... | SELECT Id, url = 'site://q/' + CAST(Id AS TEXT), CreationDate, DeletionDate, Score, Tags FROM Posts WHERE (PostTypeId = 1) AND (Tags LIKE '%<##Tagname##>%' OR Title LIKE '%<##Title##>%') AND (NOT DeletionDate IS NULL) ORDER BY DeletionDate DESC LIMIT 100 |
Which Grid has a Driver of johnny dumfries? | CREATE TABLE table_name_85 (grid VARCHAR,driver VARCHAR) | SELECT grid FROM table_name_85 WHERE driver = "johnny dumfries" |
what is the only department witj 5 total deputies | CREATE TABLE table_204_246 (id number,"department" text,"total deputies" number,"uninominal deputies" number,"plurinominal deputies" number,"special indigenous\nor campesino deputies" number,"senators" number) | SELECT "department" FROM table_204_246 WHERE "total deputies" = 5 |
What date was the venue at VFL park? | CREATE TABLE table_58525 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Date" FROM table_58525 WHERE "Venue" = 'vfl park' |
what is the first athlete in teh 100m event ? | CREATE TABLE table_204_550 (id number,"event" text,"record" text,"athlete" text,"date" text,"meet" text,"place" text) | SELECT "athlete" FROM table_204_550 WHERE "event" = '100 m' ORDER BY "date" LIMIT 1 |
Give me a histogram for how many engineers did each staff contact? List both the contact staff name and number of engineers contacted, list by the total number in descending. | CREATE TABLE Staff (staff_id INTEGER,staff_name VARCHAR(255),gender VARCHAR(1),other_staff_details VARCHAR(255))CREATE TABLE Part_Faults (part_fault_id INTEGER,part_id INTEGER,fault_short_name VARCHAR(20),fault_description VARCHAR(255),other_fault_details VARCHAR(255))CREATE TABLE Maintenance_Contracts (maintenance_con... | SELECT staff_name, COUNT(*) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id GROUP BY T1.staff_name ORDER BY COUNT(*) DESC |
Return a bar chart about the distribution of name and meter_100 , and list in asc by the total number. | CREATE TABLE swimmer (ID int,name text,Nationality text,meter_100 real,meter_200 text,meter_300 text,meter_400 text,meter_500 text,meter_600 text,meter_700 text,Time text)CREATE TABLE event (ID int,Name text,Stadium_ID int,Year text)CREATE TABLE stadium (ID int,name text,Capacity int,City text,Country text,Opening_year... | SELECT name, meter_100 FROM swimmer ORDER BY meter_100 |
calculate the number of patients admitted to emergency who had thoracentesis. | CREATE TABLE diagnoses (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,marital... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.long_title = "Thoracentesis" |
What was the round when nueza silva played against greece? | CREATE TABLE table_name_31 (round VARCHAR,against VARCHAR) | SELECT round FROM table_name_31 WHERE against = "greece" |
What is the Hanja for McCune-Reischauer of ch n? | CREATE TABLE table_name_56 (hanja VARCHAR,mccune_reischauer VARCHAR) | SELECT hanja FROM table_name_56 WHERE mccune_reischauer = "chŏn" |
how many patients whose year of death is less than or equal to 2165 and drug name is levofloxacin? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2165.0" AND prescriptions.drug = "Levofloxacin" |
What is the High points with a Team with boston? | CREATE TABLE table_name_95 (high_points VARCHAR,team VARCHAR) | SELECT high_points FROM table_name_95 WHERE team = "boston" |
Count of questions with serverless tag over time. | CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)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 T... | SELECT DATEADD(week, DATEDIFF(day, '20000109', CreationDate) / 7, '20000109') AS "week", COUNT(DISTINCT Posts.Id) AS Posts, SUM(Posts.AnswerCount) AS Answers, SUM(Posts.CommentCount) AS Comments FROM Posts INNER JOIN PostTags ON PostTags.PostId = Posts.Id INNER JOIN Tags ON PostTags.TagId = Tags.Id WHERE Tags.TagName L... |
Who directed episode 11 of the season? | CREATE TABLE table_28785738_1 (director VARCHAR,no_in_season VARCHAR) | SELECT director FROM table_28785738_1 WHERE no_in_season = 11 |
what's the result with incumbent being william h. ayres | CREATE TABLE table_1342013_34 (result VARCHAR,incumbent VARCHAR) | SELECT result FROM table_1342013_34 WHERE incumbent = "William H. Ayres" |
total the number of drugs patient 032-3281 has been prescribed so far during their last hospital encounter. | 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 COUNT(*) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '032-3281' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospi... |
What is the label from 1973 that has a catalog number of l 35023? | CREATE TABLE table_name_98 (label VARCHAR,date VARCHAR,catalog VARCHAR) | SELECT label FROM table_name_98 WHERE date = "1973" AND catalog = "l 35023" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.