instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
who is the founder where date is c. 1900 | CREATE TABLE table_11256021_1 (founder VARCHAR,date VARCHAR) | SELECT founder FROM table_11256021_1 WHERE date = "c. 1900" |
What Label released on October 25, 1984, in the format of Stereo LP? | CREATE TABLE table_80337 ("Region" text,"Date" text,"Label" text,"Format" text,"Catalog" text) | SELECT "Label" FROM table_80337 WHERE "Date" = 'october 25, 1984' AND "Format" = 'stereo lp' |
what is the cfl team for position d? | CREATE TABLE table_49152 ("Pick #" real,"CFL Team" text,"Player" text,"Position" text,"College" text) | SELECT "CFL Team" FROM table_49152 WHERE "Position" = 'd' |
Visualize a bar chart for what are the ids and names of all start stations that were the beginning of at least 200 trips?, list by the x-axis from low to high. | CREATE TABLE weather (date TEXT,max_temperature_f INTEGER,mean_temperature_f INTEGER,min_temperature_f INTEGER,max_dew_point_f INTEGER,mean_dew_point_f INTEGER,min_dew_point_f INTEGER,max_humidity INTEGER,mean_humidity INTEGER,min_humidity INTEGER,max_sea_level_pressure_inches NUMERIC,mean_sea_level_pressure_inches NUM... | SELECT start_station_name, start_station_id FROM trip ORDER BY start_station_name |
What is the Format with a Catalog that is vcrd 103? | CREATE TABLE table_41130 ("Region" text,"Date" text,"Label" text,"Format" text,"Catalog" text) | SELECT "Format" FROM table_41130 WHERE "Catalog" = 'vcrd 103' |
WHAT IS THE 2007 AT MADRID MASTERS? | CREATE TABLE table_61652 ("Tournament" text,"2005" text,"2006" text,"2007" text,"2008" text,"2009" text,"2010" text,"2011" text,"2012" text) | SELECT "2007" FROM table_61652 WHERE "Tournament" = 'madrid masters' |
How many classes will be offered next semester across all departments ? | CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE course_offering (offering_id int,course_id int,semester int,section_number int,start_time time,end_time time,monday varchar,tuesday varchar,wednesday varchar,thursday varchar,friday varchar,saturday varchar,sunday varchar,has_final_project va... | SELECT COUNT(DISTINCT course_offering.course_id) FROM course_offering, semester WHERE semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016 |
For those employees who did not have any job in the past, return a bar chart about the distribution of job_id and the average of department_id , and group by attribute job_id, sort by the names in descending please. | 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 varchar(20),HIRE_DATE date,JOB_ID varchar(10),SALARY decimal(8,2),CO... | SELECT JOB_ID, AVG(DEPARTMENT_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_ID DESC |
what is the circuit when the winner is stan jones and the race is phillip island trophy race? | CREATE TABLE table_name_3 (circuit VARCHAR,winner VARCHAR,race VARCHAR) | SELECT circuit FROM table_name_3 WHERE winner = "stan jones" AND race = "phillip island trophy race" |
What are all of the states or countries with a corrected time 3:13:40:05? | CREATE TABLE table_72587 ("Position" real,"Sail number" text,"Yacht" text,"State/country" text,"Yacht type" text,"LOA (Metres)" text,"Skipper" text,"Corrected time d:hh:mm:ss" text) | SELECT "State/country" FROM table_72587 WHERE "Corrected time d:hh:mm:ss" = '3:13:40:05' |
Show name, address road, and city for all branches sorted by open year. | CREATE TABLE membership_register_branch (member_id number,branch_id text,register_year text)CREATE TABLE branch (branch_id number,name text,open_year text,address_road text,city text,membership_amount text)CREATE TABLE purchase (member_id number,branch_id text,year text,total_pounds number)CREATE TABLE member (member_i... | SELECT name, address_road, city FROM branch ORDER BY open_year |
What is the Jersey Number of the Player from Clemson? | CREATE TABLE table_45744 ("Player" text,"Nationality" text,"Jersey Number(s)" real,"Position" text,"Years" text,"From" text) | SELECT SUM("Jersey Number(s)") FROM table_45744 WHERE "From" = 'clemson' |
What is the home for the away of 4-0? | CREATE TABLE table_name_1 (home VARCHAR,away VARCHAR) | SELECT home FROM table_name_1 WHERE away = "4-0" |
Name the number of ends lost for 6 stolen ends | CREATE TABLE table_28987 ("Country" text,"Skip" text,"W" real,"L" real,"PF" real,"PA" real,"Ends Won" real,"Ends Lost" real,"Blank Ends" real,"Stolen Ends" real,"Shot %" text) | SELECT COUNT("Ends Lost") FROM table_28987 WHERE "Stolen Ends" = '6' |
Which country has a score of 70-66=136? | CREATE TABLE table_80160 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text) | SELECT "Country" FROM table_80160 WHERE "Score" = '70-66=136' |
how many albums were released in the month of november ? | CREATE TABLE table_203_512 (id number,"release date" text,"album" text,"catalog number" text,"chart position" number,"notes" text) | SELECT COUNT("album") FROM table_203_512 WHERE "release date" = 11 |
What is the number of the acquisition of import in the 2002 season? | CREATE TABLE table_42796 ("Name" text,"Position" text,"Number" real,"Season" text,"Acquisition via" text) | SELECT "Number" FROM table_42796 WHERE "Acquisition via" = 'import' AND "Season" = '2002' |
Which bi-directional route has a terminus at Ecat/Rosa Park Transit Center? | CREATE TABLE table_name_50 (name VARCHAR,direction VARCHAR,terminus VARCHAR) | SELECT name FROM table_name_50 WHERE direction = "bi-directional" AND terminus = "ecat/rosa park transit center" |
What is Highest Attendance, when Rank is 90, and when Venue Name is Infineon Raceway? | CREATE TABLE table_9858 ("Rank" real,"Venue name" text,"Highest attendance" text,"Location" text,"Current seating capacity" real) | SELECT "Highest attendance" FROM table_9858 WHERE "Rank" = '90' AND "Venue name" = 'infineon raceway' |
For those employees who did not have any job in the past, return a bar chart about the distribution of job_id and the average of salary , and group by attribute job_id, I want to rank by the x axis in asc please. | CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar... | SELECT JOB_ID, AVG(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_ID |
which patients have levo500pm drug code? | 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 prescriptions.formulary_drug_cd = "LEVO500PM" |
what is the minimum amount of hospital cost that includes granular casts until 1 year ago? | CREATE TABLE procedures_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 number,valueuom text)CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate... | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'granular casts')) AND DATETIME(cost.chargetime) <= DATETIME(CURRENT_TIME(), '-1 year') GROUP BY cost.... |
first deep learning paper | CREATE TABLE author (authorid int,authorname varchar)CREATE TABLE field (fieldid int)CREATE TABLE paperdataset (paperid int,datasetid int)CREATE TABLE venue (venueid int,venuename varchar)CREATE TABLE keyphrase (keyphraseid int,keyphrasename varchar)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE p... | SELECT DISTINCT paper.year FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'deep learning' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid GROUP BY paper.year ORDER BY paper.year |
For GEOG 472 last semester , who were the GSIs ? | CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE course_offering (offering_id int,course_id int,semester int,section_number int,start_time time,end_time time,monday varchar,tuesday varchar,wednesday var... | SELECT DISTINCT student.firstname, student.lastname FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN gsi ON gsi.course_offering_id = course_offering.offering_id INNER JOIN student ON student.student_id = gsi.student_id INNER JOIN semester ON semester.semester_id = course... |
give me the number of patients whose admission year is less than 2176 and diagnoses short title is hypopotassemia? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_fla... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2176" AND diagnoses.short_title = "Hypopotassemia" |
calculate the duration of hospital stays of patient 035-22706's last hospital stay. | 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 microlab (microlabid number,patientunitstayid number,culturesite text,orga... | SELECT STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', patient.hospitaladmittime) FROM patient WHERE patient.uniquepid = '035-22706' AND NOT patient.hospitaladmittime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1 |
When was incumbent Leo E. Allen first elected? | CREATE TABLE table_1342315_12 (first_elected INTEGER,incumbent VARCHAR) | SELECT MIN(first_elected) FROM table_1342315_12 WHERE incumbent = "Leo E. Allen" |
Who had highest assists at the game against Houston? | CREATE TABLE table_27700530_11 (high_assists VARCHAR,team VARCHAR) | SELECT high_assists FROM table_27700530_11 WHERE team = "Houston" |
What is the total overall number of the ot position player with a pick greater than 5? | CREATE TABLE table_name_59 (overall VARCHAR,position VARCHAR,pick VARCHAR) | SELECT COUNT(overall) FROM table_name_59 WHERE position = "ot" AND pick > 5 |
In what Round was George Thomas Picked? | CREATE TABLE table_74978 ("Round" real,"Pick #" real,"Overall" real,"Name" text,"Position" text,"College" text) | SELECT AVG("Round") FROM table_74978 WHERE "Name" = 'george thomas' |
What is the highest Total for Australia? | CREATE TABLE table_name_78 (total INTEGER,country VARCHAR) | SELECT MAX(total) FROM table_name_78 WHERE country = "australia" |
which opponents in the u.s. championships played after 1945 and had a score of 3 6, 6 4, 2 6, 6 3, 20 18? | CREATE TABLE table_77473 ("Year" real,"Championship" text,"Partner" text,"Opponents in the final" text,"Score" text) | SELECT "Opponents in the final" FROM table_77473 WHERE "Championship" = 'u.s. championships' AND "Year" > '1945' AND "Score" = '3–6, 6–4, 2–6, 6–3, 20–18' |
pregnant or lactating female | CREATE TABLE table_train_2 ("id" int,"gender" string,"pregnancy_or_lactation" bool,"diabetic" string,"electro_systolic_process" bool,"degenerative_pathology" bool,"neurological_disease" bool,"cardiomyopathy" bool,"NOUSE" float) | SELECT * FROM table_train_2 WHERE pregnancy_or_lactation = 1 AND gender = 'female' |
what was the output of patient 017-49538 for the first time,? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature n... | SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-49538')) AND intakeoutput.cellpath LIKE '%output%' ORDER... |
Name the location of the church for bremanger | CREATE TABLE table_178408_1 (location_of_the_church VARCHAR,sub_parish__sokn_ VARCHAR) | SELECT location_of_the_church FROM table_178408_1 WHERE sub_parish__sokn_ = "Bremanger" |
What place has E as the to par, with Mark Wiebe as the player? | CREATE TABLE table_name_3 (place VARCHAR,to_par VARCHAR,player VARCHAR) | SELECT place FROM table_name_3 WHERE to_par = "e" AND player = "mark wiebe" |
give me the number of patients whose admission type is elective and lab test category is blood gas? | 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 demographic (subject_id text,hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND lab."CATEGORY" = "Blood Gas" |
Votes on posts that are neither questions nor answers. | CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score num... | SELECT p.Id AS "post_link", p.Id AS "post_id", pt.Name AS "post_type", vt.Name AS "vote_type", v.UserId AS "user_link", v.CreationDate AS "vote_date", p.Body FROM Votes AS v JOIN Posts AS p ON v.PostId = p.Id JOIN PostTypes AS pt ON p.PostTypeId = pt.Id JOIN VoteTypes AS vt ON v.VoteTypeId = vt.Id WHERE pt.Name NOT IN ... |
What year had Kim Gevaert as the female winner and Xavier de Baerdemaeker as the male talent? | CREATE TABLE table_name_31 (year VARCHAR,winner__female_ VARCHAR,talent__male_ VARCHAR) | SELECT year FROM table_name_31 WHERE winner__female_ = "kim gevaert" AND talent__male_ = "xavier de baerdemaeker" |
What county is associated with ansi code 1759686? | CREATE TABLE table_22476 ("Township" text,"County" text,"Pop. (2010)" real,"Land (sqmi)" text,"Water (sqmi)" text,"Latitude" text,"Longitude" text,"GEO ID" real,"ANSI code" real) | SELECT "County" FROM table_22476 WHERE "ANSI code" = '1759686' |
Who won when np cooper av cooke was runner up? | CREATE TABLE table_71889 ("Year" real,"Winners" text,"Club" text,"Time" text,"Runners-up" text) | SELECT "Winners" FROM table_71889 WHERE "Runners-up" = 'np cooper av cooke' |
what is age and procedure icd9 code of subject name estrella carroll? | 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 demographic.age, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Estrella Carroll" |
What are the names of the cheapest products in each category along with the cheapest price in a bar chart? | 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 Name, MIN(Price) FROM Products GROUP BY Name |
What was the resolution for the match that ended by Submission (armbar)? | CREATE TABLE table_39988 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Round" text,"Time" text,"Location" text) | SELECT "Res." FROM table_39988 WHERE "Method" = 'submission (armbar)' |
How many episodes have the season number of 1? | CREATE TABLE table_21386 ("Series #" real,"Season #" real,"Title" text,"Directed by" text,"Original air date" text,"Prod. code" real) | SELECT COUNT("Series #") FROM table_21386 WHERE "Season #" = '1' |
What is the date of birth of every customer whose status code is 'Good Customer', and count them by a line chart, rank in desc by the X-axis. | CREATE TABLE Staff (staff_id INTEGER,staff_address_id INTEGER,nickname VARCHAR(80),first_name VARCHAR(80),middle_name VARCHAR(80),last_name VARCHAR(80),date_of_birth DATETIME,date_joined_staff DATETIME,date_left_staff DATETIME)CREATE TABLE Customer_Payments (customer_id INTEGER,datetime_payment DATETIME,payment_method_... | SELECT date_of_birth, COUNT(date_of_birth) FROM Customers WHERE customer_status_code = 'Good Customer' ORDER BY date_of_birth DESC |
What is the location/state that has adelaide international raceway as the circuit? | CREATE TABLE table_name_5 (location___state VARCHAR,circuit VARCHAR) | SELECT location___state FROM table_name_5 WHERE circuit = "adelaide international raceway" |
When roy richardson 476cc aermacchi is the rider what is the time for saturday august 9th? | CREATE TABLE table_2880 ("Rank" real,"Rider" text,"Mon 24 Aug" text,"Tues 25 Aug" text,"Wed 26 Aug" text,"Thurs 27 Aug" text,"Fri 28 Aug" text,"Sat 29 Aug" text) | SELECT "Sat 29 Aug" FROM table_2880 WHERE "Rider" = 'Roy Richardson 476cc Aermacchi' |
What year was the total 9? | CREATE TABLE table_61289 ("Name of ground" text,"Location" text,"Year" text,"FC matches" text,"LA matches" text,"T20 matches" text,"Total" text) | SELECT "Year" FROM table_61289 WHERE "Total" = '9' |
Show the opening year in whcih at least two churches opened. | CREATE TABLE church (open_date VARCHAR) | SELECT open_date FROM church GROUP BY open_date HAVING COUNT(*) >= 2 |
count the number of patients who have been on sc 24 fe ng intake the last year. | CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate t... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT icustays.hadm_id FROM icustays WHERE icustays.icustay_id IN (SELECT inputevents_cv.icustay_id FROM inputevents_cv WHERE inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'sc 24 fe ng' AND d_... |
treated hypertension ( systolic blood pressure >= 110 mmhg systolic and <= 170 mmhg | CREATE TABLE table_train_109 ("id" int,"serum_potassium" float,"systolic_blood_pressure_sbp" int,"body_mass_index_bmi" float,"hypertension" bool,"NOUSE" float) | SELECT * FROM table_train_109 WHERE hypertension = 1 OR (systolic_blood_pressure_sbp >= 110 AND systolic_blood_pressure_sbp <= 170) |
What are the first names of all students who took ACCT-211 and received a C? | CREATE TABLE employee (emp_num number,emp_lname text,emp_fname text,emp_initial text,emp_jobcode text,emp_hiredate time,emp_dob time)CREATE TABLE department (dept_code text,dept_name text,school_code text,emp_num number,dept_address text,dept_extension text)CREATE TABLE professor (emp_num number,dept_code text,prof_off... | SELECT T3.stu_fname FROM class AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211' AND T2.enroll_grade = 'C' |
What country did Bart Bryant with a score of 69-70=139 belong to? | CREATE TABLE table_name_37 (country VARCHAR,player VARCHAR,score VARCHAR) | SELECT country FROM table_name_37 WHERE score = 69 - 70 = 139 AND player = "bart bryant" |
What is the total number of deaths and damage for all storms with a max speed greater than the average? | CREATE TABLE region (region_id number,region_code text,region_name text)CREATE TABLE affected_region (region_id number,storm_id number,number_city_affected number)CREATE TABLE storm (storm_id number,name text,dates_active text,max_speed number,damage_millions_usd number,number_deaths number) | SELECT SUM(number_deaths), SUM(damage_millions_usd) FROM storm WHERE max_speed > (SELECT AVG(max_speed) FROM storm) |
How many episodes had 9.90 million viewers? | CREATE TABLE table_12146637_1 (episode_title VARCHAR,us_viewers__millions_ VARCHAR) | SELECT COUNT(episode_title) FROM table_12146637_1 WHERE us_viewers__millions_ = "9.90" |
Name the missouri for 2002 | CREATE TABLE table_22844 ("Year" real,"Iowa" text,"Kansas" text,"Minnesota" text,"Missouri" text,"Nebraska" text,"North/South Dakota" text) | SELECT "Missouri" FROM table_22844 WHERE "Year" = '2002' |
What is the Chinese name for the English name Andy Lau? | CREATE TABLE table_name_58 (chinese_name VARCHAR,english_name VARCHAR) | SELECT chinese_name FROM table_name_58 WHERE english_name = "andy lau" |
How many times was taiwan 3rd runner-up? | CREATE TABLE table_28634206_1 (country VARCHAR) | SELECT MAX(3 AS rd_runner_up) FROM table_28634206_1 WHERE country = "Taiwan" |
What is the alternate title/translation of the series that premiered on December 12, 2006? | CREATE TABLE table_11023 ("Country" text,"Alternate title/Translation" text,"TV network(s)" text,"Series premiere" text,"Weekly schedule" text) | SELECT "Alternate title/Translation" FROM table_11023 WHERE "Series premiere" = 'december 12, 2006' |
how much does a procedure known as antibacterials - cephalosporin cost? | CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweigh... | SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'treatment' AND cost.eventid IN (SELECT treatment.treatmentid FROM treatment WHERE treatment.treatmentname = 'antibacterials - cephalosporin') |
users who took a long break from posting on an SE site?. http://meta.stackexchange.com/questions/245972/how-to-find-the-users-who-took-a-long-break-from-posting-on-an-se-site#245972 | CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuidance text,MarkdownConcensusDescription text,CreationDate time,CreationModeratorId number,ApprovalDate time,ApprovalModeratorId number,DeactivationDat... | SELECT Users.Id, Users.EmailHash, Users.WebsiteUrl FROM Users WHERE Users.CreationDate >= '##year:int##' AND Users.Location LIKE '%##location##%' |
what are the flights from DENVER to SAN FRANCISCO | CREATE TABLE food_service (meal_code text,meal_number int,compartment text,meal_description varchar)CREATE TABLE aircraft (aircraft_code varchar,aircraft_description varchar,manufacturer varchar,basic_type varchar,engines int,propulsion varchar,wide_body varchar,wing_span int,length int,weight int,capacity int,pay_load... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRA... |
What is the gold when silver is 1, rank is larger than 3, total is smaller than 2, bronze is smaller than 0? | CREATE TABLE table_name_52 (gold INTEGER,bronze VARCHAR,total VARCHAR,silver VARCHAR,rank VARCHAR) | SELECT SUM(gold) FROM table_name_52 WHERE silver = 1 AND rank > 3 AND total < 2 AND bronze < 0 |
What airs at 7:00 am when The Big Cartoonie Show airs at 3pm? | CREATE TABLE table_13178 ("7:00 am" text,"7:30 am" text,"8:00 am" text,"9:00 am" text,"10:00 am" text,"11:00 am" text,"noon" text,"12:30 pm" text,"1:00 pm" text,"1:30 pm" text,"2:00 pm" text,"3:00 pm" text,"4:30 pm" text,"5:00 pm" text,"6:30 pm" text) | SELECT "7:00 am" FROM table_13178 WHERE "3:00 pm" = 'the big cartoonie show' |
Name the matches for gold coast | CREATE TABLE table_71868 ("Team" text,"1st Match" text,"Matches" text,"Lost" text,"% Won" text) | SELECT "Matches" FROM table_71868 WHERE "Team" = 'gold coast' |
Who was the driver when the time in part 3 was 1:31.386? | CREATE TABLE table_2233 ("Pos" text,"No" text,"Driver" text,"Constructor" text,"Part 1" text,"Part 2" text,"Part 3" text,"Grid" text) | SELECT "Driver" FROM table_2233 WHERE "Part 1" = '1:31.386' |
what is diagnoses icd9 code of subject id 19420? | 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,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethni... | SELECT diagnoses.icd9_code FROM diagnoses WHERE diagnoses.subject_id = "19420" |
What is the tie number in the game on 5 January 1986 where Exeter City is the away team? | CREATE TABLE table_name_26 (tie_no VARCHAR,date VARCHAR,away_team VARCHAR) | SELECT tie_no FROM table_name_26 WHERE date = "5 january 1986" AND away_team = "exeter city" |
How many voters were in Manhattan when 181,639 people voted in the Bronx? | CREATE TABLE table_11501 ("party" text,"Manhattan" text,"The Bronx" text,"Brooklyn" text,"Queens" text,"Richmond [Staten Is.]" text,"Total" real) | SELECT "Richmond [Staten Is.]" FROM table_11501 WHERE "The Bronx" = '181,639' |
What is the promotion when the event was Acid-fest? | CREATE TABLE table_10595 ("Location" text,"Venue" text,"Promotion" text,"Event" text,"Inductee(s)" text) | SELECT "Promotion" FROM table_10595 WHERE "Event" = 'acid-fest' |
Which Round has a Method of ko, and a Date of 1958? | CREATE TABLE table_48846 ("Result" text,"Opponent" text,"Method" text,"Date" text,"Round" real) | SELECT MIN("Round") FROM table_48846 WHERE "Method" = 'ko' AND "Date" = '1958' |
How many opponents fought on 1982-12-03? | CREATE TABLE table_12206918_2 (opponent VARCHAR,date VARCHAR) | SELECT COUNT(opponent) FROM table_12206918_2 WHERE date = "1982-12-03" |
How many songs received a 10 from Goodman and were rated by Tonioli? | CREATE TABLE table_15984 ("Week" real,"Dance/song" text,"Horwood" text,"Goodman" text,"Dixon" text,"Tonioli" text,"Total" text,"Result" text) | SELECT COUNT("Tonioli") FROM table_15984 WHERE "Goodman" = '10' |
How many different students play games? | CREATE TABLE plays_games (stuid number,gameid number,hours_played number)CREATE TABLE video_games (gameid number,gname text,gtype text)CREATE TABLE sportsinfo (stuid number,sportname text,hoursperweek number,gamesplayed number,onscholarship text)CREATE TABLE student (stuid number,lname text,fname text,age number,sex te... | SELECT COUNT(DISTINCT stuid) FROM plays_games |
Which average Played has a Drawn smaller than 1, and Points larger than 4? | CREATE TABLE table_name_83 (played INTEGER,drawn VARCHAR,points VARCHAR) | SELECT AVG(played) FROM table_name_83 WHERE drawn < 1 AND points > 4 |
What mark has over 813 points in the United States, and a 0.152 react? | CREATE TABLE table_46201 ("Lane" real,"Name" text,"Country" text,"Mark" text,"React" real,"Points" real) | SELECT "Mark" FROM table_46201 WHERE "Points" > '813' AND "Country" = 'united states' AND "React" > '0.152' |
How many grids have less than 41 laps and a Driver of pedro de la rosa? | CREATE TABLE table_name_11 (grid VARCHAR,laps VARCHAR,driver VARCHAR) | SELECT COUNT(grid) FROM table_name_11 WHERE laps < 41 AND driver = "pedro de la rosa" |
What kind of Silver has a Nation of norway and a Gold smaller than 3? | CREATE TABLE table_7670 ("Rank" real,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT SUM("Silver") FROM table_7670 WHERE "Nation" = 'norway' AND "Gold" < '3' |
Which company launched in 1996 and has a Hanzi of ? | CREATE TABLE table_name_36 (name VARCHAR,launch VARCHAR,hanzi VARCHAR) | SELECT name FROM table_name_36 WHERE launch = "1996" AND hanzi = "凤凰卫视中文台" |
Who took test #4? | CREATE TABLE table_10749367_3 (test_taker VARCHAR,_number VARCHAR) | SELECT test_taker FROM table_10749367_3 WHERE _number = 4 |
Who is the opponent of the game with a game number larger than 5 on June 22? | CREATE TABLE table_14278 ("Game" real,"Date" text,"Opponent" text,"Score" text,"Location" text,"Record" text) | SELECT "Opponent" FROM table_14278 WHERE "Game" > '5' AND "Date" = 'june 22' |
Try and find deleted BLCR question. | CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,Predefined boolean,PostNoticeDurationId number)CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,LinkTypeId number)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId num... | SELECT Body FROM Posts WHERE LOWER(Body) LIKE '%blcr%' |
Number of Questions answered by Users In MonthWise. | CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,O... | SELECT COUNT(A.Id) AS Answers FROM Posts AS A INNER JOIN Users AS U ON A.OwnerUserId = U.Id WHERE NOT A.ParentId IS NULL AND U.Id = '##UserId##' |
give me the number of patients whose year of birth is less than 2041 and drug route is sc? | 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 demographic (subject_id text,hadm_id text,name text,marital... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2041" AND prescriptions.route = "SC" |
Questions with lots of answers, but none upvoted. Shows questions that have no upvoted answers, sorted by the number of answers. | CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE ReviewTasks (Id number,ReviewTaskTy... | SELECT q.Id AS "post_link", COUNT(a.Id) AS Answers FROM Posts AS q INNER JOIN Posts AS a ON a.ParentId = q.Id WHERE NOT EXISTS(SELECT Id FROM Posts AS a WHERE a.ParentId = q.Id AND a.Score > 0) GROUP BY q.Id ORDER BY COUNT(a.Id) DESC, q.Id |
How many documents are stored? Bin the store date by weekday in a bar chart, and order by the y-axis from low to high. | CREATE TABLE Roles (Role_Code CHAR(15),Role_Name VARCHAR(255),Role_Description VARCHAR(255))CREATE TABLE Ref_Locations (Location_Code CHAR(15),Location_Name VARCHAR(255),Location_Description VARCHAR(255))CREATE TABLE Documents_to_be_Destroyed (Document_ID INTEGER,Destruction_Authorised_by_Employee_ID INTEGER,Destroyed_... | SELECT Date_Stored, COUNT(Date_Stored) FROM All_Documents AS T1 JOIN Ref_Calendar AS T2 ON T1.Date_Stored = T2.Calendar_Date ORDER BY COUNT(Date_Stored) |
Who is from the united states, has a rank less than 9, and heat more than 5? | CREATE TABLE table_name_79 (name VARCHAR,nationality VARCHAR,rank VARCHAR,heat VARCHAR) | SELECT name FROM table_name_79 WHERE rank < 9 AND heat > 5 AND nationality = "united states" |
when was the first time in the previous day that patient 027-203413 has had a versed intake? | 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 allergy (allergyid number,patientunitstayid number,drugname te... | 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 = '027-203413')) AND intakeoutput.cellpath LIKE '%intake... |
Name the highest year with rank of 22 and accolade of singles of 1999 | CREATE TABLE table_name_89 (year INTEGER,accolade VARCHAR,rank VARCHAR) | SELECT MAX(year) FROM table_name_89 WHERE accolade = "singles of 1999" AND rank = "22" |
count the number of patients who have been on enteral tube intake: nasogastric nostril, l 12fr intake. | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventi... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT intakeoutput.patientunitstayid FROM intakeoutput WHERE intakeoutput.celllabel = 'enteral tube intake: nasogastric nostril, l 12fr' AND intakeoutput.cellpath LIKE '%input%') |
What are all of the area where distance is marathon and month held is february | CREATE TABLE table_28344 ("Road race" text,"Distance" text,"Location" text,"Country" text,"Month held" text) | SELECT "Location" FROM table_28344 WHERE "Distance" = 'Marathon' AND "Month held" = 'February' |
How many women has got the first runner-up position in representation of Philippines? | CREATE TABLE table_29942205_1 (country_territory VARCHAR) | SELECT 1 AS st_runner_up FROM table_29942205_1 WHERE country_territory = "Philippines" |
who is diagnosed with tot anom pulm ven connec? | 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 procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE d_icd_procedures (row_id number,icd9_code ... | SELECT admissions.subject_id FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'tot anom pulm ven connec')) |
When will they be offering Latin American Society and Culture ? | CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)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 course_prerequisite (pre_course_id int,cour... | SELECT DISTINCT course_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM semester INNER JOIN course_offering ON semester.semester_id = course_o... |
how many miles is the metz - nancy route ? | CREATE TABLE table_204_312 (id number,"stage" text,"date" text,"route" text,"terrain" text,"length" text,"winner" text) | SELECT "length" FROM table_204_312 WHERE "route" = 'metz - nancy' |
What is the highest 2010-03, when 2008-03 is less than 9.9, when 2011-03 is less than 11.8, and when Unemployment is Czech Republic? | CREATE TABLE table_7497 ("Unemployment" text,"2007-03" real,"2008-03" real,"2009-03" real,"2010-03" real,"2011-03" real,"2012-03" real) | SELECT MAX("2010-03") FROM table_7497 WHERE "2008-03" < '9.9' AND "2011-03" < '11.8' AND "Unemployment" = 'czech republic' |
What date did Episode 22 originally air? | CREATE TABLE table_23392257_4 (original_airdate VARCHAR,_number VARCHAR) | SELECT COUNT(original_airdate) FROM table_23392257_4 WHERE _number = 22 |
what is the last competition they competed in ? | CREATE TABLE table_203_269 (id number,"season" text,"competition" text,"round" text,"club" text,"home" text,"away" text,"aggregate" text) | SELECT "competition" FROM table_203_269 ORDER BY id DESC LIMIT 1 |
in the irish national final for the eurovision song contest in 1990 , the artist singing which song received third place ? | CREATE TABLE table_203_695 (id number,"draw" number,"artist" text,"song" text,"points" number,"place" text) | SELECT "artist" FROM table_203_695 WHERE "place" = 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.