instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What is the lowest interview score for Missouri, where the swimsuit score was highter than 9.433? | CREATE TABLE table_46661 ("Country" text,"Preliminary" real,"Interview" real,"Swimsuit" real,"Evening Gown" real,"Average" real) | SELECT MIN("Interview") FROM table_46661 WHERE "Country" = 'missouri' AND "Swimsuit" > '9.433' |
How many millions of viewers did the episode written by Andrea Conway Kagey? | CREATE TABLE table_73545 ("Series #" real,"Season #" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"U.S. viewers (in millions)" text) | SELECT "U.S. viewers (in millions)" FROM table_73545 WHERE "Written by" = 'Andrea Conway Kagey' |
User's Rank in a location with min rep cap. | CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,RejectionDate time,OwnerUserId number,Comment text,Text text,Title text,Tags text,RevisionGUID other)CREATE TABLE Badges (Id number,UserId number,Name text,Date ti... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", DisplayName, Reputation, Location, Views, ProfileImageUrl, AboutMe FROM Users WHERE Reputation >= '##repcap##' AND LOWER(Location) LIKE LOWER(N'%##Location##%') ORDER BY Reputation DESC |
What is the number of losses when the ties are lesser than 0? | CREATE TABLE table_77176 ("Season" real,"League" text,"Finish" text,"Wins" real,"Losses" real,"Ties" real) | SELECT COUNT("Losses") FROM table_77176 WHERE "Ties" < '0' |
What is the hometown of number 40? | CREATE TABLE table_37377 ("Position" text,"Number" real,"Name" text,"Height" text,"Weight" real,"Class" text,"Hometown" text,"Games\u2191" real) | SELECT "Hometown" FROM table_37377 WHERE "Number" = '40' |
show me economy fares from DALLAS to BALTIMORE | CREATE TABLE class_of_service (booking_class varchar,rank int,class_description text)CREATE TABLE date_day (month_number int,day_number int,year int,day_name varchar)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE restricti... | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, fare_basis, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND ... |
What is the total round of the 129 pick? | CREATE TABLE table_49250 ("Round" real,"Pick #" real,"Player" text,"Position" text,"College" text) | SELECT COUNT("Round") FROM table_49250 WHERE "Pick #" = '129' |
Who won the Brands Hatch circuit? | CREATE TABLE table_1140088_6 (winning_driver VARCHAR,circuit VARCHAR) | SELECT winning_driver FROM table_1140088_6 WHERE circuit = "Brands Hatch" |
What's the participle when the verbal noun is i-bil-tze? | CREATE TABLE table_556 ("Basic stem (root)" text,"Present stem" text,"Non-present stem" text,"Participle" text,"Verbal noun" text,"Short stem" text,"Meaning" text) | SELECT "Participle" FROM table_556 WHERE "Verbal noun" = 'i-bil-tze' |
What's the total amount of USSR that has more than 0 gold, less than 85 silver and more than 6 bronze? | CREATE TABLE table_name_62 (total INTEGER,silver VARCHAR,nation VARCHAR,gold VARCHAR,bronze VARCHAR) | SELECT MIN(total) FROM table_name_62 WHERE gold > 0 AND bronze > 6 AND nation = "ussr" AND silver < 85 |
What is the original air date of # 6? | CREATE TABLE table_27547668_2 (original_airdate VARCHAR,_number VARCHAR) | SELECT original_airdate FROM table_27547668_2 WHERE _number = 6 |
List the population density per kilometer for the city of calintaan? | CREATE TABLE table_73906 ("Municipality" text,"No. of Barangays" real,"Area (km\u00b2)" text,"Population (2010)" real,"Pop. density (per km\u00b2)" text,"Income Class (2004)" text) | SELECT "Pop. density (per km\u00b2)" FROM table_73906 WHERE "Municipality" = 'Calintaan' |
How many lessons were in cancelled state? | CREATE TABLE Lessons (lesson_status_code VARCHAR) | SELECT COUNT(*) FROM Lessons WHERE lesson_status_code = "Cancelled" |
what are all the gtc winners for pole position no. 21 team modena | CREATE TABLE table_13079788_3 (gtc_winner VARCHAR,pole_position VARCHAR) | SELECT gtc_winner FROM table_13079788_3 WHERE pole_position = "No. 21 Team Modena" |
What was the score for the match where the home team was Leicester City? | CREATE TABLE table_name_16 (score VARCHAR,home_team VARCHAR) | SELECT score FROM table_name_16 WHERE home_team = "leicester city" |
Which label is from Spain? | CREATE TABLE table_name_31 (label VARCHAR,country VARCHAR) | SELECT label FROM table_name_31 WHERE country = "spain" |
Closed, undeleted, questions with votes <= 1 by date. | CREATE TABLE FlagTypes (Id number,Name text,Description text)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE Review... | SELECT q.Id AS "post_link", q.CreationDate FROM Posts AS q WHERE q.PostTypeId = 1 AND q.CreationDate > '##StartDate##' AND q.CreationDate < '##EndDate##' AND q.ClosedDate > '##StartDate##' AND q.DeletionDate IS NULL AND q.Score <= 1 AND COALESCE((SELECT MAX(a.Score) FROM Posts AS a WHERE a.ParentId = q.Id AND a.PostTyp... |
How many escorts does the nation with 6 cruisers have? | CREATE TABLE table_name_74 (escorts VARCHAR,cruisers VARCHAR) | SELECT escorts FROM table_name_74 WHERE cruisers = "6" |
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and code , and group by attribute name, and display by the y-axis in descending please. | 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.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Code DESC |
Who was the other team on march 27? | CREATE TABLE table_29770 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Team" FROM table_29770 WHERE "Date" = 'March 27' |
Show me mean age by born state in a histogram, rank by the y axis in asc. | CREATE TABLE department (Department_ID int,Name text,Creation text,Ranking int,Budget_in_Billions real,Num_Employees real)CREATE TABLE head (head_ID int,name text,born_state text,age real)CREATE TABLE management (department_ID int,head_ID int,temporary_acting text) | SELECT born_state, AVG(age) FROM head GROUP BY born_state ORDER BY AVG(age) |
What are the number of the countries of mountains with height bigger than 5000?, I want to rank by the Y-axis from low to high. | CREATE TABLE mountain (Mountain_ID int,Name text,Height real,Prominence real,Range text,Country text)CREATE TABLE climber (Climber_ID int,Name text,Country text,Time text,Points real,Mountain_ID int) | SELECT Country, COUNT(Country) FROM mountain WHERE Height > 5000 GROUP BY Country ORDER BY COUNT(Country) |
What shows for 2009 when the 2012 is 1R? | CREATE TABLE table_name_5 (Id VARCHAR) | SELECT 2009 FROM table_name_5 WHERE 2012 = "1r" |
Which documents have more than 1 draft copies? List document id and number of draft copies. | CREATE TABLE circulation_history (document_id number,draft_number number,copy_number number,employee_id number)CREATE TABLE addresses (address_id number,address_details text)CREATE TABLE documents (document_id number,document_status_code text,document_type_code text,shipping_agent_code text,receipt_date time,receipt_nu... | SELECT document_id, COUNT(*) FROM draft_copies GROUP BY document_id HAVING COUNT(*) > 1 |
Bar chart x axis time y axis id | 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 stadium (ID int,name text,Capacity int,City text,Country text,Opening_year... | SELECT Time, ID FROM swimmer |
What district has a democratic leader from Roby? | CREATE TABLE table_45276 ("Senator" text,"Party" text,"District" real,"Home Town" text,"Took Office" real) | SELECT SUM("District") FROM table_45276 WHERE "Party" = 'democratic' AND "Home Town" = 'roby' |
what is the number of patients whose diagnoses long title is abdominal pain, other specified site and drug type is main? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,do... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Abdominal pain, other specified site" AND prescriptions.drug_type = "MAIN" |
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of hire_date and the average of department_id bin hire_date by time, rank by the the average of department id from high to low. | CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))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 varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUMBER... | SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY AVG(DEPARTMENT_ID) DESC |
How many teams listed for game 45? | CREATE TABLE table_29829 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT COUNT("Team") FROM table_29829 WHERE "Game" = '45' |
how was patient 26772 admitted to hospital the last time since 2105? | CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE cost (row_id number,subject_id number,hadm_i... | SELECT admissions.admission_type FROM admissions WHERE admissions.subject_id = 26772 AND STRFTIME('%y', admissions.admittime) >= '2105' ORDER BY admissions.admittime DESC LIMIT 1 |
Give me the number of patients diagnosed with cerebral thrombosis with cerebral infarction who had a csf lab test. | 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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Cerebral thrombosis with cerebral infarction" AND lab.fluid = "Cerebrospinal Fluid (CSF)" |
Who directed # (season #) is 1 ( 2 )? | CREATE TABLE table_30403 ("# (season #)" text,"No. (episode #)" text,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Prod. code" text) | SELECT "Directed by" FROM table_30403 WHERE "# (season #)" = '1 ( 2 )' |
How many years had a film that peaked at #10 in the UK? | CREATE TABLE table_15010 ("Film" text,"Year" real,"Score composer" text,"U.K. peak position" text,"U.S. peak position" text) | SELECT COUNT("Year") FROM table_15010 WHERE "U.K. peak position" = '10' |
Which player was picked before 13, in a P position, and is from Georgia Tech? | CREATE TABLE table_14103 ("Pick" real,"Player" text,"Team" text,"Position" text,"Hometown/School" text) | SELECT "Player" FROM table_14103 WHERE "Pick" < '13' AND "Position" = 'p' AND "Hometown/School" = 'georgia tech' |
Which total number of Week has an Opponent of at new orleans saints, and an Attendance larger than 53,448? | CREATE TABLE table_51783 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" real) | SELECT COUNT("Week") FROM table_51783 WHERE "Opponent" = 'at new orleans saints' AND "Attendance" > '53,448' |
What are the names of entrepreneurs whose investor is not 'Rachel Elnaugh'? | CREATE TABLE entrepreneur (People_ID VARCHAR,Investor VARCHAR)CREATE TABLE people (Name VARCHAR,People_ID VARCHAR) | SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor <> "Rachel Elnaugh" |
since 2105 how many people were diagnosed with hyperglycemia within the same hospital visit after the first diagnosis of diabetes mellitus - type ii? | CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,cellla... | 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 = 'hyperglycemia' AND STRFTIME('%y', diagnosis.diagnosistime) >= '2105') AS ... |
how much is the change in weight of patient 006-161415 last measured on the first hospital visit compared to the second to last value measured on the first hospital visit? | CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin te... | SELECT (SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-161415' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1) AND NOT patient.admissionweight IS NULL O... |
What is the attendance at the Dallas home game on may 12? | CREATE TABLE table_name_67 (attendance VARCHAR,home VARCHAR,date VARCHAR) | SELECT COUNT(attendance) FROM table_name_67 WHERE home = "dallas" AND date = "may 12" |
count the number of patients whose diagnoses short title is candidal esophagitis and drug route is iv? | 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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Candidal esophagitis" AND prescriptions.route = "IV" |
For those records from the products and each product's manufacturer, a bar chart shows the distribution of name and code , and group by attribute headquarter, I want to rank in asc by the X-axis. | 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.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Name |
What is the smallest converted value at number 19? | CREATE TABLE table_1895522_2 (converted INTEGER,number VARCHAR) | SELECT MIN(converted) FROM table_1895522_2 WHERE number = "19" |
Dr. Hyukjin Shin will be teaching which classes next semester ? | CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar,transfer_source varchar,earn_credit varchar,repeat_term varchar,test_id varchar)CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE ta (campus_job_id int,student_id ... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Hyukjin Shin%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offe... |
is patient 16715's level of heart rate last measured on the last intensive care unit visit less than it was second to last measured on the last intensive care unit visit? | CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)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 microbiologyevents (row_... | SELECT (SELECT 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 = 16715) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1) AND chartevents... |
What is the rating of the episode with 13.47 million viewers and overall rank larger than 6? | CREATE TABLE table_57929 ("Episode" text,"Air Date" text,"Rating" real,"Share" real,"Rating/Share 18\u201349" text,"Viewers (m)" real,"Timeslot Rank" real,"Night Rank" text,"Overall Rank" real) | SELECT SUM("Rating") FROM table_57929 WHERE "Viewers (m)" = '13.47' AND "Overall Rank" > '6' |
What label has 887 448-2 as the catalog? | CREATE TABLE table_name_4 (label VARCHAR,catalog VARCHAR) | SELECT label FROM table_name_4 WHERE catalog = "887 448-2" |
what are the three most commonly used procedures for patients that have previously received c v v h within the same month, until 4 years ago? | CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patie... | SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'c v v h' AND DATETIME(treatment.treatmen... |
What city joined the Independents conference after 1963? | CREATE TABLE table_65659 ("School" text,"City" text,"Mascot" text,"County" text,"Year joined" real,"Previous Conference" text,"Year Left" real,"Conference Joined" text) | SELECT "City" FROM table_65659 WHERE "Year joined" > '1963' AND "Conference Joined" = 'independents' |
What is the away score with a record of 7-4, win% of 0.637, and 2010 season? | CREATE TABLE table_name_22 (away VARCHAR,season VARCHAR,record VARCHAR,win__percentage VARCHAR) | SELECT away FROM table_name_22 WHERE record = "7-4" AND win__percentage = 0.637 AND season = "2010" |
what is the last ward of patient 013-36766? | CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresul... | SELECT patient.wardid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-36766') ORDER BY patient.unitadmittime DESC LIMIT 1 |
Which Result has a Party of republican, and a First elected smaller than 1856? | CREATE TABLE table_6557 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text) | SELECT "Result" FROM table_6557 WHERE "Party" = 'republican' AND "First elected" < '1856' |
vote split by month for specified user. comparison of upvotes to downvotes on answers posted by the specified user. 'all-time up to last month | CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,RejectionDate time,Own... | SELECT LAST_DATE_OF_MONTH(a.CreationDate) AS "month", SUM(CASE WHEN VoteTypeId = 2 THEN 1 ELSE 0 END) AS Upvotes, SUM(CASE WHEN VoteTypeId = 3 THEN 1 ELSE 0 END) AS Downvotes FROM Posts AS a LEFT OUTER JOIN Votes AS v ON v.PostId = a.Id JOIN Users AS u ON a.OwnerUserId = u.Id WHERE VoteTypeId IN (2, 3) AND a.OwnerUserI... |
What number of rank has more than 2 medals in total with less than 4 bronze? | CREATE TABLE table_34670 ("Rank" real,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT COUNT("Rank") FROM table_34670 WHERE "Total" > '2' AND "Bronze" < '4' |
Name the listed owners for brevak racing | CREATE TABLE table_24666 ("Team" text,"Truck(s)" text,"#" real,"Driver(s)" text,"Primary Sponsor(s)" text,"Listed Owner(s)" text,"Crew Chief" text) | SELECT "Listed Owner(s)" FROM table_24666 WHERE "Team" = 'Brevak Racing' |
who shot the least at 40 yd | CREATE TABLE table_204_234 (id number,"round" text,"100 yd (91 m)" text,"80 yd (73 m)" text,"60 yd (55 m)" text,"50 yd (46 m)" text,"40 yd (37 m)" text) | SELECT "round" FROM table_204_234 ORDER BY "40 yd (37 m)" LIMIT 1 |
What is the total number of Top-25, when Events is greater than 86? | CREATE TABLE table_41495 ("Tournament" text,"Wins" real,"Top-5" real,"Top-10" real,"Top-25" real,"Events" real,"Cuts made" real) | SELECT COUNT("Top-25") FROM table_41495 WHERE "Events" > '86' |
What player weight 235? | CREATE TABLE table_name_29 (player VARCHAR,weight VARCHAR) | SELECT player FROM table_name_29 WHERE weight = 235 |
What party established in 1797 won an election in 2007? | CREATE TABLE table_12999 ("Province" text,"Inhabitants" real,"established" real,"President" text,"Party" text,"Election" real) | SELECT "Party" FROM table_12999 WHERE "established" > '1797' AND "Election" = '2007' |
When was the livery of Kinneil Sandy Red? | CREATE TABLE table_11927 ("Number & name" text,"Description" text,"Current status" text,"Livery" text,"Date" text) | SELECT "Date" FROM table_11927 WHERE "Livery" = 'kinneil sandy red' |
count the number of patients who have had a po meds intake in 2105. | CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,syst... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT intakeoutput.patientunitstayid FROM intakeoutput WHERE intakeoutput.celllabel = 'po meds' AND intakeoutput.cellpath LIKE '%input%' AND STRFTIME('%y', intakeoutput.intakeoutputtime) = '2105') |
What is listed for the Main Location(s) that has a % of National of 2.05%? | CREATE TABLE table_name_77 (main_location_s_ VARCHAR,_percentage_of_national VARCHAR) | SELECT main_location_s_ FROM table_name_77 WHERE _percentage_of_national = "2.05%" |
What is the 1977 value that has a 1974 a value? | CREATE TABLE table_52461 ("Tournament" text,"1972" text,"1973" text,"1974" text,"1975" text,"1976" text,"1977" text,"1978" text) | SELECT "1977" FROM table_52461 WHERE "1974" = 'a' |
Which (M -1 cm -1) has a molar mass of 1008 g/mol? | CREATE TABLE table_78468 ("Color" text,"mass (g/mol)" text,"Absorb (nm)" text,"Emit (nm)" text,"\u03b5 (M -1 cm -1)" text) | SELECT "\u03b5 (M -1 cm -1 )" FROM table_78468 WHERE "mass (g/mol)" = '1008' |
what were the drugs added to patient 19412 today as compared to the one yesterday? | CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance tex... | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19412) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT prescriptions.drug FROM prescriptions WHERE... |
When 127 is on June 10th to 11th what is November 3rd? | CREATE TABLE table_25286976_2 (november_3 VARCHAR,june_10_11 VARCHAR) | SELECT november_3 FROM table_25286976_2 WHERE june_10_11 = "127" |
Return a bar chart about the distribution of ACC_Road and Team_ID , and group by attribute All_Home, sort in desc by the Team_ID. | 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, Team_ID FROM basketball_match GROUP BY All_Home, ACC_Road ORDER BY Team_ID DESC |
Which Engine has a Model of sl500, and a Year From larger than 1999? | CREATE TABLE table_name_57 (engine INTEGER,model VARCHAR,year_from VARCHAR) | SELECT MAX(engine) FROM table_name_57 WHERE model = "sl500" AND year_from > 1999 |
Find ACC_Regular_Season and ACC_Percent , and visualize them by a bar chart. | CREATE TABLE basketball_match (Team_ID int,School_ID int,Team_Name text,ACC_Regular_Season text,ACC_Percent text,ACC_Home text,ACC_Road text,All_Games text,All_Games_Percent int,All_Home text,All_Road text,All_Neutral text)CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,En... | SELECT ACC_Regular_Season, ACC_Percent FROM basketball_match |
List all headquarters and the number of companies in each headquarter with a bar chart, could you display by the the total number from high to low? | 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 Headquarters, COUNT(*) FROM company GROUP BY Headquarters ORDER BY COUNT(*) DESC |
What is the date of injury for player Wesley sneijder (2)? | CREATE TABLE table_74144 ("Date" text,"Player" text,"Injury" text,"Date of injury" text,"Number of matches (Total)" text,"Source" text) | SELECT "Date of injury" FROM table_74144 WHERE "Player" = 'Wesley Sneijder (2)' |
What is Result, when Year is greater than 1999, when White is 'Kramnik', and when Tournament is 'Mainz CC Champions Duel (5)'? | CREATE TABLE table_59335 ("White" text,"Black" text,"Year" real,"Result" text,"Moves" real,"Tournament" text,"Opening" text) | SELECT "Result" FROM table_59335 WHERE "Year" > '1999' AND "White" = 'kramnik' AND "Tournament" = 'mainz cc champions duel (5)' |
How many papers does kentaro toyama have ? | CREATE TABLE field (fieldid int)CREATE TABLE paperfield (fieldid int,paperid int)CREATE TABLE venue (venueid int,venuename varchar)CREATE TABLE author (authorid int,authorname varchar)CREATE TABLE dataset (datasetid int,datasetname varchar)CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TABLE keyphrase (ke... | SELECT DISTINCT COUNT(DISTINCT writes.paperid) FROM author, writes WHERE author.authorname = 'kentaro toyama' AND writes.authorid = author.authorid |
What is th average dras when wins are less than 12 and the against is 989? | CREATE TABLE table_60466 ("Golden Rivers" text,"Wins" real,"Byes" real,"Losses" real,"Draws" real,"Against" real) | SELECT AVG("Draws") FROM table_60466 WHERE "Against" = '989' AND "Wins" < '12' |
What is the default desktop environment when the edition is kde and the compatible repository is ubuntu 13.04? | CREATE TABLE table_3745 ("Version" text,"Codename" text,"Edition" text,"Code Base" text,"Compatible repository" text,"Default desktop environment" text,"Release date" text) | SELECT "Default desktop environment" FROM table_3745 WHERE "Edition" = 'KDE' AND "Compatible repository" = 'Ubuntu 13.04' |
What season number was assigned to the episode identified with the production code 401? | CREATE TABLE table_28081876_6 (season_no VARCHAR,production_code VARCHAR) | SELECT season_no FROM table_28081876_6 WHERE production_code = 401 |
Show the total number of the first year of parties with the theme 'Spring' or 'Teqnology' with a bar chart, bin the first year into weekday interval and count the first year, rank by the Y in descending please. | CREATE TABLE party (Party_ID int,Party_Theme text,Location text,First_year text,Last_year text,Number_of_hosts int)CREATE TABLE party_host (Party_ID int,Host_ID int,Is_Main_in_Charge bool)CREATE TABLE host (Host_ID int,Name text,Nationality text,Age text) | SELECT First_year, COUNT(First_year) FROM party WHERE Party_Theme = "Spring" OR Party_Theme = "Teqnology" ORDER BY COUNT(First_year) DESC |
Which Opponent has a Result of l 24 3? | CREATE TABLE table_47965 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" text) | SELECT "Opponent" FROM table_47965 WHERE "Result" = 'l 24–3' |
Name the record for july 18 | CREATE TABLE table_17103645_10 (record VARCHAR,date VARCHAR) | SELECT record FROM table_17103645_10 WHERE date = "July 18" |
What's the exposure fusion of Panoramaplus x4? | CREATE TABLE table_name_38 (exposure_fusion VARCHAR,name VARCHAR) | SELECT exposure_fusion FROM table_name_38 WHERE name = "panoramaplus x4" |
What is the HDTV of the Music Content Channel? | CREATE TABLE table_40675 ("Television service" text,"Country" text,"Language" text,"Content" text,"HDTV" text,"Package/Option" text) | SELECT "HDTV" FROM table_40675 WHERE "Content" = 'music' |
What Ship was Built by Cammell Laird? | CREATE TABLE table_name_70 (ship VARCHAR,builder VARCHAR) | SELECT ship FROM table_name_70 WHERE builder = "cammell laird" |
What is Venue, when Balls is '148'? | CREATE TABLE table_name_22 (venue VARCHAR,balls VARCHAR) | SELECT venue FROM table_name_22 WHERE balls = 148 |
What is the abbreviation/symbol of li on ng sh ng? | CREATE TABLE table_254234_1 (abbreviation_symbol VARCHAR,chinese_name VARCHAR) | SELECT abbreviation_symbol FROM table_254234_1 WHERE chinese_name = "辽宁省 Liáoníng Shěng" |
What did the away team score when the home team scored 14.15 (99)? | CREATE TABLE table_32976 ("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_32976 WHERE "Home team score" = '14.15 (99)' |
What are the active pixels of the cantare model? | CREATE TABLE table_76484 ("Model" text,"Sensor Size" text,"Resolution" text,"Active Pixels" text,"Display" text) | SELECT "Active Pixels" FROM table_76484 WHERE "Model" = 'cantare' |
For each cinema, show the price and group them by film title in a stacked bar chart, and could you list from high to low by the total number? | CREATE TABLE schedule (Cinema_ID int,Film_ID int,Date text,Show_times_per_day int,Price float)CREATE TABLE film (Film_ID int,Rank_in_series int,Number_in_season int,Title text,Directed_by text,Original_air_date text,Production_code text)CREATE TABLE cinema (Cinema_ID int,Name text,Openning_year int,Capacity int,Locatio... | SELECT Title, Price FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID JOIN cinema AS T3 ON T1.Cinema_ID = T3.Cinema_ID GROUP BY Name, Title ORDER BY Price DESC |
What is the score in the touranament of Antalya-Belek? | CREATE TABLE table_71402 ("Date" text,"Tournament" text,"Surface" text,"Tier" text,"Partner" text,"Opponents in the final" text,"Score" text) | SELECT "Score" FROM table_71402 WHERE "Tournament" = 'antalya-belek' |
After week 11, what was the Result on December 13, 1964? | CREATE TABLE table_36152 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" real) | SELECT "Result" FROM table_36152 WHERE "Week" > '11' AND "Date" = 'december 13, 1964' |
what are the title in japanese where the reference is kids-430? | CREATE TABLE table_16412 ("Romaji title" text,"Japanese title" text,"Release date" text,"Reference" text,"Oricon" real) | SELECT "Japanese title" FROM table_16412 WHERE "Reference" = 'KIDS-430' |
What was the series of the episode directed by Abe Levitow released on 1959-06-27? | CREATE TABLE table_name_63 (series VARCHAR,director VARCHAR,release_date VARCHAR) | SELECT series FROM table_name_63 WHERE director = "abe levitow" AND release_date = "1959-06-27" |
what was the simethicone dosage that patient 5395 was first prescribed since 49 months ago? | 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,route text)CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careunit text,wardid number,intime time,outtime time)CREA... | SELECT prescriptions.dose_val_rx FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 5395) AND prescriptions.drug = 'simethicone' AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-49 month') ORDER BY prescriptions.startdate LIMIT 1 |
when was patient 027-155345's first discharge from the hospital since 5 years ago? | CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE diagnosis (diagnosi... | SELECT patient.hospitaldischargetime FROM patient WHERE patient.uniquepid = '027-155345' AND DATETIME(patient.hospitaldischargetime) >= DATETIME(CURRENT_TIME(), '-5 year') ORDER BY patient.hospitaldischargetime LIMIT 1 |
what was the last time patient 2425 received a prescription for thiamine, since 04/2101? | CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careunit text,wardid number,intime time,outtime time)CREATE TABLE d_labitems (row_id number,itemid number,labe... | SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 2425) AND prescriptions.drug = 'thiamine' AND STRFTIME('%y-%m', prescriptions.startdate) >= '2101-04' ORDER BY prescriptions.startdate DESC LIMIT 1 |
Show the names of countries and the average speed of roller coasters from each country with a bar chart. | CREATE TABLE country (Country_ID int,Name text,Population int,Area int,Languages text)CREATE TABLE roller_coaster (Roller_Coaster_ID int,Name text,Park text,Country_ID int,Length real,Height real,Speed text,Opened text,Status text) | SELECT T1.Name, AVG(T2.Speed) FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name |
What was the margin in 2001 at the McDonald's LPGA Championship? | CREATE TABLE table_31650 ("Year" real,"Championship" text,"Winning score" text,"Margin" text,"Runner(s)-up" text) | SELECT "Margin" FROM table_31650 WHERE "Year" = '2001' AND "Championship" = 'mcdonald''s lpga championship' |
If the college is SMU, what is the position? | CREATE TABLE table_29334 ("Pick #" real,"NFL Team" text,"Player" text,"Position" text,"Pro Team" text,"College" text) | SELECT "Position" FROM table_29334 WHERE "College" = 'SMU' |
What is the sector is the establishment is 110313? | CREATE TABLE table_26330 ("Sector" text,"Establishments" real,"Sales,receipts,or shipments ($1,000)" real,"Annual payroll ($1,000)" real,"Paid employees" real) | SELECT "Sector" FROM table_26330 WHERE "Establishments" = '110313' |
When was the private/non-sectarian school founded? | CREATE TABLE table_23181 ("Institution" text,"Location" text,"Nickname" text,"Founded" real,"Type" text,"Enrollment" real,"Joined" real) | SELECT "Founded" FROM table_23181 WHERE "Type" = 'Private/Non-sectarian' |
What is the source for 7% DeSUS? | CREATE TABLE table_name_37 (source VARCHAR,desus VARCHAR) | SELECT source FROM table_name_37 WHERE desus = "7%" |
give me the number of patients whose primary disease is complete heart block and drug type is main? | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.diagnosis = "COMPLETE HEART BLOCK" AND prescriptions.drug_type = "MAIN" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.