instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
when was his last competition ?
CREATE TABLE table_203_238 (id number,"year" number,"competition" text,"venue" text,"position" text,"notes" text)
SELECT "year" FROM table_203_238 ORDER BY "year" DESC LIMIT 1
For the attribute Team_Name and ACC_Percent, show their proportion by a pie chart.
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_Percent text,ACC_Home text,ACC_Road text,All_Games text,All_Games_Perce...
SELECT Team_Name, ACC_Percent FROM basketball_match
On what date was their record 46-39?
CREATE TABLE table_5592 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" text,"Record" text)
SELECT "Date" FROM table_5592 WHERE "Record" = '46-39'
HOW MANY YEARS DID MENS DOUBLES PLAYER HEIKI SORGE MEELIS MAISTE PLAY?
CREATE TABLE table_14903627_1 (year VARCHAR,mens_doubles VARCHAR)
SELECT COUNT(year) FROM table_14903627_1 WHERE mens_doubles = "Heiki Sorge Meelis Maiste"
What's the team of the player from St. Francis Xavier College?
CREATE TABLE table_16318 ("Pick #" real,"CFL Team" text,"Player" text,"Position" text,"College" text)
SELECT "CFL Team" FROM table_16318 WHERE "College" = 'St. Francis Xavier'
What was the score for the game when the record was 37-27?
CREATE TABLE table_2855 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT "Score" FROM table_2855 WHERE "Record" = '37-27'
Top users by the number of times they earned 200/day. This query finds the top users by the number of times they've earned 200/day, and gives indication about the progress towards Epic and Legendary badges. Think of it as the number of times Mortarboard badge could have been earned
CREATE TABLE TagSynonyms (Id number,SourceTagName text,TargetTagName text,CreationDate time,OwnerUserId number,AutoRenameCount number,LastAutoRename time,Score number,ApprovedByUserId number,ApprovalDate time)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,R...
SELECT Id AS "user_link", (SELECT COUNT(TotalRep) FROM (SELECT SUM(CASE Votes.VoteTypeId WHEN 1 THEN 15 WHEN 2 THEN 10 WHEN 9 THEN BountyAmount END) AS TotalRep, Votes.CreationDate AS CreationDate FROM Posts INNER JOIN Votes ON Votes.PostId = Posts.Id WHERE Posts.OwnerUserId = U.Id AND Posts.CommunityOwnedDate IS NULL ...
Name the number of v core for model number mobile athlon 64 3000+
CREATE TABLE table_29399 ("Model Number" text,"Frequency" text,"L2 Cache" text,"HT" text,"Mult. 1" text,"V Core" text,"TDP" text,"Socket" text,"Release Date" text,"Part Number(s)" text)
SELECT COUNT("V Core") FROM table_29399 WHERE "Model Number" = 'Mobile Athlon 64 3000+'
What is the 7th runner-up of the country with a 10th runner-up greater than 0, a 9th runner-up greater than 0, and an 8th runner-up greater than 1?
CREATE TABLE table_75070 ("Rank" real,"Country/Territory" text,"Nuestra Belleza Latina" real,"1st runner-up" real,"2nd runner-up" real,"3rd runner-up" real,"4th runner-up" real,"5th runner-up" real,"6th runner-up" real,"7th runner-up" real,"8th runner-up" real,"9th runner-up" real,"10th runner-up" real,"11th runner-up"...
SELECT SUM("7th runner-up") FROM table_75070 WHERE "10th runner-up" > '0' AND "9th runner-up" > '0' AND "8th runner-up" > '1'
count the number of patients whose insurance is private and year of birth is less than 1887?
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 lab (subject_id text,hadm_id text,itemid text,charttime tex...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Private" AND demographic.dob_year < "1887"
Where is the City of Douala?
CREATE TABLE table_name_59 (country VARCHAR,city VARCHAR)
SELECT country FROM table_name_59 WHERE city = "douala"
Which heat and lane was in rank of 22?
CREATE TABLE table_4612 ("Rank" real,"Heat (Lane)" text,"Name" text,"Nationality" text,"Time" text)
SELECT "Heat (Lane)" FROM table_4612 WHERE "Rank" = '22'
Which sum of # 100 has a Season of 1990, and an Against of warwickshire?
CREATE TABLE table_5482 ("# 100" real,"Season" text,"Playing For" text,"Against" text,"Score" text)
SELECT SUM("# 100") FROM table_5482 WHERE "Season" = '1990' AND "Against" = 'warwickshire'
On what date was the record set with a time of 1:07.18?
CREATE TABLE table_49190 ("Event" text,"Time" text,"Name" text,"Nation" text,"Games" text,"Date" text)
SELECT "Date" FROM table_49190 WHERE "Time" = '1:07.18'
When was the mcdonald's lpga championship?
CREATE TABLE table_17335602_1 (date VARCHAR,tournament VARCHAR)
SELECT date FROM table_17335602_1 WHERE tournament = "McDonald's LPGA Championship"
popular db access programming languages.
CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE ReviewTaskStates (Id number,Name text,Description text)CREATE TABLE Badges (Id number,UserId number,N...
SELECT COUNT(DISTINCT P.Id) AS num_questions, t_dbname.TagName FROM Posts AS P INNER JOIN PostTags AS pt ON pt.PostId = P.Id INNER JOIN Tags AS t_lang ON t_lang.Id = pt.TagId INNER JOIN PostTags AS pt_db ON pt_db.PostId = P.Id INNER JOIN Tags AS t_dbname ON t_dbname.Id = pt_db.TagId WHERE t_lang.TagName IN ('c++', 'jav...
What is Appearances, when Postion [F ] is 'Defender', and when Date to [H ] is '1938'?
CREATE TABLE table_9522 ("Name" text,"Nationality" text,"Position [F ]" text,"Date from [G ]" text,"Date to [H ]" text,"Appearances" real,"Goals" real,"Club source [I ]" text)
SELECT "Appearances" FROM table_9522 WHERE "Position [F ]" = 'defender' AND "Date to [H ]" = '1938'
What percent of the vote went to Meg Whitman in the poll taken on October 21, 2010.
CREATE TABLE table_name_51 (meg_whitman__r_ VARCHAR,date_s__administered VARCHAR)
SELECT meg_whitman__r_ FROM table_name_51 WHERE date_s__administered = "october 21, 2010"
how many towns or villages have a population of at least 5 but less than 10 ?
CREATE TABLE table_203_568 (id number,"town/village" text,"population" number,"postal code" text,"municipality" text,"island" text,"location" text)
SELECT COUNT("town/village") FROM table_203_568 WHERE "population" >= 5 AND "population" < 10
What is the original air date for episode 4?
CREATE TABLE table_23399481_3 (original_air_date VARCHAR,season__number VARCHAR)
SELECT original_air_date FROM table_23399481_3 WHERE season__number = 4
Which Drobo (2nd) has a Drobo S (2nd) of 5?
CREATE TABLE table_11041 ("Drobo (1st)" text,"Drobo (2nd)" text,"Drobo S" text,"Drobo S (2nd)" text,"Drobo FS" text,"Drobo Mini" text,"Drobo 5D" text)
SELECT "Drobo (2nd)" FROM table_11041 WHERE "Drobo S (2nd)" = '5'
What is the lowest Hong Kong value with a 0 Brisbane value and a greater than 0 Kuala Lumpur value?
CREATE TABLE table_name_52 (hong_kong INTEGER,brisbane VARCHAR,kuala_lumpur VARCHAR)
SELECT MIN(hong_kong) FROM table_name_52 WHERE brisbane = 0 AND kuala_lumpur > 0
What is the nickname of the school with an enrollment of 2386?
CREATE TABLE table_11658094_3 (nickname VARCHAR,enrollment VARCHAR)
SELECT nickname FROM table_11658094_3 WHERE enrollment = 2386
was there any medicine prescribed since 176 months ago for patient 021-141335?
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 medication (medicationid number,patientunitstayid number,drugname text,dos...
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-141335')) AND DATETIME(medication.drugstarttime) >= DATETIME(CURRENT_T...
Find the name of the ship that is steered by the youngest captain.
CREATE TABLE ship (ship_id number,name text,type text,built_year number,class text,flag text)CREATE TABLE captain (captain_id number,name text,ship_id number,age text,class text,rank text)
SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id ORDER BY t2.age LIMIT 1
Get Most Viewed For Tag.
CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate tim...
SELECT * FROM (SELECT p.*, ViewCount / DATEDIFF(dd, CreationDate, GETUTCDATE()) AS ViewRate FROM Tags AS t JOIN PostTags AS pt ON t.Id = pt.TagId JOIN Posts AS p ON pt.PostId = p.Id WHERE t.TagName = 'microsoftgraph') AS tmp ORDER BY ViewRate DESC
how many hours has it been since the last time carvedilol 6.25 mg po tabs was prescribed to patient 010-16572 in the current hospital encounter?
CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE lab (labid number,patientunitstayid number,labna...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', medication.drugstarttime)) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-16...
who has the most bronze medals ?
CREATE TABLE table_203_374 (id number,"rank" number,"nation" text,"gold" number,"silver" number,"bronze" number,"total" number)
SELECT "nation" FROM table_203_374 ORDER BY "bronze" DESC LIMIT 1
What provinces were formed from New Munster?
CREATE TABLE table_275023_1 (province VARCHAR,formed_from VARCHAR)
SELECT province FROM table_275023_1 WHERE formed_from = "New Munster"
Who was the team guest captain for episode 2?
CREATE TABLE table_25816476_2 (team_guest_captain VARCHAR,episode VARCHAR)
SELECT team_guest_captain FROM table_25816476_2 WHERE episode = 2
has patient 006-50099 been prescribed furosemide 80 mg po tabs until 13 months ago.
CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiasto...
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-50099')) AND medication.drugname = 'furosemide 80 mg po tabs' AND DATE...
provide the number of patients whose insurance is medicaid and procedure long title is combined right and left heart angiocardiography?
CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,sho...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Medicaid" AND procedures.long_title = "Combined right and left heart angiocardiography"
Show the account id and the number of transactions for each accoun. Show scatter chart.
CREATE TABLE Customers (customer_id INTEGER,customer_first_name VARCHAR(20),customer_last_name VARCHAR(20),customer_address VARCHAR(255),customer_phone VARCHAR(255),customer_email VARCHAR(255),other_customer_details VARCHAR(255))CREATE TABLE Accounts (account_id INTEGER,customer_id INTEGER,account_name VARCHAR(50),othe...
SELECT account_id, COUNT(*) FROM Financial_Transactions GROUP BY account_id
For each state, when was the last time the average score data was collected?
CREATE TABLE finrev_fed_17 (state_code number,idcensus number,school_district text,nces_id text,yr_data number,t_fed_rev number,c14 number,c25 number)CREATE TABLE finrev_fed_key_17 (state_code number,state text,#_records text)CREATE TABLE ndecoreexcel_math_grade8 (year number,state text,all_students text,average_scale_...
SELECT state, MAX(year) FROM ndecoreexcel_math_grade8 GROUP BY state
What is the Record of the game with an Attendance of more than 16,124 and a Score of 6 3?
CREATE TABLE table_79632 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" real,"Record" text,"Arena" text,"Points" real)
SELECT "Record" FROM table_79632 WHERE "Attendance" > '16,124' AND "Score" = '6–3'
What are the former counties of the Great Grimsby district?
CREATE TABLE table_30216 ("District" text,"Status" text,"Date abolished" text,"Former county" text,"Successor" text)
SELECT "Former county" FROM table_30216 WHERE "District" = 'Great Grimsby'
provide the number of patients whose insurance is government and procedure short title is open reduc-int fix femur?
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.short_title = "Open reduc-int fix femur"
What Elector was Elevated on December 18, 1182?
CREATE TABLE table_78928 ("Elector" text,"Place of birth" text,"Cardinalatial title" text,"Elevated" text,"Elevator" text)
SELECT "Elector" FROM table_78928 WHERE "Elevated" = 'december 18, 1182'
When sweden is the country what is the highest production in 2010 (1,000 ton)?
CREATE TABLE table_31108 ("Rank 2011" real,"Country" text,"Production in 2011 (1,000 ton)" real,"Share 2011" text,"Rank 2010" real,"Production in 2010 (1,000 ton)" real)
SELECT MAX("Production in 2010 (1,000 ton)") FROM table_31108 WHERE "Country" = 'Sweden'
What is the oldest year that the Royal Philharmonic Orchestra released a record with Decca Records?
CREATE TABLE table_name_63 (year_of_recording INTEGER,orchestra VARCHAR,record_company VARCHAR)
SELECT MIN(year_of_recording) FROM table_name_63 WHERE orchestra = "royal philharmonic orchestra" AND record_company = "decca records"
Among the patients born before the year 2056, how many of them had the lab test for other body fluid?
CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug tex...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2056" AND lab.fluid = "Other Body Fluid"
How many counties have a population of 2266?
CREATE TABLE table_25348 ("County" text,"Population" real,"Unemployment Rate" text,"Market Income Per Capita" text,"Poverty Rate" text,"Status" text)
SELECT COUNT("County") FROM table_25348 WHERE "Population" = '2266'
patient 030-34260 has received a diagnosis in their current hospital encounter?
CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number...
SELECT COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-34260' AND patient.hospitaldischargetime IS NULL))
for the first time in 03/this year, what was the drug that patient 40116 was prescribed via iv bolus route?
CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE transfers (row_id num...
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 40116) AND prescriptions.route = 'iv bolus' AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m'...
What venue had an away team of south melbourne?
CREATE TABLE table_11166 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Venue" FROM table_11166 WHERE "Away team" = 'south melbourne'
What was the most recent year the venue was Barcelona, Spain?
CREATE TABLE table_7804 ("Year" real,"Tournament" text,"Venue" text,"Result" text,"Event" text)
SELECT MAX("Year") FROM table_7804 WHERE "Venue" = 'barcelona, spain'
For all employees in the Finance department, compare the total number of different job id using a bar chart, and could you list by the bar in descending?
CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_PROVINCE varchar(25),COUNTRY_ID varchar(2))CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME va...
SELECT JOB_ID, COUNT(JOB_ID) FROM employees AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID WHERE T2.DEPARTMENT_NAME = 'Finance' GROUP BY JOB_ID ORDER BY JOB_ID DESC
For those records from the products and each product's manufacturer, a bar chart shows the distribution of name and the sum of price , and group by attribute name, show in desc by the y axis.
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 T2.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Price DESC
What was 1961's qual?
CREATE TABLE table_45152 ("Year" text,"Start" text,"Qual" text,"Rank" text,"Finish" text,"Laps" real)
SELECT "Qual" FROM table_45152 WHERE "Year" = '1961'
Name the english name for orach, zarev
CREATE TABLE table_19975 ("No." real,"English name" text,"Bulgarian name" text,"Bulgarian name (Transliteration)" text,"Old Bulgarian Names" text,"Old Bulgarian name (Transliteration)" text,"Old Bulgarian name - Meaning" text)
SELECT "English name" FROM table_19975 WHERE "Old Bulgarian name (Transliteration)" = 'Orach, Zarev'
what are the three most frequent drugs that were prescribed within 2 months to the patients aged 20s after having been diagnosed with nb obsrv suspct infect, until 2 years ago?
CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE d_items (row_id number,itemid number,label text,lin...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ...
What is the average year of the games with the date December 26?
CREATE TABLE table_name_84 (year INTEGER,date VARCHAR)
SELECT AVG(year) FROM table_name_84 WHERE date = "december 26"
Display a bar chart for what is the total revenue of companies started by founder?, and could you list in asc by the total number of revenue?
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 Founder, SUM(Revenue) FROM Manufacturers GROUP BY Founder ORDER BY SUM(Revenue)
what are the top five most common procedures in 2102?
CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careu...
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, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM procedures_icd WHERE STRFTIME('%y', procedures_icd.charttime) = '2102' GROUP BY procedures_icd.icd9_code) AS t1 ...
Which Game has a Score of 122 125?
CREATE TABLE table_name_74 (game VARCHAR,score VARCHAR)
SELECT game FROM table_name_74 WHERE score = "122–125"
Who is the rookie goalkeeper Rob Scherr who played before week 6?
CREATE TABLE table_6044 ("Month" text,"Week" real,"Offensive" text,"Defensive" text,"Goalkeeper" text,"Rookie" text)
SELECT "Rookie" FROM table_6044 WHERE "Goalkeeper" = 'rob scherr' AND "Week" < '6'
what is the nme of the song performed by billy vaughn?
CREATE TABLE table_72488 ("Position" real,"Artist" text,"Song title" text,"Highest position" real,"Points" real)
SELECT "Song title" FROM table_72488 WHERE "Artist" = 'Billy Vaughn'
how many of the patients belonging to asian ethnic origin were unmarried?
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 demographic (subject_id text,hadm_id t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.ethnicity = "ASIAN"
Name the name of 36.0n
CREATE TABLE table_16799784_2 (name VARCHAR,latitude VARCHAR)
SELECT name FROM table_16799784_2 WHERE latitude = "36.0N"
What is the top league that pays the most to their players?
CREATE TABLE hall_of_fame (player_id text,yearid number,votedby text,ballots text,needed text,votes text,inducted text,category text,needed_note text)CREATE TABLE player_award (player_id text,award_id text,year number,league_id text,tie text,notes text)CREATE TABLE salary (year number,team_id text,league_id text,player...
SELECT league_id FROM salary GROUP BY league_id ORDER BY SUM(salary) DESC LIMIT 1
how many of the patients aged below 31 were treated with sodium fluoride (dental gel)?
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "31" AND prescriptions.drug = "Sodium Fluoride (Dental Gel)"
With the pick of 1 Cecil Martin has what number as the overall?
CREATE TABLE table_name_38 (overall VARCHAR,pick VARCHAR,name VARCHAR)
SELECT COUNT(overall) FROM table_name_38 WHERE pick = 1 AND name = "cecil martin"
get me patient 6215's yearly maximum weight until 09/2103.
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 microbiologyevents (row_id number,subject_id number,hadm_id nu...
SELECT MAX(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 6215)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit...
What is the number of patients admitted before 2184 who had overdose as their primary disease?
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 WHERE demographic.diagnosis = "OVERDOSE" AND demographic.admityear < "2184"
What Player is from Argentina and whose position is a guard-forward?
CREATE TABLE table_4316 ("Player" text,"Nationality" text,"Position" text,"Years in Toronto" text,"School/Club Team" text)
SELECT "Player" FROM table_4316 WHERE "Position" = 'guard-forward' AND "Nationality" = 'argentina'
What is Competition, when Date is 30 December 2005?
CREATE TABLE table_name_96 (competition VARCHAR,date VARCHAR)
SELECT competition FROM table_name_96 WHERE date = "30 december 2005"
What is the most recent year georgia tech chose a linebacker?
CREATE TABLE table_47686 ("Year [A ]" real,"Pick" text,"Player" text,"Position" text,"College" text)
SELECT MAX("Year [A ]") FROM table_47686 WHERE "Position" = 'linebacker' AND "College" = 'georgia tech'
How many different products are produced in each headquarter city Visualize by bar chart, sort in ascending by the y axis.
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 Headquarter, COUNT(DISTINCT T1.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code ORDER BY COUNT(DISTINCT T1.Name)
Which Player had a From club of atl tico madrid?
CREATE TABLE table_6762 ("Date" text,"Pos." text,"Player" text,"From club" text,"Transfer fee" text)
SELECT "Player" FROM table_6762 WHERE "From club" = 'atlético madrid'
Who were the batting partners in Colombo?
CREATE TABLE table_45683 ("Wicket" text,"Runs" text,"Batting partners" text,"Batting team" text,"Fielding team" text,"Venue" text,"Season" text)
SELECT "Batting partners" FROM table_45683 WHERE "Venue" = 'colombo'
Who was the Opponent on a Hard (i) Surface?
CREATE TABLE table_35324 ("Date" text,"Tournament" text,"Surface" text,"Opponent" text,"Score" text)
SELECT "Opponent" FROM table_35324 WHERE "Surface" = 'hard (i)'
What is the age group for figure skating?
CREATE TABLE table_68955 ("Sport" text,"Competition name" text,"Competing entities" text,"Age groups" text,"Held every" text)
SELECT "Age groups" FROM table_68955 WHERE "Sport" = 'figure skating'
With a To par of 1, what is Player Henrik Stenson's Score?
CREATE TABLE table_60674 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text)
SELECT "Score" FROM table_60674 WHERE "To par" = '–1' AND "Player" = 'henrik stenson'
What is every state and District of Columbia with 60.0% overweight or obese adults?
CREATE TABLE table_22730 ("State and District of Columbia" text,"Obese adults" text,"Overweight (incl. obese) adults" text,"Obese children and adolescents" text,"Obesity rank" real)
SELECT "State and District of Columbia" FROM table_22730 WHERE "Overweight (incl. obese) adults" = '60.0%'
Who were the runner(s)-up when the winning score was 10 (69-68-74-67=278)?
CREATE TABLE table_40276 ("Date" text,"Tournament" text,"Winning score" text,"Margin of victory" text,"Runner(s)-up" text)
SELECT "Margin of victory" FROM table_40276 WHERE "Winning score" = '–10 (69-68-74-67=278)'
Name the vacator for died august 13, 1826
CREATE TABLE table_225102_4 (vacator VARCHAR,reason_for_change VARCHAR)
SELECT vacator FROM table_225102_4 WHERE reason_for_change = "Died August 13, 1826"
Which Drawn has a Points of 6, and a Against larger than 16?
CREATE TABLE table_name_17 (drawn INTEGER,points VARCHAR,against VARCHAR)
SELECT SUM(drawn) FROM table_name_17 WHERE points = 6 AND against > 16
Name the Non-Suited Match that has greater than 6 Number of Decks.
CREATE TABLE table_name_60 (non_suited_match VARCHAR,number_of_decks INTEGER)
SELECT non_suited_match FROM table_name_60 WHERE number_of_decks > 6
What is the fewest number of points for clubs with less than 2 draws and more than 8 matches played?
CREATE TABLE table_name_38 (points INTEGER,drawn VARCHAR,played VARCHAR)
SELECT MIN(points) FROM table_name_38 WHERE drawn < 2 AND played > 8
number of competitions
CREATE TABLE table_203_238 (id number,"year" number,"competition" text,"venue" text,"position" text,"notes" text)
SELECT COUNT("competition") FROM table_203_238
What is the T4 Place Player with a Score of 71-74-66=211?
CREATE TABLE table_name_57 (player VARCHAR,place VARCHAR,score VARCHAR)
SELECT player FROM table_name_57 WHERE place = "t4" AND score = 71 - 74 - 66 = 211
What as the production code for the episode directed by Robert Duncan McNeill?
CREATE TABLE table_26762 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"U.S. viewers (million)" text,"Original air date" text,"Production code" text)
SELECT "Production code" FROM table_26762 WHERE "Directed by" = 'Robert Duncan McNeill'
Where should I begin if I want to take a computing infrastructure course ?
CREATE TABLE ta (campus_job_id int,student_id int,location varchar)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 ...
SELECT DISTINCT course.department, course.name, course.number FROM area, course WHERE area.area LIKE '%computing infrastructure%' AND course.course_id = area.course_id
what was the name of the drug that was prescribed to patient 27362 last time through the oral route in 07/last year?
CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careunit text,l...
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27362) AND prescriptions.route = 'oral' AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m', pr...
Show all book categories and the number of books in each category with a bar chart.
CREATE TABLE book_club (book_club_id int,Year int,Author_or_Editor text,Book_Title text,Publisher text,Category text,Result text)CREATE TABLE culture_company (Company_name text,Type text,Incorporated_in text,Group_Equity_Shareholding real,book_club_id text,movie_id text)CREATE TABLE movie (movie_id int,Title text,Year ...
SELECT Category, COUNT(*) FROM book_club GROUP BY Category
Name the most points for champion, won in the final against am lie mauresmo
CREATE TABLE table_1973321_5 (points INTEGER,status VARCHAR)
SELECT MAX(points) FROM table_1973321_5 WHERE status = "Champion, won in the final against Amélie Mauresmo"
What is City, when State is California, when AAM Accredited is No, when ASTC Member is Yes, and when AAM Member is No?
CREATE TABLE table_42124 ("City" text,"State" text,"AAM Accredited" text,"AAM Member" text,"ASTC Member" text)
SELECT "City" FROM table_42124 WHERE "State" = 'california' AND "AAM Accredited" = 'no' AND "ASTC Member" = 'yes' AND "AAM Member" = 'no'
Name what succeeded by for foam
CREATE TABLE table_1398 ("Headphone Model" text,"Headphone Class" text,"Sensitivity (dB)" text,"Impedance (Ohms)" real,"Driver-matched dB" text,"Construction" text,"Earpads" text,"Termination" text,"Succeeded by" text)
SELECT "Succeeded by" FROM table_1398 WHERE "Earpads" = 'Foam'
flights from SAN JOSE to ST. PAUL
CREATE TABLE flight_stop (flight_id int,stop_number int,stop_days text,stop_airport text,arrival_time int,arrival_airline text,arrival_flight_number int,departure_time int,departure_airline text,departure_flight_number int,stop_time int)CREATE TABLE month (month_number int,month_name text)CREATE TABLE flight_fare (flig...
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 = 'SAN JOSE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ST. P...
Which From club has a Date of 20 oct. 2008?
CREATE TABLE table_name_49 (from_club VARCHAR,date VARCHAR)
SELECT from_club FROM table_name_49 WHERE date = "20 oct. 2008"
How many performances of each location? Show me the proportion using a pie chart.
CREATE TABLE member_attendance (Member_ID int,Performance_ID int,Num_of_Pieces int)CREATE TABLE member (Member_ID text,Name text,Nationality text,Role text)CREATE TABLE performance (Performance_ID real,Date text,Host text,Location text,Attendance int)
SELECT Location, COUNT(Location) FROM performance GROUP BY Location
What country is the show aired on TVNZ?
CREATE TABLE table_14523485_9 (country VARCHAR,channel VARCHAR)
SELECT country FROM table_14523485_9 WHERE channel = "TVNZ"
Return a bar chart on what are the district names and city populations for all districts that between 200,000 and 2,000,000 residents?, I want to sort by the bars in asc please.
CREATE TABLE product (product_id int,product text,dimensions text,dpi real,pages_per_minute_color real,max_page_size text,interface text)CREATE TABLE district (District_ID int,District_name text,Headquartered_City text,City_Population real,City_Area real)CREATE TABLE store (Store_ID int,Store_Name text,Type text,Area_s...
SELECT District_name, City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000 ORDER BY District_name
What ship was built in 2012?
CREATE TABLE table_12259 ("Built" real,"Ship" text,"Operator" text,"Tonnage" text,"Flag" text)
SELECT "Ship" FROM table_12259 WHERE "Built" = '2012'
In what district was keith ellison the incumbent?
CREATE TABLE table_25030512_26 (district VARCHAR,incumbent VARCHAR)
SELECT district FROM table_25030512_26 WHERE incumbent = "Keith Ellison"
What is the grid total for david coulthard?
CREATE TABLE table_name_76 (grid INTEGER,driver VARCHAR)
SELECT SUM(grid) FROM table_name_76 WHERE driver = "david coulthard"
what is the place where the person is luke donald
CREATE TABLE table_28498999_6 (country VARCHAR,player VARCHAR)
SELECT country FROM table_28498999_6 WHERE player = "Luke Donald"
what number of married patients underwent the procedure titled radiotherapeut proc nec?
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 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.marital_status = "MARRIED" AND procedures.short_title = "Radiotherapeut proc NEC"
Name the style for 27
CREATE TABLE table_28677723_14 (style VARCHAR,total VARCHAR)
SELECT style FROM table_28677723_14 WHERE total = 27
Show the hometown of all members, I want to sort by the X-axis in asc.
CREATE TABLE branch (Branch_ID int,Name text,Open_year text,Address_road text,City text,membership_amount text)CREATE TABLE purchase (Member_ID int,Branch_ID text,Year text,Total_pounds real)CREATE TABLE membership_register_branch (Member_ID int,Branch_ID text,Register_Year text)CREATE TABLE member (Member_ID int,Card_...
SELECT Hometown, COUNT(Hometown) FROM member GROUP BY Hometown ORDER BY Hometown