instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
Which round has a record of 5-3 (1)? | CREATE TABLE table_49776 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Location" text) | SELECT MIN("Round") FROM table_49776 WHERE "Record" = '5-3 (1)' |
how many patients until 2 years ago were prescribed levothyroxine sodium during the same month after diagnosis of pneumonia? | CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime t... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'pneumonia' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-2 year')) AS t1 JOIN (SELECT ... |
For the competition Mithras Cup 2nd Rd (2nd Leg), what is the date and time? | CREATE TABLE table_1233808_2 (date_and_time VARCHAR,competition VARCHAR) | SELECT date_and_time FROM table_1233808_2 WHERE competition = "Mithras Cup 2nd Rd (2nd Leg)" |
What is the lowest total when the Bronze metals are larger than 0 and the nation is France (fra)? | CREATE TABLE table_name_85 (total INTEGER,bronze VARCHAR,nation VARCHAR) | SELECT MIN(total) FROM table_name_85 WHERE bronze > 0 AND nation = "france (fra)" |
What was the firefox % was chrome was 25.08%? | CREATE TABLE table_name_86 (firefox VARCHAR,chrome VARCHAR) | SELECT firefox FROM table_name_86 WHERE chrome = "25.08%" |
Who were the visitors when the home team were the ny rangers? | CREATE TABLE table_name_76 (visitor VARCHAR,home VARCHAR) | SELECT visitor FROM table_name_76 WHERE home = "ny rangers" |
What are the names of ships that are commanded by both captains with the rank of Midshipman and captains with the rank of Lieutenant? | CREATE TABLE captain (captain_id number,name text,ship_id number,age text,class text,rank text)CREATE TABLE ship (ship_id number,name text,type text,built_year number,class text,flag text) | SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Midshipman' INTERSECT SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Lieutenant' |
What is the highest localities? | CREATE TABLE table_26007767_1 (localities INTEGER) | SELECT MAX(localities) FROM table_26007767_1 |
How many platinum points were awarded when 70 silver points were awarded? | CREATE TABLE table_16593 ("Finishing position" text,"Points awarded (Platinum)" real,"Points awarded (Gold)" real,"Points awarded (Silver)" real,"Points awarded (Satellite)" real) | SELECT "Points awarded (Platinum)" FROM table_16593 WHERE "Points awarded (Silver)" = '70' |
What type of ship was the Shinano? | CREATE TABLE table_name_77 (ship_type VARCHAR,name VARCHAR) | SELECT ship_type FROM table_name_77 WHERE name = "shinano" |
when was the last time in 09/2105 patient 010-17316 was prescribed a drug via the im route? | 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 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 = '010-17316')) AND medication.routeadmin = 'im' AND STRFTIME('%y... |
Name the least join date | CREATE TABLE table_26466528_1 (join_date INTEGER) | SELECT MIN(join_date) FROM table_26466528_1 |
List all the distinct product names ordered by product id? | CREATE TABLE problem_category_codes (problem_category_code text,problem_category_description text)CREATE TABLE problem_status_codes (problem_status_code text,problem_status_description text)CREATE TABLE problems (problem_id number,product_id number,closure_authorised_by_staff_id number,reported_by_staff_id number,date_... | SELECT DISTINCT product_name FROM product ORDER BY product_id |
What is the description of the measure that got 39.57% yes votes? | CREATE TABLE table_27927 ("meas. num" real,"passed" text,"YES votes" real,"NO votes" real,"% YES" text,"Const. Amd.?" text,"type" text,"description" text) | SELECT "description" FROM table_27927 WHERE "% YES" = '39.57%' |
Which City or town has a Top division titles of 17 | CREATE TABLE table_name_92 (city_or_town VARCHAR,top_division_titles VARCHAR) | SELECT city_or_town FROM table_name_92 WHERE top_division_titles = "17" |
Name the week 3 with week 6 of 31+40=71 | CREATE TABLE table_name_94 (week_3 VARCHAR,week_6 VARCHAR) | SELECT week_3 FROM table_name_94 WHERE week_6 = 31 + 40 = 71 |
How many episodes of 30 minutes were written by John Sullivan? | CREATE TABLE table_17641206_4 (duration VARCHAR,written_by VARCHAR) | SELECT COUNT(duration) FROM table_17641206_4 WHERE written_by = "John Sullivan" |
what was the name of the intake that patient 017-60306 had a first on the last intensive care unit visit? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,... | 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-60306') AND NOT patient.unitdischargetime IS NULL ORDER ... |
Show all allergy types and the number of allergies in each type. Visualize by pie chart. | CREATE TABLE Has_Allergy (StuID INTEGER,Allergy VARCHAR(20))CREATE TABLE Allergy_Type (Allergy VARCHAR(20),AllergyType VARCHAR(20))CREATE TABLE Student (StuID INTEGER,LName VARCHAR(12),Fname VARCHAR(12),Age INTEGER,Sex VARCHAR(1),Major INTEGER,Advisor INTEGER,city_code VARCHAR(3)) | SELECT AllergyType, COUNT(*) FROM Allergy_Type GROUP BY AllergyType |
Which winning driver of the Roussillon Grand Prix had an Alfa Romeo? | CREATE TABLE table_name_53 (winning_driver VARCHAR,winning_constructor VARCHAR,name VARCHAR) | SELECT winning_driver FROM table_name_53 WHERE winning_constructor = "alfa romeo" AND name = "roussillon grand prix" |
how many pylons are in austria ? | CREATE TABLE table_203_375 (id number,"name" text,"year built" text,"country" text,"town" text,"height" text,"remarks" text) | SELECT COUNT("name") FROM table_203_375 WHERE "country" = 'austria' |
What is the title of Senusret I? | CREATE TABLE table_name_78 (title VARCHAR,name VARCHAR) | SELECT title FROM table_name_78 WHERE name = "senusret i" |
specify duration of hospital stay and drug route of patient gus marques | 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 demographic (subject_id text,hadm_id t... | SELECT demographic.days_stay, prescriptions.route FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Gus Marques" |
tell me the total output on the current icu visit for patient 021-111547. | 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 diagnosis (diagnosisid number,patientunitstayid number,diagnos... | SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-111547') AND patient.unitdischargetime IS NU... |
How old is each gender, on average Plot them as bar chart, order by the X-axis in ascending. | CREATE TABLE PersonFriend (name varchar(20),friend varchar(20),year INTEGER)CREATE TABLE Person (name varchar(20),age INTEGER,city TEXT,gender TEXT,job TEXT) | SELECT gender, AVG(age) FROM Person GROUP BY gender ORDER BY gender |
What competition had more than 40 assists? | CREATE TABLE table_37272 ("Name" text,"Date" text,"Goals" real,"Assists" real,"Team" text,"Venue" text,"Opponent" text,"Competition" text,"Total Goals" real,"Total Assists" real) | SELECT "Competition" FROM table_37272 WHERE "Assists" > '40' |
how many patients until 2104 got a microbiological wound, decubitus test? | CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE treatment (treatmen... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT microlab.patientunitstayid FROM microlab WHERE microlab.culturesite = 'wound, decubitus' AND STRFTIME('%y', microlab.culturetakentime) <= '2104') |
WHAT IS THE SCORE WHEN THE COMPETITION WAS 1978 world cup qualification? | CREATE TABLE table_name_2 (score VARCHAR,competition VARCHAR) | SELECT score FROM table_name_2 WHERE competition = "1978 world cup qualification" |
What is the 2013 with virgin in 2009? | CREATE TABLE table_50047 ("Rank" real,"2008" text,"2009" text,"2010" text,"2011" text,"2012" text,"2013" text) | SELECT "2013" FROM table_50047 WHERE "2009" = 'virgin' |
Average Posting Stats per Posting Type. | 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 PostTypes.Name AS PostType, AVG(Posts.Score) AS AvgScore FROM Posts, PostTypes WHERE PostTypes.Id = 1 AND Posts.ClosedDate IS NULL AND PostTypes.Id = Posts.PostTypeId GROUP BY PostTypes.Name |
in 2105, what were the top five most frequently diagnosed diagnoses that patients were diagnosed with in the same month after being diagnosed with acute copd exacerbation - with baseline hypercarbia? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE lab (labid number,patientunitstayid number,labnam... | SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'acute copd exacerbation - with baseline ... |
What type is the sorrento to sapri course with a distance of km (mi)? | CREATE TABLE table_54169 ("Date" text,"Course" text,"Distance" text,"Type" text,"Winner" text) | SELECT "Type" FROM table_54169 WHERE "Distance" = 'km (mi)' AND "Course" = 'sorrento to sapri' |
Average daily score per month. | CREATE TABLE PostTags (PostId number,TagId 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 number,ViewCount number,Body text,OwnerUserId... | SELECT DATEADD(mm, (YEAR(Posts.CreationDate) - 1900) * 12 + MONTH(Posts.CreationDate) - 1, 0) AS Month, AVG(CAST(Posts.Score AS FLOAT)) AS Score FROM Posts LEFT JOIN PostTypes ON PostTypes.Id = Posts.PostTypeId WHERE PostTypes.Name IN ('Question') GROUP BY YEAR(Posts.CreationDate), MONTH(Posts.CreationDate) ORDER BY YE... |
Which cornerback has the lowest overall and a pick number smaller than 16? | CREATE TABLE table_34464 ("Round" real,"Pick #" real,"Overall" real,"Name" text,"Position" text,"College" text) | SELECT MIN("Overall") FROM table_34464 WHERE "Position" = 'cornerback' AND "Pick #" < '16' |
Was there a starter when 3 touchdowns were scored? | CREATE TABLE table_19279 ("Player" text,"Position" text,"Starter" text,"Touchdowns" real,"Extra points" real,"Field goals" real,"Points" real) | SELECT "Starter" FROM table_19279 WHERE "Touchdowns" = '3' |
What loss occurred on August 21? | CREATE TABLE table_name_57 (loss VARCHAR,date VARCHAR) | SELECT loss FROM table_name_57 WHERE date = "august 21" |
What is Brian Gay's place? | CREATE TABLE table_60634 ("Place" text,"Player" text,"Country" text,"Score" real,"To par" text) | SELECT "Place" FROM table_60634 WHERE "Player" = 'brian gay' |
What is the last year that someone is first elected? | CREATE TABLE table_1341690_9 (first_elected INTEGER) | SELECT MAX(first_elected) FROM table_1341690_9 |
What is them two (the two) when you and i is ng balngu? | CREATE TABLE table_1015914_24 (them_two__the_two_ VARCHAR,you_and_i VARCHAR) | SELECT them_two__the_two_ FROM table_1015914_24 WHERE you_and_i = "ngœbalngu" |
He wrote production number 102? | CREATE TABLE table_26448179_2 (written_by VARCHAR,production_code VARCHAR) | SELECT written_by FROM table_26448179_2 WHERE production_code = "102" |
indicate the daily average dose of ns ivf that patient 031-13920 has received on the first icu visit. | CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE patient (uniquepid text,patienthealths... | SELECT AVG(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-13920') AND NOT patient.unitdischargetime IS... |
Visualize a bar chart for showing the total number of different product type codes, and order from low to high by the total number. | CREATE TABLE Channels (Channel_ID INTEGER,Other_Details VARCHAR(255))CREATE TABLE Products_in_Events (Product_in_Event_ID INTEGER,Event_ID INTEGER,Product_ID INTEGER)CREATE TABLE Agreements (Document_ID INTEGER,Event_ID INTEGER)CREATE TABLE Parties (Party_ID INTEGER,Party_Details VARCHAR(255))CREATE TABLE Finances (Fin... | SELECT Product_Type_Code, COUNT(Product_Type_Code) FROM Products GROUP BY Product_Type_Code ORDER BY COUNT(Product_Type_Code) |
Which Outcome has a Launch Date of march 18, 1964; 14:50 gmt? | CREATE TABLE table_name_32 (outcomes VARCHAR,launch_date VARCHAR) | SELECT outcomes FROM table_name_32 WHERE launch_date = "march 18, 1964; 14:50 gmt" |
retrieve the top five most commonly prescribed drugs until 1 year ago for patients of age 50s. | CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,va... | SELECT t1.drug FROM (SELECT prescriptions.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN 50 AND 59) AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-1 year') GROUP BY pres... |
Which committees have delegates from the Democratic party? | CREATE TABLE party (party_id number,year number,party text,governor text,lieutenant_governor text,comptroller text,attorney_general text,us_senate text)CREATE TABLE county (county_id number,county_name text,population number,zip_code text)CREATE TABLE election (election_id number,counties_represented text,district numb... | SELECT T1.committee FROM election AS T1 JOIN party AS T2 ON T1.party = T2.party_id WHERE T2.party = "Democratic" |
What was the score of the game played on 16 August 2006? | CREATE TABLE table_name_32 (score VARCHAR,date VARCHAR) | SELECT score FROM table_name_32 WHERE date = "16 august 2006" |
Where did a home team score 23.20 (158)? | CREATE TABLE table_52075 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Venue" FROM table_52075 WHERE "Home team score" = '23.20 (158)' |
What is the 2008 value with a 7 in 2010? | CREATE TABLE table_35740 ("2005" text,"2006" text,"2007" text,"2008" text,"2009" text,"2010" text,"2011" text,"2013" text,"Total" real) | SELECT "2008" FROM table_35740 WHERE "2010" = '7' |
how many drivers did not complete 95 laps ? | CREATE TABLE table_204_468 (id number,"pos" number,"no" number,"driver" text,"team" text,"laps" number,"time/retired" text,"grid" number,"points" number) | SELECT COUNT("driver") FROM table_204_468 WHERE "laps" <> 95 |
Find the number of different cities which banks are located at. | CREATE TABLE bank (city VARCHAR) | SELECT COUNT(DISTINCT city) FROM bank |
which engine was used the most by teams this season ? | CREATE TABLE table_204_808 (id number,"team" text,"no" number,"driver" text,"class" text,"chassis" text,"engine" text) | SELECT "engine" FROM table_204_808 GROUP BY "engine" ORDER BY COUNT("team") DESC LIMIT 1 |
what is the only nation to have one silver medal ? | CREATE TABLE table_203_608 (id number,"rank" number,"nation" text,"gold" number,"silver" number,"bronze" number,"total" number) | SELECT "nation" FROM table_203_608 WHERE "silver" = 1 |
how many open 2nd viii had u15 3rd iv being gt | CREATE TABLE table_16629 ("Crew" real,"Open 1st VIII" text,"Open 2nd VIII" text,"Open 3rd VIII" text,"U16 1st VIII" text,"U16 2nd VIII" text,"U16 3rd VIII" text,"U15 1st IV" text,"U15 2nd IV" text,"U15 3rd IV" text,"U15 4th IV" text,"U15 5th IV" text,"U15 6th IV" text) | SELECT COUNT("Open 2nd VIII") FROM table_16629 WHERE "U15 3rd IV" = 'GT' |
What are the distinct visit dates, and count them by a bar chart, list in descending by the y-axis. | CREATE TABLE Visitors (Tourist_ID INTEGER,Tourist_Details VARCHAR(255))CREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code CHAR(15),star_rating_description VARCHAR(80))CREATE TABLE Visits (Visit_ID INTEGER,Tourist_Attraction_ID INTEGER,Tourist_ID INTEGER,Visit_Date DATETIME,Visit_Details VARCHAR(40))CREATE TABLE Stre... | SELECT Visit_Date, COUNT(Visit_Date) FROM Visits ORDER BY COUNT(Visit_Date) DESC |
What Reimboldsh has Willingshain of 268 and Gersdorf 194? | CREATE TABLE table_name_24 (reimboldsh VARCHAR,willingshain VARCHAR,gersdorf VARCHAR) | SELECT reimboldsh FROM table_name_24 WHERE willingshain = "268" AND gersdorf = "194" |
what is the subtrate for enzyme ala dehydratase | CREATE TABLE table_182499_1 (substrate VARCHAR,enzyme VARCHAR) | SELECT substrate FROM table_182499_1 WHERE enzyme = "ALA dehydratase" |
Which game had an attendance of 5,000 and was away? | CREATE TABLE table_name_23 (game INTEGER,venue VARCHAR,attendance VARCHAR) | SELECT AVG(game) FROM table_name_23 WHERE venue = "away" AND attendance = 5 OFFSET 000 |
Which format has a Frequency larger than 1050, and a Station of kvto? | CREATE TABLE table_name_70 (format VARCHAR,frequency VARCHAR,station VARCHAR) | SELECT format FROM table_name_70 WHERE frequency > 1050 AND station = "kvto" |
UWP top all-time open questions by viewcount. | CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCou... | SELECT p.Id AS "post_link", p.Title AS "Title", p.Tags AS Tags, p.ViewCount AS "Views", p.Score AS "Score", p.AnswerCount AS "Answers", DATEDIFF(day, p.CreationDate, GETDATE()) AS "Age (days)" FROM Posts AS p WHERE p.AcceptedAnswerId IS NULL AND (p.Tags LIKE '%<uwp>%' OR p.Tags LIKE '%<windows-10-universal>%' OR (p.Tag... |
papers by stefan savage | CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE author (authorid int,authorname varchar)CREATE TABLE venue (venueid int,venuename varchar)CREATE TABLE paperdataset (paperid int,datasetid int)CREATE TABLE paper (paperid int,title varchar,venueid ... | SELECT DISTINCT writes.paperid FROM author, writes WHERE author.authorname = 'stefan savage' AND writes.authorid = author.authorid |
Give me the comparison about Team_ID over the ACC_Regular_Season , could you order from low to high by the X-axis please? | CREATE TABLE basketball_match (Team_ID int,School_ID int,Team_Name text,ACC_Regular_Season text,ACC_Percent text,ACC_Home text,ACC_Road text,All_Games text,All_Games_Percent int,All_Home text,All_Road text,All_Neutral text)CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,En... | SELECT ACC_Regular_Season, Team_ID FROM basketball_match ORDER BY ACC_Regular_Season |
What was the away team's score in the game against North Melbourne? | CREATE TABLE table_name_35 (away_team VARCHAR,home_team VARCHAR) | SELECT away_team AS score FROM table_name_35 WHERE home_team = "north melbourne" |
What are the directions for the guardian whose graha (planet) is b haspati (Jupiter)? | CREATE TABLE table_100518_1 (direction VARCHAR,graha__planet_ VARCHAR) | SELECT direction FROM table_100518_1 WHERE graha__planet_ = "Bṛhaspati (Jupiter)" |
severe sepsis or septic shock with plasma activity of protein c < 60 % | CREATE TABLE table_train_5 ("id" int,"pregnancy_or_lactation" bool,"severe_sepsis" bool,"protein_c" int,"liver_disease" bool,"chronic_respiratory_disease" bool,"child_pugh_score" int,"septic_shock" bool,"myocardial_infarction" bool,"NOUSE" float) | SELECT * FROM table_train_5 WHERE (severe_sepsis = 1 OR septic_shock = 1) AND protein_c < 60 |
Who is the center position of Years for Jazz, Greg Ostertag? | CREATE TABLE table_52031 ("Player" text,"Nationality" text,"Position" text,"Years for Jazz" text,"School/Club Team" text) | SELECT "Years for Jazz" FROM table_52031 WHERE "Position" = 'center' AND "Player" = 'greg ostertag' |
Who was the husband of marie of baden-sponheim? | CREATE TABLE table_6082 ("Image" text,"Father" text,"Birth" text,"Ceased to be Duchess" text,"Death" text,"Husband" text) | SELECT "Husband" FROM table_6082 WHERE "Image" = 'marie of baden-sponheim' |
how many different colleges did the players come from ? | CREATE TABLE table_204_635 (id number,"round" number,"selection" number,"player" text,"position" text,"college" text) | SELECT COUNT(DISTINCT "college") FROM table_204_635 |
What was the episode that had Jack Dee and Stacey Solomon on Sean's team? | CREATE TABLE table_23292220_13 (episode VARCHAR,seans_team VARCHAR) | SELECT episode FROM table_23292220_13 WHERE seans_team = "Jack Dee and Stacey Solomon" |
do you have any direct flights from PITTSBURGH to ATLANTA | CREATE TABLE airline (airline_code varchar,airline_name text,note text)CREATE TABLE fare_basis (fare_basis_code text,booking_class text,class_type text,premium text,economy text,discounted text,night text,season text,basis_days text)CREATE TABLE flight_stop (flight_id int,stop_number int,stop_days text,stop_airport tex... | 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 = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'AT... |
What is the year of appearance for the Prince Albert Raiders? | CREATE TABLE table_17751942_4 (years_of_appearance VARCHAR,team VARCHAR) | SELECT years_of_appearance FROM table_17751942_4 WHERE team = "Prince Albert Raiders" |
what is the difference in weight between the 060 ea and the challenger ? | CREATE TABLE table_204_850 (id number,"name" text,"railway" text,"series" text,"maker" text,"dates" text,"drive" text,"wheel arrangement" text,"weight" text,"power" text,"notes" text) | SELECT ABS((SELECT "weight" FROM table_204_850 WHERE "name" = '060-ea') - (SELECT "weight" FROM table_204_850 WHERE "name" = 'challenger')) |
Give me the comparison about Team_ID over the All_Neutral , and I want to display by the Y-axis from high to low please. | 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 All_Neutral, Team_ID FROM basketball_match ORDER BY Team_ID DESC |
A pie chart shows the proportion of All_Road and School_ID. | 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_Road, School_ID FROM basketball_match |
How many vehicle in total? | CREATE TABLE Vehicles (Id VARCHAR) | SELECT COUNT(*) FROM Vehicles |
a hematocrit of > 50 % | CREATE TABLE table_train_264 ("id" int,"stroke" bool,"hematocrit_hct" float,"serum_psa" float,"coronary_artery_disease_cad" bool,"international_prostate_symptom_score_ipss" int,"hypertension" bool,"NOUSE" float) | SELECT * FROM table_train_264 WHERE hematocrit_hct > 50 |
Which nation has a Bronze and Silver smaller than 1 and a Gold larger than 1? | CREATE TABLE table_name_87 (nation VARCHAR,gold VARCHAR,bronze VARCHAR,silver VARCHAR) | SELECT nation FROM table_name_87 WHERE bronze < 1 AND silver < 1 AND gold > 1 |
what 's the last flight from ATLANTA to BOSTON | CREATE TABLE time_interval (period text,begin_time int,end_time int)CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE airline (airline_code varchar,airline_name text,note text)CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE c... | 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 = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTO... |
What is the sum of the interview scores from North Dakota that have averages less than 8.697, evening gown scores less than 8.73, and swimsuit scores greater than 8.41? | CREATE TABLE table_name_4 (interview INTEGER,swimsuit VARCHAR,state VARCHAR,average VARCHAR,evening_gown VARCHAR) | SELECT SUM(interview) FROM table_name_4 WHERE average < 8.697 AND evening_gown < 8.73 AND state = "north dakota" AND swimsuit > 8.41 |
Tell me the sum of week for result of l 24 21 | CREATE TABLE table_31767 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" text) | SELECT SUM("Week") FROM table_31767 WHERE "Result" = 'l 24–21' |
What is the total code number for Amadiba? | CREATE TABLE table_63124 ("Place" text,"Code" real,"Area (km 2)" real,"Population" real,"Most spoken language" text) | SELECT COUNT("Code") FROM table_63124 WHERE "Place" = 'amadiba' |
List the all the distinct names of the products with the characteristic name 'warm'. | CREATE TABLE characteristics (characteristic_id number,characteristic_type_code text,characteristic_data_type text,characteristic_name text,other_characteristic_details text)CREATE TABLE product_characteristics (product_id number,characteristic_id number,product_characteristic_value text)CREATE TABLE ref_colors (color_... | SELECT DISTINCT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN characteristics AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = "warm" |
WHAT IS THE TYPE OF LAND WITH A 2007 POPULATION SMALLER THAN 4346, 2010 POPULATION LARGER THAN 3385, FROM BARANGAY OF MANALONGON? | CREATE TABLE table_47250 ("Barangay" text,"Urban/rural" text,"Geographic character" text,"Population (2007)" real,"Population (2010)" real) | SELECT "Geographic character" FROM table_47250 WHERE "Population (2007)" < '4346' AND "Population (2010)" > '3385' AND "Barangay" = 'manalongon' |
What is the original date of the repeat air date of 26/01/1969? | CREATE TABLE table_18088 ("#" real,"Title" text,"Director" text,"Writer(s)" text,"Originalairdate" text,"Repeatairdate(s)" text,"Prod.Code" text) | SELECT "Originalairdate" FROM table_18088 WHERE "Repeatairdate(s)" = '26/01/1969' |
What's the Period with # found of 5? | CREATE TABLE table_6441 ("Location" text,"Culture" text,"# found" text,"Ball diameter" text,"Period" text) | SELECT "Period" FROM table_6441 WHERE "# found" = '5' |
What type of school is Stratford University? | CREATE TABLE table_23914 ("School" text,"Location(s)" text,"Control" text,"Type" text,"Accreditation" text,"Founded" real,"Enrollment" text) | SELECT "Type" FROM table_23914 WHERE "School" = 'Stratford University' |
How many patients are diagnosed with other second degree atrioventricular block were suggested the oral drug route? | 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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Other second degree atrioventricular block" AND prescriptions.route = "ORAL" |
what is days of hospital stay and admission time of subject id 15061? | 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.days_stay, demographic.admittime FROM demographic WHERE demographic.subject_id = "15061" |
what is average age of patients whose marital status is single and admission location is trsf within this facility? | 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 AVG(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.admission_location = "TRSF WITHIN THIS FACILITY" |
Which of the airport names contains the word 'international'? | CREATE TABLE operate_company (id number,name text,type text,principal_activities text,incorporated_in text,group_equity_shareholding number)CREATE TABLE flight (id number,vehicle_flight_number text,date text,pilot text,velocity number,altitude number,airport_id number,company_id number)CREATE TABLE airport (id number,c... | SELECT name FROM airport WHERE name LIKE '%international%' |
how many patients with ruq pain stayed in the hospital for more than 2 days? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "RUQ PAIN" AND demographic.days_stay > "2" |
For Tie #2, who was the home team? | CREATE TABLE table_50148 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Date" text) | SELECT "Home team" FROM table_50148 WHERE "Tie no" = '2' |
What shows for 1988 when 1994 shows 10 6? | CREATE TABLE table_name_32 (Id VARCHAR) | SELECT 1988 FROM table_name_32 WHERE 1994 = "10–6" |
What players finished 2nd? | CREATE TABLE table_1506950_4 (player VARCHAR,finish VARCHAR) | SELECT player FROM table_1506950_4 WHERE finish = "2nd" |
what is the one year survival rate of patients prescribed with insulin after diagnosed with hx of alcoholism? | CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance text,language text,marital_status t... | SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t4.charttime) > 1 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.subject_id, t2.charttime FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd... |
Return a bar chart on what are the names and distances for all airplanes?, and I want to sort names from low to high order. | CREATE TABLE certificate (eid number(9,0),aid number(9,0))CREATE TABLE aircraft (aid number(9,0),name varchar2(30),distance number(6,0))CREATE TABLE employee (eid number(9,0),name varchar2(30),salary number(10,2))CREATE TABLE flight (flno number(4,0),origin varchar2(20),destination varchar2(20),distance number(6,0),dep... | SELECT name, distance FROM aircraft ORDER BY name |
Failures larger than 0, and a Successes of 1 has what lowest partial failures? | CREATE TABLE table_36412 ("Country" text,"Launches" real,"Successes" real,"Failures" real,"Partial failures" real) | SELECT MIN("Partial failures") FROM table_36412 WHERE "Failures" > '0' AND "Successes" = '1' |
Which 300 -level classes are there for Fall or Winter terms ? | CREATE TABLE course (course_id int,name varchar,department varchar,number varchar,credits varchar,advisory_requirement varchar,enforced_requirement varchar,description varchar,num_semesters int,num_enrolled int,has_discussion varchar,has_lab varchar,has_projects varchar,has_exams varchar,num_reviews int,clarity_score i... | SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number BETWEEN 300 AND 300 + 100 AND semester.semester IN ('FA', 'WN') AND semester.semester_id = course_of... |
Namem the number of cities that contains Voivodeship of elbl g voivodeship | CREATE TABLE table_53743 ("Abbreviation" text,"Voivodeship" text,"Capital" text,"Area km\u00b2 (1998)" text,"Population (1980)" text,"No. of cities" real,"No. of communes" real) | SELECT "No. of cities" FROM table_53743 WHERE "Voivodeship" = 'elbląg voivodeship' |
Find the total amount of loans offered by each bank branch, and sort in desc by the total number. | CREATE TABLE bank (branch_ID int,bname varchar(20),no_of_customers int,city varchar(10),state varchar(20))CREATE TABLE customer (cust_ID varchar(3),cust_name varchar(20),acc_type char(1),acc_bal int,no_of_loans int,credit_score int,branch_ID int,state varchar(20))CREATE TABLE loan (loan_ID varchar(3),loan_type varchar(... | SELECT bname, SUM(amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_ID = T2.branch_ID GROUP BY T1.bname ORDER BY SUM(amount) DESC |
what is minimum days of hospital stay of patients whose ethnicity is black/african american? | 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 MIN(demographic.days_stay) FROM demographic WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.