instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
What is the Director of Children of Sarajevo?
CREATE TABLE table_name_39 (director VARCHAR,film_title_used_in_nomination VARCHAR)
SELECT director FROM table_name_39 WHERE film_title_used_in_nomination = "children of sarajevo"
What is the distance for the team time trial?
CREATE TABLE table_name_26 (distance VARCHAR,type VARCHAR)
SELECT distance FROM table_name_26 WHERE type = "team time trial"
Virtual channel of 16.5 has what call sign?
CREATE TABLE table_75031 ("Call sign" text,"Analog channel" text,"Digital channel" text,"Virtual channel" text,"Network" text,"Station Ownership" text)
SELECT "Call sign" FROM table_75031 WHERE "Virtual channel" = '16.5'
What was the score when the opposition was West Coast in Wanganui?
CREATE TABLE table_26847237_1 (score VARCHAR,opposition VARCHAR,location VARCHAR)
SELECT score FROM table_26847237_1 WHERE opposition = "West Coast" AND location = "Wanganui"
what is the home team when the round # is round 1?
CREATE TABLE table_29083 ("Round #" text,"Home Team" text,"Win/Loss" text,"Score" text,"Opposition" text,"Location" text)
SELECT "Home Team" FROM table_29083 WHERE "Round #" = 'Round 1'
What is the finished place where exited is day 11?
CREATE TABLE table_19296 ("Celebrity" text,"Famous for" text,"Entered" text,"Exited" text,"Finished" text)
SELECT "Finished" FROM table_19296 WHERE "Exited" = 'Day 11'
i need information for a flight from DENVER to ATLANTA
CREATE TABLE fare_basis (fare_basis_code text,booking_class text,class_type text,premium text,economy text,discounted text,night text,season text,basis_days text)CREATE TABLE class_of_service (booking_class varchar,rank int,class_description text)CREATE TABLE airport_service (city_code varchar,airport_code varchar,mile...
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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA...
Name the purpose for on-air ID of 2xx
CREATE TABLE table_37965 ("Callsign" text,"Area served" text,"Frequency" text,"Band" text,"On-air ID" text,"Purpose" text)
SELECT "Purpose" FROM table_37965 WHERE "On-air ID" = '2xx'
What are the hometowns of gymnasts and the corresponding number of gymnasts. Show a pie chart.
CREATE TABLE gymnast (Gymnast_ID int,Floor_Exercise_Points real,Pommel_Horse_Points real,Rings_Points real,Vault_Points real,Parallel_Bars_Points real,Horizontal_Bar_Points real,Total_Points real)CREATE TABLE people (People_ID int,Name text,Age real,Height real,Hometown text)
SELECT Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown
Highest smaller than 3,378, and a Stadium of cappielow has what average capacity?
CREATE TABLE table_38780 ("Team" text,"Stadium" text,"Capacity" real,"Highest" real,"Lowest" real,"Average" real)
SELECT AVG("Capacity") FROM table_38780 WHERE "Highest" < '3,378' AND "Stadium" = 'cappielow'
please list the morning flights from PHILADELPHIA to TORONTO
CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varchar,minutes_distant int)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,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 = 'PHILADELPHIA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = '...
Who did the high rebounds for the team Minnesota?
CREATE TABLE table_27734769_9 (high_rebounds VARCHAR,team VARCHAR)
SELECT high_rebounds FROM table_27734769_9 WHERE team = "Minnesota"
When did Jacques Chirac stop being a G8 leader?
CREATE TABLE table_10026563_1 (ended_time_as_senior_g8_leader VARCHAR,person VARCHAR)
SELECT ended_time_as_senior_g8_leader FROM table_10026563_1 WHERE person = "Jacques Chirac"
Who was the republican candidate in the race with incumbent thelma drake?
CREATE TABLE table_21772 ("District" real,"Incumbent" text,"2008 Status" text,"Democratic" text,"Republican" text,"Independent Green" text,"Libertarian" text,"Other Party" text)
SELECT "Republican" FROM table_21772 WHERE "Incumbent" = 'Thelma Drake'
what is the score when the surface is carpet (i) outcome is winner and the championship is rotterdam, netherlands?
CREATE TABLE table_name_43 (score VARCHAR,championship VARCHAR,surface VARCHAR,outcome VARCHAR)
SELECT score FROM table_name_43 WHERE surface = "carpet (i)" AND outcome = "winner" AND championship = "rotterdam, netherlands"
Top 30 Users from Milan, Italy.
CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,RejectionDate time,OwnerUserId number,Comment text,Text text,Title text,Tags text,RevisionGUID other)CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicRea...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%toulouse%' ORDER BY Reputation DESC LIMIT 30
how many tracks are in the album ?
CREATE TABLE table_204_184 (id number,"#" number,"title" text,"producer(s)" text,"featured guest(s)" text,"length" text)
SELECT COUNT("title") FROM table_204_184
Which Combination classification has a Stage of 14?
CREATE TABLE table_6001 ("Stage" text,"Winner" text,"General classification" text,"Points classification" text,"Mountains classification" text,"Combination classification" text,"Team classification" text)
SELECT "Combination classification" FROM table_6001 WHERE "Stage" = '14'
until 2104, patient 7073 underwent any procedure?
CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm...
SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 7073) AND STRFTIME('%y', procedures_icd.charttime) <= '2104'
What is the number of professors for different school.
CREATE TABLE ENROLL (CLASS_CODE varchar(5),STU_NUM int,ENROLL_GRADE varchar(50))CREATE TABLE CLASS (CLASS_CODE varchar(5),CRS_CODE varchar(10),CLASS_SECTION varchar(2),CLASS_TIME varchar(20),CLASS_ROOM varchar(8),PROF_NUM int)CREATE TABLE STUDENT (STU_NUM int,STU_LNAME varchar(15),STU_FNAME varchar(15),STU_INIT varchar...
SELECT SCHOOL_CODE, COUNT(*) FROM DEPARTMENT AS T1 JOIN PROFESSOR AS T2 ON T1.DEPT_CODE = T2.DEPT_CODE GROUP BY T1.SCHOOL_CODE
Name the visitor for detroit on february 24
CREATE TABLE table_38498 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Record" text)
SELECT "Visitor" FROM table_38498 WHERE "Home" = 'detroit' AND "Date" = 'february 24'
what is patient 016-34108's last ward id until 2104?
CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE patient (uniquepid ...
SELECT patient.wardid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-34108') AND STRFTIME('%y', patient.unitadmittime) <= '2104' ORDER BY patient.unitadmittime DESC LIMIT 1
What is the original airdate for episode 7-17 (195) from writer Sidney Slon?
CREATE TABLE table_35331 ("Episode" text,"Title" text,"Writer(s)" text,"Preservation" text,"Original airdate" text)
SELECT "Original airdate" FROM table_35331 WHERE "Writer(s)" = 'sidney slon' AND "Episode" = '7-17 (195)'
In the afternoon of Fall 2006 , is 692 available ?
CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE instructor (instructor...
SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course_offering.start_time >= '12:00:00' AND course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 692 AND semester.semester = 'Fall' AND semester.semester_id = course_offering.semester AND semester.year = 2006
What are the number of days in 1945 where the constituent was heywood and radcliffe?
CREATE TABLE table_name_18 (days VARCHAR,year VARCHAR,constituency VARCHAR)
SELECT days FROM table_name_18 WHERE year = "1945" AND constituency = "heywood and radcliffe"
Find the names of the artists who have produced English songs but have never received rating higher than 8.
CREATE TABLE song (artist_name VARCHAR,languages VARCHAR,rating INTEGER)
SELECT DISTINCT artist_name FROM song WHERE languages = "english" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8
who are all the players for armwood high school
CREATE TABLE table_11677691_12 (player VARCHAR,school VARCHAR)
SELECT player FROM table_11677691_12 WHERE school = "Armwood High school"
What type had a course of Grosseto To Rieti?
CREATE TABLE table_68523 ("Date" text,"Course" text,"Distance" text,"Type" text,"Winner" text)
SELECT "Type" FROM table_68523 WHERE "Course" = 'grosseto to rieti'
What is the Season when league shows bundesliga, and a European competition of played korac cup?
CREATE TABLE table_name_25 (season VARCHAR,league VARCHAR,european_competitions VARCHAR)
SELECT season FROM table_name_25 WHERE league = "bundesliga" AND european_competitions = "played korac cup"
when's the first time patient 022-44805 had the maximum chloride in 12/this year?
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 allergy (allergyid number,patientunitstayid number,drugname text,allergyna...
SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-44805')) AND lab.labname = 'chloride' AND DATETIME(lab.labresulttime, 'start of...
What points have pittsburgh as the home, and November 29 as the date?
CREATE TABLE table_name_30 (points VARCHAR,home VARCHAR,date VARCHAR)
SELECT points FROM table_name_30 WHERE home = "pittsburgh" AND date = "november 29"
which episode had at least 1.0 viewers ?
CREATE TABLE table_204_449 (id number,"no" number,"episode" text,"title" text,"original airdate" text,"viewers" number,"nightly\nrank" number)
SELECT "title" FROM table_204_449 WHERE "viewers" >= 1.0
what is the current version of the name mupen64plus with gpl v2 license?
CREATE TABLE table_51405 ("Name" text,"Current version" text,"System" text,"Platform" text,"License" text)
SELECT "Current version" FROM table_51405 WHERE "License" = 'gpl v2' AND "Name" = 'mupen64plus'
Show each premise type and the number of premises in that type Visualize by bar chart, and show by the Y in ascending please.
CREATE TABLE Order_Items (item_id INTEGER,order_item_status_code VARCHAR(15),order_id INTEGER,product_id INTEGER,item_status_code VARCHAR(15),item_delivered_datetime DATETIME,item_order_quantity VARCHAR(80))CREATE TABLE Premises (premise_id INTEGER,premises_type VARCHAR(15),premise_details VARCHAR(255))CREATE TABLE Mai...
SELECT premises_type, COUNT(*) FROM Premises GROUP BY premises_type ORDER BY COUNT(*)
this month when was patient 11826 prescribed the first propofol?
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_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...
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 11826) AND prescriptions.drug = 'propofol' AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month') ORDER BY p...
Draw a bar chart of destination versus the total number, sort Y in asc order.
CREATE TABLE aircraft (aid number(9,0),name varchar2(30),distance number(6,0))CREATE TABLE flight (flno number(4,0),origin varchar2(20),destination varchar2(20),distance number(6,0),departure_date date,arrival_date date,price number(7,2),aid number(9,0))CREATE TABLE certificate (eid number(9,0),aid number(9,0))CREATE T...
SELECT destination, COUNT(*) FROM flight GROUP BY destination ORDER BY COUNT(*)
count the number of patients whose diagnosis short title is follicular cyst of ovary and drug route is buccal.
CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Follicular cyst of ovary" AND prescriptions.route = "BUCCAL"
Find the checking balance of the accounts whose savings balance is higher than the average savings balance.
CREATE TABLE checking (custid number,balance number)CREATE TABLE savings (custid number,balance number)CREATE TABLE accounts (custid number,name text)
SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT AVG(balance) FROM savings))
What tyre has a chassis of p57 p61?
CREATE TABLE table_name_85 (tyre VARCHAR,chassis VARCHAR)
SELECT tyre FROM table_name_85 WHERE chassis = "p57 p61"
What are the Colt model numbers of the models named GAU-5A/A, with no bayonet lug, no case deflector and stock of 2nd generation?
CREATE TABLE table_72336 ("Colt model no." text,"Name" text,"Stock" text,"Fire control" text,"Rear sight" text,"Forward assist" text,"Case deflector" text,"Barrel length" text,"Barrel profile" text,"Barrel twist" text,"Hand guards" text,"Bayonet Lug" text,"Muzzle device" text)
SELECT "Colt model no." FROM table_72336 WHERE "Bayonet Lug" = 'No' AND "Stock" = '2nd Generation' AND "Case deflector" = 'No' AND "Name" = 'GAU-5A/A'
Name the being qualities for having things of language, religions, work, customs, values, norms
CREATE TABLE table_68449 ("Need" text,"Being (qualities)" text,"Having (things)" text,"Doing (actions)" text,"Interacting (settings)" text)
SELECT "Being (qualities)" FROM table_68449 WHERE "Having (things)" = 'language, religions, work, customs, values, norms'
How many first place participants where from croatia?
CREATE TABLE table_30018460_1 (country_territory VARCHAR)
SELECT 3 AS rd_runner_up FROM table_30018460_1 WHERE country_territory = "Croatia"
Show minimum and maximum amount of memberships for all branches opened in 2011 or located at city London.
CREATE TABLE branch (membership_amount INTEGER,open_year VARCHAR,city VARCHAR)
SELECT MIN(membership_amount), MAX(membership_amount) FROM branch WHERE open_year = 2011 OR city = 'London'
what is the minimum of 60 -64?
CREATE TABLE table_16457934_4 (Id VARCHAR)
SELECT MIN(60 AS _to_64) FROM table_16457934_4
What was the original air date of series number 10?
CREATE TABLE table_45280 ("Series Number" real,"Number of Episodes" real,"Original Air Date" real,"DVD Region 2 release date" text,"DVD Region 1 release date" text)
SELECT AVG("Original Air Date") FROM table_45280 WHERE "Series Number" = '10'
Which 2007 has a 2006 of A, and a Tournament of canada?
CREATE TABLE table_name_8 (tournament VARCHAR)
SELECT 2007 FROM table_name_8 WHERE 2006 = "a" AND tournament = "canada"
did true romance make more or less money than diabolique ?
CREATE TABLE table_203_98 (id number,"title" text,"year" number,"director" text,"budget" text,"gross (worldwide)" text,"notes" text)
SELECT (SELECT "gross (worldwide)" FROM table_203_98 WHERE "title" = 'true romance') > (SELECT "gross (worldwide)" FROM table_203_98 WHERE "title" = 'diabolique')
What is the Italian word for the English word 'otter'?
CREATE TABLE table_2077192_2 (italian VARCHAR,english VARCHAR)
SELECT italian FROM table_2077192_2 WHERE english = "otter"
Show the role description and the id of the project staff involved in most number of project outcomes?
CREATE TABLE Project_outcomes (project_id VARCHAR)CREATE TABLE Project_Staff (staff_id VARCHAR,role_code VARCHAR,project_id VARCHAR)CREATE TABLE Staff_Roles (role_description VARCHAR,role_code VARCHAR)
SELECT T1.role_description, T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id ORDER BY COUNT(*) DESC LIMIT 1
Which Date has a Pole Position of michael devaney?
CREATE TABLE table_name_94 (date VARCHAR,pole_position VARCHAR)
SELECT date FROM table_name_94 WHERE pole_position = "michael devaney"
What is the to par that has jimmy hines as the player?
CREATE TABLE table_name_46 (to_par VARCHAR,player VARCHAR)
SELECT to_par FROM table_name_46 WHERE player = "jimmy hines"
What is the sum of totals with a Vault of 38.437, and a Floor Exercise smaller than 37.524?
CREATE TABLE table_55942 ("Rank" real,"Team" text,"Floor Exercise" real,"Pommel Horse" real,"Rings" real,"Vault" real,"Parallel Bars" real,"Horizontal Bar" real,"Total" real)
SELECT COUNT("Total") FROM table_55942 WHERE "Vault" = '38.437' AND "Floor Exercise" < '37.524'
how many patients received glucose in the same hospital visit after the first ct scan - without contrast was performed since 5 years ago?
CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,discha...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'ct scan - without contrast' AND DATETIME(treatment.treatmenttime) >= DATE...
Which stadium name contains the substring 'Bank'?
CREATE TABLE stadium (name VARCHAR)
SELECT name FROM stadium WHERE name LIKE "%Bank%"
Are there integrated secondary schools in Uri?
CREATE TABLE table_22253 ("Canton" text,"Years of Kindergarten" real,"Years of Kindergarten provided" text,"Years of Kindergarten legally required" text,"Length of Primary School" real,"Length of mandatory Secondary School" real,"Separate Secondary Schools?" text,"Cooperative Secondary Schools?" text,"Integrated Second...
SELECT "Integrated Secondary Schools?" FROM table_22253 WHERE "Canton" = 'Uri'
What was the away team when the home team scored 10.8 (68)?
CREATE TABLE table_74778 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Away team" FROM table_74778 WHERE "Home team score" = '10.8 (68)'
give me the flights on 12 27 with the fares from INDIANAPOLIS to ORLANDO
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 date_day (month_number int,day_number int,year int,day_name varchar)CR...
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, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AN...
how many times did patient 22517 visit hospital until 2 years ago?
CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,valuenum number,valueuom text)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 ...
SELECT COUNT(DISTINCT admissions.hadm_id) FROM admissions WHERE admissions.subject_id = 22517 AND DATETIME(admissions.admittime) <= DATETIME(CURRENT_TIME(), '-2 year')
what type of record was made where result/games is 10 games (29,606 avg.)
CREATE TABLE table_21436373_12 (type_of_record VARCHAR,result_games VARCHAR)
SELECT type_of_record FROM table_21436373_12 WHERE result_games = "10 games (29,606 avg.)"
Which city has a C1 class and Identifier of CBCD-FM?
CREATE TABLE table_41023 ("City of license" text,"Identifier" text,"Frequency" text,"Power" text,"Class" text,"RECNet" text)
SELECT "City of license" FROM table_41023 WHERE "Class" = 'c1' AND "Identifier" = 'cbcd-fm'
On November 14, 2007, what are the Democrat: Vivian Davis Figures percentages?
CREATE TABLE table_21042 ("Poll Source" text,"Dates administered" text,"Democrat: Vivian Davis Figures" text,"Republican: Jeff Sessions" text,"Lead Margin" real)
SELECT "Democrat: Vivian Davis Figures" FROM table_21042 WHERE "Dates administered" = 'November 14, 2007'
In which location was the method decision (split)?
CREATE TABLE table_7980 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Time" text,"Location" text)
SELECT "Location" FROM table_7980 WHERE "Method" = 'decision (split)'
What is the time in week 3?
CREATE TABLE table_63284 ("Week" real,"Date" text,"Opponent" text,"Result" text,"TV Time" text,"Attendance" text)
SELECT "TV Time" FROM table_63284 WHERE "Week" = '3'
What was the 2nd leg score when atl tico tucum n played at home?
CREATE TABLE table_name_84 (home__2nd_leg_ VARCHAR)
SELECT 2 AS nd_leg FROM table_name_84 WHERE home__2nd_leg_ = "atlético tucumán"
which party had the most prime ministers ?
CREATE TABLE table_203_694 (id number,"#" number,"name" text,"took office" text,"left office" text,"party" text)
SELECT "party" FROM table_203_694 GROUP BY "party" ORDER BY COUNT("name") DESC LIMIT 1
Name the Kaz Hayashi which has BUSHI of yang (9:43)
CREATE TABLE table_name_49 (kaz_hayashi VARCHAR,bushi VARCHAR)
SELECT kaz_hayashi FROM table_name_49 WHERE bushi = "yang (9:43)"
What genre is the song recorded in 1926?
CREATE TABLE table_name_56 (genre VARCHAR,year_recorded VARCHAR)
SELECT genre FROM table_name_56 WHERE year_recorded = "1926"
count the number of patients whose admission year is less than 2187 and lab test name is creatinine, urine?
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2187" AND lab.label = "Creatinine, Urine"
show me the number of patients admitted before 2174 who have been diagnosed with ventricular septal defect.
CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,do...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2174" AND diagnoses.long_title = "Ventricular septal defect"
What is the rating of the episode with a share of 4 and a rating/share (18-49) of 0.7/2?
CREATE TABLE table_25751274_2 (rating VARCHAR,share VARCHAR)
SELECT rating FROM table_25751274_2 WHERE share = 4 AND rating / SHARE(18 - 49) = 0.7 / 2
Show me about the correlation between School_ID and ACC_Percent , and group by attribute Team_Name in a scatter chart.
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 School_ID, ACC_Percent FROM basketball_match GROUP BY Team_Name
close votes for particular tags.
CREATE TABLE PostTypes (Id number,Name text)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)CR...
SELECT p.Id, p.Id AS "post_link", p.CreationDate, p.Score, COUNT(PostHistory.Id) AS HistCount FROM Tags JOIN PostTags ON Tags.Id = PostTags.TagId JOIN Posts AS p ON p.Id = PostTags.PostId JOIN PostHistory ON PostHistory.PostId = p.Id WHERE Tags.TagName IN ('python') AND PostHistory.PostHistoryTypeId = 10 AND p.ClosedDa...
which team gave up the most goals ?
CREATE TABLE table_203_171 (id number,"place\n(posicion)" number,"team\n(equipo)" text,"played\n(pj)" number,"won\n(pg)" number,"draw\n(pe)" number,"lost\n(pp)" number,"goals scored\n(gf)" number,"goals conceded\n(gc)" number,"+/-\n(dif.)" number,"points\n(pts.)" number)
SELECT "team\n(equipo)" FROM table_203_171 ORDER BY "goals conceded\n(gc)" DESC LIMIT 1
What is the average Laps for a grid smaller than 17, and a Constructor of williams - bmw, driven by jenson button?
CREATE TABLE table_78436 ("Driver" text,"Constructor" text,"Laps" real,"Time/Retired" text,"Grid" real)
SELECT AVG("Laps") FROM table_78436 WHERE "Grid" < '17' AND "Constructor" = 'williams - bmw' AND "Driver" = 'jenson button'
what flights on UA leave LGA for SAN JOSE and arrive around 10pm
CREATE TABLE compartment_class (compartment varchar,class_type varchar)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varchar,minutes_dist...
SELECT DISTINCT flight.flight_id FROM airport, airport_service, city, flight WHERE (((flight.arrival_time <= 2230 AND flight.arrival_time >= 2130) AND city.city_code = airport_service.city_code AND city.city_name = 'SAN JOSE' AND flight.to_airport = airport_service.airport_code) AND airport.airport_code = 'LGA' AND fli...
For those records from the products and each product's manufacturer, visualize a scatter chart about the correlation between code and revenue , and group by attribute headquarter.
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 T1.Code, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter
List each test result and its count in descending order of count by a pie chart.
CREATE TABLE Students (student_id INTEGER,date_of_registration DATETIME,date_of_latest_logon DATETIME,login_name VARCHAR(40),password VARCHAR(10),personal_name VARCHAR(40),middle_name VARCHAR(40),family_name VARCHAR(40))CREATE TABLE Courses (course_id INTEGER,author_id INTEGER,subject_id INTEGER,course_name VARCHAR(120...
SELECT test_result, COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC
What is the date of the game later than week 13 and 41,862 people attended?
CREATE TABLE table_33425 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Stadium" text,"Record" text,"Box scores" text,"Attendance" text)
SELECT "Date" FROM table_33425 WHERE "Week" > '13' AND "Attendance" = '41,862'
What is the score of the game with a tie no of 3?
CREATE TABLE table_59577 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Date" text)
SELECT "Score" FROM table_59577 WHERE "Tie no" = '3'
Which round was played in the H Venue on 29 january 1949?
CREATE TABLE table_50210 ("Opposing Team" text,"Against" real,"Date" text,"Venue" text,"Round" text)
SELECT "Round" FROM table_50210 WHERE "Venue" = 'h' AND "Date" = '29 january 1949'
What was the period for 1896?
CREATE TABLE table_10581 ("Name" text,"City" text,"Height feet/m" text,"Year" real,"Period" text,"Surpassed by" text)
SELECT "Period" FROM table_10581 WHERE "Year" = '1896'
What are the names and scores of wines that are made of white color grapes?
CREATE TABLE grapes (id number,grape text,color text)CREATE TABLE wine (no number,grape text,winery text,appelation text,state text,name text,year number,price number,score number,cases number,drink text)CREATE TABLE appellations (no number,appelation text,county text,state text,area text,isava text)
SELECT T2.name, T2.score FROM grapes AS T1 JOIN wine AS T2 ON T1.grape = T2.grape WHERE T1.color = "White"
What is the fewest amount of races in any season?
CREATE TABLE table_25421463_1 (races INTEGER)
SELECT MIN(races) FROM table_25421463_1
Show the names of donors who donated to both school 'Glenn' and 'Triton.
CREATE TABLE endowment (endowment_id number,school_id number,donator_name text,amount number)CREATE TABLE budget (school_id number,year number,budgeted number,total_budget_percent_budgeted number,invested number,total_budget_percent_invested number,budget_invested_percent text)CREATE TABLE school (school_id text,school...
SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn' INTERSECT SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Triton'
what is the hospital's maximum total cost when it includes cultures - urine in 2100?
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 vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number...
SELECT MAX(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 treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'cultures - urine')) AND STRFTIME('%y', cost....
How many vieweres for the episode with a share of 1, a Rating larger than 0.7000000000000001, and a Rank (#) of 100/102?
CREATE TABLE table_55829 ("Episode" text,"Airdate" text,"Rating" real,"Share" real,"18-49 (Rating/Share)" text,"Viewers (m)" real,"Rank (#)" text)
SELECT "Viewers (m)" FROM table_55829 WHERE "Share" = '1' AND "Rating" > '0.7000000000000001' AND "Rank (#)" = '100/102'
What away team played against Footscray as the home team?
CREATE TABLE table_77844 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Away team" FROM table_77844 WHERE "Home team" = 'footscray'
What Persian word(s) has the same meaning as the Romani word duj?
CREATE TABLE table_name_92 (persian VARCHAR,romani VARCHAR)
SELECT persian FROM table_name_92 WHERE romani = "duj"
What is the highest week that has carolina panthers as the opponent?
CREATE TABLE table_name_51 (week INTEGER,opponent VARCHAR)
SELECT MAX(week) FROM table_name_51 WHERE opponent = "carolina panthers"
Who was the Centerfold Model on 5-95?
CREATE TABLE table_name_32 (centerfold_model VARCHAR,date VARCHAR)
SELECT centerfold_model FROM table_name_32 WHERE date = "5-95"
Name the 3rd stage for parameter of thrust
CREATE TABLE table_16537783_2 (parameter VARCHAR)
SELECT 3 AS rd_stage FROM table_16537783_2 WHERE parameter = "Thrust"
What is the pf for Rebecca Jean Macphee?
CREATE TABLE table_73253 ("Locale" text,"Skip" text,"W" real,"L" real,"PF" real,"PA" real,"Ends Won" real,"Ends Lost" real,"Blank Ends" real,"Stolen Ends" real,"Shot Pct." real)
SELECT MIN("PF") FROM table_73253 WHERE "Skip" = 'Rebecca Jean MacPhee'
fares from DALLAS to BALTIMORE
CREATE TABLE code_description (code varchar,description text)CREATE TABLE food_service (meal_code text,meal_number int,compartment text,meal_description varchar)CREATE TABLE fare_basis (fare_basis_code text,booking_class text,class_type text,premium text,economy text,discounted text,night text,season text,basis_days te...
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_...
Who is the home team when the san francisco 49ers are visiting with a result of 42-14?
CREATE TABLE table_79162 ("Year" real,"Date" text,"Home Team" text,"Result" text,"Visiting Team" text,"Venue" text,"Attendance" real)
SELECT "Home Team" FROM table_79162 WHERE "Visiting Team" = 'san francisco 49ers' AND "Result" = '42-14'
what is the minimum hospital cost involving a drug that is called 0.9% sodium chloride (mini bag plus)?
CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type t...
SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT prescriptions.hadm_id FROM prescriptions WHERE prescriptions.drug = '0.9% sodium chloride (mini bag plus)') GROUP BY cost.hadm_id) AS t1
count the number of patients whose insurance is private and procedure long title is coronary arteriography using a single catheter?
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 = "Private" AND procedures.long_title = "Coronary arteriography using a single catheter"
What's the score of the t10 player from australia?
CREATE TABLE table_60001 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text)
SELECT "Score" FROM table_60001 WHERE "Place" = 't10' AND "Country" = 'australia'
Count the number of captains that have each rank Visualize by bar chart, and show from low to high by the x axis please.
CREATE TABLE Ship (Ship_ID int,Name text,Type text,Built_Year real,Class text,Flag text)CREATE TABLE captain (Captain_ID int,Name text,Ship_ID int,age text,Class text,Rank text)
SELECT Rank, COUNT(*) FROM captain GROUP BY Rank ORDER BY Rank
Return the number of booking end dates for the apartments that have type code 'Duplex' for each year in a bar chart, rank by the Y-axis in ascending.
CREATE TABLE Apartment_Buildings (building_id INTEGER,building_short_name CHAR(15),building_full_name VARCHAR(80),building_description VARCHAR(255),building_address VARCHAR(255),building_manager VARCHAR(50),building_phone VARCHAR(80))CREATE TABLE Apartment_Bookings (apt_booking_id INTEGER,apt_id INTEGER,guest_id INTEGE...
SELECT booking_end_date, COUNT(booking_end_date) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = "Duplex" ORDER BY COUNT(booking_start_date)
Name the team for january 17
CREATE TABLE table_74186 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT "Team" FROM table_74186 WHERE "Date" = 'January 17'