instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
Name the investing dragon for razzamataz
CREATE TABLE table_68485 ("Episode" text,"First aired" text,"Entrepreneur(s)" text,"Company or product name" text,"Money requested (\u00a3)" real,"Investing Dragon(s)" text)
SELECT "Investing Dragon(s)" FROM table_68485 WHERE "Company or product name" = 'razzamataz'
How many points did the player who was right guard score?
CREATE TABLE table_14342592_7 (points VARCHAR,position VARCHAR)
SELECT COUNT(points) FROM table_14342592_7 WHERE position = "Right guard"
Bar chart of all_games_percent from each all road, and show in asc by the Y.
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 (School_ID int,School text,Location text,Founded real,Affiliation text,En...
SELECT All_Road, All_Games_Percent FROM basketball_match ORDER BY All_Games_Percent
what is admission time of subject name jerry deberry?
CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ...
SELECT demographic.admittime FROM demographic WHERE demographic.name = "Jerry Deberry"
How many values are displayed under pick for Vlastimil Kroupa?
CREATE TABLE table_29989 ("Pick" real,"Player" text,"Position" text,"Nationality" text,"NHL team" text,"College/junior/club team" text)
SELECT COUNT("Pick") FROM table_29989 WHERE "Player" = 'Vlastimil Kroupa'
What is the low score for TO par +2 in japan?
CREATE TABLE table_name_5 (score INTEGER,to_par VARCHAR,country VARCHAR)
SELECT MIN(score) FROM table_name_5 WHERE to_par = "+2" AND country = "japan"
To which party does Riley Joseph Wilson belong?
CREATE TABLE table_18690 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text)
SELECT "Party" FROM table_18690 WHERE "Incumbent" = 'Riley Joseph Wilson'
For all employees who have the letters D or S in their first name, draw a bar chart about the distribution of hire_date and the amount of hire_date bin hire_date by weekday.
CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar...
SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
What is Score, when Tie No is '109'?
CREATE TABLE table_name_67 (score VARCHAR,tie_no VARCHAR)
SELECT score FROM table_name_67 WHERE tie_no = "109"
Find the titles of papers whose first author is affiliated with an institution in the country 'Japan' and has last name 'Ohori'?
CREATE TABLE authorship (authid VARCHAR,paperid VARCHAR,instid VARCHAR,authorder VARCHAR)CREATE TABLE authors (authid VARCHAR,lname VARCHAR)CREATE TABLE inst (instid VARCHAR,country VARCHAR)CREATE TABLE papers (title VARCHAR,paperid VARCHAR)
SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = "Japan" AND t2.authorder = 1 AND t1.lname = "Ohori"
Name the result for week 7
CREATE TABLE table_name_14 (result VARCHAR,week VARCHAR)
SELECT result FROM table_name_14 WHERE week = 7
What is the reviewer id of Daniel Lewis?
CREATE TABLE Reviewer (rID VARCHAR,name VARCHAR)
SELECT rID FROM Reviewer WHERE name = "Daniel Lewis"
For those records from the products and each product's manufacturer, a bar chart shows the distribution of name and the average of code , and group by attribute name, and display y-axis in ascending order.
CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL)
SELECT T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Code
Limiting Posts by Date and Rep, Parameterized (Tutorial).
CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuidance text,MarkdownConcensusDescription text,CreationDate time,CreationModeratorId number,ApprovalDate time,ApprovalModeratorId number,DeactivationDat...
SELECT p.Title, p.Id, u.DisplayName, u.Reputation FROM Posts AS p JOIN Users AS u ON p.OwnerUserId = u.Id WHERE p.CreationDate BETWEEN '##StartDate:string##' AND '##EndDate:string##' AND p.PostTypeId = 1 AND u.Reputation < '##MaxReputation:int##'
What were the bleeding times when both the platelet count was unaffected and the partial thromboplastin time was unaffected
CREATE TABLE table_1099080_1 (bleeding_time VARCHAR,partial_thromboplastin_time VARCHAR,platelet_count VARCHAR)
SELECT bleeding_time FROM table_1099080_1 WHERE partial_thromboplastin_time = "Unaffected" AND platelet_count = "Unaffected"
which team #1 played again chalkida
CREATE TABLE table_24346 ("Team #1" text,"Agg. score" text,"Team #2" text,"1st leg" text,"2nd leg" text)
SELECT "Team #1" FROM table_24346 WHERE "Team #2" = 'Chalkida'
What is the try bonus that has llangefni rfc as the club?
CREATE TABLE table_37840 ("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)
SELECT "Try bonus" FROM table_37840 WHERE "Club" = 'llangefni rfc'
What is the last episode which has segment d as blown glass?
CREATE TABLE table_15187735_4 (episode INTEGER,segment_d VARCHAR)
SELECT MAX(episode) FROM table_15187735_4 WHERE segment_d = "Blown Glass"
Which Catalog has a Date of july 15, 2011?
CREATE TABLE table_name_73 (catalog INTEGER,date VARCHAR)
SELECT AVG(catalog) FROM table_name_73 WHERE date = "july 15, 2011"
For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about commission_pct over the phone_number by a bar chart, list y-axis in desc order.
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),HIRE_DATE date,JOB_ID varchar(10),SALARY decimal(8,2)...
SELECT PHONE_NUMBER, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY COMMISSION_PCT DESC
Which Overall has a playoff record of (0-1) and an away record of (1-1)?
CREATE TABLE table_name_71 (overall VARCHAR,plyff VARCHAR,away VARCHAR)
SELECT overall FROM table_name_71 WHERE plyff = "(0-1)" AND away = "(1-1)"
Who is h.t. brewer when je armstrong is c.p. greeks?
CREATE TABLE table_639 ("W.H. Archer" text,"J.E. Armstrong" text,"H.L. Birkett" text,"F.A. Brill" text,"H.T. Brewer" text)
SELECT "H.T. Brewer" FROM table_639 WHERE "J.E. Armstrong" = 'C.P. Greeks'
Who wrote the episode that originally aired April 29, 1994?
CREATE TABLE table_2468961_4 (written_by VARCHAR,original_air_date VARCHAR)
SELECT written_by FROM table_2468961_4 WHERE original_air_date = "April 29, 1994"
Which opponents conference has the result L, 62-10?
CREATE TABLE table_26240481_1 (opponents_conference VARCHAR,result VARCHAR)
SELECT opponents_conference FROM table_26240481_1 WHERE result = "L, 62-10"
elevated triglyceride level > 150 mg / dl
CREATE TABLE table_train_179 ("id" int,"systolic_blood_pressure_sbp" int,"fasting_plasma_glucose_fpg" float,"diastolic_blood_pressure_dbp" int,"diabetes" bool,"body_mass_index_bmi" float,"triglyceride_tg" float,"hypertension" bool,"age" float,"NOUSE" float)
SELECT * FROM table_train_179 WHERE triglyceride_tg > 150
which institutions can be categorized as private/united church of christ?
CREATE TABLE table_73898 ("Institution" text,"Location" text,"Nickname" text,"Founded" real,"Type" text,"Enrollment" real,"Joined" text)
SELECT "Institution" FROM table_73898 WHERE "Type" = 'Private/United Church of Christ'
When did the term end that began January 3, 2007?
CREATE TABLE table_2617 ("Office" text,"Type" text,"Location" text,"Elected" text,"Term began" text,"Term ended" text)
SELECT "Term ended" FROM table_2617 WHERE "Term began" = 'January 3, 2007'
What is the item for Leagues entering, when the value for Clubs is 8 4?
CREATE TABLE table_66852 ("Round" text,"Fixtures" real,"Clubs" text,"New entries" text,"Leagues entering" text)
SELECT "Leagues entering" FROM table_66852 WHERE "Clubs" = '8 → 4'
What courses would be helpful before taking CDB 685 ?
CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar,transfer_source varchar,earn_credit varchar,repeat_term varchar,test_id varchar)CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE program_requirement (program_id int,category varchar,min_credit i...
SELECT DISTINCT advisory_requirement FROM course WHERE department = 'CDB' AND number = 685
For what competition was the venue away the n/a the man of the match?
CREATE TABLE table_name_62 (competition VARCHAR,venue VARCHAR,man_of_the_match VARCHAR)
SELECT competition FROM table_name_62 WHERE venue = "away" AND man_of_the_match = "n/a"
What album came out before 1975 with the dawn record label and the single 'lady lady lay'?
CREATE TABLE table_44780 ("Year" real,"Month" text,"Single" text,"Album" text,"Record label" text)
SELECT "Album" FROM table_44780 WHERE "Year" < '1975' AND "Record label" = 'dawn' AND "Single" = 'lady lady lay'
calculate the average age of white ethnic background patients who were hospitalized for 3 days.
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 procedures (subject_id text,hadm_id text,icd9_code text,sho...
SELECT AVG(demographic.age) FROM demographic WHERE demographic.ethnicity = "WHITE" AND demographic.days_stay = "3"
Who are the runners-up in 1996?
CREATE TABLE table_14692 ("Location" text,"Year" text,"Champions" text,"Runners-up" text,"Score" text)
SELECT "Runners-up" FROM table_14692 WHERE "Year" = '1996'
Which 2013 has a 2007 of A, and a Tournament of french open?
CREATE TABLE table_33981 ("Tournament" text,"2006" text,"2007" text,"2008-12" text,"2013" text)
SELECT "2013" FROM table_33981 WHERE "2007" = 'a' AND "Tournament" = 'french open'
What is Air Date, when Rating is 'N/A', and when Weekly Winner is 'Wedding DJ Chris Dixon'?
CREATE TABLE table_61841 ("Air Date" text,"Rating" text,"18-49" text,"Viewers" text,"Weekly Winner" text)
SELECT "Air Date" FROM table_61841 WHERE "Rating" = 'n/a' AND "Weekly Winner" = 'wedding dj chris dixon'
What percentage of voters choise McCain in Burlington?
CREATE TABLE table_20278716_2 (mccain__percentage VARCHAR,county VARCHAR)
SELECT mccain__percentage FROM table_20278716_2 WHERE county = "Burlington"
What is the result when the score is 8-1?
CREATE TABLE table_15626 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text)
SELECT "Result" FROM table_15626 WHERE "Score" = '8-1'
What 2009 has 52-75 as the 2010?
CREATE TABLE table_name_19 (Id VARCHAR)
SELECT 2009 FROM table_name_19 WHERE 2010 = "52-75"
what is the number of the chosen club where the hc dukla tren n (slovakia) is from
CREATE TABLE table_2840500_3 (pick VARCHAR,college_junior_club_team VARCHAR)
SELECT COUNT(pick) FROM table_2840500_3 WHERE college_junior_club_team = "HC Dukla Trenčín (Slovakia)"
What is the name of the language that the film 'AIRPORT POLLOCK' is in?
CREATE TABLE address (address_id number,address text,address2 text,district text,city_id number,postal_code text,phone text,last_update time)CREATE TABLE inventory (inventory_id number,film_id number,store_id number,last_update time)CREATE TABLE film (film_id number,title text,description text,release_year time,languag...
SELECT T2.name FROM film AS T1 JOIN language AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'
How many inputs are there in the 'closure for signature' tab under the field 'sea (revised)'?
CREATE TABLE table_2001348_1 (closure_for_signature VARCHAR,field VARCHAR)
SELECT COUNT(closure_for_signature) FROM table_2001348_1 WHERE field = "Sea (revised)"
What's the average amount of Gold medals won when there were more than 1 silver medal won and less than 2 bronze medals won.
CREATE TABLE table_8934 ("Rank" real,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real)
SELECT AVG("Gold") FROM table_8934 WHERE "Silver" > '1' AND "Bronze" < '2'
Average accept rate (for the whole site). The average accept rate among all users of the target site.
CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserId number,ContentLicense text)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE PostN...
SELECT AVG(a."accept_rate") AS "average_accept_rate" FROM (SELECT p.OwnerUserId, CAST(CAST(COUNT(p.AcceptedAnswerId) AS FLOAT) / CAST(COUNT(p.Id) AS FLOAT) * 100 AS FLOAT(5, 2)) AS "accept_rate" FROM Posts AS p WHERE p.PostTypeId = 1 AND p.ClosedDate IS NULL AND p.CommunityOwnedDate IS NULL AND p.AnswerCount > 0 AND (N...
how many patients were prescribed k-dur 20 during the same month after their cpap/peep therapy - 5-10 cm h2o, since 4 years ago?
CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosi...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'cpap/peep therapy - 5-10 cm h2o' AND DATETIME(treatment.treatmenttime) >= DATETIME(CURRENT_TIME(), '-4 year'...
what is admission type and days of hospital stay of subject name charley pescatore?
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 demographic.admission_type, demographic.days_stay FROM demographic WHERE demographic.name = "Charley Pescatore"
Name the team #2 for river plate
CREATE TABLE table_26339 ("Team #1" text,"Points" text,"Team #2" text,"1st leg" text,"2nd leg" text)
SELECT "Team #2" FROM table_26339 WHERE "Team #1" = 'River Plate'
Find the number of scientists involved for the projects that require more than 300 hours. Show a pie chart.
CREATE TABLE AssignedTo (Scientist int,Project char(4))CREATE TABLE Projects (Code Char(4),Name Char(50),Hours int)CREATE TABLE Scientists (SSN int,Name Char(30))
SELECT Name, COUNT(*) FROM Projects AS T1 JOIN AssignedTo AS T2 ON T1.Code = T2.Project WHERE T1.Hours > 300 GROUP BY T1.Name
Who wrote the episode that had 12.15 million viewers?
CREATE TABLE table_24961421_1 (written_by VARCHAR,us_viewers__millions_ VARCHAR)
SELECT written_by FROM table_24961421_1 WHERE us_viewers__millions_ = "12.15"
Which Attendance has a Date of september 29, 1968, and a Week smaller than 3?
CREATE TABLE table_77195 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" real)
SELECT MIN("Attendance") FROM table_77195 WHERE "Date" = 'september 29, 1968' AND "Week" < '3'
Show the names of members and the location of the performances they attended.
CREATE TABLE member_attendance (Member_ID VARCHAR,Performance_ID VARCHAR)CREATE TABLE performance (Location VARCHAR,Performance_ID VARCHAR)CREATE TABLE member (Name VARCHAR,Member_ID VARCHAR)
SELECT T2.Name, T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID
during this year, what are the top five most frequently prescribed drugs to patients within the same hospital visit after they are diagnosed with hypertension?
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,hospitaladmitsource text,unitadmittime time,unitdischargetime tim...
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hypertension' A...
A pie chart about what are the ids and details for all organizations that have grants of more than 6000 dollars?
CREATE TABLE Organisation_Types (organisation_type VARCHAR(10),organisation_type_description VARCHAR(255))CREATE TABLE Research_Outcomes (outcome_code VARCHAR(10),outcome_description VARCHAR(255))CREATE TABLE Project_Staff (staff_id DOUBLE,project_id INTEGER,role_code VARCHAR(10),date_from DATETIME,date_to DATETIME,oth...
SELECT T2.organisation_details, T1.organisation_id FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_details
What is Mass, when Designation is Prognoz 2?
CREATE TABLE table_name_54 (mass VARCHAR,designation VARCHAR)
SELECT mass FROM table_name_54 WHERE designation = "prognoz 2"
Name the year for le confessional
CREATE TABLE table_17025328_1 (year__ceremony_ VARCHAR,original_title VARCHAR)
SELECT year__ceremony_ FROM table_17025328_1 WHERE original_title = "Le Confessional"
What is the latest year when Phil Anderson won?
CREATE TABLE table_74595 ("Year" real,"Race name" text,"Rider status" text,"Winner" text,"Team/Country" text)
SELECT MAX("Year") FROM table_74595 WHERE "Winner" = 'phil anderson'
What teacher has the easiest course for PreMajor ?
CREATE TABLE program (program_id int,name varchar,college varchar,introduction 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 varcha...
SELECT DISTINCT instructor.name, program_course.workload FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN program_course ON program_course.course_id = cour...
In upper-level classes , which ones are 10 credits ?
CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)CREATE TABLE o...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 10 AND program_course.category LIKE 'ULCS'
What is his lowest number of wins?
CREATE TABLE table_2216245_2 (wins INTEGER)
SELECT MIN(wins) FROM table_2216245_2
Name the english gloss for ha na
CREATE TABLE table_72621 ("English gloss" text,"Santee-Sisseton" text,"Yankton-Yanktonai" text,"Northern Lakota" text,"Southern Lakota" text)
SELECT "English gloss" FROM table_72621 WHERE "Santee-Sisseton" = 'haŋȟ’áŋna'
What is the Site when the date is 11/11/1950?
CREATE TABLE table_77125 ("Date" text,"Opponent#" text,"Site" text,"Result" text,"Attendance" text)
SELECT "Site" FROM table_77125 WHERE "Date" = '11/11/1950'
Who has a religion of and more than 1853 votes?
CREATE TABLE table_name_66 (candidate_name VARCHAR,votes VARCHAR,religion VARCHAR)
SELECT candidate_name FROM table_name_66 WHERE votes > 1853 AND religion = "☪"
What is the Location of the Frequency with a Callsign of DXBL?
CREATE TABLE table_48363 ("Branding" text,"Callsign" text,"Frequency" text,"Power" text,"Location" text)
SELECT "Location" FROM table_48363 WHERE "Callsign" = 'dxbl'
Name the date for hard surface at maybelline classic with opponent of wendy turnbull
CREATE TABLE table_69643 ("Tournament" text,"Date" text,"Surface" text,"Round" text,"Opponent" text)
SELECT "Date" FROM table_69643 WHERE "Surface" = 'hard' AND "Tournament" = 'maybelline classic' AND "Opponent" = 'wendy turnbull'
What year was Jerry Huckaby first elected?
CREATE TABLE table_18308 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text)
SELECT "First elected" FROM table_18308 WHERE "Incumbent" = 'Jerry Huckaby'
Which Played has a Position of 3, and a Points smaller than 15?
CREATE TABLE table_name_85 (played VARCHAR,position VARCHAR,points VARCHAR)
SELECT COUNT(played) FROM table_name_85 WHERE position = 3 AND points < 15
How many apperances for shakhtar donetsk?
CREATE TABLE table_name_84 (appearances VARCHAR,team VARCHAR)
SELECT COUNT(appearances) FROM table_name_84 WHERE team = "shakhtar donetsk"
show me a list of flights from BOSTON to ATLANTA leaving after 1200 and arriving before 1900
CREATE TABLE flight (aircraft_code_sequence text,airline_code varchar,airline_flight text,arrival_time int,connections int,departure_time int,dual_carrier text,flight_days text,flight_id int,flight_number int,from_airport varchar,meal_code text,stops int,time_elapsed int,to_airport varchar)CREATE TABLE days (days_code ...
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 ((flight.arrival_time <= 1900 AND flight.departure_time > 1200) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND flight.to...
Name the game site for l 26 42
CREATE TABLE table_28664 ("Week" real,"Date" text,"Kickoff" text,"Opponent" text,"Final score" text,"Team record" text,"Game site" text,"Attendance" real)
SELECT "Game site" FROM table_28664 WHERE "Final score" = 'L 26–42'
tell me the number of hispanic/latino-puerto rican patients who are less than 67 years of age.
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 WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND demographic.age < "67"
What are the names of teams that do no have match season record?
CREATE TABLE player (player_id number,player text,years_played text,total_wl text,singles_wl text,doubles_wl text,team number)CREATE TABLE team (team_id number,name text)CREATE TABLE match_season (season number,player text,position text,country number,team number,draft_pick_number number,draft_class text,college text)C...
SELECT name FROM team WHERE NOT team_id IN (SELECT team FROM match_season)
what is the maximum total hospital cost to include inject anticoagulant since 2105?
CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careunit text,wardid number,intime time,outtime time)CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id numbe...
SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT procedures_icd.hadm_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'inject anticoagulant')) AND STRFTIME('%y', cost.chargetim...
what comes after 2.7 volts
CREATE TABLE table_204_583 (id number,"capacitor type" text,"capacity" text,"volts" text,"temp." text,"energy-to-weight ratio" text,"power-to-weight ratio" text)
SELECT "volts" FROM table_204_583 WHERE id > (SELECT id FROM table_204_583 WHERE "volts" = 2.7 ORDER BY id DESC LIMIT 1) ORDER BY id LIMIT 1
when did first patient 17953 receive a procedure until 2102?
CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)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 tex...
SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 17953) AND STRFTIME('%y', procedures_icd.charttime) <= '2102' ORDER BY procedures_icd.charttime LIMIT 1
Who placed t1 in Scotland?
CREATE TABLE table_name_37 (player VARCHAR,place VARCHAR,country VARCHAR)
SELECT player FROM table_name_37 WHERE place = "t1" AND country = "scotland"
find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30.
CREATE TABLE pilot (name VARCHAR,age INTEGER,pilot_id VARCHAR)CREATE TABLE MATCH (winning_pilot VARCHAR)
SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY COUNT(*) DESC LIMIT 1
Please give me a bar chart that counts the number of grape of wine, list in ascending by the total number.
CREATE TABLE appellations (No INTEGER,Appelation TEXT,County TEXT,State TEXT,Area TEXT,isAVA TEXT)CREATE TABLE grapes (ID INTEGER,Grape TEXT,Color TEXT)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)
SELECT Grape, COUNT(Grape) FROM wine GROUP BY Grape ORDER BY COUNT(Grape)
What county is the St. Augustine bridge in?
CREATE TABLE table_name_98 (county VARCHAR,location VARCHAR)
SELECT county FROM table_name_98 WHERE location = "st. augustine"
Which rounds did Vic Elford with a Ford cosworth dfv 3.0 v8 engine have?
CREATE TABLE table_58506 ("Constructor" text,"Chassis" text,"Engine" text,"Tyre" text,"Driver" text,"Rounds" text)
SELECT "Rounds" FROM table_58506 WHERE "Driver" = 'vic elford' AND "Engine" = 'ford cosworth dfv 3.0 v8'
Who was the trainer when the jockey was Luke Nolen?
CREATE TABLE table_3161 ("Saddle cloth" real,"Horse" text,"Trainer" text,"Jockey" text,"Weight (kg)" text,"Barrier [b ]" real,"Placing" text)
SELECT "Trainer" FROM table_3161 WHERE "Jockey" = 'Luke Nolen'
What was the team's record against philadelphia?
CREATE TABLE table_27882867_8 (record VARCHAR,team VARCHAR)
SELECT record FROM table_27882867_8 WHERE team = "Philadelphia"
is patient 022-17495's temperature last measured on the first intensive care unit visit greater than the value second to last measured on the first intensive care unit visit?
CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosa...
SELECT (SELECT vitalperiodic.temperature FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-17495') AND NOT patient.unitdischargetime I...
What is the Venue of the Competition with a Score of 0 2?
CREATE TABLE table_60432 ("Date" text,"Venue" text,"Score" text,"Competition" text,"Report" text)
SELECT "Venue" FROM table_60432 WHERE "Score" = '0–2'
On which date was the GT class at Monterey Sports Car Grand Prix?
CREATE TABLE table_name_8 (date VARCHAR,class VARCHAR,race VARCHAR)
SELECT date FROM table_name_8 WHERE class = "gt" AND race = "monterey sports car grand prix"
Name the aircraft type for furstenau/vorden
CREATE TABLE table_30480 ("Parent unit" text,"Geschwader Base" text,"Unit (Gruppe/Staffel)" text,"Aircraft Type" text,"Commanding Officer" text)
SELECT "Aircraft Type" FROM table_30480 WHERE "Geschwader Base" = 'Furstenau/Vorden'
What Position is listed against a Venue of Debrecen, Hungary
CREATE TABLE table_name_64 (position VARCHAR,venue VARCHAR)
SELECT position FROM table_name_64 WHERE venue = "debrecen, hungary"
What is the music for choreographer sabina dalfj ll?
CREATE TABLE table_name_23 (music VARCHAR,choreographer_s_ VARCHAR)
SELECT music FROM table_name_23 WHERE choreographer_s_ = "sabina dalfjäll"
was v. vaithilingam a member of the indian national congress or the janata party ?
CREATE TABLE table_204_54 (id number,"pondicherry assembly" text,"duration" text,"name of m.l.a." text,"party affiliation" text,"election year" number)
SELECT "party affiliation" FROM table_204_54 WHERE "name of m.l.a." = 'v. vaithilingam'
What circuit did Rupert Keegan win in round 8?
CREATE TABLE table_4554 ("Round" real,"Name" text,"Circuit" text,"Date" text,"Winning driver" text,"Winning car" text)
SELECT "Circuit" FROM table_4554 WHERE "Winning driver" = 'rupert keegan' AND "Round" = '8'
where is a arabic restaurant on buchanan in san francisco ?
CREATE TABLE geographic (city_name varchar,county varchar,region varchar)CREATE TABLE restaurant (id int,name varchar,food_type varchar,city_name varchar,rating "decimal)CREATE TABLE location (restaurant_id int,house_number int,street_name varchar,city_name varchar)
SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'san francisco' AND location.street_name = 'buchanan' AND restaurant.food_type = 'arabic' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5
Which Winner has a Winter Olympics of 1968?
CREATE TABLE table_45912 ("Winner" text,"Country" text,"Winter Olympics" text,"FIS Nordic World Ski Championships" text,"Holmenkollen" text)
SELECT "Winner" FROM table_45912 WHERE "Winter Olympics" = '1968'
has patient 030-53416 been treated with a bronchoscopy?
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 treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-53416')) AND treatment.treatmentname = 'bronchoscopy'
Name the resolution for dish of 5270
CREATE TABLE table_79813 ("Dish" text,"Callsign" text,"Network" text,"Resolution" text,"City of License" text,"Official Website" text)
SELECT "Resolution" FROM table_79813 WHERE "Dish" = '5270'
What is the average crowd size for games with north melbourne as the away side?
CREATE TABLE table_name_22 (crowd INTEGER,away_team VARCHAR)
SELECT AVG(crowd) FROM table_name_22 WHERE away_team = "north melbourne"
did patient 14467 have a albumin laboratory test in 08/this year?
CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name 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 prescriptions (row_id number,subject_id n...
SELECT COUNT(*) > 0 FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'albumin') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14467) AND DATETIME(labevents.charttime, 'start of year') = DATETIME(CURRENT_TIME()...
Which Winning score has a Tournament of walt disney world/oldsmobile classic?
CREATE TABLE table_5494 ("Date" text,"Tournament" text,"Winning score" text,"To par" text,"Margin of victory" text)
SELECT "Winning score" FROM table_5494 WHERE "Tournament" = 'walt disney world/oldsmobile classic'
who came next after seve ballesteros ?
CREATE TABLE table_203_499 (id number,"place" text,"player" text,"country" text,"score" text,"to par" number,"money ($)" number)
SELECT "player" FROM table_203_499 WHERE "place" = (SELECT "place" FROM table_203_499 WHERE "player" = 'seve ballesteros') + 1
What were the final time for the swimmer on lane 4?
CREATE TABLE table_name_1 (final VARCHAR,lane VARCHAR)
SELECT final FROM table_name_1 WHERE lane = 4
Which venue is the friendly match in?
CREATE TABLE table_35302 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text)
SELECT "Venue" FROM table_35302 WHERE "Competition" = 'friendly match'
calculate the minimum days for which patients who died before 2168 stayed in hospital.
CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id tex...
SELECT MIN(demographic.days_stay) FROM demographic WHERE demographic.dod_year < "2168.0"
how many incumbent with district being tennessee 5
CREATE TABLE table_18409 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text)
SELECT COUNT("Incumbent") FROM table_18409 WHERE "District" = 'Tennessee 5'