instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What is Type, when Number of Bearers 2008 is greater than 12.376, when Rank is greater than 3, and when Etymology is Son of Jens? | CREATE TABLE table_name_68 (type VARCHAR,etymology VARCHAR,number_of_bearers_2008 VARCHAR,rank VARCHAR) | SELECT type FROM table_name_68 WHERE number_of_bearers_2008 > 12.376 AND rank > 3 AND etymology = "son of jens" |
count the number of patients whose marital status is single and item id is 51144? | 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.marital_status = "SINGLE" AND lab.itemid = "51144" |
What is the score of player craig stadler from the United States with a t8 place? | CREATE TABLE table_10077 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" real) | SELECT "Score" FROM table_10077 WHERE "Place" = 't8' AND "Country" = 'united states' AND "Player" = 'craig stadler' |
List the dates of games by the home team name in descending order. | CREATE TABLE game (Date VARCHAR,home_team VARCHAR) | SELECT Date FROM game ORDER BY home_team DESC |
what is the game when batting 2nd is new zealand 6/133 (18)? | CREATE TABLE table_name_17 (game INTEGER,batting_2nd VARCHAR) | SELECT MIN(game) FROM table_name_17 WHERE batting_2nd = "new zealand 6/133 (18)" |
What was the score when the home team was goole town? | CREATE TABLE table_name_84 (score VARCHAR,home_team VARCHAR) | SELECT score FROM table_name_84 WHERE home_team = "goole town" |
what is admission type and diagnoses short title of subject id 30011? | 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 demographic.admission_type, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "30011" |
What is the theme song for Magarikado no Kanojo? | CREATE TABLE table_73019 ("Japanese Title" text,"Romaji Title" text,"TV Station" text,"Time Frame" text,"Starring Actors" text,"Theme Song(s)" text,"Episodes" real,"Average Ratings" text) | SELECT "Theme Song(s)" FROM table_73019 WHERE "Romaji Title" = 'Magarikado no Kanojo' |
how many albums did not have a time length ? | CREATE TABLE table_204_631 (id number,"#" number,"title" text,"english translation" text,"original album" text,"length" text) | SELECT COUNT("title") FROM table_204_631 WHERE "length" IS NULL |
how many seasons had average attendance of at least 15,000 at the stadio ennio tardini ? | CREATE TABLE table_204_237 (id number,"season" text,"average" number,"high" number,"low" number,"season tickets" number) | SELECT COUNT("season") FROM table_204_237 WHERE "average" >= 15000 |
List of Stack Exchange non-meta sites. | CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,OwnerDisplayName text,LastEditorUserId number,LastEditorDisplayN... | SELECT * FROM sys.databases WHERE (NOT name LIKE '%.Meta' OR name = 'StackExchange.Meta') AND database_id > 5 ORDER BY name |
what was the name of the drug that was prescribed to patient 66015 within 2 days after having received a reopen recent lap site procedure the last month. | CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)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 d_icd_procedures (row_id number,icd9_code text,short_title text... | SELECT t2.drug FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 66015 AND procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = ... |
How much is the other black population when the black African population is 37811? | CREATE TABLE table_1993 ("Rank" real,"London Borough" text,"Black African Population" real,"Black Caribbean Population" real,"Other Black Population" real,"Total Black Population" real) | SELECT MIN("Other Black Population") FROM table_1993 WHERE "Black African Population" = '37811' |
Questions tagged [origins] on SFF. | CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number,Paren... | SELECT Tags, p.Id AS "post_link" FROM Posts AS p JOIN PostTags AS pt ON p.Id = pt.PostId JOIN Tags AS t ON pt.TagId = t.Id WHERE t.TagName = 'origins' ORDER BY CASE WHEN p.Tags LIKE '%history-of%' THEN 1 ELSE 0 END, p.CreationDate |
Suggested Edits that someone rejected as vandalism, someone approved, and the edit got rejected. | CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)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,A... | SELECT s.Id AS "suggested_edit_link", v.UserId, v.CreationDate, s.Comment FROM SuggestedEditVotes AS v INNER JOIN SuggestedEdits AS s ON s.Id = v.SuggestedEditId WHERE v.SuggestedEditId IN (SELECT Id FROM SuggestedEdits WHERE Id IN (SELECT SuggestedEditId FROM ReviewTasks WHERE Id IN (SELECT ReviewTaskId FROM ReviewTas... |
What is Application Sharing, when Web Conferencing is 'Web Conferencing'? | CREATE TABLE table_name_40 (application_sharing VARCHAR,web_conferencing VARCHAR) | SELECT application_sharing FROM table_name_40 WHERE web_conferencing = "web conferencing" |
For those employees who do not work in departments with managers that have ids between 100 and 200, find last_name and employee_id , and visualize them by a bar chart, order in ascending by the Y. | 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 jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE dep... | SELECT LAST_NAME, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMPLOYEE_ID |
Which Home has a Competition of european cup, and a Round of qf? | CREATE TABLE table_name_70 (home VARCHAR,competition VARCHAR,round VARCHAR) | SELECT home FROM table_name_70 WHERE competition = "european cup" AND round = "qf" |
Can you tell me the Year(s) Won that has the To par larger than 5, and the Total smaller than 155, and the Country of united states? | CREATE TABLE table_59093 ("Player" text,"Country" text,"Year(s) Won" text,"Total" real,"To par" real) | SELECT "Year(s) Won" FROM table_59093 WHERE "To par" > '5' AND "Total" < '155' AND "Country" = 'united states' |
what was the name of the procedure that was given two or more times to patient 1862 in 09/2100? | 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_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 186... |
What is the lowest rank of rider darren gilpin? | CREATE TABLE table_63876 ("Rank" real,"Rider" text,"Team" text,"Speed" text,"Time" text) | SELECT MIN("Rank") FROM table_63876 WHERE "Rider" = 'darren gilpin' |
What was the home leg score against partizani tirana? | CREATE TABLE table_2214582_3 (home_leg VARCHAR,opponents VARCHAR) | SELECT home_leg FROM table_2214582_3 WHERE opponents = "Partizani Tirana" |
What loss has 10-16 as the record? | CREATE TABLE table_name_83 (loss VARCHAR,record VARCHAR) | SELECT loss FROM table_name_83 WHERE record = "10-16" |
Give me a bar chart for all_games_percent of each team name, and list in descending by the y-axis. | 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 Team_Name, All_Games_Percent FROM basketball_match ORDER BY All_Games_Percent DESC |
Count Questions Freq by Year per Title. | CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE Posts... | SELECT COUNT(P.Id) AS Posts, YEAR(P.CreationDate) AS Year_Data FROM Posts AS P WHERE P.Title LIKE '%mockito%' AND ((P.Tags LIKE '%android-testing%') OR (P.Tags LIKE '%robotium%') OR (P.Tags LIKE '%androidviewclient%') OR (P.Tags LIKE '%monkeyrunner%') OR (P.Tags LIKE '%robolectric%') OR (P.Tags LIKE '%android-espresso%... |
calculate the one year survival rate of those who were diagnosed with tracheostomy performed during this admission for ventilatory support. | 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 SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 1 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOI... |
On what date was there a friendly game against Wales? | CREATE TABLE table_6655 ("Date" text,"City" text,"Opponent" text,"Results\u00b9" text,"Type of game" text) | SELECT "Date" FROM table_6655 WHERE "Type of game" = 'friendly' AND "Opponent" = 'wales' |
Who played over 46 games and allowed less than 195 goals? | CREATE TABLE table_name_50 (player VARCHAR,games_played VARCHAR,goals_allowed VARCHAR) | SELECT player FROM table_name_50 WHERE games_played > 46 AND goals_allowed < 195 |
What is the Date of RL Test v Wales Int'l Debut? | CREATE TABLE table_64938 ("Player" text,"Int'l Debut" text,"Year" text,"Cross Code Debut" text,"Date" text) | SELECT "Date" FROM table_64938 WHERE "Int'l Debut" = 'rl test v wales' |
count the number of patients whose primary disease is squamous cell carcinoma oral tongue/sda and year of birth is less than 2170? | 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 WHERE demographic.diagnosis = "SQUAMOUS CELL CARCINOMA ORAL TONGUE/SDA" AND demographic.dob_year < "2170" |
What is the constructor for time/retired of handling? | CREATE TABLE table_name_99 (constructor VARCHAR,time_retired VARCHAR) | SELECT constructor FROM table_name_99 WHERE time_retired = "handling" |
how many patients whose procedure icd9 code is 4105 and drug type is main? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE procedures.icd9_code = "4105" AND prescriptions.drug_type = "MAIN" |
Which municipality has a party of Lega Friuli-VG that won elections before 2011? | CREATE TABLE table_name_34 (municipality VARCHAR,party VARCHAR,election VARCHAR) | SELECT municipality FROM table_name_34 WHERE party = "lega friuli-vg" AND election < 2011 |
how many patients whose diagnoses short title is intestinal abscess and drug type is main? | 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 = "Intestinal abscess" AND prescriptions.drug_type = "MAIN" |
Name the lowest Wins which has Points of 28, and a Year smaller than 1972? | CREATE TABLE table_name_94 (wins INTEGER,points VARCHAR,year VARCHAR) | SELECT MIN(wins) FROM table_name_94 WHERE points = 28 AND year < 1972 |
who has the least amount of losses ? | CREATE TABLE table_204_964 (id number,"team" text,"seasons" number,"games" number,"wins" number,"ties" number,"losses" number,"goals\nfor" number,"goals\nagainst" number,"goal\ndiff" number,"points" number) | SELECT "team" FROM table_204_964 ORDER BY "losses" LIMIT 1 |
What is the average number of losses the team with less than 25 runs allowed and 5 wins have? | CREATE TABLE table_67844 ("Rank" real,"Team" text,"Wins" real,"Losses" real,"Runs Allowed" real,"Run Ratio" real) | SELECT AVG("Losses") FROM table_67844 WHERE "Runs Allowed" < '25' AND "Wins" = '5' |
count the number of patients whose admission type is urgent and diagnoses long title is poisoning by penicillins? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "URGENT" AND diagnoses.long_title = "Poisoning by penicillins" |
Next semester , is SAC 306 being offered ? | CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE area (course_id int,area varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE student (student_id int,lastname varchar,firstname varchar,program_id int,declare_major varchar,tota... | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'SAC' AND course.number = 306 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016 |
how many games have been won by only one point ? | CREATE TABLE table_204_770 (id number,"season" number,"date" text,"jia-a/csl winner" text,"result" text,"fa cup winner" text,"scorers" text,"stadium" text) | SELECT COUNT(*) FROM table_204_770 WHERE ABS("result" - "result") = 1 |
how many gold and bronze medals were achieved overall ? | CREATE TABLE table_203_496 (id number,"pos" number,"country" text,"gold" number,"silver" number,"bronze" number,"total" number) | SELECT SUM("silver" + "bronze") FROM table_203_496 |
In what Year was the Position 11th? | CREATE TABLE table_36006 ("Year" real,"Competition" text,"Venue" text,"Position" text,"Notes" text) | SELECT COUNT("Year") FROM table_36006 WHERE "Position" = '11th' |
how many patients died in or before the year 2158 and were tested with lab item id 51078? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2158.0" AND lab.itemid = "51078" |
What are the notes of the satellite whose nssdc id number is 1959-002a? | CREATE TABLE table_191323_2 (notes VARCHAR,nssdc_id_no VARCHAR) | SELECT notes FROM table_191323_2 WHERE nssdc_id_no = "1959-002A" |
Visualize a bar chart about the distribution of ACC_Regular_Season and School_ID , and display Y-axis in desc order please. | 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 ACC_Regular_Season, School_ID FROM basketball_match ORDER BY School_ID DESC |
Who was the visiting team at the matchup at the RCA Dome? | CREATE TABLE table_68802 ("Date" text,"Visiting Team" text,"Final Score" text,"Host Team" text,"Stadium" text) | SELECT "Visiting Team" FROM table_68802 WHERE "Stadium" = 'rca dome' |
what are the numbers of wines for different grapes?, and show x-axis from high to low order. | CREATE TABLE grapes (ID INTEGER,Grape TEXT,Color TEXT)CREATE TABLE appellations (No INTEGER,Appelation TEXT,County TEXT,State TEXT,Area TEXT,isAVA TEXT)CREATE TABLE wine (No INTEGER,Grape TEXT,Winery TEXT,Appelation TEXT,State TEXT,Name TEXT,Year INTEGER,Price INTEGER,Score INTEGER,Cases INTEGER,Drink TEXT) | SELECT Grape, COUNT(*) FROM wine GROUP BY Grape ORDER BY Grape DESC |
are there any monte carlo simulation papers since 2011 ? | CREATE TABLE paperkeyphrase (paperid int,keyphraseid int)CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TABLE author (authorid int,authorname varchar)CREATE TABLE field (fieldid int)CREATE TABLE dataset (datasetid int,datasetname varchar)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE... | SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'monte carlo simulation' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year > 2011 |
what is the number of patients whose marital status is single and admission year is less than 2178? | 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 prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.admityear < "2178" |
what is the pts/game for Charlotte barras and the games is 5? | CREATE TABLE table_name_78 (pts_game VARCHAR,games VARCHAR,name VARCHAR) | SELECT pts_game FROM table_name_78 WHERE games = 5 AND name = "charlotte barras" |
What's the year of the first election of the district whose incumbent is Edwin E. Willis? | CREATE TABLE table_728 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT "First elected" FROM table_728 WHERE "Incumbent" = 'Edwin E. Willis' |
Give swimsuit scores of participants 8.847 in preliminary | CREATE TABLE table_17088705_2 (swimsuit VARCHAR,preliminary VARCHAR) | SELECT swimsuit FROM table_17088705_2 WHERE preliminary = "8.847" |
Which opening film has the opening date of august 23? | CREATE TABLE table_72992 ("Year" real,"Date (Opening)" text,"Date (Closing)" text,"Opening Film" text,"Number of Screening" text,"Award-Winning Film" text) | SELECT "Opening Film" FROM table_72992 WHERE "Date (Opening)" = 'August 23' |
Is butter or bacon better?. | CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,OwnerDisplayName text,LastEditorUserId number,LastEditorDisplayName text,LastEditDate time,LastActivityDate time,Title text,Ta... | SELECT 'bacon', COUNT(*) FROM Posts WHERE Body LIKE '%bacon%' UNION ALL SELECT 'butter', COUNT(*) FROM Posts WHERE Body LIKE '%butter%' |
What is the Score of the 1996 Asian Cup Qualification on June 29, 1996? | CREATE TABLE table_66119 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text) | SELECT "Score" FROM table_66119 WHERE "Competition" = '1996 asian cup qualification' AND "Date" = 'june 29, 1996' |
which artist has released at least 5 albums ? | CREATE TABLE table_204_680 (id number,"released" text,"title" text,"artist" text,"format" text,"language" text) | SELECT "artist" FROM table_204_680 GROUP BY "artist" HAVING COUNT(*) >= 5 |
Who has points larger than 167.5? | CREATE TABLE table_name_51 (name VARCHAR,points INTEGER) | SELECT name FROM table_name_51 WHERE points > 167.5 |
Who was the original artist when the order number is 9? | CREATE TABLE table_15796072_1 (original_artist VARCHAR,order__number VARCHAR) | SELECT original_artist FROM table_15796072_1 WHERE order__number = "9" |
If the Representative is Barbara sears, what is the district number? | CREATE TABLE table_26131768_4 (district INTEGER,representative VARCHAR) | SELECT MAX(district) FROM table_26131768_4 WHERE representative = "Barbara Sears" |
Who was the GT2 Winning Team if Greg Mansell Leo Mansell was the LMP1 Winning Team? | CREATE TABLE table_27150 ("Rnd." real,"Circuit" text,"LMP1 Winning Team" text,"LMP2 Winning Team" text,"FLM Winning Team" text,"GT1 Winning Team" text,"GT2 Winning Team" text,"Results" text) | SELECT "GT2 Winning Team" FROM table_27150 WHERE "LMP1 Winning Team" = 'Greg Mansell Leo Mansell' |
what is admission type of subject name betty campbell? | 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 demographic.admission_type FROM demographic WHERE demographic.name = "Betty Campbell" |
How many backgrounds are there represented from Memphis, Tennessee? | CREATE TABLE table_1289860_2 (background VARCHAR,hometown VARCHAR) | SELECT COUNT(background) FROM table_1289860_2 WHERE hometown = "Memphis, Tennessee" |
Which Winner and score has a Finalist of aaron krickstein? | CREATE TABLE table_name_70 (winner_and_score VARCHAR,finalist VARCHAR) | SELECT winner_and_score FROM table_name_70 WHERE finalist = "aaron krickstein" |
What is the highest Matches were the points were smaller than 8, the place was larger than 13, and the drawn is less than 1? | CREATE TABLE table_name_78 (matches INTEGER,drawn VARCHAR,points VARCHAR,place VARCHAR) | SELECT MAX(matches) FROM table_name_78 WHERE points < 8 AND place > 13 AND drawn < 1 |
What was Peter Woolfolk's Total Rebound average? | CREATE TABLE table_32466 ("Rank" real,"Player" text,"Years" text,"Games" real,"Reb. Avg." real,"Total Rebounds" real) | SELECT SUM("Total Rebounds") FROM table_32466 WHERE "Player" = 'peter woolfolk' |
What was the passing result for the measure with a description of bus and truck operating license bill? | CREATE TABLE table_27922 ("meas. num" real,"passed" text,"YES votes" real,"NO votes" real,"% YES" text,"Const. Amd.?" text,"type" text,"description" text) | SELECT "passed" FROM table_27922 WHERE "description" = 'Bus and Truck Operating License Bill' |
What lost has 86 points? | CREATE TABLE table_46094 ("Club" text,"Played" text,"Drawn" text,"Lost" text,"Points for" text,"Points against" text,"Tries for" text,"Tries against" text,"Try bonus" text,"Losing bonus" text,"Points" text) | SELECT "Lost" FROM table_46094 WHERE "Points" = '86' |
how many hours has it been since last time patient 99883 was prescribed clotrimazole during this hospital visit? | CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE chartevents (row_id number,subject_id number,... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', prescriptions.startdate)) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 99883 AND admissions.dischtime IS NULL) AND prescriptions.drug = 'clotrimazole' ORDER BY prescriptions.startda... |
Who has a roll value of 422? | CREATE TABLE table_52595 ("Name" text,"Years" text,"Gender" text,"Area" text,"Authority" text,"Decile" real,"Roll" real) | SELECT "Name" FROM table_52595 WHERE "Roll" = '422' |
what's the location attendance where high rebounds is nick collison (14) | CREATE TABLE table_11964154_9 (location_attendance VARCHAR,high_rebounds VARCHAR) | SELECT location_attendance FROM table_11964154_9 WHERE high_rebounds = "Nick Collison (14)" |
Visualize the average experience working length of journalists working on different role type using a bar chart, and could you rank in descending by the total number? | CREATE TABLE news_report (journalist_ID int,Event_ID int,Work_Type text)CREATE TABLE journalist (journalist_ID int,Name text,Nationality text,Age text,Years_working int)CREATE TABLE event (Event_ID int,Date text,Venue text,Name text,Event_Attendance int) | SELECT Work_Type, AVG(Years_working) FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_ID = t2.journalist_ID GROUP BY t2.Work_Type ORDER BY AVG(Years_working) DESC |
In which neighborhoods has Michelle reviewed a business ? | CREATE TABLE tip (tip_id int,business_id varchar,text longtext,user_id varchar,likes int,year int,month varchar)CREATE TABLE checkin (cid int,business_id varchar,count int,day varchar)CREATE TABLE neighborhood (id int,business_id varchar,neighborhood_name varchar)CREATE TABLE business (bid int,business_id varchar,name ... | SELECT neighborhood.name FROM business, neighborhood, review, user WHERE neighborhood.business_id = business.business_id AND review.business_id = business.business_id AND user.name = 'Michelle' AND user.user_id = review.user_id |
Which contestant is from the province of baoruco | CREATE TABLE table_26661 ("Province,Community" text,"Contestant" text,"Age" real,"Height" text,"Hometown" text,"Geographical Regions" text) | SELECT "Contestant" FROM table_26661 WHERE "Province, Community" = 'Baoruco' |
What is the average Points when the artist is kamil mikul k and nela, and the Place is larger than 18? | CREATE TABLE table_name_42 (points INTEGER,artist VARCHAR,place VARCHAR) | SELECT AVG(points) FROM table_name_42 WHERE artist = "kamil mikulčík and nela" AND place > 18 |
in how many games was sapsford a scorer ? | CREATE TABLE table_204_467 (id number,"date" text,"opponents" text,"h/a" text,"result\nf-a" text,"scorers" text,"attendance" number) | SELECT COUNT(*) FROM table_204_467 WHERE "scorers" = 'sapsford' |
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and revenue , and group by attribute headquarter, and display bars in descending order. | CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL) | SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Name DESC |
What position did Roseau High School (USHS-MN) play? | CREATE TABLE table_30872 ("Pick #" real,"Player" text,"Position" text,"Nationality" text,"NHL team" text,"College/junior/club team" text) | SELECT "Position" FROM table_30872 WHERE "College/junior/club team" = 'Roseau High School (USHS-MN)' |
How many patients aged below 63 years had the drug pneumococcal vac polyvalent? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "63" AND prescriptions.drug = "PNEUMOcoccal Vac Polyvalent" |
give me the number of patients whose procedure long title is fiber-optic bronchoscopy? | 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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Fiber-optic bronchoscopy" |
What location did david mccann receive a siver and morgan fox win the gold? | CREATE TABLE table_66565 ("Year" text,"Location" text,"Gold" text,"Silver" text,"Bronze" text) | SELECT "Location" FROM table_66565 WHERE "Silver" = 'david mccann' AND "Gold" = 'morgan fox' |
when did patient 030-52327 have the minimum value of heartrate for the last time a day before? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabe... | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-52327')) AND NOT vitalperiodic.heartrate IS NUL... |
what was the first test which patient 002-4486 received since 12/2100? | CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,disch... | SELECT lab.labname FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-4486')) AND STRFTIME('%y-%m', lab.labresulttime) >= '2100-12' ORDER BY lab.labresultt... |
What was the television that was dated December 28, 2009? | CREATE TABLE table_26295 ("Bowl Game" text,"Date" text,"Stadium" text,"City" text,"Television" text,"Matchup/Results" text,"Attendance" real,"Payout (US$)" text) | SELECT "Television" FROM table_26295 WHERE "Date" = 'December 28, 2009' |
How many pole data were given on season 2012 with 252 points? | CREATE TABLE table_25538763_1 (poles VARCHAR,season VARCHAR,points VARCHAR) | SELECT COUNT(poles) FROM table_25538763_1 WHERE season = 2012 AND points = "252" |
when patient 85895 received a microbiology test for a urine for the last time during a month before? | 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 procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE d_items (r... | SELECT microbiologyevents.charttime FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 85895) AND microbiologyevents.spec_type_desc = 'urine' AND DATETIME(microbiologyevents.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start o... |
Show the average of account details for different statement details in a bar chart. | CREATE TABLE Ref_Document_Types (Document_Type_Code CHAR(15),Document_Type_Name VARCHAR(255),Document_Type_Description VARCHAR(255))CREATE TABLE Accounts (Account_ID INTEGER,Statement_ID INTEGER,Account_Details VARCHAR(255))CREATE TABLE Documents_with_Expenses (Document_ID INTEGER,Budget_Type_Code CHAR(15),Document_Det... | SELECT Statement_Details, AVG(Account_Details) FROM Accounts AS T1 JOIN Statements AS T2 ON T1.Statement_ID = T2.Statement_ID GROUP BY Statement_Details |
Give me the comparison about the amount of All_Home over the All_Home , and group by attribute All_Home by a bar chart, I want to sort by the how many all home in desc please. | 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_Home, COUNT(All_Home) FROM basketball_match GROUP BY All_Home ORDER BY COUNT(All_Home) DESC |
What was the attendance of the Indiana game? | CREATE TABLE table_17080868_7 (location_attendance VARCHAR,team VARCHAR) | SELECT location_attendance FROM table_17080868_7 WHERE team = "Indiana" |
Find the names of schools that have some players in the mid position but not in the goalie position. | CREATE TABLE tryout (cName VARCHAR,pPos VARCHAR) | SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie' |
Name the title with presentation of credentials of april 10, 1907 | CREATE TABLE table_name_62 (title VARCHAR,presentation_of_credentials VARCHAR) | SELECT title FROM table_name_62 WHERE presentation_of_credentials = "april 10, 1907" |
Who had the fastest lap when adam christodoulou was the winning driver and had the pole position? | CREATE TABLE table_name_50 (fastest_lap VARCHAR,winning_driver VARCHAR,pole_position VARCHAR) | SELECT fastest_lap FROM table_name_50 WHERE winning_driver = "adam christodoulou" AND pole_position = "adam christodoulou" |
Name the location for trenton 300 | CREATE TABLE table_25220 ("Rnd" real,"Date" text,"Race Name" text,"Length" text,"Track" text,"Location" text,"Pole Position" text,"Winning Driver" text) | SELECT "Location" FROM table_25220 WHERE "Race Name" = 'Trenton 300' |
Which Round has a Pick larger than 179? | CREATE TABLE table_65715 ("Player" text,"Round" real,"Pick" real,"Position" text,"NFL Club" text) | SELECT MAX("Round") FROM table_65715 WHERE "Pick" > '179' |
What is the antiparticle symbol with a rest mess (mev/c2) of .47 .33? | CREATE TABLE table_76408 ("Particle name" text,"Particle symbol" text,"Antiparticle symbol" text,"Quark content" text,"Rest mass (MeV / c 2)" text,"J P C" text,"Mean lifetime (s)" text,"Commonly decays to (>5% of decays)" text) | SELECT "Antiparticle symbol" FROM table_76408 WHERE "Rest mass ( MeV / c 2 )" = '.47 ± .33' |
What was the score of the game with a loss of Maholm (2 4)? | CREATE TABLE table_75118 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Record" text) | SELECT "Score" FROM table_75118 WHERE "Loss" = 'maholm (2–4)' |
what is admission type and discharge location of subject id 990? | CREATE TABLE procedures (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 diagnoses (subject_id text,hadm_id text,icd9_code text,sho... | SELECT demographic.admission_type, demographic.discharge_location FROM demographic WHERE demographic.subject_id = "990" |
For each phone, show its names and total number of stocks Visualize by bar chart, and could you sort in ascending by the names? | CREATE TABLE phone_market (Market_ID int,Phone_ID text,Num_of_stock int)CREATE TABLE market (Market_ID int,District text,Num_of_employees int,Num_of_shops real,Ranking int)CREATE TABLE phone (Name text,Phone_ID int,Memory_in_G int,Carrier text,Price real) | SELECT Name, SUM(T1.Num_of_stock) FROM phone_market AS T1 JOIN phone AS T2 ON T1.Phone_ID = T2.Phone_ID GROUP BY T2.Name ORDER BY Name |
Find Questions with No Answers by Users with 1 Reputation. | CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,LinkTypeId number)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous bool... | SELECT q.Id, q.Title, q.CreationDate, q.Body, q.Tags FROM Posts AS q, Users AS u WHERE q.AnswerCount = 0 AND q.OwnerUserId = u.Id AND u.Reputation = 1 AND NOT q.PostTypeId = 2 ORDER BY CreationDate DESC |
Which Points has a Difference of 3, and a Played smaller than 10? | CREATE TABLE table_41153 ("Position" real,"Team" text,"Points" real,"Played" real,"Drawn" real,"Lost" real,"Against" real,"Difference" text) | SELECT AVG("Points") FROM table_41153 WHERE "Difference" = '3' AND "Played" < '10' |
how many times does mpa -lrb- kpsi -rrb- appear under the units column ? | CREATE TABLE table_204_229 (id number,"property" text,"test method" text,"units" text,"4275" text,"4301" text,"4435" text,"4630" text,"4645" text) | SELECT COUNT(*) FROM table_204_229 WHERE "units" = 'mpa (kpsi)' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.