instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
Who won silver in the year before 2010, the year Chan Ming Shu won gold? | CREATE TABLE table_35281 ("Year" real,"Location" text,"Gold" text,"Silver" text,"Bronze" text) | SELECT "Silver" FROM table_35281 WHERE "Year" < '2010' AND "Gold" = 'chan ming shu' |
What is the Total with a Player named robbie winters? | CREATE TABLE table_name_95 (total VARCHAR,player VARCHAR) | SELECT total FROM table_name_95 WHERE player = "robbie winters" |
Search for spam in profile info. Finds accounts with typical spam keywords in 'about me' field | 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 Id AS "user_link", AboutMe, WebsiteUrl FROM Users WHERE (AboutMe LIKE '%My uncle, Scrooge McDuck, is the richest duck in the world. He makes me polish his coins for 30 cents an hour. My girlfriend is Daisy Duck and my nephews are Huey, Dewey and Louie Duck. My neighbor Jones and my cousin Gladstone drive me nuts... |
Name the rank for tottenham hotspur | CREATE TABLE table_name_7 (rank VARCHAR,team VARCHAR) | SELECT rank FROM table_name_7 WHERE team = "tottenham hotspur" |
how many days has passed since the last dextrose 50% 25 gram/50 ml syr prescription of patient 016-38131 on this hospital visit? | CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE intakeoutput (intakeoutputid number,patientuni... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', medication.drugstarttime)) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-381... |
Find the number of patients who passed away in or before 2132 and have 51067 as the lab test item id. | 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 demographic.dod_year <= "2132.0" AND lab.itemid = "51067" |
how many patients born earlier than 2114 had procedure under icd9 code 5110? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "2114" AND procedures.icd9_code = "5110" |
Which Uni # has a Surname of ough? | CREATE TABLE table_name_40 (uni_number VARCHAR,surname VARCHAR) | SELECT uni_number FROM table_name_40 WHERE surname = "ough" |
what is the name of the medication that was prescribed to patient 015-910 during the same day after receiving a ivc filter procedure since 126 months ago? | CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,dischargeweight number,hospitaladmittime time,hospitaladmitsource text,unitadmittime time,unitdischargetime tim... | SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-910') AND treatment.treatment... |
What is the Tie no listed for the Away team of Barnet? | CREATE TABLE table_68780 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Attendance" text) | SELECT "Tie no" FROM table_68780 WHERE "Away team" = 'barnet' |
What is the sum of against in Ballarat FL of East Point and wins less than 16? | CREATE TABLE table_name_75 (against INTEGER,ballarat_fl VARCHAR,wins VARCHAR) | SELECT SUM(against) FROM table_name_75 WHERE ballarat_fl = "east point" AND wins < 16 |
Name the total number of lost when goals scored is less than 22 and goals conceded is more than 27 | CREATE TABLE table_name_82 (lost VARCHAR,goals_scored VARCHAR,goals_conceded VARCHAR) | SELECT COUNT(lost) FROM table_name_82 WHERE goals_scored < 22 AND goals_conceded > 27 |
when was patient 74392 discharged from the hospital until 2102 for the last time? | CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE d_labitems (row_id number,itemid number,label 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 diagnoses_icd... | SELECT admissions.dischtime FROM admissions WHERE admissions.subject_id = 74392 AND STRFTIME('%y', admissions.dischtime) <= '2102' ORDER BY admissions.dischtime DESC LIMIT 1 |
What competition was at pusk s ferenc stadium , budapest , hungary, and a Score of 1 0? | CREATE TABLE table_11364 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text) | SELECT "Competition" FROM table_11364 WHERE "Venue" = 'puskás ferenc stadium , budapest , hungary' AND "Score" = '1–0' |
Visualize a bar chart about the distribution of All_Neutral and ACC_Percent , and display from high to low by the ACC_Percent. | CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,Enrollment real,Nickname text,Primary_conference text)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_Perce... | SELECT All_Neutral, ACC_Percent FROM basketball_match ORDER BY ACC_Percent DESC |
What year had a date of TBA where the Oakland raiders were the home team? | CREATE TABLE table_name_80 (year INTEGER,date VARCHAR,designated_home VARCHAR) | SELECT AVG(year) FROM table_name_80 WHERE date = "tba" AND designated_home = "oakland raiders" |
What is the home stadium of the Atlanta Falcons? | CREATE TABLE table_name_11 (stadium VARCHAR,host_team VARCHAR) | SELECT stadium FROM table_name_11 WHERE host_team = "atlanta falcons" |
Which player came from Kent State? | CREATE TABLE table_name_38 (player VARCHAR,college VARCHAR) | SELECT player FROM table_name_38 WHERE college = "kent state" |
how many patients whose age is less than 31 and lab test category is hematology? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "31" AND lab."CATEGORY" = "Hematology" |
What is the train name of the rail with a daily frequency and Jammutawi as the destination? | CREATE TABLE table_37384 ("Train Number" text,"Train Name" text,"Origin" text,"Destination" text,"Frequency (inbound/outbound)" text) | SELECT "Train Name" FROM table_37384 WHERE "Frequency (inbound/outbound)" = 'daily' AND "Destination" = 'jammutawi' |
Can you tell me the average Chapter that has Articles smaller than 15? | CREATE TABLE table_name_48 (chapter INTEGER,articles INTEGER) | SELECT AVG(chapter) FROM table_name_48 WHERE articles < 15 |
Name the M939 series for short wheelbase and M809 series of m817 | CREATE TABLE table_name_95 (m939_series VARCHAR,wheelbase VARCHAR,m809_series VARCHAR) | SELECT m939_series FROM table_name_95 WHERE wheelbase = "short" AND m809_series = "m817" |
Total count of up- and downvotes in the system from the Users and the Votes table. | CREATE TABLE ReviewTaskStates (Id number,Name text,Description text)CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,LinkTypeId number)CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE PostNotices (Id n... | SELECT 'Users Table' AS Source, SUM(UpVotes) AS Ups, SUM(DownVotes) AS Downs FROM Users UNION SELECT 'Votes Table' AS Source, COUNT(CASE WHEN VoteTypeId = 2 THEN 1 ELSE NULL END) AS Ups, COUNT(CASE WHEN VoteTypeId = 3 THEN 1 ELSE NULL END) AS Downs FROM Votes |
Show how many cinemas open for each year in a line chart, and could you rank X from high to low order? | CREATE TABLE cinema (Cinema_ID int,Name text,Openning_year int,Capacity int,Location text)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 schedule (Cinema_ID int,Film_ID int,Date text,Show_times_per_day int,Price... | SELECT Openning_year, COUNT(Openning_year) FROM cinema ORDER BY Openning_year DESC |
give me the number of patients whose admission location is trsf within this facility and procedure icd9 code is 5059? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)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 ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND procedures.icd9_code = "5059" |
Plot how many class by grouped by class as a bar graph, order in asc by the Class. | CREATE TABLE Ship (Ship_ID int,Name text,Type text,Built_Year real,Class text,Flag text)CREATE TABLE captain (Captain_ID int,Name text,Ship_ID int,age text,Class text,Rank text) | SELECT Class, COUNT(Class) FROM captain GROUP BY Class ORDER BY Class |
Top Users with most rejected Edits. | CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE FlagTypes (Id number,Name text,Description text)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,Ema... | SELECT OwnerUserId AS "user_link", COUNT(*) FROM SuggestedEdits WHERE ApprovalDate IS NULL AND NOT RejectionDate IS NULL GROUP BY OwnerUserId ORDER BY COUNT(*) DESC LIMIT 10 |
Show the names of editors and the theme of journals for which they serve on committees. | CREATE TABLE journal_committee (Editor_ID VARCHAR,Journal_ID VARCHAR)CREATE TABLE journal (Theme VARCHAR,Journal_ID VARCHAR)CREATE TABLE editor (Name VARCHAR,Editor_ID VARCHAR) | SELECT T2.Name, T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID |
What is the sum for December when the record was 22-12-5? | CREATE TABLE table_name_56 (december INTEGER,record VARCHAR) | SELECT SUM(december) FROM table_name_56 WHERE record = "22-12-5" |
Which Viavoice 5/15/09 has a CSA 5/14/09 of 5%, and a TNS-Sofres 5/28/09 of 4.5%? | CREATE TABLE table_name_96 (viavoice_5_15_09 VARCHAR,csa_5_14_09 VARCHAR,tns_sofres_5_28_09 VARCHAR) | SELECT viavoice_5_15_09 FROM table_name_96 WHERE csa_5_14_09 = "5%" AND tns_sofres_5_28_09 = "4.5%" |
What is the Friday 4 June if the Wednesday 2 June is 20' 50.62 108.608mph? | CREATE TABLE table_27460 ("Rank" real,"Rider" text,"Sat 29 May" text,"Mon 31 May" text,"Tues 1 June" text,"Wed 2 June" text,"Thurs 3 June" text,"Fri 4 June" text) | SELECT "Fri 4 June" FROM table_27460 WHERE "Wed 2 June" = '20'' 50.62 108.608mph' |
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 email and commission_pct , show y-axis in ascending order. | CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_PROVINCE varchar(25),COUNTRY_ID varchar(2))CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANA... | SELECT EMAIL, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY COMMISSION_PCT |
how many patients whose diagnoses long title is diabetes mellitus without mention of complication, type ii or unspecified type, not stated as uncontrolled and drug route is oral? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Diabetes mellitus without mention of complication, type II or unspecified type, not stated ... |
What was the date of the home game for Colorado? | CREATE TABLE table_6084 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Record" text) | SELECT "Date" FROM table_6084 WHERE "Home" = 'colorado' |
What was the report of the Belgian Grand Prix? | CREATE TABLE table_1132600_3 (report VARCHAR,grand_prix VARCHAR) | SELECT report FROM table_1132600_3 WHERE grand_prix = "Belgian grand_prix" |
Can you tell me the sum of Gain that has the Name of kass, rob, and the Avg/g smaller than 1.9? | CREATE TABLE table_name_75 (gain INTEGER,name VARCHAR,avg_g VARCHAR) | SELECT SUM(gain) FROM table_name_75 WHERE name = "kass, rob" AND avg_g < 1.9 |
What is the highest Rank, when Date of Official Foundation of Municipality is '1952', and when 2006 is less than 189120? | CREATE TABLE table_44171 ("Rank" real,"City" text,"Province" text,"Date of Official Foundation of Municipality" real,"2006" real) | SELECT MAX("Rank") FROM table_44171 WHERE "Date of Official Foundation of Municipality" = '1952' AND "2006" < '189120' |
Non-wiki posts with a lot of edits. | 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 PostHistory (Id number,PostHistoryTypeId number,PostId number,R... | SELECT PostHistory.PostId AS "post_link", COUNT(PostHistory.Id) AS "count" FROM PostHistory INNER JOIN Posts ON PostHistory.PostId = Posts.Id WHERE Posts.CommunityOwnedDate IS NULL GROUP BY PostId ORDER BY 'count' DESC LIMIT 100 |
Show me about the distribution of Sex and the average of Height , and group by attribute Sex in a bar chart, and list in ascending by the Y. | CREATE TABLE people (People_ID int,Sex text,Name text,Date_of_Birth text,Height real,Weight real)CREATE TABLE candidate (Candidate_ID int,People_ID int,Poll_Source text,Date text,Support_rate real,Consider_rate real,Oppose_rate real,Unsure_rate real) | SELECT Sex, AVG(Height) FROM people GROUP BY Sex ORDER BY AVG(Height) |
Show all origins and the number of flights from each origin by a bar chart, show by the x axis from low to high. | 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 origin, COUNT(*) FROM flight GROUP BY origin ORDER BY origin |
Show me about the distribution of Team_Name and ACC_Percent in a bar chart, and order from high to low by the X. | 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 Team_Name, ACC_Percent FROM basketball_match ORDER BY Team_Name DESC |
Jos verstappen jeroen bleekemolen is on Imp2 winning team where all are rnd. | CREATE TABLE table_944 ("Rnd" real,"Circuit" text,"LMP1 Winning Team" text,"LMP2 Winning Team" text,"GT1 Winning Team" text,"GT2 Winning Team" text,"Results" text) | SELECT "Rnd" FROM table_944 WHERE "LMP2 Winning Team" = 'Jos Verstappen Jeroen Bleekemolen' |
Find the name of the products that are not using the most frequently-used max page size. | CREATE TABLE store_product (store_id number,product_id number)CREATE TABLE district (district_id number,district_name text,headquartered_city text,city_population number,city_area number)CREATE TABLE product (product_id number,product text,dimensions text,dpi number,pages_per_minute_color number,max_page_size text,inte... | SELECT product FROM product WHERE product <> (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1) |
return me the number of papers by ' H. V. Jagadish ' on PVLDB . | CREATE TABLE organization (continent varchar,homepage varchar,name varchar,oid int)CREATE TABLE domain_publication (did int,pid int)CREATE TABLE conference (cid int,homepage varchar,name varchar)CREATE TABLE domain (did int,name varchar)CREATE TABLE publication (abstract varchar,cid int,citation_num int,jid int,pid int... | SELECT COUNT(DISTINCT (publication.title)) FROM author, journal, publication, writes WHERE author.name = 'H. V. Jagadish' AND journal.name = 'PVLDB' AND publication.jid = journal.jid AND writes.aid = author.aid AND writes.pid = publication.pid |
Which Cashes has a Match Play smaller than 13, and a Events of 7? | CREATE TABLE table_40422 ("Season" text,"Events" real,"Cashes" real,"Match Play" real,"TV Finals" real,"PBA Titles" real,"Average" real,"Earnings" text) | SELECT COUNT("Cashes") FROM table_40422 WHERE "Match Play" < '13' AND "Events" = '7' |
What is the position when wins are fewer than 14 and draws are fewer than 3? | CREATE TABLE table_name_81 (position INTEGER,wins VARCHAR,draws VARCHAR) | SELECT AVG(position) FROM table_name_81 WHERE wins < 14 AND draws < 3 |
Posts of a hibernate project. | CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,Reje... | SELECT * FROM Posts WHERE Tags LIKE '%hibernate%' AND Tags LIKE '%orm%' AND Body LIKE '%doc%' |
What are the locations and representatives' names of the gas stations owned by the companies with the 3 largest amounts of assets? | CREATE TABLE company (company_id number,rank number,company text,headquarters text,main_industry text,sales_billion number,profits_billion number,assets_billion number,market_value number)CREATE TABLE station_company (station_id number,company_id number,rank_of_the_year number)CREATE TABLE gas_station (station_id numbe... | SELECT T3.location, T3.representative_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id ORDER BY T2.assets_billion DESC LIMIT 3 |
What is Lisladeen poor law union? | CREATE TABLE table_30120566_1 (poor_law_union VARCHAR,townland VARCHAR) | SELECT poor_law_union FROM table_30120566_1 WHERE townland = "Lisladeen" |
Name the air date for ratings of 2.19 million | CREATE TABLE table_3712 ("Episode #" real,"Title" text,"Directed by" text,"Written by" text,"Originalairdate" text,"Ratings" text) | SELECT "Originalairdate" FROM table_3712 WHERE "Ratings" = '2.19 Million' |
what is the total number of different models ? | CREATE TABLE table_204_878 (id number,"model" text,"release date" text,"sensor\nres.,size" text,"lens (35 mm equiv.)\nzoom,aperture" text,"screen\nsize,pixels" text,"dimensions\nw (mm) \u00d7 h (mm) \u00d7 d (mm)" text,"weight" text,"features" text) | SELECT COUNT(DISTINCT "model") FROM table_204_878 |
how many black/cape verdean patients had guillain barre syndrome as a primary disease? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)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 ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND demographic.diagnosis = "GUILLAIN BARRE SYNDROME" |
What is the name of the competition that ended with a score of 1-3? | CREATE TABLE table_56366 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text) | SELECT "Competition" FROM table_56366 WHERE "Score" = '1-3' |
Which Color has a Transcription of wan suk? | CREATE TABLE table_name_16 (color VARCHAR,transcription VARCHAR) | SELECT color FROM table_name_16 WHERE transcription = "wan suk" |
What is the year retired of the locomotive which had the quantity made of 25? | CREATE TABLE table_79273 ("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 "Year(s) retired" FROM table_79273 WHERE "Quantity made" = '25' |
What is every entry for Friday August 26 if the entry for Monday August 22 is 32' 25.72 69.809mph? | CREATE TABLE table_30058355_3 (fri_26_aug VARCHAR,mon_22_aug VARCHAR) | SELECT fri_26_aug FROM table_30058355_3 WHERE mon_22_aug = "32' 25.72 69.809mph" |
how many swat games were there before 2006 ? | CREATE TABLE table_203_633 (id number,"title" text,"year" number,"platform" text,"developer" text,"publisher" text) | SELECT COUNT("title") FROM table_203_633 WHERE "year" < 2006 |
What air date had 1.01 million U.S. viewers? | CREATE TABLE table_28334498_3 (original_air_date VARCHAR,us_viewers__millions_ VARCHAR) | SELECT original_air_date FROM table_28334498_3 WHERE us_viewers__millions_ = "1.01" |
What football stadium has a school enrollment of 43579? | CREATE TABLE table_12896884_1 (football_stadium VARCHAR,enrollment VARCHAR) | SELECT football_stadium FROM table_12896884_1 WHERE enrollment = 43579 |
which river is positioned right , with a drainage area for 11.8 | CREATE TABLE table_201_46 (id number,"name" text,"position" text,"length\n[km]" number,"drainage basin area\n[km2]" number,"confluence\n[by lahn-km]" number,"mouth elevation\n[m above msl]" number) | SELECT "name" FROM table_201_46 WHERE "position" = 'right' AND "drainage basin area\n[km2]" = 11.8 |
Who is the visitor team of the game on March 2, 2008? | CREATE TABLE table_name_19 (visitor VARCHAR,date VARCHAR) | SELECT visitor FROM table_name_19 WHERE date = "march 2, 2008" |
What are all values for 24 mountains when direction is Northeast? | CREATE TABLE table_23406517_2 (direction VARCHAR) | SELECT 24 AS _mountains FROM table_23406517_2 WHERE direction = "Northeast" |
What are the clubs involved with 16 clubs remaining? | CREATE TABLE table_61887 ("Round" text,"Clubs remaining" real,"Clubs involved" real,"Winners from previous round" text,"New entries this round" text) | SELECT "Clubs involved" FROM table_61887 WHERE "Clubs remaining" = '16' |
Name the total number for score l 110-112 | CREATE TABLE table_25460 ("#" real,"Date" text,"Team" text,"Score" text,"Location Attendance" text,"High Points" text,"High Rebounds" text,"High Assists" text,"Record" text) | SELECT COUNT("#") FROM table_25460 WHERE "Score" = 'L 110-112' |
which year is previous to the year that had 74.1 % in romanian population ? | CREATE TABLE table_203_355 (id number,"year" number,"total" number,"romanians" text,"hungarians" text,"roma" text) | SELECT "year" FROM table_203_355 WHERE "year" < (SELECT "year" FROM table_203_355 WHERE "romanians" = 74.1) ORDER BY "year" DESC LIMIT 1 |
What is the BBM when the strike rate is 42.2? | CREATE TABLE table_23146 ("Player" text,"Team" text,"Matches" real,"Overs" text,"Wickets" real,"Economy Rate" text,"Average" text,"Strike Rate" text,"BBI" text,"BBM" text) | SELECT "BBM" FROM table_23146 WHERE "Strike Rate" = '42.2' |
how many patients with percutaneous abdominal drainage were discharged for home health care? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "HOME HEALTH CARE" AND procedures.long_title = "Percutaneous abdominal drainage" |
For all employees who have the letters D or S in their first name, give me the comparison about the sum of salary over the job_id , and group by attribute job_id, and order y-axis in asc order. | CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12... | SELECT JOB_ID, SUM(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY SUM(SALARY) |
Which films participated in the 61st Berlin international film festival? | CREATE TABLE table_31283 ("Film Festival" text,"Date of ceremony" text,"Category" text,"Participants/Recipients" text,"Result" text) | SELECT "Participants/Recipients" FROM table_31283 WHERE "Film Festival" = '61st Berlin International Film Festival' |
In what district was John E. Miller the incumbent? | CREATE TABLE table_72420 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT "District" FROM table_72420 WHERE "Incumbent" = 'John E. Miller' |
how many of the patients were treated with nitroglycerin sl? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Nitroglycerin SL" |
For this semester 's Intro Med Micro class , who is the instructor ? | CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE area (course_id int,area varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TAB... | SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN course ON course.course_id = course_offering.course_id INNER JOIN semester... |
Show how many installation date from each installation date, list in desc by the Y-axis please. | 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 installation_date, COUNT(installation_date) FROM station ORDER BY COUNT(installation_date) DESC |
When the game was played at Mile High Stadium before week 9, what was the result? | CREATE TABLE table_name_87 (result VARCHAR,week VARCHAR,game_site VARCHAR) | SELECT result FROM table_name_87 WHERE week < 9 AND game_site = "mile high stadium" |
For those employees who was hired before 2002-06-21, visualize a bar chart about the distribution of job_id and the average of salary , and group by attribute job_id, display in ascending by the x-axis. | CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decima... | SELECT JOB_ID, AVG(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY JOB_ID |
What is the average year that has a final Tour position of 54 and a final Vuelta position over 55? | CREATE TABLE table_name_67 (year INTEGER,final_position___tour VARCHAR,final_position___vuelta VARCHAR) | SELECT AVG(year) FROM table_name_67 WHERE final_position___tour = 54 AND final_position___vuelta > 55 |
What is the population of the Parish, Plumbland, that had a former local authority of Cockermouth Rural District? | CREATE TABLE table_39465 ("Name" text,"Status" text,"Population" real,"District" text,"Former local authority" text) | SELECT COUNT("Population") FROM table_39465 WHERE "Former local authority" = 'cockermouth rural district' AND "Name" = 'plumbland' |
count the number of patients whose ethnicity is asian and primary disease is pneumonia? | 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 diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "ASIAN" AND demographic.diagnosis = "PNEUMONIA" |
Kitchen knives is segment a of what episode? | CREATE TABLE table_15187735_5 (episode VARCHAR,segment_a VARCHAR) | SELECT episode FROM table_15187735_5 WHERE segment_a = "Kitchen Knives" |
What is the site when the superintendent was James Sever? | CREATE TABLE table_name_93 (site VARCHAR,superintendent VARCHAR) | SELECT site FROM table_name_93 WHERE superintendent = "james sever" |
Which Opponents in the final have a Date of june 10, 1996? | CREATE TABLE table_40761 ("Date" text,"Tournament" text,"Surface" text,"Partnering" text,"Opponents in the final" text,"Score" text) | SELECT "Opponents in the final" FROM table_40761 WHERE "Date" = 'june 10, 1996' |
what is patient 6536's difference in the patient's sao2 second measured on the first icu visit compared to the value first measured on the first icu visit? | CREATE TABLE procedures_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 labevents (row_id number,subject_id number,hadm_id number,itemid... | 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 = 6536) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND chartevents.itemi... |
what is the total number of representatives ? | CREATE TABLE table_203_69 (id number,"representative" text,"title" text,"from" number,"to" number,"appointed by" text) | SELECT COUNT("representative") FROM table_203_69 |
What is the High points with a Team with boston? | CREATE TABLE table_11833 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "High points" FROM table_11833 WHERE "Team" = 'boston' |
Papers that use the WebKB dataset | CREATE TABLE author (authorid int,authorname varchar)CREATE TABLE paperfield (fieldid int,paperid int)CREATE TABLE paper (paperid int,title varchar,venueid int,year int,numciting int,numcitedby int,journalid int)CREATE TABLE field (fieldid int)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE keyphra... | SELECT DISTINCT paper.paperid FROM dataset, paper, paperdataset WHERE dataset.datasetname = 'WebKB' AND paperdataset.datasetid = dataset.datasetid AND paper.paperid = paperdataset.paperid |
when was the first time 1 ml vial : heparin sodium (porcine) 1000 unit/ml ij soln was prescribed to patient 005-77687 in 11/this year? | 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 medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-77687')) AND medication.drugname = '1 ml vial : heparin so... |
What is Record, when Date is 'November 22'? | CREATE TABLE table_47388 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Decision" text,"Attendance" real,"Record" text,"Points" real) | SELECT "Record" FROM table_47388 WHERE "Date" = 'november 22' |
What is the lowest area for cannonvale that speaks afrikaans? | CREATE TABLE table_76459 ("Place" text,"Code" real,"Area (km 2)" real,"Population" real,"Most spoken language" text) | SELECT MIN("Area (km 2 )") FROM table_76459 WHERE "Most spoken language" = 'afrikaans' AND "Place" = 'cannonvale' |
give me some good arabic -s in mountain view ? | CREATE TABLE geographic (city_name varchar,county varchar,region varchar)CREATE TABLE restaurant (id int,name varchar,food_type varchar,city_name varchar,rating "decimal)CREATE TABLE location (restaurant_id int,house_number int,street_name varchar,city_name varchar) | SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'mountain view' AND restaurant.food_type = 'arabic' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5 |
What Unit has a Ratio of 1/32? | CREATE TABLE table_38007 ("Unit" text,"Russian" text,"Ratio" text,"Metric value" text,"Avoirdupois value" text) | SELECT "Unit" FROM table_38007 WHERE "Ratio" = '1/32' |
what is the number of points scored by finland ? | CREATE TABLE table_203_803 (id number,"draw" number,"country" text,"language" text,"artist" text,"song" text,"english translation" text,"place" number,"points" number) | SELECT "points" FROM table_203_803 WHERE "country" = 'finland' |
Where is the Mackey Arena located? | CREATE TABLE table_33007 ("Region" text,"Host" text,"Venue" text,"City" text,"State" text) | SELECT "City" FROM table_33007 WHERE "Venue" = 'mackey arena' |
which country has the most people ? | CREATE TABLE table_203_481 (id number,"n\u00b0" number,"name" text,"position" text,"date of birth" text,"nationality" text) | SELECT "nationality" FROM table_203_481 GROUP BY "nationality" ORDER BY COUNT("n\u00b0") DESC LIMIT 1 |
Who played on December 25, 1925? | CREATE TABLE table_40786 ("Date" text,"Result" text,"Score" text,"Brazil scorers" text,"Competition" text) | SELECT "Competition" FROM table_40786 WHERE "Date" = 'december 25, 1925' |
Who previously attended south kent school / brentwood hs? | CREATE TABLE table_29050051_3 (name VARCHAR,previous_school VARCHAR) | SELECT name FROM table_29050051_3 WHERE previous_school = "South Kent School / Brentwood HS" |
Give me a line chart about the number of competitions held in each year, and display x axis from high to low order. | CREATE TABLE competition_record (Competition_ID int,Farm_ID int,Rank int)CREATE TABLE city (City_ID int,Official_Name text,Status text,Area_km_2 real,Population real,Census_Ranking text)CREATE TABLE farm_competition (Competition_ID int,Year int,Theme text,Host_city_ID int,Hosts text)CREATE TABLE farm (Farm_ID int,Year ... | SELECT Year, COUNT(Year) FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID ORDER BY Year DESC |
When 7 april 2001 to 29 september 2001 was aired in japan 2 how many titles were there? | CREATE TABLE table_1627 ("Series" text,"Title" text,"Broadcasts (TV) 1" real,"Episodes (TV+extra) 2" text,"Directors" text,"Aired in Japan 3" text,"US Release Date" text) | SELECT COUNT("Title") FROM table_1627 WHERE "Aired in Japan 3" = '7 April 2001 to 29 September 2001' |
What is the smallest number of gold of a country of rank 6, with 2 bronzes? | CREATE TABLE table_name_71 (gold INTEGER,total VARCHAR,bronze VARCHAR,rank VARCHAR) | SELECT MIN(gold) FROM table_name_71 WHERE bronze = 2 AND rank = 6 AND total > 2 |
Which artist uses a finish of selective gold plating? | CREATE TABLE table_name_29 (artist VARCHAR,finish VARCHAR) | SELECT artist FROM table_name_29 WHERE finish = "selective gold plating" |
For all employees who have the letters D or S in their first name, give me the comparison about the sum of salary over the job_id , and group by attribute job_id. | CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUMBER varchar(20),HIRE_DATE date,JOB_ID varchar(10),SALARY decimal(8,2),COMMISSION_PCT decimal(2,2),MANAGER_ID decimal(6,0),DEPARTME... | SELECT JOB_ID, SUM(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.