instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
Name the Qual 2 which has the name of katherine legge
CREATE TABLE table_name_40 (qual_2 VARCHAR,name VARCHAR)
SELECT qual_2 FROM table_name_40 WHERE name = "katherine legge"
What date did South Melbourne play as the Away team?
CREATE TABLE table_33328 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Date" FROM table_33328 WHERE "Away team" = 'south melbourne'
what number of patients with private insurance have been diagnosed with pressure ulcer, unstageable?
CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,sho...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Private" AND diagnoses.long_title = "Pressure ulcer, unstageable"
Name the final score for week 5
CREATE TABLE table_26606 ("Week" real,"Date" text,"Opponent" text,"Location" text,"Final Score" text,"Attendance" real,"Record" text)
SELECT "Final Score" FROM table_26606 WHERE "Week" = '5'
how many of the patients with adverse effects of corticosteroids remained admitted in hospital for more than 1 day?
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "1" AND diagnoses.short_title = "Adv eff corticosteroids"
what is the party for the district south carolina 4?
CREATE TABLE table_1341423_40 (party VARCHAR,district VARCHAR)
SELECT party FROM table_1341423_40 WHERE district = "South Carolina 4"
What was the loss of the game when the record was 20-16?
CREATE TABLE table_name_77 (loss VARCHAR,record VARCHAR)
SELECT loss FROM table_name_77 WHERE record = "20-16"
provide the maximum age of female patients who had sternal wound infection.
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 MAX(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "STERNAL WOUND INFECTION"
Name the lowest league for play-offs more than 0 and total of 25
CREATE TABLE table_name_88 (league INTEGER,play_offs VARCHAR,total VARCHAR)
SELECT MIN(league) FROM table_name_88 WHERE play_offs > 0 AND total = 25
Which 1991-92 has a 1993-94 smaller than 34, and a Team of argentinos juniors?
CREATE TABLE table_59858 ("Team" text,"Average" real,"Points" real,"Played" real,"1991-92" text,"1992-93" text,"1993-94" real)
SELECT "1991-92" FROM table_59858 WHERE "1993-94" < '34' AND "Team" = 'argentinos juniors'
provide the number of patients whose death status is 1 and diagnoses long title is diabetes with ketoacidosis, type i [juvenile type], not stated as uncontrolled?
CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE procedures (subject_id text,hadm_id te...
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 = "Diabetes with ketoacidosis, type I [juvenile type], not stated as uncontrolled"
Labs are in what number of upper level courses ?
CREATE TABLE course_tags_count (course_id int,clear_grading int,pop_quiz int,group_projects int,inspirational int,long_lectures int,extra_credit int,few_tests int,good_feedback int,tough_tests int,heavy_papers int,cares_for_students int,heavy_assignments int,respected int,participation int,heavy_reading int,tough_grade...
SELECT COUNT(DISTINCT course.course_id) FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.has_lab = 'Y' AND program_course.category LIKE '%ULCS%'
What was the average rank for the film directed by roland emmerich under the studio of 20th century fox?
CREATE TABLE table_48107 ("Rank" real,"Title" text,"Studio" text,"Director" text,"Worldwide Gross" text)
SELECT AVG("Rank") FROM table_48107 WHERE "Studio" = '20th century fox' AND "Director" = 'roland emmerich'
most popular python questions for Julia :).
CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,Predefined boolean,PostNoticeDurationId number)CREATE TABLE FlagTypes (Id number,Name text,Description text)CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE PostHistoryT...
SELECT P.Title, P.Id AS "post_link", P.Score AS Score, P.FavoriteCount AS Favorites, P.ViewCount AS "views" FROM Posts AS P WHERE P.Tags LIKE '%<##tag?julia##>%' AND NOT P.CommunityOwnedDate IS NULL AND NOT P.Title IS NULL ORDER BY Score DESC LIMIT 100
How many integrated allied-related are there?
CREATE TABLE table_386 ("Component" text,"Integrated" text,"Allied-Related" text,"Allied-Unrelated" text,"Holding" text)
SELECT "Integrated" FROM table_386 WHERE "Allied-Related" = 'Many'
what is the number of patients whose age is less than 71 and item id is 50818?
CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "71" AND lab.itemid = "50818"
list the patient ids of the patients that were diagnosed with fever in 2103.
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 patient.uniquepid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'fever' AND STRFTIME('%y', diagnosis.diagnosistime) = '2103')
What are the enrollment dates of all the tests that have result 'Pass', and count them by a line chart, show x-axis from low to high order.
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 Subjects (subject_id INTEGER,subject_name VARCHAR(120))CREATE TABLE Courses (course_id ...
SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass" GROUP BY date_of_enrolment ORDER BY date_of_enrolment
What year did player steve jones, who had a t60 finish, win?
CREATE TABLE table_76638 ("Player" text,"Country" text,"Year(s) won" text,"Total" real,"To par" text,"Finish" text)
SELECT "Year(s) won" FROM table_76638 WHERE "Finish" = 't60' AND "Player" = 'steve jones'
Which party had a member from the state of Vic and an Electorate called Wannon?
CREATE TABLE table_80331 ("Member" text,"Party" text,"Electorate" text,"State" text,"Term in office" text)
SELECT "Party" FROM table_80331 WHERE "State" = 'vic' AND "Electorate" = 'wannon'
Who was the interview subject when the centerfold model was Sherry Arnett?
CREATE TABLE table_20217 ("Date" text,"Cover model" text,"Centerfold model" text,"Interview subject" text,"20 Questions" text,"Pictorials" text)
SELECT COUNT("Interview subject") FROM table_20217 WHERE "Centerfold model" = 'Sherry Arnett'
With a Morse Taper number less than 3 and a C (max) of 59.5 what is the total of D (max)?
CREATE TABLE table_name_59 (d__max_ VARCHAR,morse_taper_number VARCHAR,c__max_ VARCHAR)
SELECT COUNT(d__max_) FROM table_name_59 WHERE morse_taper_number < 3 AND c__max_ = 59.5
What conference does daniela witten publish in ?
CREATE TABLE keyphrase (keyphraseid int,keyphrasename varchar)CREATE TABLE field (fieldid int)CREATE TABLE author (authorid int,authorname varchar)CREATE TABLE paperkeyphrase (paperid int,keyphraseid int)CREATE TABLE paper (paperid int,title varchar,venueid int,year int,numciting int,numcitedby int,journalid int)CREATE...
SELECT DISTINCT paper.venueid FROM author, paper, writes WHERE author.authorname = 'daniela witten' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid
how many times did patient 3663 produce chest tubes cticu ct 1 until 10/2105?
CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)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 d_labitems (row_id number,itemid number,label text)...
SELECT COUNT(*) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3663)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'chest tubes cticu c...
in the 197172 national hurling league , how many players from cork county were ranked at least rank 15 or better ?
CREATE TABLE table_204_525 (id number,"rank" number,"player" text,"county" text,"tally" text,"total" number,"opposition" text)
SELECT COUNT("player") FROM table_204_525 WHERE "county" = 'cork' AND "rank" <= 15
What is the locomotive class that has a wheel arrangement of 2-8-2 and a quantity made of 25?
CREATE TABLE table_79275 ("Class" text,"Wheel arrangement" text,"Fleet number(s)" text,"Manufacturer" text,"Year made" text,"Quantity made" text,"Quantity preserved" text,"Year(s) retired" text)
SELECT "Class" FROM table_79275 WHERE "Wheel arrangement" = '2-8-2' AND "Quantity made" = '25'
What venue is on the date of 8/6/03
CREATE TABLE table_name_5 (venue VARCHAR,date VARCHAR)
SELECT venue FROM table_name_5 WHERE date = "8/6/03"
What is the attendance date of the game home team Shrewsbury Town played?
CREATE TABLE table_43508 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Attendance" text)
SELECT "Attendance" FROM table_43508 WHERE "Home team" = 'shrewsbury town'
What is the highest to par of player len mattiace, who has a t7 place and a score of 73-74=147?
CREATE TABLE table_name_83 (to_par INTEGER,player VARCHAR,place VARCHAR,score VARCHAR)
SELECT MAX(to_par) FROM table_name_83 WHERE place = "t7" AND score = 73 - 74 = 147 AND player = "len mattiace"
Most popular comments for a user. Exactly what it says on the tin. Shows the most popular comments for a given user
CREATE TABLE Users (Id number,Reputation number,CreationDate time,DisplayName text,LastAccessDate time,WebsiteUrl text,Location text,AboutMe text,Views number,UpVotes number,DownVotes number,ProfileImageUrl text,EmailHash text,AccountId number)CREATE TABLE FlagTypes (Id number,Name text,Description text)CREATE TABLE Re...
SELECT C.PostId AS "post_link", C.Score, C.Text FROM Comments AS C WHERE C.UserId = '##UserId##' ORDER BY C.Score DESC LIMIT 20
Bar chart x axis product type code y axis maximal product price
CREATE TABLE Customer_Addresses (customer_id INTEGER,address_id INTEGER,date_from DATETIME,date_to DATETIME)CREATE TABLE Staff (staff_id INTEGER,staff_gender VARCHAR(1),staff_name VARCHAR(80))CREATE TABLE Suppliers (supplier_id INTEGER,supplier_name VARCHAR(80),supplier_phone VARCHAR(80))CREATE TABLE Department_Store_C...
SELECT product_type_code, MAX(product_price) FROM Products GROUP BY product_type_code
What is the purse when Aidan O'brien was the trainer?
CREATE TABLE table_6133 ("Year" real,"Winner" text,"Jockey" text,"Trainer" text,"Owner" text,"Time" text,"Purse" text)
SELECT "Purse" FROM table_6133 WHERE "Trainer" = 'aidan o''brien'
Who are the candidates in Florida 13 district?
CREATE TABLE table_23273 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text)
SELECT "Candidates" FROM table_23273 WHERE "District" = 'Florida 13'
Return the name of each physician and the number of patients he or she treats in a bar chart.
CREATE TABLE Stay (StayID INTEGER,Patient INTEGER,Room INTEGER,StayStart DATETIME,StayEnd DATETIME)CREATE TABLE Patient (SSN INTEGER,Name VARCHAR(30),Address VARCHAR(30),Phone VARCHAR(30),InsuranceID INTEGER,PCP INTEGER)CREATE TABLE Physician (EmployeeID INTEGER,Name VARCHAR(30),Position VARCHAR(30),SSN INTEGER)CREATE ...
SELECT T1.Name, COUNT(*) FROM Physician AS T1 JOIN Patient AS T2 ON T1.EmployeeID = T2.PCP GROUP BY T1.EmployeeID
Bar chart x axis meter 500 y axis meter_100, order in descending by the X-axis.
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 event (ID int,Name text,Stadium_ID int,Year text)CREATE TABLE record (ID int,Result text,Swimmer_ID int,Event_ID int)CREATE TABLE stadiu...
SELECT meter_500, meter_100 FROM swimmer ORDER BY meter_500 DESC
For those records from the products and each product's manufacturer, give me the comparison about manufacturer over the name , and group by attribute name by a bar chart, and sort from low to high by the bar please.
CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL)CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)
SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Name
Which Mac OSX's GNU/Linux was yes when Windows was no?
CREATE TABLE table_11854 ("Client" text,"Windows" text,"GNU/Linux" text,"Mac OS X" text,"Haiku" text)
SELECT "Mac OS X" FROM table_11854 WHERE "GNU/Linux" = 'yes' AND "Windows" = 'no'
How many Q1 figures are given for Alexander Wurz?
CREATE TABLE table_1706942_1 (q1_order VARCHAR,driver VARCHAR)
SELECT COUNT(q1_order) FROM table_1706942_1 WHERE driver = "Alexander Wurz"
Count the number of office admitted patients who had a prescription for vecuronium bromide medication.
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND prescriptions.drug = "Vecuronium Bromide"
i'd like to go from BOSTON to SAN FRANCISCO
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 text)CREATE TABLE aircraft (aircraft_code varchar,aircraft_description varchar,manufacturer varchar,basic_type varchar,engines int,propulsion va...
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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRA...
How many rebounds have a Player of herb estes?
CREATE TABLE table_name_51 (total_rebounds VARCHAR,player VARCHAR)
SELECT COUNT(total_rebounds) FROM table_name_51 WHERE player = "herb estes"
In what time period were 354 built?
CREATE TABLE table_15102 ("Model" text,"Seats" text,"Period" text,"Built" text,"Country" text)
SELECT "Period" FROM table_15102 WHERE "Built" = '354'
Which country has a population of 3,221,216?
CREATE TABLE table_43020 ("Country" text,"Area (km\u00b2)" text,"Population (2011 est.)" text,"Population density (per km\u00b2)" text,"GDP (PPP) $M USD" text)
SELECT "Country" FROM table_43020 WHERE "Population (2011 est.)" = '3,221,216'
how many patients had v6284 as their diagnosis icd9 code along with a base drug type?
CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id tex...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "V6284" AND prescriptions.drug_type = "BASE"
how many hours does it have been since the first time patient 51858 stayed in careunit micu on the current hospital encounter?
CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value num...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 51858 AND admissions.dischtime IS NULL) AND transfers.careunit = 'micu' ORDER BY transfers.intime LIMIT 1
How many Gold medals for the country with a Rank of 1 and less than 2 Total medals?
CREATE TABLE table_name_57 (gold VARCHAR,rank VARCHAR,total VARCHAR)
SELECT COUNT(gold) FROM table_name_57 WHERE rank = "1" AND total < 2
what's the edo flight with duration being 17 days, 15 hours, 53 minutes, 18 seconds
CREATE TABLE table_19139 ("EDO Flight" real,"Shuttle" text,"Mission" text,"Launch Date" text,"Duration" text,"Primary Payload(s)" text)
SELECT "EDO Flight" FROM table_19139 WHERE "Duration" = '17 days, 15 hours, 53 minutes, 18 seconds'
For each payment method, return how many customers use it.
CREATE TABLE Supplier_Addresses (supplier_id INTEGER,address_id INTEGER,date_from DATETIME,date_to DATETIME)CREATE TABLE Addresses (address_id INTEGER,address_details VARCHAR(255))CREATE TABLE Order_Items (order_item_id INTEGER,order_id INTEGER,product_id INTEGER)CREATE TABLE Department_Stores (dept_store_id INTEGER,de...
SELECT payment_method_code, COUNT(*) FROM Customers GROUP BY payment_method_code
how many male patients were admitted to emergency?
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 diagnoses (subject_id text,hadm_id text,icd9_code text,sho...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.admission_type = "EMERGENCY"
The New York Jets picked someone from what college?
CREATE TABLE table_79578 ("Pick" real,"Team" text,"Player" text,"Position" text,"College" text)
SELECT "College" FROM table_79578 WHERE "Team" = 'new york jets'
Which leagues entered an extra preliminary round?
CREATE TABLE table_26075 ("Round" text,"Clubs remaining" real,"Clubs involved" real,"Winners from previous round" text,"New entries this round" text,"Leagues entering at this round" text)
SELECT "Leagues entering at this round" FROM table_26075 WHERE "Round" = 'Extra Preliminary Round'
Which missions were scheduled to launch on November 16, 2006?
CREATE TABLE table_359 ("Launch Vehicle" text,"Launch date" text,"Mission" text,"Institutional authority" text,"Launch site" text,"Results" text)
SELECT "Mission" FROM table_359 WHERE "Launch date" = 'November 16, 2006'
For those employees who did not have any job in the past, visualize a bar chart about the distribution of job_id and the amount of job_id , and group by attribute job_id, list from low to high by the JOB_ID please.
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 decimal(2,2),MANAGER_ID decimal(6,0),DEPARTMENT_ID decimal(4,0))CREATE TABLE departments (DEPARTMENT_ID decimal(4,...
SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_ID
What is the Blank Ends when there are less than 39 ends won and, more than 35 ends lost, and 4 stolen ends.
CREATE TABLE table_41514 ("Nation" text,"Skip" text,"Ends Won" real,"Ends Lost" real,"Blank Ends" real,"Stolen Ends" real,"Shot Pct." text)
SELECT "Blank Ends" FROM table_41514 WHERE "Ends Won" < '39' AND "Ends Lost" > '35' AND "Stolen Ends" = '4'
Name the candidates for selah r. hobbie
CREATE TABLE table_2668243_17 (candidates VARCHAR,incumbent VARCHAR)
SELECT candidates FROM table_2668243_17 WHERE incumbent = "Selah R. Hobbie"
What country has a rank smaller than 6, a time of 6:32.32 and notes of FB?
CREATE TABLE table_79210 ("Rank" real,"Rowers" text,"Country" text,"Time" text,"Notes" text)
SELECT "Country" FROM table_79210 WHERE "Rank" < '6' AND "Notes" = 'fb' AND "Time" = '6:32.32'
What was the 2001-05 rate for the country that had 1981-85 rate of -3.48%?
CREATE TABLE table_33438 ("Country Name" text,"1961-65" text,"1966-70" text,"1971-75" text,"1976-80" text,"1981-85" text,"1986-90" text,"1991-95" text,"1996\u20132000" text,"2001-05" text,"2006-10" text)
SELECT "2001-05" FROM table_33438 WHERE "1981-85" = '-3.48%'
What is Winner, when Year is 2013?
CREATE TABLE table_name_11 (winner VARCHAR,year VARCHAR)
SELECT winner FROM table_name_11 WHERE year = 2013
what was the last year that it finished the race ?
CREATE TABLE table_204_609 (id number,"year" number,"car" number,"start" number,"qual" number,"rank" number,"finish" number,"laps" number,"led" number,"retired" text)
SELECT "year" FROM table_204_609 ORDER BY "year" DESC LIMIT 1
What is the moment of intertia in torsion (j) Cm4) for the beam height (mm) 120??=
CREATE TABLE table_2071644_1 (moment_of_inertia_in_torsion__j___cm_4__ VARCHAR,beam_height__mm_ VARCHAR)
SELECT COUNT(moment_of_inertia_in_torsion__j___cm_4__) FROM table_2071644_1 WHERE beam_height__mm_ = 120
Which year had 0 points and an AGS JH23B chassis?
CREATE TABLE table_name_81 (year VARCHAR,points VARCHAR,chassis VARCHAR)
SELECT year FROM table_name_81 WHERE points = 0 AND chassis = "ags jh23b"
Find the name and level of catalog structure with level between 5 and 10.
CREATE TABLE Catalog_Structure (catalog_level_name VARCHAR,catalog_level_number INTEGER)
SELECT catalog_level_name, catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10
If the POS is 3, what is the 08 points?
CREATE TABLE table_22011138_7 (pos VARCHAR)
SELECT 08 AS _pts FROM table_22011138_7 WHERE pos = 3
Who is the home team when melbourne is the away team?
CREATE TABLE table_name_47 (home_team VARCHAR,away_team VARCHAR)
SELECT home_team AS score FROM table_name_47 WHERE away_team = "melbourne"
does the first catheter tip-iv microbiology test of patient 28484 until 09/2102 have any organisms?
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_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,l...
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 28484) AND microbiologyevents.spec_type_desc = 'catheter tip-iv' AND NOT microbiologyevents.org_name IS NULL AND STRFTIME('%y-%m', microbiologyevents.charttime) <= '21...
A bar chart for what are the number of the category of music festivals with result 'Awarded'?
CREATE TABLE music_festival (ID int,Music_Festival text,Date_of_ceremony text,Category text,Volume int,Result text)CREATE TABLE volume (Volume_ID int,Volume_Issue text,Issue_Date text,Weeks_on_Top real,Song text,Artist_ID int)CREATE TABLE artist (Artist_ID int,Artist text,Age int,Famous_Title text,Famous_Release_date t...
SELECT Category, COUNT(Category) FROM music_festival WHERE Result = "Awarded" GROUP BY Category
Which Wins have a Goal Difference larger than 12, and a Club of granada cf, and Played larger than 30?
CREATE TABLE table_78617 ("Position" real,"Club" text,"Played" real,"Points" real,"Wins" real,"Draws" real,"Losses" real,"Goals for" real,"Goals against" real,"Goal Difference" real)
SELECT AVG("Wins") FROM table_78617 WHERE "Goal Difference" > '12' AND "Club" = 'granada cf' AND "Played" > '30'
What is the largest laps for Time/Retired of + 2 laps, and a Grid of 13?
CREATE TABLE table_name_34 (laps INTEGER,time_retired VARCHAR,grid VARCHAR)
SELECT MAX(laps) FROM table_name_34 WHERE time_retired = "+ 2 laps" AND grid = 13
What are the ids, scores, and dates of the games which caused at least two injury accidents?
CREATE TABLE injury_accident (game_id VARCHAR)CREATE TABLE game (id VARCHAR,score VARCHAR,date VARCHAR)
SELECT T1.id, T1.score, T1.date FROM game AS T1 JOIN injury_accident AS T2 ON T2.game_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 2
what are the total number of times the soviet union is listed under the gold column ?
CREATE TABLE table_203_554 (id number,"year" number,"place" text,"gold" text,"silver" text,"bronze" text)
SELECT COUNT(*) FROM table_203_554 WHERE "gold" = 'soviet union'
When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible?
CREATE TABLE browser (id VARCHAR,name VARCHAR)CREATE TABLE accelerator_compatible_browser (compatible_since_year VARCHAR,browser_id VARCHAR,accelerator_id VARCHAR)CREATE TABLE web_client_accelerator (id VARCHAR,name VARCHAR)
SELECT T1.compatible_since_year FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id = T3.id WHERE T3.name = 'CACHEbox' AND T2.name = 'Internet Explorer'
What is the Score of the tournament played on Clay Surface against Pablo Martin-Adalia?
CREATE TABLE table_12588 ("Outcome" text,"Date" text,"Category" text,"Tournament" text,"Surface" text,"Opponent" text,"Score" text)
SELECT "Score" FROM table_12588 WHERE "Surface" = 'clay' AND "Opponent" = 'pablo martin-adalia'
how many patients whose lab test fluid is pleural?
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 prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug tex...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.fluid = "Pleural"
When did Adam Thompson play in the final?
CREATE TABLE table_37632 ("Date" text,"Tournament" text,"Surface" text,"Opponent in the final" text,"Score" text)
SELECT "Date" FROM table_37632 WHERE "Opponent in the final" = 'adam thompson'
Who was the director of Pecado Mortal
CREATE TABLE table_19963 ("Year (Ceremony)" real,"Original title" text,"English title" text,"Director" text,"Result" text)
SELECT "Director" FROM table_19963 WHERE "Original title" = 'Pecado Mortal'
How many points are there with more losses than 16, more goals than 44, and a smaller position than 13?
CREATE TABLE table_name_99 (points VARCHAR,position VARCHAR,loses VARCHAR,goals_scored VARCHAR)
SELECT COUNT(points) FROM table_name_99 WHERE loses > 16 AND goals_scored > 44 AND position < 13
Which Tournament has an Outcome of winner on 19 october 2008?
CREATE TABLE table_74963 ("Outcome" text,"Date" text,"Tournament" text,"Surface" text,"Opponent" text,"Score" text)
SELECT "Tournament" FROM table_74963 WHERE "Outcome" = 'winner' AND "Date" = '19 october 2008'
which party is the newark representative from
CREATE TABLE table_31167 ("District" real,"Representative" text,"Party" text,"Residence" text,"First Elected" text,"Term Limited" real)
SELECT "Party" FROM table_31167 WHERE "Residence" = 'Newark'
Count the number of documents.
CREATE TABLE statements (statement_id number,statement_details text)CREATE TABLE projects (project_id number,project_details text)CREATE TABLE ref_document_types (document_type_code text,document_type_name text,document_type_description text)CREATE TABLE documents (document_id number,document_type_code text,project_id ...
SELECT COUNT(*) FROM documents
Can you tell me the highest Game that has the Opponent of atlanta hawks?
CREATE TABLE table_name_56 (game INTEGER,opponent VARCHAR)
SELECT MAX(game) FROM table_name_56 WHERE opponent = "atlanta hawks"
How many games had a tied less 15 with goals against being fewer than 186?
CREATE TABLE table_10887 ("Season" text,"Games" real,"Lost" real,"Tied" real,"Points" real,"Goals for" real,"Goals against" real,"Standing" text)
SELECT COUNT("Games") FROM table_10887 WHERE "Tied" < '15' AND "Goals against" < '186'
What kind of hand guards are associated with a rear sight of A1 and stock of A2?
CREATE TABLE table_17831 ("Colt model no." text,"Diemaco model" text,"Stock" text,"Fire control" text,"Rear sight" text,"Forward assist" text,"Barrel length" text,"Barrel profile" text,"Barrel twist" text,"Hand guards" text,"Bayonet Lug" text,"Muzzle device" text)
SELECT "Hand guards" FROM table_17831 WHERE "Rear sight" = 'A1' AND "Stock" = 'A2'
What is the total number of field goals for a player that had less than 3 touchdowns, had 4 points, and had less than 4 extra points?
CREATE TABLE table_name_99 (field_goals VARCHAR,extra_points VARCHAR,touchdowns VARCHAR,points VARCHAR)
SELECT COUNT(field_goals) FROM table_name_99 WHERE touchdowns < 3 AND points = 4 AND extra_points < 4
Which band plays Self Versus Self - Immersion?
CREATE TABLE table_name_17 (band VARCHAR,album_or_song VARCHAR)
SELECT band FROM table_name_17 WHERE album_or_song = "self versus self - immersion"
Unique Most Recent Post For Each User.
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 OwnerUserId, Score FROM Posts INNER JOIN (SELECT OwnerUserId AS id, MAX(CreationDate) AS maxDate FROM Posts GROUP BY OwnerUserId) AS p ON Posts.OwnerUserId = p.Id AND Posts.CreationDate = p.maxDate LIMIT 20
How many flights in each destination city? Return a bar chart, and order by the destination from high to low please.
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 employee (eid number(9,0),name varchar2(30),salary number(10,2))CREATE TABLE aircraft (aid number(9,0),name varchar2(30),distance n...
SELECT destination, COUNT(destination) FROM flight GROUP BY destination ORDER BY destination DESC
What position does the player from Texas State who was drafted before round 11 with an overall rank lower than 306 play?
CREATE TABLE table_32583 ("Round" real,"Overall" real,"Player" text,"Position" text,"School/Club Team" text)
SELECT "Position" FROM table_32583 WHERE "Overall" < '306' AND "Round" < '11' AND "School/Club Team" = 'texas state'
Return the text of tweets about the topic 'intern'.
CREATE TABLE tweets (text VARCHAR)
SELECT text FROM tweets WHERE text LIKE '%intern%'
which tramway was built directly before the 3s aeriral tramway ?
CREATE TABLE table_203_457 (id number,"tramway" text,"country" text,"city" text,"height of pylons" text,"span width,\nleaning straight line" text,"span width,\nhorizontal measurement" text,"height of cable over ground" text,"year of inauguration" number,"notes" text)
SELECT "tramway" FROM table_203_457 WHERE "year of inauguration" = (SELECT "year of inauguration" FROM table_203_457 WHERE "tramway" = '3s aerial tramway') - 1
When sylvania, oh is the location what is the team nickname?
CREATE TABLE table_30393 ("Institution" text,"Location" text,"Founded" real,"Affiliation" text,"Enrollment" real,"Team Nickname" text,"Primary conference" text)
SELECT "Team Nickname" FROM table_30393 WHERE "Location" = 'Sylvania, OH'
What is the to par of the player from the United States with a place of t1 and a 76-68=144 score?
CREATE TABLE table_50020 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text)
SELECT "To par" FROM table_50020 WHERE "Country" = 'united states' AND "Place" = 't1' AND "Score" = '76-68=144'
Name the broadcast date for 7.4 viewers
CREATE TABLE table_24056 ("Episode" text,"Broadcast date" text,"Run time" text,"Viewers (in millions)" text,"Archive" text)
SELECT "Broadcast date" FROM table_24056 WHERE "Viewers (in millions)" = '7.4'
Which team has a right wing position listed?
CREATE TABLE table_70175 ("Pick #" text,"Player" text,"Position" text,"Nationality" text,"NHL team" text,"College/junior/club team" text)
SELECT "College/junior/club team" FROM table_70175 WHERE "Position" = 'right wing'
what was the nominee of best musical
CREATE TABLE table_75509 ("Year" real,"Award" text,"Category" text,"Nominee" text,"Result" text)
SELECT "Nominee" FROM table_75509 WHERE "Category" = 'best musical'
there is a microbiology test result for patient 96833 since 6 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 inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE transfers (row_id nu...
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 96833) AND DATETIME(microbiologyevents.charttime) >= DATETIME(CURRENT_TIME(), '-6 year')
Suggested edits which are possibly affected by rollback bug.
CREATE TABLE ReviewTaskStates (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 PostTypes (Id number,Name text)CREATE TABLE ReviewTaskResultTy...
SELECT e.PostId AS "post_link" FROM SuggestedEdits AS e INNER JOIN PostHistory AS th ON e.PostId = th.PostId AND e.ApprovalDate = th.CreationDate LEFT OUTER JOIN PostHistory AS h ON e.PostId = h.PostId AND e.ApprovalDate = h.CreationDate AND e.OwnerUserId = h.UserId AND h.PostHistoryTypeId IN (4, 5) WHERE th.PostHistor...
What is Player, when To Par is +1, and when Score is 72-70-72=214?
CREATE TABLE table_48859 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text)
SELECT "Player" FROM table_48859 WHERE "To par" = '+1' AND "Score" = '72-70-72=214'
What is the average against that has a drawn less than 7, points greater than 22, and 19 for the played?
CREATE TABLE table_42054 ("Position" real,"Team" text,"Points" real,"Played" real,"Drawn" real,"Lost" real,"Against" real,"Difference" text)
SELECT AVG("Against") FROM table_42054 WHERE "Drawn" < '7' AND "Points" > '22' AND "Played" = '19'
give me the number of patients whose primary disease is st-segment elevation myocardial infarction\cardiac cath and year of birth is less than 2043?
CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,sho...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "ST-SEGMENT ELEVATION MYOCARDIAL INFARCTION\CARDIAC CATH" AND demographic.dob_year < "2043"
what is the two year survival rate of nb obsrv suspct infect patients?
CREATE TABLE d_icd_procedures (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 cost (row_id number,subject_id number,hadm_id number,event_type text,event_id...
SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t2.charttime) > 2 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id...