instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
What year did the San Agustin gym open?
CREATE TABLE table_69572 ("Arena/Venue" text,"Home Campus" text,"Location" text,"Province/Region" text,"Maximum Seating Capacity" text,"Year Opened" text)
SELECT "Year Opened" FROM table_69572 WHERE "Arena/Venue" = 'san agustin gym'
On how many different dates was the race at the Silverstone circuit?
CREATE TABLE table_24922 ("Round" real,"Circuit" text,"Date" text,"Pole Position" text,"Fastest Lap" text,"Winning Drivers" text,"Winning Team" text)
SELECT COUNT("Date") FROM table_24922 WHERE "Circuit" = 'Silverstone'
What is the home team's score when the venue is princes park?
CREATE TABLE table_74653 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Home team score" FROM table_74653 WHERE "Venue" = 'princes park'
what does patient 594 age be during their last hospital encounter?
CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title 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 labevents (row_id number,subject_id number,hadm_id number,itemid number,chartt...
SELECT admissions.age FROM admissions WHERE admissions.subject_id = 594 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1
What is the pos with more than 1 tier during Pokal Slovenije 1. round?
CREATE TABLE table_35529 ("Season" text,"Tier" real,"Division" text,"Pos." real,"Cup Competitions" text)
SELECT "Pos." FROM table_35529 WHERE "Tier" > '1' AND "Cup Competitions" = 'pokal slovenije 1. round'
For those employees who do not work in departments with managers that have ids between 100 and 200, what is the relationship between salary and manager_id ?
CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))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...
SELECT SALARY, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200)
What were the Bills points on Nov. 11?
CREATE TABLE table_name_54 (bills_points INTEGER,date VARCHAR)
SELECT SUM(bills_points) FROM table_name_54 WHERE date = "nov. 11"
What are the names of all the physicians who took appointments, and count them by a bar chart, and show X-axis in ascending order.
CREATE TABLE Procedures (Code INTEGER,Name VARCHAR(30),Cost REAL)CREATE TABLE Prescribes (Physician INTEGER,Patient INTEGER,Medication INTEGER,Date DATETIME,Appointment INTEGER,Dose VARCHAR(30))CREATE TABLE On_Call (Nurse INTEGER,BlockFloor INTEGER,BlockCode INTEGER,OnCallStart DATETIME,OnCallEnd DATETIME)CREATE TABLE ...
SELECT Name, COUNT(Name) FROM Appointment AS T1 JOIN Physician AS T2 ON T1.Physician = T2.EmployeeID GROUP BY Name ORDER BY Name
What was the date of the game at Joe Robbie Stadium?
CREATE TABLE table_name_14 (date VARCHAR,game_site VARCHAR)
SELECT date FROM table_name_14 WHERE game_site = "joe robbie stadium"
Who is the president representing the Creuse department?
CREATE TABLE table_name_10 (président VARCHAR,départment__or_collectivity_ VARCHAR)
SELECT président FROM table_name_10 WHERE départment__or_collectivity_ = "creuse"
count the number of patients who had taken a mode test.
CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmen...
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = 'mode')
On what Date of the race was Nesta Carter the Athlete?
CREATE TABLE table_name_46 (date VARCHAR,athlete VARCHAR)
SELECT date FROM table_name_46 WHERE athlete = "nesta carter"
List the pitchers for the 1970 season
CREATE TABLE table_2175 ("Pitcher" text,"Stats" real,"Wins" real,"Losses" real,"No decisions" real,"Winning %" text,"Seasons" text)
SELECT "Pitcher" FROM table_2175 WHERE "Seasons" = '1970'
when was for the last time during the last hospital encounter patient 31696 prescribed a medication via po/ng route?
CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum ...
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31696 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND prescriptions.route = 'po/ng' ORDER BY prescriptions.startdate DESC LIMIT 1
What is the total number of wickets that have runs under 4600 and matches under 44?
CREATE TABLE table_name_64 (wickets INTEGER,runs VARCHAR,matches VARCHAR)
SELECT SUM(wickets) FROM table_name_64 WHERE runs < 4600 AND matches < 44
What is the time when time is 10:46?
CREATE TABLE table_24484 ("Day" text,"Stage" text,"Time (EET)" text,"Name" text,"Length" text,"Winner" text,"Time" text,"Avg. spd." text,"Rally leader" text)
SELECT "Time" FROM table_24484 WHERE "Time (EET)" = '10:46'
Highest question to view ratio by user.
CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE FlagTypes (Id number,Name text,Description text)CREATE TABLE Users (Id numb...
SELECT p.OwnerUserId AS "user_link", SUM(p.ViewCount) AS "total_views", COUNT(p.Id) AS "total_questions", SUM(p.ViewCount) / COUNT(p.Id) AS "view_count_ratio", (SELECT Id FROM Posts WHERE ViewCount = MAX(p.ViewCount) LIMIT 1) AS "post_link" FROM Posts AS p WHERE p.PostTypeId = 1 GROUP BY p.OwnerUserId ORDER BY SUM(p.Vi...
What is the number of theWhat is the number of the chapter that is called 'breakthrough' 'bur ku sur ' ( )?
CREATE TABLE table_1703 ("Episode #" real,"Title" text,"Director" text,"Screenwriter" text,"Original airdate" text,"English airdate" text)
SELECT MIN("Episode #") FROM table_1703 WHERE "Title" = 'Breakthrough" "Burēku surū" (ブレーク·スルー)'
A bar chart showing the number of start date of the apartment bookings made by female guests (gender code 'Female') for each weekday, and could you show total number in asc order?
CREATE TABLE Apartment_Bookings (apt_booking_id INTEGER,apt_id INTEGER,guest_id INTEGER,booking_status_code CHAR(15),booking_start_date DATETIME,booking_end_date DATETIME)CREATE TABLE Apartment_Buildings (building_id INTEGER,building_short_name CHAR(15),building_full_name VARCHAR(80),building_description VARCHAR(255),b...
SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = "Female" ORDER BY COUNT(booking_start_date)
What was John Fought's score?
CREATE TABLE table_60212 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text,"Money ($)" real)
SELECT "Score" FROM table_60212 WHERE "Player" = 'john fought'
What grid has 24 points?
CREATE TABLE table_76619 ("Fin. Pos" text,"Car No." text,"Driver" text,"Team" text,"Laps" text,"Time/Retired" text,"Grid" text,"Laps Led" text,"Points" text)
SELECT "Grid" FROM table_76619 WHERE "Points" = '24'
Which Nominee has a Category of outstanding musical?
CREATE TABLE table_53127 ("Year" real,"Award Ceremony" text,"Category" text,"Nominee" text,"Result" text)
SELECT "Nominee" FROM table_53127 WHERE "Category" = 'outstanding musical'
how many hours have passed since patient 032-21820 stayed in the ward 1063 for the last time in their current hospital visit?
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 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '032-21820' AND patient.wardid = 1063 AND patient.hospitaldischargetime IS NULL ORDER BY patient.unitadmittime DESC LIMIT 1
What is the Attendance of the game with a Score of 3 2?
CREATE TABLE table_79630 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" real,"Record" text,"Arena" text,"Points" real)
SELECT COUNT("Attendance") FROM table_79630 WHERE "Score" = '3–2'
Show different nominees and the number of musicals they have been nominated Plot them as bar chart, and list Y-axis in ascending order.
CREATE TABLE musical (Musical_ID int,Name text,Year int,Award text,Category text,Nominee text,Result text)CREATE TABLE actor (Actor_ID int,Name text,Musical_ID int,Character text,Duration text,age int)
SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee ORDER BY COUNT(*)
Which Margin of victory has a Runner(s)-up of jos maria ca izares?
CREATE TABLE table_34065 ("Date" text,"Tournament" text,"Winning score" text,"Margin of victory" text,"Runner(s)-up" text)
SELECT "Margin of victory" FROM table_34065 WHERE "Runner(s)-up" = 'josé maria cañizares'
Which Losses have an Against smaller than 1018, and Wins smaller than 14?
CREATE TABLE table_65613 ("Wimmera FL" text,"Wins" real,"Byes" real,"Losses" real,"Draws" real,"Against" real)
SELECT AVG("Losses") FROM table_65613 WHERE "Against" < '1018' AND "Wins" < '14'
How many companies without a gas station in each main industry? Draw a bar chart.
CREATE TABLE company (Company_ID int,Rank int,Company text,Headquarters text,Main_Industry text,Sales_billion real,Profits_billion real,Assets_billion real,Market_Value real)CREATE TABLE station_company (Station_ID int,Company_ID int,Rank_of_the_Year int)CREATE TABLE gas_station (Station_ID int,Open_Year int,Location t...
SELECT Main_Industry, COUNT(Main_Industry) FROM company WHERE NOT Company_ID IN (SELECT Company_ID FROM station_company) GROUP BY Main_Industry
What was the sum of the scores before the year 2002, that had the venue of Halmstad?
CREATE TABLE table_name_29 (score INTEGER,venue VARCHAR,year VARCHAR)
SELECT SUM(score) FROM table_name_29 WHERE venue = "halmstad" AND year < 2002
Name the bulgarian name for mart
CREATE TABLE table_19978 ("No." real,"English name" text,"Bulgarian name" text,"Bulgarian name (Transliteration)" text,"Old Bulgarian Names" text,"Old Bulgarian name (Transliteration)" text,"Old Bulgarian name - Meaning" text)
SELECT "Bulgarian name" FROM table_19978 WHERE "Bulgarian name ( Transliteration )" = 'Mart'
Which record has an Opponent of orioles and a Date of april 14?
CREATE TABLE table_71040 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Record" text)
SELECT "Record" FROM table_71040 WHERE "Opponent" = 'orioles' AND "Date" = 'april 14'
Next Winter , who is teaching PreMajor classes ?
CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE jobs (job_id int,job_title varchar,description varchar,r...
SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instr...
Which player scored 76-68=144?
CREATE TABLE table_79170 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text)
SELECT "Player" FROM table_79170 WHERE "Score" = '76-68=144'
What was the title of the episode written by Bob Rosenfarb and directed by Richard Correll?
CREATE TABLE table_3112 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" real)
SELECT "Title" FROM table_3112 WHERE "Written by" = 'Bob Rosenfarb' AND "Directed by" = 'Richard Correll'
Return a bar chart showing the number of companies in each building, display in asc by the Y.
CREATE TABLE Office_locations (building_id int,company_id int,move_in_year int)CREATE TABLE buildings (id int,name text,City text,Height int,Stories int,Status text)CREATE TABLE Companies (id int,name text,Headquarters text,Industry text,Sales_billion real,Profits_billion real,Assets_billion real,Market_Value_billion t...
SELECT T2.name, COUNT(T2.name) FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T2.name ORDER BY COUNT(T2.name)
what were the dates of the last event of the year ?
CREATE TABLE table_204_536 (id number,"event" text,"bowling center" text,"city" text,"dates" text,"winner" text)
SELECT "dates" FROM table_204_536 ORDER BY id DESC LIMIT 1
list currrent or all databases.
CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,OwnerDisplayName text,LastEditorUserId number,LastEditorDisplayName text,LastEditDate time,LastActivityDate time,Title text,Ta...
SELECT name FROM master.sys.databases
What was the type of sussex?
CREATE TABLE table_1184344_1 (type VARCHAR,name VARCHAR)
SELECT type FROM table_1184344_1 WHERE name = "Sussex"
what was patient 005-87465's last output time of the stool on the current icu visit?
CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemic...
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-87465') AND patient.unitdischargetime IS NULL) AN...
Which chassis was used when over 6 points were earned?
CREATE TABLE table_name_47 (chassis VARCHAR,points VARCHAR)
SELECT chassis FROM table_name_47 WHERE points = 6
What is the name of the Artist for the Spoofed Title of the moron downer jr. show?
CREATE TABLE table_name_13 (artist VARCHAR,spoofed_title VARCHAR)
SELECT artist FROM table_name_13 WHERE spoofed_title = "the moron downer jr. show"
What is the name of a building in Courbevoie built before 1973?
CREATE TABLE table_32454 ("Rank" text,"Name" text,"City" text,"Height in m (ft)" text,"Floors" real,"Year built" real)
SELECT "Name" FROM table_32454 WHERE "Year built" < '1973' AND "City" = 'courbevoie'
what is the school with the location of alexandria?
CREATE TABLE table_79642 ("School" text,"Location" text,"Mascot" text,"County" text,"Enrollment" real,"IHSAA Class / Football / Soccer" text,"Year Joined" real,"Previous Conference" text)
SELECT "School" FROM table_79642 WHERE "Location" = 'alexandria'
What is the p1 diameter (mm) when .300 lapua magnum is the chambering?
CREATE TABLE table_29159 ("Chambering" text,"P1 diameter (mm)" text,"A external (cm 2)" text,"P max (bar)" real,"F bolt (kgf)" real,"F bolt" text)
SELECT "P1 diameter (mm)" FROM table_29159 WHERE "Chambering" = '.300 Lapua Magnum'
What is the maximum number of 1st places for the country with exactly 1 third place?
CREATE TABLE table_2876467_3 (first_place INTEGER,third_place VARCHAR)
SELECT MAX(first_place) FROM table_2876467_3 WHERE third_place = 1
what's the last time patient 2498 has had a procedure until 1 year 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 labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE patients (row_id number,sub...
SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 2498) AND DATETIME(procedures_icd.charttime) <= DATETIME(CURRENT_TIME(), '-1 year') ORDER BY procedures_icd.charttime DESC LIMIT 1
What Argentina country is in t10 place?
CREATE TABLE table_70976 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text)
SELECT "Score" FROM table_70976 WHERE "Place" = 't10' AND "Country" = 'argentina'
What is Player, when Score is less than 69, and when Country is 'United States'?
CREATE TABLE table_48772 ("Place" text,"Player" text,"Country" text,"Score" real,"To par" text)
SELECT "Player" FROM table_48772 WHERE "Score" < '69' AND "Country" = 'united states'
What is the number of votes of candidate edward mahama, who had 0.9% share of votes?
CREATE TABLE table_name_82 (number_of_votes VARCHAR,candidate VARCHAR,share_of_votes VARCHAR)
SELECT number_of_votes FROM table_name_82 WHERE candidate = "edward mahama" AND share_of_votes = "0.9%"
For those employees who did not have any job in the past, a bar chart shows the distribution of hire_date and the sum of department_id bin hire_date by time.
CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,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),COMMISSION_PCT decima...
SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history)
How many devices are there?
CREATE TABLE device (Id VARCHAR)
SELECT COUNT(*) FROM device
What is the party for new york 20?
CREATE TABLE table_18576 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text)
SELECT "Party" FROM table_18576 WHERE "District" = 'New York 20'
how many patients whose item id is 51221?
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,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marita...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "51221"
Which entrant had fewer than 33 points in 1999?
CREATE TABLE table_15326 ("Year" real,"Entrant" text,"Chassis" text,"Engine" text,"Tyres" text,"Points" real)
SELECT "Entrant" FROM table_15326 WHERE "Points" < '33' AND "Year" = '1999'
How many architects are female?
CREATE TABLE mill (architect_id number,id number,location text,name text,type text,built_year number,notes text)CREATE TABLE architect (id text,name text,nationality text,gender text)CREATE TABLE bridge (architect_id number,id number,name text,location text,length_meters number,length_feet number)
SELECT COUNT(*) FROM architect WHERE gender = 'female'
obsolete accept my answer comments on accepted questions.
CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReviewTaskId number)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId...
SELECT c.Id AS "comment_link" FROM Comments AS c INNER JOIN Posts AS p ON p.Id = c.PostId WHERE 'text' LIKE '%accept my answer%' AND NOT p.AcceptedAnswerId IS NULL
how many patients since 2 years ago were diagnosed with cardiac arrest - witnessed, < 15 minutes cpr in the same hospital encounter after the first diagnosis with chronic respiratory failure?
CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllab...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'cardiac arrest - witnessed, < 15 minutes cpr' AND DATETIME(diagnosis.diag...
Which 3rd day has a 4th Day of rowed-over, and a Finish position of 55th?
CREATE TABLE table_13608 ("Year" real,"Finish position" text,"1st day" text,"2nd day" text,"3rd day" text,"4th Day" text)
SELECT "3rd day" FROM table_13608 WHERE "4th Day" = 'rowed-over' AND "Finish position" = '55th'
What is the Championship Game that has 4 Bids and a .600 Win %?
CREATE TABLE table_name_40 (championship_game VARCHAR,_number_of_bids VARCHAR,win__percentage VARCHAR)
SELECT championship_game FROM table_name_40 WHERE _number_of_bids = 4 AND win__percentage = ".600"
What was the issue date for the single with a Volume:Issue of 47:8-9?
CREATE TABLE table_35439 ("Volume:Issue" text,"Issue Date(s)" text,"Weeks on Top" real,"Song" text,"Artist" text)
SELECT "Issue Date(s)" FROM table_35439 WHERE "Volume:Issue" = '47:8-9'
What is part 1 of the verb in class 4
CREATE TABLE table_21723 ("Class" text,"Part 1" text,"Part 2" text,"Part 3" text,"Part 4" text,"Verb meaning" text)
SELECT "Part 3" FROM table_21723 WHERE "Class" = '4'
How many tie no have team 1 as borac banja luka?
CREATE TABLE table_22937 ("Tie no" real,"Team 1" text,"Agg." text,"Team 2" text,"1st leg" text,"2nd leg" text)
SELECT "Tie no" FROM table_22937 WHERE "Team 1" = 'Borac Banja Luka'
what was the last value of patient 45612's laboratory test for potassium in 05/2101?
CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance text,language text,marital_status text,ethnicity text,age number)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,i...
SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 45612) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'potassium') AND STRFTIME('%y-%m', labevents.charttime) = '2101-05' ORDER BY labe...
How many medications are prescribed for each brand?
CREATE TABLE room (roomnumber number,roomtype text,blockfloor number,blockcode number,unavailable boolean)CREATE TABLE trained_in (physician number,treatment number,certificationdate time,certificationexpires time)CREATE TABLE department (departmentid number,name text,head number)CREATE TABLE on_call (nurse number,bloc...
SELECT COUNT(*), T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand
Query answers by PostTypeId, Score and keyword.
CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE Votes (Id number,PostId number,Vot...
SELECT Body FROM Posts WHERE PostTypeId = 2 AND Score >= 25 AND Body LIKE ('%##param##%')
I have never' in answers..
CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate tim...
SELECT p.Id AS "post_link" FROM Posts AS p WHERE p.PostTypeId = 2 AND (p.Body LIKE '%I have never%' OR p.Body LIKE '%I''ve never%' OR p.Body LIKE '%never tried%')
What was the date administered from a source of Rasmussen Reports and a lead margin over 32?
CREATE TABLE table_name_19 (dates_administered VARCHAR,poll_source VARCHAR,lead_margin VARCHAR)
SELECT dates_administered FROM table_name_19 WHERE poll_source = "rasmussen reports" AND lead_margin > 32
what is the number of patients whose year of birth is less than 2138 and drug code is fent75p?
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2138" AND prescriptions.formulary_drug_cd = "FENT75P"
For those records from the products and each product's manufacturer, give me the comparison about the average of code over the name , and group by attribute name by a bar chart, and I want to display Y-axis from low to high 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
which round is u.s. open cup division semifinals
CREATE TABLE table_1046170_5 (us_open_cup VARCHAR,playoffs VARCHAR)
SELECT us_open_cup FROM table_1046170_5 WHERE playoffs = "division Semifinals"
How many times did the Denver Broncos face the Dallas Texans this season?
CREATE TABLE table_17778417_1 (record VARCHAR,opponent VARCHAR)
SELECT COUNT(record) FROM table_17778417_1 WHERE opponent = "Dallas Texans"
count the number of patients whose gender is m and diagnoses icd9 code is 591?
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 prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.icd9_code = "591"
How many locations does Elon University have?
CREATE TABLE table_16403890_1 (location VARCHAR,institution VARCHAR)
SELECT COUNT(location) FROM table_16403890_1 WHERE institution = "Elon University"
Which VIETNAMESE has a CHINESE of / p x m ?
CREATE TABLE table_6769 ("SANSKRT" text,"CHINESE" text,"VIETNAMESE" text,"JAPANESE" text,"KOREAN" text)
SELECT "VIETNAMESE" FROM table_6769 WHERE "CHINESE" = '婆須密 / póxūmì'
If the country of origin is switzerland, what is the name/ designation?
CREATE TABLE table_28659 ("Name / designation" text,"Year of introduction" text,"Country of origin" text,"Primary cartridge" text,"primary user" text)
SELECT "Name / designation" FROM table_28659 WHERE "Country of origin" = 'Switzerland'
What's the number of decimal digits when the total bits is more than 32 and the exponent is less than 15?
CREATE TABLE table_name_26 (number_of_decimal_digits VARCHAR,total_bits VARCHAR,exponent VARCHAR)
SELECT number_of_decimal_digits FROM table_name_26 WHERE total_bits > 32 AND exponent < 15
Active people from Greece before 2019.
CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTask...
SELECT COUNT(*) FROM Users WHERE LastAccessDate >= '2018-01-01' AND CreationDate <= '2019-01-01' AND Location LIKE '%greece%' COLLATE Latin1_General_CI_AI_KS_WS
how many deputy judges served on the permanent court of international justice after 1930 ?
CREATE TABLE table_204_301 (id number,"nationality" text,"name" text,"term as a deputy judge" text,"reason for termination" text)
SELECT COUNT("name") FROM table_204_301 WHERE "term as a deputy judge" > 1930
what flights are available monday from SAN FRANCISCO to PITTSBURGH
CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,time_zone_code varchar)CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)C...
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 = 'PITTSBURGH' AND date_day.day_number = 21 AND date_day.month_number = 2 AN...
What is the default desktop environment when the code base is ubuntu 8.04 and edition is fluxbox ce?
CREATE TABLE table_27329061_2 (default_desktop_environment VARCHAR,code_base VARCHAR,edition VARCHAR)
SELECT default_desktop_environment FROM table_27329061_2 WHERE code_base = "Ubuntu 8.04" AND edition = "Fluxbox CE"
Users scoring lower than the questions they answer. Does not count self-answers. Shows users with at least @MinAnswers answers. Does not count self-answers. Shows users with at least @MinAnswers answers.
CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE ReviewTaskStates (Id number,Name text,Description text)CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,Crea...
SELECT u.Id AS "user_link", COUNT(*) AS NumAnswers, CAST(AVG(CAST((q.Score - a.Score) AS FLOAT)) AS FLOAT(6, 2)) AS AvgVoteDelta FROM Posts AS a INNER JOIN Users AS u ON u.Id = a.OwnerUserId INNER JOIN Posts AS q ON a.ParentId = q.Id WHERE (q.OwnerUserId != u.Id OR q.OwnerUserId IS NULL) GROUP BY u.Id HAVING COUNT(*) >...
What are all the countries where the electric company Ebisa has a presence?
CREATE TABLE table_19001916_2 (country VARCHAR,entities VARCHAR)
SELECT country FROM table_19001916_2 WHERE entities = "EBISA"
How many department stores does the store chain South have?
CREATE TABLE suppliers (supplier_id number,supplier_name text,supplier_phone text)CREATE TABLE department_store_chain (dept_store_chain_id number,dept_store_chain_name text)CREATE TABLE customers (customer_id number,payment_method_code text,customer_code text,customer_name text,customer_address text,customer_phone text...
SELECT COUNT(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id WHERE T2.dept_store_chain_name = "South"
state the round that had a game attended attended by 9359 people
CREATE TABLE table_21256068_3 (round VARCHAR,attendance VARCHAR)
SELECT round FROM table_21256068_3 WHERE attendance = 9359
Can you tell me the lowest Wins that has the Ballarat FL of daylesford, and the Byes smaller than 1?
CREATE TABLE table_7684 ("Ballarat FL" text,"Wins" real,"Byes" real,"Losses" real,"Draws" real,"Against" real)
SELECT MIN("Wins") FROM table_7684 WHERE "Ballarat FL" = 'daylesford' AND "Byes" < '1'
return me the paper in Databases area with more than 200 citations .
CREATE TABLE domain (did int,name varchar)CREATE TABLE publication (abstract varchar,cid int,citation_num int,jid int,pid int,reference_num int,title varchar,year int)CREATE TABLE keyword (keyword varchar,kid int)CREATE TABLE conference (cid int,homepage varchar,name varchar)CREATE TABLE publication_keyword (kid int,pi...
SELECT publication.title FROM domain, domain_publication, publication WHERE domain.did = domain_publication.did AND domain.name = 'Databases' AND publication.citation_num > 200 AND publication.pid = domain_publication.pid
What is the Election date for Member william richmond category:articles with hcards?
CREATE TABLE table_name_49 (election_date VARCHAR,member VARCHAR)
SELECT election_date FROM table_name_49 WHERE member = "william richmond category:articles with hcards"
what is the daily minimum of sao2 for patient 30296 when they came to the hospital last time?
CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location t...
SELECT MIN(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 30296 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1)) AND chart...
Which College has a Round of 11, and a Pick of 14?
CREATE TABLE table_name_53 (college VARCHAR,round VARCHAR,pick VARCHAR)
SELECT college FROM table_name_53 WHERE round = 11 AND pick = 14
What is the Name with an Average that is 16.4?
CREATE TABLE table_name_10 (name VARCHAR,average VARCHAR)
SELECT name FROM table_name_10 WHERE average = 16.4
Which rounds was Hap Sharp a driver in?
CREATE TABLE table_name_40 (rounds VARCHAR,driver VARCHAR)
SELECT rounds FROM table_name_40 WHERE driver = "hap sharp"
which element is listed directly above copper ?
CREATE TABLE table_204_39 (id number,"number" number,"symbol" text,"name" text,"21st" number,"22nd" number,"23rd" number,"24th" number,"25th" number,"26th" number,"27th" number,"28th" number,"29th" number,"30th" number)
SELECT "name" FROM table_204_39 WHERE id = (SELECT id FROM table_204_39 WHERE "name" = 'copper') - 1
what is minimum age of patients whose primary disease is hypoxia and year of death is less than 2155?
CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay ...
SELECT MIN(demographic.age) FROM demographic WHERE demographic.diagnosis = "HYPOXIA" AND demographic.dod_year < "2155.0"
My answers (with body) ordered by CreationDate. My answers ordered by score
CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId number,RevisionGUID other,CreationDate time,UserId number,UserDisplayName text,Comment text,Text text,ContentLicense text)CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwne...
SELECT q.Id, q.Title, q.CreationDate, q.Tags, q.Body, a.Body FROM Posts AS q INNER JOIN Posts AS a ON q.Id = a.ParentId AND a.PostTypeId = 2 AND q.PostTypeId = 1 WHERE a.OwnerUserId = '##UserId##' ORDER BY q.CreationDate
A bar chart shows the distribution of meter_700 and meter_100 .
CREATE TABLE event (ID int,Name text,Stadium_ID int,Year text)CREATE TABLE swimmer (ID int,name text,Nationality text,meter_100 real,meter_200 text,meter_300 text,meter_400 text,meter_500 text,meter_600 text,meter_700 text,Time text)CREATE TABLE record (ID int,Result text,Swimmer_ID int,Event_ID int)CREATE TABLE stadiu...
SELECT meter_700, meter_100 FROM swimmer
High points earned by Josh Howard (19) resulted in how many high rebounds?
CREATE TABLE table_17288869_7 (high_rebounds VARCHAR,high_points VARCHAR)
SELECT COUNT(high_rebounds) FROM table_17288869_7 WHERE high_points = "Josh Howard (19)"
What is the highest number of games played for teams that lost over 5 games and had an against total of 228?
CREATE TABLE table_name_52 (played INTEGER,lost VARCHAR,against VARCHAR)
SELECT MAX(played) FROM table_name_52 WHERE lost > 5 AND against = 228
what is the total number of building for address on 201 1st avenue south
CREATE TABLE table_13397394_1 (building VARCHAR,address VARCHAR)
SELECT COUNT(building) FROM table_13397394_1 WHERE address = "201 1st Avenue South"
Which Notes has a Venue of barcelona, spain?
CREATE TABLE table_42875 ("Year" real,"Competition" text,"Venue" text,"Position" text,"Event" text,"Notes" text)
SELECT "Notes" FROM table_42875 WHERE "Venue" = 'barcelona, spain'
what kind of papers does shwetak patel publish
CREATE TABLE writes (paperid int,authorid int)CREATE TABLE dataset (datasetid int,datasetname varchar)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE paper (paperid int,title varchar,venueid int,year int,numciting int,numcitedby int,journalid int)CREATE TABLE field (fieldid int)CREATE TABLE author ...
SELECT DISTINCT keyphrase.keyphraseid FROM author, keyphrase, paper, paperkeyphrase, writes WHERE author.authorname = 'shwetak patel' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid