table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
⌀
CREATE TABLE table_name_38 ( attendance VARCHAR, record VARCHAR )
How many people attended when the record was broken with 47 63?
SELECT attendance FROM table_name_38 WHERE record = "47–63"
CREATE TABLE table_16918 ( "Institution" text, "Nickname" text, "Status" text, "Founded" real, "Color" text, "Location" text )
What was the number of location of nickname cbsua formerly known cssac?
SELECT COUNT("Location") FROM table_16918 WHERE "Nickname" = 'CBSUA formerly known CSSAC'
CREATE TABLE table_74687 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What was the venue when the away team scored 14.9 (93)?
SELECT "Venue" FROM table_74687 WHERE "Away team score" = '14.9 (93)'
CREATE TABLE table_2877 ( "#" real, "Title" text, "Director" text, "Writer(s)" text, "Original air date" text, "Production Code" text, "U.S. viewers (millions)" text )
What's the number of the episode directed by Whitney Ransick?
SELECT "#" FROM table_2877 WHERE "Director" = 'Whitney Ransick'
CREATE TABLE table_name_34 ( pick__number VARCHAR, college VARCHAR )
How many picks were from Lamar College?
SELECT COUNT(pick__number) FROM table_name_34 WHERE college = "lamar"
CREATE TABLE table_47649 ( "Year" real, "Publication" text, "Country" text, "Accolade" text, "Rank" real )
What's the average year with a rank less than 3?
SELECT AVG("Year") FROM table_47649 WHERE "Rank" < '3'
CREATE TABLE table_50420 ( "Rank" real, "Title" text, "Studio" text, "Director" text, "Gross" text )
WHAT IS THE TITLE THAT HAS A RANK BIGGER THAN 10, FOR DIRECTOR WALTER HILL?
SELECT "Title" FROM table_50420 WHERE "Rank" > '10' AND "Director" = 'walter hill'
CREATE TABLE table_name_50 ( game_site VARCHAR, result VARCHAR )
What game site has w 10-3 as the result?
SELECT game_site FROM table_name_50 WHERE result = "w 10-3"
CREATE TABLE submission ( Submission_ID int, Scores real, Author text, College text ) CREATE TABLE Acceptance ( Submission_ID int, Workshop_ID int, Result text ) CREATE TABLE workshop ( Workshop_ID int, Date text, Venue text, Name text )
How many workshops did each author submit to? Return the author name and the number of workshops in a bar chart, could you order names in desc order?
SELECT Author, COUNT(DISTINCT T1.Workshop_ID) FROM Acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY Author DESC
CREATE TABLE table_19901_1 ( trigger_pack VARCHAR, rear_sight_type VARCHAR, colt_model_no VARCHAR )
What is the trigger pack on the Colt 602 with the a1 rear sight type?
SELECT trigger_pack FROM table_19901_1 WHERE rear_sight_type = "A1" AND colt_model_no = "602"
CREATE TABLE table_72484 ( "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 )
what's the won with points against being 597
SELECT "Won" FROM table_72484 WHERE "Points against" = '597'
CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE procedures_icd ( ...
how many times patient 28910 has come to the hospital since 2104?
SELECT COUNT(DISTINCT admissions.hadm_id) FROM admissions WHERE admissions.subject_id = 28910 AND STRFTIME('%y', admissions.admittime) >= '2104'
CREATE TABLE table_15200 ( "Tournament" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text )
Name the 2008 for 2012 being a and tournament of australian open
SELECT "2008" FROM table_15200 WHERE "2012" = 'a' AND "Tournament" = 'australian open'
CREATE TABLE table_name_96 ( spacecraft VARCHAR, start_date_time VARCHAR )
The EVA that started 8 July 12:38 was from what spacecraft?
SELECT spacecraft FROM table_name_96 WHERE start_date_time = "8 july 12:38"
CREATE TABLE table_name_6 ( competition VARCHAR, year VARCHAR, venue VARCHAR )
What competition did he compete in before 2007 in gothenburg, sweden?
SELECT competition FROM table_name_6 WHERE year < 2007 AND venue = "gothenburg, sweden"
CREATE TABLE table_name_52 ( time VARCHAR, rank VARCHAR, lane VARCHAR, nationality VARCHAR )
What is the total time of the athlete from Canada with a lane less than 8 and a rank less than 8?
SELECT COUNT(time) FROM table_name_52 WHERE lane < 8 AND nationality = "canada" AND rank < 8
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 t...
count the number of patients whose ethnicity is white and year of birth is less than 2064?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "WHITE" AND demographic.dob_year < "2064"
CREATE TABLE table_9723 ( "Year" real, "Miss Earth Venezuela" text, "1st Runner Up" text, "2nd Runner Up" text, "3rd Runner Up" text, "4th Runner Up" text )
who is the 1st runner-up when the miss earth Venezuela is mar a daniela torrealba?
SELECT "1st Runner Up" FROM table_9723 WHERE "Miss Earth Venezuela" = 'maría daniela torrealba'
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 t...
how many patients marital status is divorced and tested with folate in lab?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "DIVORCED" AND lab.label = "Folate"
CREATE TABLE table_48726 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
What was the week number when a game was played on November 19, 1967?
SELECT MIN("Week") FROM table_48726 WHERE "Date" = 'november 19, 1967'
CREATE TABLE table_17011 ( "Institution" text, "Location" text, "Founded" real, "Type" text, "Enrollment" real, "Nickname" text, "Joined" real, "Left" real, "Current Conference" text )
What is the nickname of the school with an enrollment of 2386?
SELECT "Nickname" FROM table_17011 WHERE "Enrollment" = '2386'
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 job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), ...
For all employees who have the letters D or S in their first name, give me the comparison about the sum of department_id over the job_id , and group by attribute job_id, could you rank bars in asc order?
SELECT JOB_ID, SUM(DEPARTMENT_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY JOB_ID
CREATE TABLE table_name_82 ( kickoff_time VARCHAR, date VARCHAR )
What was the kickoff time for the December 14, 2003 game?
SELECT kickoff_time FROM table_name_82 WHERE date = "december 14, 2003"
CREATE TABLE table_name_33 ( score VARCHAR, player VARCHAR )
Name the Score of craig stadler?
SELECT score FROM table_name_33 WHERE player = "craig stadler"
CREATE TABLE wine ( No INTEGER, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TEXT, Year INTEGER, Price INTEGER, Score INTEGER, Cases INTEGER, Drink TEXT ) CREATE TABLE grapes ( ID INTEGER, Grape TEXT, Color TEXT ) CREATE TABLE appellations ( No...
Compare the average of maximum price of wines each year, bin the year into the weekday interval, and I want to display in asc by the y axis.
SELECT Year, AVG(MAX(Price)) FROM wine ORDER BY AVG(MAX(Price))
CREATE TABLE table_15280 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text )
Position of defensive back, and an Overall smaller than 69 is what lowest pick #?
SELECT MIN("Pick #") FROM table_15280 WHERE "Position" = 'defensive back' AND "Overall" < '69'
CREATE TABLE table_name_53 ( laps INTEGER, time_retired VARCHAR, grid VARCHAR )
What is the mean number of laps where Time/retired was a water leak and the grid number was bigger than 12?
SELECT AVG(laps) FROM table_name_53 WHERE time_retired = "water leak" AND grid > 12
CREATE TABLE table_21678 ( "Alaska" text, "Arizona" text, "Arkansas" text, "California" text, "Colorado" text )
Name the california where alaska tennessee
SELECT "California" FROM table_21678 WHERE "Alaska" = 'Tennessee'
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...
give me the number of patients whose age is less than 80 and drug name is finasteride?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "80" AND prescriptions.drug = "Finasteride"
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 t...
tell me the number of female patients who had other persistent mental disorders due to conditions classified elsewhere diagnoses.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "F" AND diagnoses.short_title = "Mental disor NEC oth dis"
CREATE TABLE table_42832 ( "Spoofed Title" text, "Actual Title" text, "Writer" text, "Artist" text, "Issue" real, "Date" text )
What is the name of the writer for issue 224?
SELECT "Writer" FROM table_42832 WHERE "Issue" = '224'
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE intakeoutput ( intakeoutput...
retrieve the top five most common output events since 6 years ago?
SELECT t1.celllabel FROM (SELECT intakeoutput.celllabel, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM intakeoutput WHERE intakeoutput.cellpath LIKE '%output%' AND DATETIME(intakeoutput.intakeoutputtime) >= DATETIME(CURRENT_TIME(), '-6 year') GROUP BY intakeoutput.celllabel) AS t1 WHERE t1.c1 <= 5
CREATE TABLE table_203_824 ( id number, "pick #" number, "player" text, "position" text, "nationality" text, "nhl team" text, "college/junior/club team" text )
how many center position players are there ?
SELECT COUNT("player") FROM table_203_824 WHERE "position" = 'centre'
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 ) C...
how many patients are with death status 0 and with diagnosis chronic diastolic heart failure?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "0" AND diagnoses.long_title = "Chronic diastolic heart failure"
CREATE TABLE table_28923 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Result" text, "Candidates" text )
How many parties were first elected in 1805?
SELECT COUNT("Party") FROM table_28923 WHERE "First elected" = '1805'
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 t...
give me the number of patients who had continuous intra-arterial blood gas monitoring and were hospitalized for more than 16 days.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "16" AND procedures.long_title = "Continuous intra-arterial blood gas monitoring"
CREATE TABLE table_68348 ( "Round" text, "Kick Off" text, "Opponents" text, "H / A" text, "Result" text, "Attendance" real, "Report" text )
What was the kickoff date for the round value of R4?
SELECT "Kick Off" FROM table_68348 WHERE "Round" = 'r4'
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime t...
tell me the sex of patient 006-195541.
SELECT DISTINCT patient.gender FROM patient WHERE patient.uniquepid = '006-195541'
CREATE TABLE table_27837 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text )
Who direcred the episode with production code 7d03?
SELECT "Directed by" FROM table_27837 WHERE "Production code" = '7D03'
CREATE TABLE table_203_332 ( id number, "number" text, "year built" number, "builder" text, "status" text, "notes" text )
how many of the locomotives were built before 1940 ?
SELECT COUNT(*) FROM table_203_332 WHERE "year built" < 1940
CREATE TABLE table_60176 ( "Shooter" text, "Event" text, "Rank points" text, "Score points" text, "Total" text )
What is Rank Points, when Event is 'WC Milan', and when Shooter is 'Lalita Yauhleuskaya ( AUS )'?
SELECT "Rank points" FROM table_60176 WHERE "Event" = 'wc milan' AND "Shooter" = 'lalita yauhleuskaya ( aus )'
CREATE TABLE Scientists ( SSN int, Name Char(30) ) CREATE TABLE Projects ( Code Char(4), Name Char(50), Hours int ) CREATE TABLE AssignedTo ( Scientist int, Project char(4) )
A bar chart for finding the number of the name of the project for which a scientist whose name contains Smith is assigned to, I want to order in asc by the total number.
SELECT T2.Name, COUNT(T2.Name) FROM AssignedTo AS T1 JOIN Projects AS T2 ON T1.Project = T2.Code JOIN Scientists AS T3 ON T1.Scientist = T3.SSN WHERE T3.Name LIKE '%Smith%' GROUP BY T2.Name ORDER BY COUNT(T2.Name)
CREATE TABLE table_name_21 ( rank INTEGER, assists VARCHAR )
What is the sum of Rank, when Assists is '82'?
SELECT SUM(rank) FROM table_name_21 WHERE assists = 82
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) ...
what is the minimum hospital cost for a drug with a name called albumin 5% since 6 years ago?
SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT medication.patientunitstayid FROM medication WHERE medication.drugname = 'albumin 5%')) AND DATETIME(cost.chargetime) >=...
CREATE TABLE table_12807904_3 ( played VARCHAR, points_for VARCHAR )
HOW MANY PLAYERS PLAYED IN THE GAME THAT WON WITH 438 POINTS
SELECT played FROM table_12807904_3 WHERE points_for = "438"
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 ) C...
provide the number of patients whose drug code is nvan500i and lab test category is blood gas?
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 = "NVAN500I" AND lab."CATEGORY" = "Blood Gas"
CREATE TABLE table_77296 ( "Year" real, "Team" text, "Co-Drivers" text, "Class" text, "Laps" real, "Pos." text, "Class Pos." text )
What is Class Pos., when Year is before 2013, and when Laps is greater than 175?
SELECT "Class Pos." FROM table_77296 WHERE "Year" < '2013' AND "Laps" > '175'
CREATE TABLE table_name_68 ( authority VARCHAR, decile VARCHAR, area VARCHAR )
Which Authority has a Decile smaller than 6, and an Area of opoutere?
SELECT authority FROM table_name_68 WHERE decile < 6 AND area = "opoutere"
CREATE TABLE table_name_17 ( song VARCHAR, draw VARCHAR, artist VARCHAR )
What Luca Barbarossa song had a draw smaller than 20?
SELECT song FROM table_name_17 WHERE draw < 20 AND artist = "luca barbarossa"
CREATE TABLE table_80004 ( "Name" text, "Years" text, "Gender" text, "Area" text, "Authority" text, "Decile" real, "Roll" real )
How many deciles have Years of 9 13?
SELECT COUNT("Decile") FROM table_80004 WHERE "Years" = '9–13'
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, ...
calculate the total number of patients aged below 24
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "24"
CREATE TABLE table_name_88 ( games INTEGER, name VARCHAR, assists VARCHAR )
What is the mean number of games for pablo prigioni when there are more than 14 assists?
SELECT AVG(games) FROM table_name_88 WHERE name = "pablo prigioni" AND assists > 14
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 treatment ( treat...
count the number of patients who are dead after having been diagnosed with sepsis - severe during the same hospital visit until 2104.
SELECT COUNT(DISTINCT t2.uniquepid) FROM (SELECT t1.uniquepid, t1.diagnosistime, t1.patienthealthsystemstayid FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = ...
CREATE TABLE table_27279050_3 ( first_driver_s_ VARCHAR, country VARCHAR )
Who is the first driver(s) when the country is romania?
SELECT first_driver_s_ FROM table_27279050_3 WHERE country = "Romania"
CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_graduation_semester int, degree varchar, minor varchar, internship varch...
What are some of the useful courses I should take before ASIAN 416 ?
SELECT DISTINCT advisory_requirement FROM course WHERE department = 'ASIAN' AND number = 416
CREATE TABLE table_55672 ( "Driver" text, "Constructor" text, "Laps" text, "Time/Retired" text, "Grid" text )
who is the constructor when the driver is jenson button?
SELECT "Constructor" FROM table_55672 WHERE "Driver" = 'jenson button'
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 ...
how many hours have passed since patient 27172 last started to stay in careunit csru during their current hospital visit?
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27172 AND admissions.dischtime IS NULL) AND transfers.careunit = 'csru' ORDER BY transfers.intime DESC LIMIT 1
CREATE TABLE table_69850 ( "Name" text, "Party" text, "Province" text, "Term expires" real, "Term of office" text )
How many times did Ken Wright expired in North Western?
SELECT COUNT("Term expires") FROM table_69850 WHERE "Province" = 'north western' AND "Name" = 'ken wright'
CREATE TABLE table_17278 ( "Series #" real, "Season #" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text )
Which tittles have an original air date of March 19, 1998
SELECT "Title" FROM table_17278 WHERE "Original air date" = 'March 19, 1998'
CREATE TABLE table_72961 ( "Rank" real, "Railway Station" text, "Annual entry/exit (millions) 2011\u201312" text, "Annual interchanges (millions) 2011\u201312" text, "Total Passengers (millions) 2011\u201312" text, "Location" text, "Main Services" text, "Number of Platforms" real )
What is the main service for the station with 14.849 million passengers 2011-12?
SELECT "Main Services" FROM table_72961 WHERE "Total Passengers (millions) 2011\u201312" = '14.849'
CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE cite ( citingpaperid int, citedpa...
How many papers has david blei published in nips ?
SELECT DISTINCT COUNT(paper.paperid) FROM author, paper, venue, writes WHERE author.authorname = 'david blei' AND venue.venueid = paper.venueid AND venue.venuename = 'nips' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid
CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zone_code varchar, minimum_connect_...
i will need a RENTAL CAR at NEW YORK
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'NEW YORK' AND ground_service.city_code = city.city_code AND ground_service.transport_type = 'RENTAL CAR'
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 te...
provide the number of patients whose ethnicity is hispanic or latino and procedure is titled other phototherapy.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "HISPANIC OR LATINO" AND procedures.long_title = "Other phototherapy"
CREATE TABLE table_name_76 ( opponent VARCHAR, date VARCHAR )
What is Opponent, when Date is 17 September 1998?
SELECT opponent FROM table_name_76 WHERE date = "17 september 1998"
CREATE TABLE table_name_38 ( opponent VARCHAR, date VARCHAR )
Who is the opponent on November 1?
SELECT opponent FROM table_name_38 WHERE date = "november 1"
CREATE TABLE table_1341472_12 ( district VARCHAR, incumbent VARCHAR )
What district is Mac Collins an incumbent in?
SELECT district FROM table_1341472_12 WHERE incumbent = "Mac Collins"
CREATE TABLE table_17265535_7 ( result INTEGER, equation VARCHAR )
If the equation is 0 9 + 3 9 + 3, what is the result?
SELECT MIN(result) FROM table_17265535_7 WHERE equation = "0 × 9² + 3 × 9 + 3"
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), ...
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of email and employee_id , and show x axis in ascending order.
SELECT EMAIL, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMAIL
CREATE TABLE table_64604 ( "Rank" real, "Athletes" text, "Country" text, "Time" text, "Notes" text )
What is the average rank for Hungary?
SELECT AVG("Rank") FROM table_64604 WHERE "Country" = 'hungary'
CREATE TABLE table_14336 ( "Club" text, "Visa 1" text, "Visa 2" text, "Visa 3" text, "Visa 4" text, "Visa 5" text )
Which Visa 3 has gui finkler as Visa 1?
SELECT "Visa 3" FROM table_14336 WHERE "Visa 1" = 'gui finkler'
CREATE TABLE table_28243691_1 ( team_nickname VARCHAR, location VARCHAR )
How many mascotts are there for college station, texas
SELECT COUNT(team_nickname) FROM table_28243691_1 WHERE location = "College Station, Texas"
CREATE TABLE table_56447 ( "Rank" real, "Movie" text, "Year" real, "Studio(s)" text, "Opening Day Net Gross" real, "Day of Week" text )
What is the year of the movie with an opening day on Friday with a rank 10?
SELECT COUNT("Year") FROM table_56447 WHERE "Day of Week" = 'friday' AND "Rank" = '10'
CREATE TABLE table_39698 ( "Call sign" text, "Launched" text, "Transmitting from" text, "Coverage" text, "Languages" text, "Frequency" text )
Where is the station with a coverage of yucat n quintana roo campeche transmitting from?
SELECT "Transmitting from" FROM table_39698 WHERE "Coverage" = 'yucatán quintana roo campeche'
CREATE TABLE song ( song_name text, artist_name text, country text, f_id number, genre_is text, rating number, languages text, releasedate time, resolution number ) CREATE TABLE files ( f_id number, artist_name text, file_size text, duration text, formats text ) ...
What are the names of the songs that are modern or sung in English?
SELECT song_name FROM song WHERE genre_is = "modern" OR languages = "english"
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 ) CRE...
Accepted answers with a zero score.
SELECT a.Id AS "post_link", a.Score, a.OwnerUserId AS "user_link" FROM Posts AS a, Posts AS q WHERE a.PostTypeId = 2 AND q.PostTypeId = 1 AND a.Score = 0 AND a.ParentId = q.Id AND q.AcceptedAnswerId = a.Id
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
calculate the number of patients who were dead after being diagnosed with bladder ca within the same hospital visit.
SELECT COUNT(DISTINCT t2.uniquepid) FROM (SELECT t1.uniquepid, t1.diagnosistime, t1.patienthealthsystemstayid FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = ...
CREATE TABLE table_59345 ( "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 )
WHAT IS THE TRIES AGAINST WITH PLAYED 22, POINTS AGAINST 784?
SELECT "Tries against" FROM table_59345 WHERE "Played" = '22' AND "Points against" = '784'
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
Return a scatter chart about the correlation between ACC_Percent and All_Games_Percent , and group by attribute All_Games.
SELECT ACC_Percent, All_Games_Percent FROM basketball_match GROUP BY All_Games
CREATE TABLE table_name_70 ( game VARCHAR, october VARCHAR, record VARCHAR )
Which game was after October 24 and had a record of 6-2-1?
SELECT game FROM table_name_70 WHERE october > 24 AND record = "6-2-1"
CREATE TABLE table_21076286_2 ( broadcast_network VARCHAR, broadcast_scope VARCHAR )
Name the broadcast network for chiba prefecture
SELECT broadcast_network FROM table_21076286_2 WHERE broadcast_scope = "Chiba Prefecture"
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 t...
what is the number of patients whose admission year is less than 2170 and procedure icd9 code is 8854?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2170" AND procedures.icd9_code = "8854"
CREATE TABLE table_name_12 ( first_year_played VARCHAR, doubles_w_l VARCHAR )
Which year first played with Double W-L of 8 3?
SELECT first_year_played FROM table_name_12 WHERE doubles_w_l = "8–3"
CREATE TABLE table_43061 ( "Date" text, "Cover model" text, "Centerfold model" text, "Interview subject" text, "20 Questions" text )
Who was the Cover model on 11-03?
SELECT "Cover model" FROM table_43061 WHERE "Date" = '11-03'
CREATE TABLE table_28846752_13 ( player VARCHAR, average VARCHAR )
Who is the player with an average of 35.42?
SELECT player FROM table_28846752_13 WHERE average = "35.42"
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospit...
tell me how much patient 021-213732's total output was on last month/08.
SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-213732')) AND intakeoutput.cellpath LIKE '%o...
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, ...
when did the first lab test of patient 92846 happened during this month?
SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 92846) AND DATETIME(labevents.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month') ORDER BY labevents.charttime LIMIT 1
CREATE TABLE table_58081 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
When vfl park is the venue what's the Away team playing?
SELECT "Away team" FROM table_58081 WHERE "Venue" = 'vfl park'
CREATE TABLE weather ( date TEXT, max_temperature_f INTEGER, mean_temperature_f INTEGER, min_temperature_f INTEGER, max_dew_point_f INTEGER, mean_dew_point_f INTEGER, min_dew_point_f INTEGER, max_humidity INTEGER, mean_humidity INTEGER, min_humidity INTEGER, max_sea_level_pre...
Give me a bar chart to show how many days with a max temperature greater than or equal to 80 for each year.
SELECT date, COUNT(date) FROM weather WHERE max_temperature_f >= 80
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0),...
For those employees who was hired before 2002-06-21, a bar chart shows the distribution of job_id and the average of manager_id , and group by attribute job_id.
SELECT JOB_ID, AVG(MANAGER_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID
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 t...
what is the number of patients whose gender is m and discharge location is left against medical advi?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.discharge_location = "LEFT AGAINST MEDICAL ADVI"
CREATE TABLE table_204_691 ( id number, "date" text, "round" text, "opponent" text, "venue" text, "result" text, "attendance" number, "scorers" text )
how many goals did durrant score ?
SELECT COUNT(*) FROM table_204_691 WHERE "scorers" = 'durrant'
CREATE TABLE table_203_134 ( id number, "place" text, "player" text, "country" text, "score" text, "to par" number )
which golfers other than tim clark shot 3 over par at the 2010 us open ?
SELECT "player" FROM table_203_134 WHERE "player" <> 'tim clark' AND "to par" = 3
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 t...
how many patients whose lab test abnormal status is abnormal and lab test name is potassium, urine?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.flag = "abnormal" AND lab.label = "Potassium, Urine"
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
Find All_Home and School_ID , and group by attribute ACC_Home, and visualize them by a bar chart, could you list in descending by the y-axis please?
SELECT All_Home, School_ID FROM basketball_match GROUP BY ACC_Home, All_Home ORDER BY School_ID DESC
CREATE TABLE table_75608 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Save" text )
Name the score for save of lancaster (3)
SELECT "Score" FROM table_75608 WHERE "Save" = 'lancaster (3)'
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
what were the five most common diagnoses among the patients in the 30s in 2105?
SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 30 AND 39) AND STRFTIME('%y', diagnosis.diagnosistime) = '2105' GROUP BY diagnosis.d...
CREATE TABLE table_name_94 ( constructor VARCHAR, grid VARCHAR, laps VARCHAR )
Who built the under grid 6 car with under 49 laps?
SELECT constructor FROM table_name_94 WHERE grid < 6 AND laps < 49
CREATE TABLE table_1446600_4 ( date_successor_seated VARCHAR, district VARCHAR )
What is the date the successor was seated for the georgia 6th district?
SELECT date_successor_seated FROM table_1446600_4 WHERE district = "Georgia 6th"
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_proje...
Is EECS 567 or EECS 529 easier ?
SELECT DISTINCT course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (course.number = 567 OR course.number = 529) AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 INNER JOIN course AS COURSEalias1 ON ...
CREATE TABLE table_45238 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Ground" text, "Date" text, "Crowd" real )
Which Ground has a Home team score of 18.12 (120)?
SELECT "Ground" FROM table_45238 WHERE "Home team score" = '18.12 (120)'