instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
What is the average attendance of the game with 38 opponent and less than 14 Falcons points?
CREATE TABLE table_44081 ("Game" text,"Date" text,"Opponent" text,"Result" text,"Falcons points" real,"Opponents" real,"Attendance" real)
SELECT AVG("Attendance") FROM table_44081 WHERE "Opponents" = '38' AND "Falcons points" < '14'
Which years in Orlando are featured with the center position?
CREATE TABLE table_name_11 (years_in_orlando VARCHAR,position VARCHAR)
SELECT years_in_orlando FROM table_name_11 WHERE position = "center"
are there any flights from DALLAS FORT WORTH to BOSTON leaving before 1000
CREATE TABLE code_description (code varchar,description text)CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE restriction (restriction_code text,advance_purchase int,stopovers text,saturday_stay_required text,minimum_stay int,maximum_stay int,application text,no_discounts ...
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_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND flight.departure_time < 1000 AND flight.to_airport = AIRPORT_SERVICE_1.airpor...
For those records from the products and each product's manufacturer, show me about the distribution of name and the sum of manufacturer , and group by attribute name in a bar chart, order by the y-axis from low to high.
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.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Manufacturer
What school/club did gerald wilkins attend?
CREATE TABLE table_46621 ("Player" text,"Nationality" text,"Position" text,"Years for Grizzlies" text,"School/Club Team" text)
SELECT "School/Club Team" FROM table_46621 WHERE "Player" = 'gerald wilkins'
For those employees who do not work in departments with managers that have ids between 100 and 200, draw a bar chart about the distribution of hire_date and the average of manager_id bin hire_date by weekday.
CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUMBER...
SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200)
what was the transfer fee to transfer kevin watson ?
CREATE TABLE table_204_482 (id number,"date" text,"position" text,"name" text,"from" text,"fee" text)
SELECT "fee" FROM table_204_482 WHERE "name" = 'kevin watson'
What's the result for the category of best actor in a supporting role?
CREATE TABLE table_50066 ("Year" real,"Award giving body" text,"Category" text,"Nominated for" text,"Result" text)
SELECT "Result" FROM table_50066 WHERE "Category" = 'best actor in a supporting role'
What is the percentage of the Labour Party on the Harris Poll
CREATE TABLE table_20443 ("Party" text,"Marplan" text,"Gallup" text,"National Opinion Polls (NOP)" text,"Opinion Research Centre (OPC)" text,"Harris" text)
SELECT "Harris" FROM table_20443 WHERE "Party" = 'Labour'
What engine was used by Ram Penthouse Rizla Racing in 1978?
CREATE TABLE table_name_97 (engine VARCHAR,year VARCHAR,entrant VARCHAR)
SELECT engine FROM table_name_97 WHERE year > 1978 AND entrant = "ram penthouse rizla racing"
find all flights from PHILADELPHIA to DALLAS stopping in ATLANTA
CREATE TABLE time_interval (period text,begin_time int,end_time int)CREATE TABLE fare (fare_id int,from_airport varchar,to_airport varchar,fare_basis_code text,fare_airline text,restriction_code text,one_direction_cost int,round_trip_cost int,round_trip_required varchar)CREATE TABLE date_day (month_number int,day_numbe...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND CITY_2.cit...
How many positions have goals of fewer than 40 and more than 38 played?
CREATE TABLE table_name_62 (position VARCHAR,goals_for VARCHAR,played VARCHAR)
SELECT COUNT(position) FROM table_name_62 WHERE goals_for < 40 AND played > 38
how many times did they not qualify for both playoffs and open cup ?
CREATE TABLE table_203_595 (id number,"year" number,"division" number,"league" text,"reg. season" text,"playoffs" text,"open cup" text)
SELECT COUNT(*) FROM table_203_595 WHERE "playoffs" = 'did not qualify' AND "open cup" = 'did not qualify'
which event comes before dynamite !! usa ?
CREATE TABLE table_204_363 (id number,"res." text,"record" text,"opponent" text,"method" text,"event" text,"date" text,"round" number,"time" text,"location" text,"notes" text)
SELECT "event" FROM table_204_363 WHERE id = (SELECT id FROM table_204_363 WHERE "event" = 'dynamite!! usa') - 1
Which team has a 59.8% completion rate?
CREATE TABLE table_71845 ("Year" text,"Team" text,"Attempts" text,"Completions" text,"Completion %" text,"Yards" text)
SELECT "Team" FROM table_71845 WHERE "Completion %" = '59.8%'
how many drumsets of drumstand (oftenoptional) with hd-1/3stand and tom-tom pads is 3xcloth-head are
CREATE TABLE table_2889300_6 (drumset_name VARCHAR,drumstand__oftenoptional_ VARCHAR,tom_tom_pads VARCHAR)
SELECT COUNT(drumset_name) FROM table_2889300_6 WHERE drumstand__oftenoptional_ = "HD-1/3Stand" AND tom_tom_pads = "3xCloth-Head"
what is marital status and death status of subject id 98220?
CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marita...
SELECT demographic.marital_status, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "98220"
Which Rank has a Network of bbc one, and a Number of Viewers of 30.15million? Question 2
CREATE TABLE table_59811 ("Rank" real,"Show" text,"Number of Viewers" text,"Date" text,"Network" text)
SELECT SUM("Rank") FROM table_59811 WHERE "Network" = 'bbc one' AND "Number of Viewers" = '30.15million'
What is the maximum pick when WR was the position and Michigan the college, and the overall greater than 255?
CREATE TABLE table_47802 ("Round" real,"Pick" real,"Overall" real,"Name" text,"Position" text,"College" text)
SELECT MAX("Pick") FROM table_47802 WHERE "Position" = 'wr' AND "College" = 'michigan' AND "Overall" > '255'
Name the high rebounds for record 7-1
CREATE TABLE table_22669 ("Game" real,"Date" text,"Opponent" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location/Attendance" text,"Record" text)
SELECT "High rebounds" FROM table_22669 WHERE "Record" = '7-1'
What is the state and enrollment of the colleges where have any students who got accepted in the tryout decision Plot them as bar chart, order X-axis in asc order.
CREATE TABLE Tryout (pID numeric(5,0),cName varchar(20),pPos varchar(8),decision varchar(3))CREATE TABLE College (cName varchar(20),state varchar(2),enr numeric(5,0))CREATE TABLE Player (pID numeric(5,0),pName varchar(20),yCard varchar(3),HS numeric(5,0))
SELECT state, enr FROM College AS T1 JOIN Tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes' ORDER BY state
What's the record achieved in the gamed played at BC Place Stadium?
CREATE TABLE table_21796261_4 (record VARCHAR,location VARCHAR)
SELECT record FROM table_21796261_4 WHERE location = "BC Place Stadium"
i'd like to go from ST. PAUL to KANSAS CITY on friday with a meal
CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,time_zone_code varchar)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,departu...
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, days, flight, food_service WHERE ((date_day.day_number = 25 AND date_day.month_number = 6 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight....
Give me the comparison about School_ID over the ACC_Road , and group by attribute ACC_Home by a bar chart, sort by the X in ascending.
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 ACC_Road, School_ID FROM basketball_match GROUP BY ACC_Home, ACC_Road ORDER BY ACC_Road
On what date were sheets issued in Tallahassee, Florida?
CREATE TABLE table_name_40 (date_of_issue VARCHAR,place_of_issue VARCHAR)
SELECT date_of_issue FROM table_name_40 WHERE place_of_issue = "tallahassee, florida"
which team took first place ?
CREATE TABLE table_204_135 (id number,"position" number,"club" text,"played" number,"points" number,"wins" number,"draws" number,"losses" number,"goals for" number,"goals against" number,"goal difference" number)
SELECT "club" FROM table_204_135 WHERE "position" = 1
For all employees who have the letters D or S in their first name, find hire_date and the average of manager_id bin hire_date by time, and visualize them by a bar chart.
CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME var...
SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
how many matters have political party as their type ?
CREATE TABLE table_203_609 (id number,"#" number,"matters" text,"sections of the constitution allowing their institution" text,"eligible petitioners" text,"type" text)
SELECT COUNT("matters") FROM table_203_609 WHERE "type" = 'political party'
how many patients admitted via office referral are less than 49 years of age?
CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,sho...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND demographic.age < "49"
Tell me the named for latitude of 6.4
CREATE TABLE table_name_61 (named VARCHAR,latitude VARCHAR)
SELECT named AS after FROM table_name_61 WHERE latitude = 6.4
i would like to get the top five diagnosis that has the highest three year mortality rate.
CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id...
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t4.icd9_code FROM (SELECT t3.icd9_code, DENSE_RANK() OVER (ORDER BY t3.c1 DESC) AS c2 FROM (SELECT t2.icd9_code, 100 - SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t2.chartt...
What number is Tony Dixon?
CREATE TABLE table_34156 ("Position" text,"Number" real,"Name" text,"Height" text,"Weight" real,"Class" text,"Hometown" text,"Games\u2191" real)
SELECT "Number" FROM table_34156 WHERE "Name" = 'tony dixon'
What was the method for the UFC Fight Night 10 event?
CREATE TABLE table_name_11 (method VARCHAR,event VARCHAR)
SELECT method FROM table_name_11 WHERE event = "ufc fight night 10"
Which Points have a Game larger than 25, and an Opponent of dallas stars?
CREATE TABLE table_36201 ("Game" real,"December" real,"Opponent" text,"Score" text,"Record" text,"Points" real)
SELECT AVG("Points") FROM table_36201 WHERE "Game" > '25' AND "Opponent" = 'dallas stars'
What is the Label for Date of 14 November 2003, and Catalogue tojp 60121-22?
CREATE TABLE table_52129 ("Country" text,"Date" text,"Label" text,"Format" text,"Catalogue" text)
SELECT "Label" FROM table_52129 WHERE "Date" = '14 november 2003' AND "Catalogue" = 'tojp 60121-22'
What zip codes have a station with a max temperature greater than or equal to 80 and when did it reach that temperature?
CREATE TABLE station (id number,name text,lat number,long number,dock_count number,city text,installation_date text)CREATE TABLE trip (id number,duration number,start_date text,start_station_name text,start_station_id number,end_date text,end_station_name text,end_station_id number,bike_id number,subscription_type text...
SELECT date, zip_code FROM weather WHERE max_temperature_f >= 80
What is the population that has an area of 715.58?
CREATE TABLE table_21372 ("Official Name" text,"Status" text,"Area km 2" text,"Population" real,"Census Ranking" text)
SELECT "Population" FROM table_21372 WHERE "Area km 2" = '715.58'
What is the location of the school established in 1923
CREATE TABLE table_20799 ("Institution" text,"Location" text,"Nickname" text,"Enrollment" real,"Established" real)
SELECT "Location" FROM table_20799 WHERE "Established" = '1923'
In what county is the school of Merrillville?
CREATE TABLE table_name_17 (county VARCHAR,school VARCHAR)
SELECT county FROM table_name_17 WHERE school = "merrillville"
What is the population for the area that has a Hanzi of ?
CREATE TABLE table_35851 ("Name" text,"Hanzi" text,"Hanyu Pinyin" text,"Population (2010-11-01)" text,"Area (km\u00b2)" text,"Density (/km\u00b2)" text)
SELECT "Population (2010-11-01)" FROM table_35851 WHERE "Hanzi" = '延寿县'
Which Losses have Draws larger than 0?
CREATE TABLE table_name_28 (losses INTEGER,draws INTEGER)
SELECT MAX(losses) FROM table_name_28 WHERE draws > 0
What bullet does the gun with a shoulder measurement of 12.5 (.491)?
CREATE TABLE table_33692 ("Name" text,"Bullet" text,"Length" text,"Base" text,"Shoulder" text,"Neck" text)
SELECT "Bullet" FROM table_33692 WHERE "Shoulder" = '12.5 (.491)'
for patients who were prescribed with aspirin 325 mg ec tab since 6 years ago, what are the top five most common drugs that followed within the same month?
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 intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text...
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'aspirin 325 mg ec tab' AND DATETIME(medication.drug...
give me the number of patients whose death status is 0 and procedure short title is venous cath nec?
CREATE TABLE diagnoses (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,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.short_title = "Venous cath NEC"
What conferences does Yejin Kim submit to ?
CREATE TABLE field (fieldid int)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE paperdataset (paperid int,datasetid int)CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TABLE paper (paperid int,title varchar,venueid int,year int,numciting int,numcitedby int,journalid int)CREATE TABLE da...
SELECT DISTINCT paper.venueid FROM author, paper, writes WHERE author.authorname = 'Yejin Kim' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid
specify the religion of patient josette orr
CREATE TABLE diagnoses (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,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag...
SELECT demographic.religion FROM demographic WHERE demographic.name = "Josette Orr"
Who is the director of the production number 9368?
CREATE TABLE table_62778 ("Title" text,"Series" text,"Director" text,"Production Number" text,"Release date" text)
SELECT "Director" FROM table_62778 WHERE "Production Number" = '9368'
What's the Serie A when the coppa italia was 5?
CREATE TABLE table_61335 ("Name" text,"Serie A" real,"Champions League" real,"Coppa Italia" real,"Total" real)
SELECT AVG("Serie A") FROM table_61335 WHERE "Coppa Italia" = '5'
what is maximum age of patients whose marital status is single and ethnicity is unknown/not specified?
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 MAX(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.ethnicity = "UNKNOWN/NOT SPECIFIED"
which month had the most performers ?
CREATE TABLE table_203_784 (id number,"no. in\nseries" number,"no. in\nseason" number,"performer" text,"appearance" text,"air date" text)
SELECT "air date" FROM table_203_784 GROUP BY "air date" ORDER BY COUNT("performer") DESC LIMIT 1
what number of patients with primary disease as overdose had procedure called contr cerebr arteriogram?
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.diagnosis = "OVERDOSE" AND procedures.short_title = "Contr cerebr arteriogram"
show me all flights from DENVER to PHILADELPHIA which leave next saturday afternoon
CREATE TABLE equipment_sequence (aircraft_code_sequence varchar,aircraft_code varchar)CREATE TABLE fare (fare_id int,from_airport varchar,to_airport varchar,fare_basis_code text,fare_airline text,restriction_code text,one_direction_cost int,round_trip_cost int,round_trip_required varchar)CREATE TABLE ground_service (ci...
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, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' AND date_day.day_number = 26 AND date_day.month_number = 7...
What country did ekaterina karsten row for with fa listed under notes?
CREATE TABLE table_66482 ("Rank" real,"Athlete" text,"Country" text,"Time" text,"Notes" text)
SELECT "Country" FROM table_66482 WHERE "Notes" = 'fa' AND "Athlete" = 'ekaterina karsten'
Name the ends won for blank ends for 0
CREATE TABLE table_25107064_2 (Ends VARCHAR,blank_ends VARCHAR)
SELECT Ends AS won FROM table_25107064_2 WHERE blank_ends = 0
Name the normal with que of 24
CREATE TABLE table_name_62 (normal_total VARCHAR,que VARCHAR)
SELECT normal_total FROM table_name_62 WHERE que = "24"
Bar graph to show minimal room count from different apt type code, and order in ascending by the Y-axis.
CREATE TABLE Apartment_Facilities (apt_id INTEGER,facility_code CHAR(15))CREATE TABLE View_Unit_Status (apt_id INTEGER,apt_booking_id INTEGER,status_date DATETIME,available_yn BIT)CREATE TABLE Apartment_Buildings (building_id INTEGER,building_short_name CHAR(15),building_full_name VARCHAR(80),building_description VARCH...
SELECT apt_type_code, MIN(room_count) FROM Apartments GROUP BY apt_type_code ORDER BY MIN(room_count)
what is the average total hospital cost, that includes diagnostic ultrasound of heart - transthoracic echocardiography in 2105?
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 diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,...
SELECT AVG(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 = 'diagnostic ultrasound of heart - transthorac...
What volume number has the ISBN of 978-1-59582-712-8 (hc) 978-1-59582-713-5 (tpb)?
CREATE TABLE table_name_38 (volume VARCHAR,isbn VARCHAR)
SELECT volume FROM table_name_38 WHERE isbn = "978-1-59582-712-8 (hc) 978-1-59582-713-5 (tpb)"
What is the Revenues of Ukyo-Daiyu?
CREATE TABLE table_name_81 (revenues VARCHAR,courtesy_title VARCHAR)
SELECT revenues FROM table_name_81 WHERE courtesy_title = "ukyo-daiyu"
Name the total number of ERP W when the call sign is w217bf
CREATE TABLE table_66821 ("Call sign" text,"Frequency MHz" real,"City of license" text,"ERP W" real,"FCC info" text)
SELECT COUNT("ERP W") FROM table_66821 WHERE "Call sign" = 'w217bf'
give me the number of patients whose year of death is less than or equal to 2133 and procedure icd9 code is 3142?
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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2133.0" AND procedures.icd9_code = "3142"
give me the number of patients less than 79 years who are suffering from posterior communicating aneurysm/sda primary disease.
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 lab (subject_id text,hadm_id text,itemid text,charttime tex...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "POSTERIOR COMMUNICATING ANEURYSM/SDA" AND demographic.age < "79"
Accept rate of answers vs total answers written.
CREATE TABLE FlagTypes (Id number,Name text,Description text)CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionDate time,ExpiryDate time,Body text,OwnerUserId number,DeletionUserId number)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostType...
SELECT 10 * (answer_count / 10) AS answer_count, 100 * SUM(accepted_answer_count) / SUM(answer_count) AS accepted_percent FROM (SELECT Users.Id, COUNT(*) AS answer_count, SUM(CASE WHEN questions.AcceptedAnswerId = answers.Id THEN 1 ELSE 0 END) AS accepted_answer_count FROM Posts AS answers INNER JOIN Users AS users ON ...
How many colleges did the player picked 57 attend?
CREATE TABLE table_1163 ("Rnd" real,"Pick" real,"Player name" text,"Position" text,"College" text,"Height" text,"Weight" text)
SELECT COUNT("College") FROM table_1163 WHERE "Pick" = '57'
How much would you expect the enrollment to be in Springfield?
CREATE TABLE table_2316 ("School" text,"Location(s)" text,"Control" text,"Type" text,"Enrollment" real,"Founded" real)
SELECT MIN("Enrollment") FROM table_2316 WHERE "Location(s)" = 'Springfield'
What is the To par of the Place 1 Player?
CREATE TABLE table_62156 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text,"Money ($)" real)
SELECT "To par" FROM table_62156 WHERE "Place" = '1'
What is Date, when City is 'Punta Del Este'?
CREATE TABLE table_name_87 (date VARCHAR,city VARCHAR)
SELECT date FROM table_name_87 WHERE city = "punta del este"
What are the best NLP conferences ?
CREATE TABLE writes (paperid int,authorid int)CREATE TABLE paper (paperid int,title varchar,venueid int,year int,numciting int,numcitedby int,journalid int)CREATE TABLE field (fieldid int)CREATE TABLE venue (venueid int,venuename varchar)CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TABLE author (authori...
SELECT DISTINCT COUNT(DISTINCT cite.citingpaperid), paper.venueid FROM cite, keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'NLP' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = cite.citedpaperid AND paper.paperid = paperkeyphrase.paperid GROUP BY paper.venueid ORDER BY COUN...
For those employees who was hired before 2002-06-21, find hire_date and the average of department_id bin hire_date by time, and visualize them by a bar chart, and could you show by the Y-axis from low to high please?
CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE job_history (EMPLOYEE_ID decimal(6,...
SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY AVG(DEPARTMENT_ID)
clinically significant anemia ( hct < 36 % in male , < 33 % in female )
CREATE TABLE table_dev_53 ("id" int,"anemia" bool,"gender" string,"hemoglobin_a1c_hba1c" float,"dyslipidemia" bool,"hct" int,"hematocrit_hct" float,"persistent_macroalbuminuria" bool,"urine_albumin" int,"high_density_lipoprotein_cholesterol_hdl_c" int,"coagulopathy" bool,"NOUSE" float)
SELECT * FROM table_dev_53 WHERE anemia = 1 OR (hct < 36 AND gender = 'male') OR (hct < 33 AND gender = 'female')
What is the total number of top-25 a tournament with less than 2 events has?
CREATE TABLE table_name_93 (top_25 VARCHAR,events INTEGER)
SELECT COUNT(top_25) FROM table_name_93 WHERE events < 2
What is the Venue with the Friendly Competition?
CREATE TABLE table_name_91 (venue VARCHAR,competition VARCHAR)
SELECT venue FROM table_name_91 WHERE competition = "friendly"
What is Richmond's away team score versus Geelong?
CREATE TABLE table_10157 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Away team score" FROM table_10157 WHERE "Away team" = 'richmond'
What predecessor has a district less than 11, 68th as the Congress, and may 1, 1923 as the date?
CREATE TABLE table_36527 ("District" real,"Congress" text,"Date" text,"Predecessor" text,"Winner" text)
SELECT "Predecessor" FROM table_36527 WHERE "District" < '11' AND "Congress" = '68th' AND "Date" = 'may 1, 1923'
Name the location attendance for 20
CREATE TABLE table_1662 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT "Location Attendance" FROM table_1662 WHERE "Game" = '20'
give me the total quantity of enteral impact peptide 1.5 that patient 015-23047 has taken today.
CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number...
SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-23047')) AND intakeoutput.celllabel = 'enter...
what are the drugs that are added to patient 3125 today in comparison to yesterday?
CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careunit text,last_careunit text,first_wardid number,last_wardid number,intime time,outtime time)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CRE...
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3125) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT prescriptions.drug FROM prescriptions WHERE ...
Find the parties associated with the delegates from district 1 or 2 Who served as comptrollers of the parties, and count them by a bar chart, and rank in asc by the x axis.
CREATE TABLE election (Election_ID int,Counties_Represented text,District int,Delegate text,Party int,First_Elected real,Committee text)CREATE TABLE county (County_Id int,County_name text,Population real,Zip_code text)CREATE TABLE party (Party_ID int,Year real,Party text,Governor text,Lieutenant_Governor text,Comptroll...
SELECT Comptroller, COUNT(Comptroller) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2 GROUP BY Comptroller ORDER BY Comptroller
papers on semantic parsing appeared at acl in 2016
CREATE TABLE dataset (datasetid int,datasetname varchar)CREATE TABLE keyphrase (keyphraseid int,keyphrasename varchar)CREATE TABLE author (authorid int,authorname varchar)CREATE TABLE paperdataset (paperid int,datasetid int)CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TABLE paperkeyphrase (paperid int,k...
SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase, venue WHERE keyphrase.keyphrasename = 'semantic parsing' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year = 2016 AND venue.venueid = paper.venueid AND venue.venuename = 'acl'
Tell me the 2008 for when 2001 of wta premier 5 tournaments
CREATE TABLE table_55664 ("Tournament" text,"2001" text,"2002" text,"2003" text,"2004" text,"2005" text,"2006" text,"2007" text,"2008" text,"2009" text,"2010" text,"2011" text,"2012" text,"2013" text)
SELECT "2008" FROM table_55664 WHERE "2001" = 'wta premier 5 tournaments'
WHo won men's singles in 1994?
CREATE TABLE table_14904221_1 (mens_singles VARCHAR,year VARCHAR)
SELECT mens_singles FROM table_14904221_1 WHERE year = 1994
give me some good places for arabic in mountain view ?
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)CREATE TABLE geographic (city_name varchar,county varchar,region varchar)
SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'mountain view' AND restaurant.food_type = 'arabic' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5
What is the report listed for the race in San Marino Grand Prix?
CREATE TABLE table_1140076_2 (report VARCHAR,race VARCHAR)
SELECT report FROM table_1140076_2 WHERE race = "San Marino Grand Prix"
what was the lisinopril dose that was prescribed to patient 26995 in 11/last year for the first time?
CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE ...
SELECT prescriptions.dose_val_rx FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 26995) AND prescriptions.drug = 'lisinopril' AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFT...
Which Player has Years for Grizzlies of 2002-2003?
CREATE TABLE table_name_48 (player VARCHAR,years_for_grizzlies VARCHAR)
SELECT player FROM table_name_48 WHERE years_for_grizzlies = "2002-2003"
how many dead patients had ulcer of other part of foot diagnoses?
CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marita...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.long_title = "Ulcer of other part of foot"
Create a pie chart showing how many nationality across nationality.
CREATE TABLE journalist (journalist_ID int,Name text,Nationality text,Age text,Years_working int)CREATE TABLE news_report (journalist_ID int,Event_ID int,Work_Type text)CREATE TABLE event (Event_ID int,Date text,Venue text,Name text,Event_Attendance int)
SELECT Nationality, COUNT(Nationality) FROM journalist GROUP BY Nationality
What is the position of the player with a round less than 8 and an overall of 48?
CREATE TABLE table_name_81 (position VARCHAR,round VARCHAR,overall VARCHAR)
SELECT position FROM table_name_81 WHERE round < 8 AND overall = 48
Which Rim diameter has a Neck diameter of 11.84 (.466)?
CREATE TABLE table_74705 ("Name" text,"Case type" text,"Bullet diameter" text,"Neck diameter" text,"Base diameter" text,"Rim diameter" text,"Case length" text,"Cartridge length" text)
SELECT "Rim diameter" FROM table_74705 WHERE "Neck diameter" = '11.84 (.466)'
Tell me the date for jody scheckter being the fastest lap at the french grand prix
CREATE TABLE table_name_14 (date VARCHAR,fastest_lap VARCHAR,race VARCHAR)
SELECT date FROM table_name_14 WHERE fastest_lap = "jody scheckter" AND race = "french grand prix"
Tell me the tournament for opponents of andrei pavel rogier wassen
CREATE TABLE table_name_53 (tournament VARCHAR,opponents_in_the_final VARCHAR)
SELECT tournament FROM table_name_53 WHERE opponents_in_the_final = "andrei pavel rogier wassen"
count the number of patients whose diagnoses short title is ac infect polyneuritis and lab test abnormal status is delta?
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,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_fla...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Ac infect polyneuritis" AND lab.flag = "delta"
What was the record after game 37?
CREATE TABLE table_name_70 (record VARCHAR,game VARCHAR)
SELECT record FROM table_name_70 WHERE game = 37
What was the highest number of games played when they had over 14 against and 3 losses?
CREATE TABLE table_name_27 (played INTEGER,against VARCHAR,lost VARCHAR)
SELECT MAX(played) FROM table_name_27 WHERE against > 14 AND lost = 3
what was the number of times the adefovir dipivoxil was prescribed until 2104?
CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx text,dose_unit_rx text,ro...
SELECT COUNT(*) FROM prescriptions WHERE prescriptions.drug = 'adefovir dipivoxil' AND STRFTIME('%y', prescriptions.startdate) <= '2104'
what is the maximum age of married patients whose admission year is in or after 2184?
CREATE TABLE diagnoses (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,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag...
SELECT MAX(demographic.age) FROM demographic WHERE demographic.marital_status = "MARRIED" AND demographic.admityear >= "2184"
What is Country, when Total is less than 290, and when Year(s) Won is 1960?
CREATE TABLE table_76437 ("Player" text,"Country" text,"Year(s) won" text,"Total" real,"To par" real,"Finish" text)
SELECT "Country" FROM table_76437 WHERE "Total" < '290' AND "Year(s) won" = '1960'
For each director, how many reviews have they received?
CREATE TABLE movie (mid number,title text,year number,director text)CREATE TABLE reviewer (rid number,name text)CREATE TABLE rating (rid number,mid number,stars number,ratingdate time)
SELECT COUNT(*), T1.director FROM movie AS T1 JOIN rating AS T2 ON T1.mid = T2.mid GROUP BY T1.director
Location of boston garden, and a Record of 58-23 involved what opponent?
CREATE TABLE table_name_34 (opponent VARCHAR,location VARCHAR,record VARCHAR)
SELECT opponent FROM table_name_34 WHERE location = "boston garden" AND record = "58-23"
Top 50 Users from Hyderabad.
CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReviewTaskId number)CREATE TABLE Tags (Id number,TagName...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%hyderabad%' OR UPPER(Location) LIKE '%HYDERABAD' ORDER BY Reputation DESC LIMIT 50