instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
Which Result has a Date of september 3, 2000? | CREATE TABLE table_name_81 (result VARCHAR,date VARCHAR) | SELECT result FROM table_name_81 WHERE date = "september 3, 2000" |
Name the most # of seats won | CREATE TABLE table_2159 ("Election" text,"# of candidates nominated" real,"# of seats won" real,"# of total votes" real,"% of popular vote" text,"result" text) | SELECT MAX("# of seats won") FROM table_2159 |
What school did the catcher attend? | CREATE TABLE table_294 ("Player" text,"Position" text,"School" text,"Hometown" text,"MLB Draft" text) | SELECT "School" FROM table_294 WHERE "Position" = 'Catcher' |
Find the name of amenities Smith Hall dorm have. ordered the results by amenity names. | CREATE TABLE dorm_amenity (amenity_name VARCHAR,amenid VARCHAR)CREATE TABLE has_amenity (dormid VARCHAR,amenid VARCHAR)CREATE TABLE dorm (dormid VARCHAR,dorm_name VARCHAR) | SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall' ORDER BY T3.amenity_name |
what's patient 51497's average value of ptt in 07/2105? | CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)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 text,ethnicity text,age number)C... | SELECT AVG(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 51497) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'ptt') AND STRFTIME('%y-%m', labevents.charttime) = '2105-07' |
what is the number of private health insurance patients who have procedure icd9 code 311? | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.icd9_code = "311" |
On what date was the number of locomotives 421-6? | CREATE TABLE table_name_70 (date VARCHAR,loco_nos VARCHAR) | SELECT date FROM table_name_70 WHERE loco_nos = "421-6" |
What is the lowest total that has 1977 as the year (s) won? | CREATE TABLE table_name_32 (total INTEGER,year_s__won VARCHAR) | SELECT MIN(total) FROM table_name_32 WHERE year_s__won = "1977" |
For each director, return the director's name together with the value of that rating and ignore movies whose director is NULL Could you plot the result with a bar chart?, and display by the Y in asc. | CREATE TABLE Reviewer (rID int,name text)CREATE TABLE Rating (rID int,mID int,stars int,ratingDate date)CREATE TABLE Movie (mID int,title text,year int,director text) | SELECT director, stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE director <> "null" ORDER BY stars |
give me the number of patients whose age is less than 31 and item id is 50935? | 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,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,la... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "31" AND lab.itemid = "50935" |
Name the total number of ERP/Power W for frequency of 89.3 fm and facility ID less than 40430 | CREATE TABLE table_name_34 (erp___power_w VARCHAR,frequency VARCHAR,facility_id VARCHAR) | SELECT COUNT(erp___power_w) FROM table_name_34 WHERE frequency = "89.3 fm" AND facility_id < 40430 |
Who was the host team on October 4? | CREATE TABLE table_71610 ("Date" text,"Visiting Team" text,"Final Score" text,"Host Team" text,"Stadium" text) | SELECT "Host Team" FROM table_71610 WHERE "Date" = 'october 4' |
What is the highest gold when bronze is 1, and rank is 5? | CREATE TABLE table_name_93 (gold INTEGER,bronze VARCHAR,rank VARCHAR) | SELECT MAX(gold) FROM table_name_93 WHERE bronze = 1 AND rank = 5 |
Give the minimum product price for each product type in a pie chart. | CREATE TABLE Customer_Addresses (customer_id INTEGER,address_id INTEGER,date_from DATETIME,date_to DATETIME)CREATE TABLE Product_Suppliers (product_id INTEGER,supplier_id INTEGER,date_supplied_from DATETIME,date_supplied_to DATETIME,total_amount_purchased VARCHAR(80),total_value_purchased DECIMAL(19,4))CREATE TABLE Cus... | SELECT product_type_code, MIN(product_price) FROM Products GROUP BY product_type_code ORDER BY product_type_code |
how did patient 016-34475 get first admission to the hospital until 4 years ago? | CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissio... | SELECT patient.hospitaladmitsource FROM patient WHERE patient.uniquepid = '016-34475' AND DATETIME(patient.hospitaladmittime) <= DATETIME(CURRENT_TIME(), '-4 year') ORDER BY patient.hospitaladmittime LIMIT 1 |
What is Venue, when Opposing Teams is 'South Africa', and when Date is '17/06/2000'? | CREATE TABLE table_59222 ("Opposing Teams" text,"Against" real,"Date" text,"Venue" text,"Status" text) | SELECT "Venue" FROM table_59222 WHERE "Opposing Teams" = 'south africa' AND "Date" = '17/06/2000' |
provide the number of patients whose ethnicity is hispanic/latino - puerto rican and drug name is sucralfate? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,do... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND prescriptions.drug = "Sucralfate" |
What is the highest value for col(m) at North Island? | CREATE TABLE table_22714 ("Rank" real,"Peak" text,"Country" text,"Island" text,"Elevation (m)" real,"Prominence (m)" real,"Col (m)" real) | SELECT MAX("Col (m)") FROM table_22714 WHERE "Island" = 'North Island' |
what is admission type and diagnoses icd9 code of subject id 62296? | 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 demographic.admission_type, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "62296" |
Please show the employee last names that serves no more than 20 customers. | CREATE TABLE EMPLOYEE (EmployeeId VARCHAR)CREATE TABLE CUSTOMER (LastName VARCHAR,SupportRepId VARCHAR) | SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) <= 20 |
what 's the total number of dates listed for 1964 ? | CREATE TABLE table_203_81 (id number,"date" text,"constituency" text,"gain" text,"loss" text,"note" text) | SELECT COUNT("date") FROM table_203_81 WHERE "date" = 1964 |
Who was the visitor on January 24? | CREATE TABLE table_67247 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Decision" text,"Attendance" real,"Record" text) | SELECT "Visitor" FROM table_67247 WHERE "Date" = 'january 24' |
Who was the elevator when the Cardinal-Deacon of S. Nicola in Carcere Tulliano was the order and title? | CREATE TABLE table_47747 ("Elector" text,"Nationality" text,"Order and title" text,"Elevated" text,"Elevator" text) | SELECT "Elevator" FROM table_47747 WHERE "Order and title" = 'cardinal-deacon of s. nicola in carcere tulliano' |
What is the 1995 Album? | CREATE TABLE table_name_22 (album VARCHAR,year VARCHAR) | SELECT album FROM table_name_22 WHERE year = 1995 |
What Mountain Pass has an Elevation of 10,001 feet 3048 m? | CREATE TABLE table_74814 ("Rank" real,"Mountain Pass" text,"Elevation" text,"Surface" text,"Route" real) | SELECT "Mountain Pass" FROM table_74814 WHERE "Elevation" = '10,001 feet 3048 m' |
What is the 2011 value with a 2008 value of 0.3 and is a member state of the European Union? | CREATE TABLE table_6998 ("Member State" text,"2005" real,"2006" real,"2007" real,"2008" text,"2009" text,"2010" text,"2011" text,"2012" text) | SELECT "2011" FROM table_6998 WHERE "2008" = '0.3' AND "Member State" = 'european union' |
What is the average of someone with more than 19 wickets and less than 16 matches? | CREATE TABLE table_49425 ("Player" text,"Team" text,"Matches" real,"Overs" real,"Wickets" real,"Economy Rate" real,"Average" real,"Strike Rate" real,"Best Bowling" text) | SELECT AVG("Average") FROM table_49425 WHERE "Wickets" > '19' AND "Matches" < '16' |
Name the Losing BP with 22 played and 9 Try BP. | CREATE TABLE table_70818 ("Club" text,"Played" text,"Drawn" text,"Lost" text,"Try BP" text,"Losing BP" text) | SELECT "Losing BP" FROM table_70818 WHERE "Played" = '22' AND "Try BP" = '9' |
Specify the minimum age of divorced patients who had angioedema | 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 MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "DIVORCED" AND demographic.diagnosis = "ANGIOEDEMA" |
Who has the lowest earnings that has a rank smaller than 2? | CREATE TABLE table_name_38 (earnings__ INTEGER,rank INTEGER) | SELECT MIN(earnings__) AS $__ FROM table_name_38 WHERE rank < 2 |
number of answers and comments. This is a hack to answer this question: http://codegolf.stackexchange.com/questions/20277/number-of-answers-and-comments | CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,RejectionDate time,OwnerUserId number,Comment text,Text text,Title text,Tags text,RevisionGUID other)CREATE TABLE PendingFla... | SELECT 'A' + CAST(AnswerCount AS TEXT(3)) + 'C' + CAST(CommentCount AS TEXT(3)) FROM Posts WHERE Id = 2913 |
show me flights on 9 26 please | CREATE TABLE code_description (code varchar,description text)CREATE TABLE compartment_class (compartment varchar,class_type varchar)CREATE TABLE aircraft (aircraft_code varchar,aircraft_description varchar,manufacturer varchar,basic_type varchar,engines int,propulsion varchar,wide_body varchar,wing_span int,length int,... | SELECT DISTINCT flight.flight_id FROM date_day, days, flight WHERE date_day.day_number = 26 AND date_day.month_number = 9 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code |
What is the Leading scorer with a Visitor of grizzlies, and with a Score with 114 111? | CREATE TABLE table_name_65 (leading_scorer VARCHAR,visitor VARCHAR,score VARCHAR) | SELECT leading_scorer FROM table_name_65 WHERE visitor = "grizzlies" AND score = "114–111" |
how long did the the saros on july 30 , 2307 last for ? | CREATE TABLE table_204_206 (id number,"saros" number,"member" number,"date" text,"time\n(greatest)\nutc" text,"type" text,"location\nlat,long" text,"gamma" number,"mag." number,"width\n(km)" number,"duration\n(min:sec)" text,"ref" number) | SELECT "saros" FROM table_204_206 WHERE "date" = 'july 30, 2307' |
In year 2011 what is sum of profit/loss before tax and net profit larger than 123.8 million? | CREATE TABLE table_name_47 (profit__loss__before_tax__ VARCHAR,year_ended VARCHAR,net_profit__£m_ VARCHAR) | SELECT COUNT(profit__loss__before_tax__) AS £m_ FROM table_name_47 WHERE year_ended = "2011" AND net_profit__£m_ > 123.8 |
What was the tie number for the round against visiting opponent Newcastle United? | CREATE TABLE table_50007 ("Tie no" real,"Home team" text,"Score" text,"Away team" text,"Date" text) | SELECT "Tie no" FROM table_50007 WHERE "Away team" = 'newcastle united' |
What day was the margin of victory 1 stroke when the tournament was colonial national invitation? | CREATE TABLE table_39483 ("Date" text,"Tournament" text,"Winning score" text,"Margin of victory" text,"Runner(s)-up" text) | SELECT "Date" FROM table_39483 WHERE "Margin of victory" = '1 stroke' AND "Tournament" = 'colonial national invitation' |
What days were games played at Hofstra Stadium? | CREATE TABLE table_70319 ("Date" text,"Opponent" text,"Home/Away" text,"Field" text,"Result" text) | SELECT "Date" FROM table_70319 WHERE "Field" = 'hofstra stadium' |
What score has houston texans as the opponent? | CREATE TABLE table_79135 ("Date" text,"Result" text,"Score" text,"Opponent" text,"Record" text,"Attendance" text) | SELECT "Score" FROM table_79135 WHERE "Opponent" = 'houston texans' |
What is the highest rank of the day with a gross of $38,916 and more than 6 screens? | CREATE TABLE table_name_27 (rank INTEGER,gross VARCHAR,screens VARCHAR) | SELECT MAX(rank) FROM table_name_27 WHERE gross = "$38,916" AND screens > 6 |
For those products with a price between 60 and 120, visualize a bar chart about the distribution of name and manufacturer , and could you order in ascending by the x-axis? | CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL)CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER) | SELECT Name, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120 ORDER BY Name |
What is the date of the match for the wbc flyweight (112) title? | CREATE TABLE table_12262182_2 (date VARCHAR,titles VARCHAR) | SELECT date FROM table_12262182_2 WHERE titles = "WBC Flyweight (112)" |
Please give me a bar chart to show the distribution of results of all music festival, and display by the Y-axis from low to high. | CREATE TABLE music_festival (ID int,Music_Festival text,Date_of_ceremony text,Category text,Volume int,Result text)CREATE TABLE artist (Artist_ID int,Artist text,Age int,Famous_Title text,Famous_Release_date text)CREATE TABLE volume (Volume_ID int,Volume_Issue text,Issue_Date text,Weeks_on_Top real,Song text,Artist_ID ... | SELECT Result, COUNT(Result) FROM music_festival GROUP BY Result ORDER BY COUNT(Result) |
provide the number of patients whose gender is f and primary disease is brain mass;intracranial hemorrhage? | 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 WHERE demographic.gender = "F" AND demographic.diagnosis = "BRAIN MASS;INTRACRANIAL HEMORRHAGE" |
How many points did the 2005 1st place team receive? | CREATE TABLE table_name_90 (points VARCHAR,year VARCHAR) | SELECT points FROM table_name_90 WHERE year = 2005 |
I want to see trend of the number of yearid by yearid, and I want to show in desc by the X. | CREATE TABLE team_franchise (franchise_id TEXT,franchise_name TEXT,active TEXT,na_assoc TEXT)CREATE TABLE home_game (year INTEGER,league_id TEXT,team_id TEXT,park_id TEXT,span_first TEXT,span_last TEXT,games INTEGER,openings INTEGER,attendance INTEGER)CREATE TABLE player (player_id TEXT,birth_year NUMERIC,birth_month N... | SELECT yearid, COUNT(yearid) FROM hall_of_fame ORDER BY yearid DESC |
What is the Nationality of the swimmer with a Time of 1:08.80? | CREATE TABLE table_65201 ("Rank" real,"Heat" real,"Lane" real,"Name" text,"Nationality" text,"Time" text) | SELECT "Nationality" FROM table_65201 WHERE "Time" = '1:08.80' |
Name the equipment for bike number 6 | CREATE TABLE table_21163 ("Position" real,"Driver / Passenger" text,"Equipment" text,"Bike No" real,"Points" real) | SELECT "Equipment" FROM table_21163 WHERE "Bike No" = '6' |
What is Race 2, when Race 4 is 28? | CREATE TABLE table_name_40 (race_2 VARCHAR,race_4 VARCHAR) | SELECT race_2 FROM table_name_40 WHERE race_4 = "28" |
What is the game average that has a rank larger than 2 with team Olympiacos and points larger than 113? | CREATE TABLE table_39857 ("Rank" real,"Name" text,"Team" text,"Games" real,"Points" real) | SELECT AVG("Games") FROM table_39857 WHERE "Rank" > '2' AND "Team" = 'olympiacos' AND "Points" > '113' |
A pie chart for what are the number of the names of all the Japanese constructors that have earned more than 5 points? | CREATE TABLE races (raceId INTEGER,year INTEGER,round INTEGER,circuitId INTEGER,name TEXT,date TEXT,time TEXT,url TEXT)CREATE TABLE seasons (year INTEGER,url TEXT)CREATE TABLE status (statusId INTEGER,status TEXT)CREATE TABLE constructorStandings (constructorStandingsId INTEGER,raceId INTEGER,constructorId INTEGER,poin... | SELECT name, COUNT(name) FROM constructors AS T1 JOIN constructorStandings AS T2 ON T1.constructorId = T2.constructorId WHERE T1.nationality = "Japanese" AND T2.points > 5 GROUP BY name |
What are Utah's high points? | CREATE TABLE table_50277 ("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_50277 WHERE "Team" = 'utah' |
give me the number of newborn patients whose lab test fluid is ascites. | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "NEWBORN" AND lab.fluid = "Ascites" |
Find the names of all patients who have an undergoing treatment and are staying in room 111. | CREATE TABLE patient (name VARCHAR,SSN VARCHAR)CREATE TABLE undergoes (patient VARCHAR,Stay VARCHAR)CREATE TABLE stay (StayID VARCHAR,room VARCHAR) | SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay = T3.StayID WHERE T3.room = 111 |
Top Node.JS dev in Poland. | CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,Cr... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE (LOWER(Location) LIKE '%poland%' OR UPPER(Location) LIKE '%POLAND%' OR Location LIKE '%Poland%') AND Reputation >= 1000 AND Id IN (SELECT OwnerUserId FROM Posts WHERE LOWER(Tags) LIKE '%node.js%') ORDER BY Reputat... |
list all the arriving flights at MKE | CREATE TABLE code_description (code varchar,description text)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE airport (airport_code varchar,airport_name text,airport_location text,state_code varchar,country_name varchar,time... | SELECT DISTINCT flight.flight_id FROM airport, airport_service, city, flight WHERE airport.airport_code = 'MKE' AND city.city_code = airport_service.city_code AND flight.from_airport = airport_service.airport_code AND flight.to_airport = airport.airport_code |
Who is the away team at Windy Hill? | CREATE TABLE table_name_69 (away_team VARCHAR,venue VARCHAR) | SELECT away_team FROM table_name_69 WHERE venue = "windy hill" |
On what day was the record 30-31? | CREATE TABLE table_name_88 (date VARCHAR,record VARCHAR) | SELECT date FROM table_name_88 WHERE record = "30-31" |
how many patients whose admission year is less than 2121 and diagnoses long title is personal history of transient ischemic attack (tia), and cerebral infarction without residual deficits? | 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 text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,do... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2121" AND diagnoses.long_title = "Personal history of transient ischemic attack (TIA), and cerebral infarction without residual deficits" |
what flights are there from NEW YORK to LAS VEGAS | CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE restriction (restriction_code text,advance_purchase int,stopovers text,saturday_stay_required text,minimum_stay int,maximum_stay int,application text,no_discounts text)CREATE TABLE flight (aircraft_code_sequence text,airline_code varchar,... | 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 = 'NEW YORK' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'LAS V... |
Can you tell me the Record that has the Game larger than 15, and the Opponent of edmonton oilers? | CREATE TABLE table_name_9 (record VARCHAR,game VARCHAR,opponent VARCHAR) | SELECT record FROM table_name_9 WHERE game > 15 AND opponent = "edmonton oilers" |
which plant is listed first ? | CREATE TABLE table_204_614 (id number,"date announced" text,"plant name" text,"location" text,"date of closing" text,"products" text,"employees" number) | SELECT "plant name" FROM table_204_614 WHERE id = 1 |
fasting serum glucose > 300 mg / dl at screening; a single repeat test is allowable. | CREATE TABLE table_train_149 ("id" int,"prostate_specific_antigen_psa" float,"c_peptide_level" float,"hemoglobin_a1c_hba1c" float,"fasting_serum_glucose" int,"vitamin_d" int,"NOUSE" float) | SELECT * FROM table_train_149 WHERE fasting_serum_glucose > 300 |
give me the total amount of output of patient 028-42654 on the last icu visit. | CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,tempe... | 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 = '028-42654') AND NOT patient.unitdischargetime IS... |
Name the team with best of 58.846 | CREATE TABLE table_68240 ("Name" text,"Team" text,"Qual 1" text,"Qual 2" text,"Best" text) | SELECT "Team" FROM table_68240 WHERE "Best" = '58.846' |
what is the notes for the time 6:05.21? | CREATE TABLE table_66139 ("Rank" real,"Athlete" text,"Country" text,"Time" text,"Notes" text) | SELECT "Notes" FROM table_66139 WHERE "Time" = '6:05.21' |
what was patient 029-584's last id of the ward when they came to the hospital first time? | CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,observationtime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,... | SELECT patient.wardid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '029-584' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1) ORDER BY patient.unitadmittime DESC LIMIT 1 |
Name the tries against for 87 points | CREATE TABLE table_12792876_4 (tries_against VARCHAR,points VARCHAR) | SELECT tries_against FROM table_12792876_4 WHERE points = "87" |
How many players were with the school or club team La Salle? | CREATE TABLE table_15879 ("Player" text,"No." text,"Nationality" text,"Position" text,"Years in Toronto" text,"School/Club Team" text) | SELECT COUNT("Player") FROM table_15879 WHERE "School/Club Team" = 'La Salle' |
List the description of all the colors. | CREATE TABLE ref_characteristic_types (characteristic_type_code text,characteristic_type_description text)CREATE TABLE ref_product_categories (product_category_code text,product_category_description text,unit_of_measure text)CREATE TABLE ref_colors (color_code text,color_description text)CREATE TABLE products (product_... | SELECT color_description FROM ref_colors |
Name the lowest points for officine alfieri maserati | CREATE TABLE table_name_7 (points INTEGER,entrant VARCHAR) | SELECT MIN(points) FROM table_name_7 WHERE entrant = "officine alfieri maserati" |
What was the position of terry jones whose pick number was after 256? | CREATE TABLE table_38337 ("Round" real,"Pick" real,"Player" text,"Position" text,"School" text) | SELECT "Position" FROM table_38337 WHERE "Pick" > '256' AND "Player" = 'terry jones' |
What Super G has a Career of 1980 1996? | CREATE TABLE table_78831 ("Country" text,"Career" text,"Victories" real,"Super G" text,"Giant Slalom" text,"Slalom" text,"Combined" text,"Parallel" text) | SELECT "Super G" FROM table_78831 WHERE "Career" = '1980–1996' |
who directed with original air date being november18,1995 | CREATE TABLE table_19473 ("No. in series" real,"Title" text,"Written by" text,"Directed by" text,"Original air date" text,"TV broadcast" text) | SELECT "Directed by" FROM table_19473 WHERE "Original air date" = 'November18,1995' |
what are the flights from ATLANTA to BALTIMORE which arrive in BALTIMORE at 1900 o'clock pm | CREATE TABLE aircraft (aircraft_code varchar,aircraft_description varchar,manufacturer varchar,basic_type varchar,engines int,propulsion varchar,wide_body varchar,wing_span int,length int,weight int,capacity int,pay_load int,cruising_speed int,range_miles int,pressurized varchar)CREATE TABLE code_description (code varc... | 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_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND flight.arrival_time = 1900 AND flight.to_airport = AIRPORT_SERVICE_1.airpo... |
What rank is aliyya qadi with less than 1421 votes? | CREATE TABLE table_name_73 (rank INTEGER,candidate_name VARCHAR,votes VARCHAR) | SELECT MIN(rank) FROM table_name_73 WHERE candidate_name = "aliyya qadi" AND votes < 1421 |
What team has draft picks from Mississippi? | CREATE TABLE table_16729063_1 (nfl_team VARCHAR,college VARCHAR) | SELECT nfl_team FROM table_16729063_1 WHERE college = "Mississippi" |
give me the number of patients whose primary disease is mesenteric ischemia and year of birth is less than 2180? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "MESENTERIC ISCHEMIA" AND demographic.dob_year < "2180" |
Which Video has a Channel smaller than 35.66, and a Programming of nhk world? | CREATE TABLE table_64145 ("Channel" real,"Video" text,"Aspect" text,"PSIP Short Name" text,"Programming" text) | SELECT "Video" FROM table_64145 WHERE "Channel" < '35.66' AND "Programming" = 'nhk world' |
What is the country of Palmers Shipbuilding and Iron Company? | CREATE TABLE table_name_96 (country VARCHAR,builder VARCHAR) | SELECT country FROM table_name_96 WHERE builder = "palmers shipbuilding and iron company" |
What is the name of the school that has the smallest enrollment in each state?, and show from high to low by the X-axis. | CREATE TABLE College (cName varchar(20),state varchar(2),enr numeric(5,0))CREATE TABLE Tryout (pID numeric(5,0),cName varchar(20),pPos varchar(8),decision varchar(3))CREATE TABLE Player (pID numeric(5,0),pName varchar(20),yCard varchar(3),HS numeric(5,0)) | SELECT cName, MIN(enr) FROM College GROUP BY state ORDER BY cName DESC |
Name the competition that was on august 25, 2007 | CREATE TABLE table_name_48 (competition VARCHAR,date VARCHAR) | SELECT competition FROM table_name_48 WHERE date = "august 25, 2007" |
Can you tell me the Score that has the Country of united states, and the To par of 8? | CREATE TABLE table_name_45 (score VARCHAR,country VARCHAR,to_par VARCHAR) | SELECT score FROM table_name_45 WHERE country = "united states" AND to_par = 8 |
What is Surface, when Tournament is 'Sunderland , United Kingdom'? | CREATE TABLE table_58668 ("Date" text,"Tournament" text,"Surface" text,"Opponent in the final" text,"Score" text) | SELECT "Surface" FROM table_58668 WHERE "Tournament" = 'sunderland , united kingdom' |
Why are certain questions redirecting to tag wikis?. | CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId number,RevisionGUID other,CreationDate time,UserId number,UserDisplayName text,Comment text,Text text,ContentLicense text)CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE FlagTypes (Id number,Name text,Description text)C... | SELECT q.Id AS "post_link", a.Id AS "post_link" FROM Posts AS a LEFT JOIN Posts AS q ON a.PostTypeId = 2 AND q.PostTypeId = 1 AND q.AcceptedAnswerId = a.Id WHERE a.Score = 0 |
Which Position has an Against of 32, and a Difference of 18, and a Drawn larger than 4? | CREATE TABLE table_name_97 (position INTEGER,drawn VARCHAR,against VARCHAR,difference VARCHAR) | SELECT SUM(position) FROM table_name_97 WHERE against = 32 AND difference = "18" AND drawn > 4 |
What player is 2.01 m tall? | CREATE TABLE table_12962773_2 (player VARCHAR,height VARCHAR) | SELECT player FROM table_12962773_2 WHERE height = "2.01" |
What is the campus fee of 'San Francisco State University' in year 2000? | CREATE TABLE csu_fees (campusfee VARCHAR,campus VARCHAR,year VARCHAR)CREATE TABLE campuses (id VARCHAR,campus VARCHAR) | SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = "San Francisco State University" AND t1.year = 2000 |
What is the FCC info for the radio station in West Lafayette, Indiana? | CREATE TABLE table_77339 ("Call sign" text,"Frequency" text,"City of license" text,"State" text,"FCC info" text) | SELECT "FCC info" FROM table_77339 WHERE "State" = 'indiana' AND "City of license" = 'west lafayette' |
When the division is Division 2 men what is the champion score? | CREATE TABLE table_15161170_1 (champion_score VARCHAR,division VARCHAR) | SELECT champion_score FROM table_15161170_1 WHERE division = "division 2 Men" |
How many original air dates did episode 12 have?h | CREATE TABLE table_25829 ("Episode #" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Viewers (in millions)" text) | SELECT COUNT("Original air date") FROM table_25829 WHERE "Episode #" = '12' |
What is the name of the player with position of G and the team was the Washington Capitols? | CREATE TABLE table_name_58 (player VARCHAR,position VARCHAR,team VARCHAR) | SELECT player FROM table_name_58 WHERE position = "g" AND team = "washington capitols" |
How many pints does the Cambrian Welfare RFC have? | CREATE TABLE table_41686 ("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 "Points for" FROM table_41686 WHERE "Club" = 'cambrian welfare rfc' |
Name the average total for tournament less than 0 | CREATE TABLE table_name_82 (total INTEGER,tournament INTEGER) | SELECT AVG(total) FROM table_name_82 WHERE tournament < 0 |
How many paper has Ed Desmond written about Semantic Parsing ? | CREATE TABLE paperdataset (paperid int,datasetid int)CREATE TABLE venue (venueid int,venuename varchar)CREATE TABLE paperfield (fieldid int,paperid int)CREATE TABLE dataset (datasetid int,datasetname varchar)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE paperkeyphrase (paperid int,keyphraseid int... | SELECT DISTINCT COUNT(DISTINCT writes.paperid) FROM author, keyphrase, paperkeyphrase, writes WHERE author.authorname = 'Ed Desmond' AND keyphrase.keyphrasename = 'Semantic Parsing' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND writes.authorid = author.authorid AND writes.paperid = paperkeyphrase.paperid |
how many hours have it been since the last time that patient 17667 stayed in careunit micu during their current hospital visit? | CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses_... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 17667 AND admissions.dischtime IS NULL) AND transfers.careunit = 'micu' ORDER BY transfers.intime DESC LIMIT 1 |
give me the number of medicaid patients who had procedure icd9 code 403. | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Medicaid" AND procedures.icd9_code = "403" |
What record was reached when the Eagles played the Phoenix Cardinals? | CREATE TABLE table_1502 ("Game" real,"Date" text,"Opponent" text,"Result" text,"Eagles points" real,"Opponents" real,"Record" text,"Attendance" real) | SELECT "Record" FROM table_1502 WHERE "Opponent" = 'Phoenix Cardinals' |
What is the July temperature where the annual precipitation is 514mm (20.2in)? | CREATE TABLE table_name_23 (july VARCHAR,annual_precipitation VARCHAR) | SELECT july FROM table_name_23 WHERE annual_precipitation = "514mm (20.2in)" |
Who is the leading scorer of the wnba finals series? | CREATE TABLE table_76222 ("Date" text,"Opponent" text,"Score" text,"Leading Scorer" text,"Attendance" text,"Series" text) | SELECT "Leading Scorer" FROM table_76222 WHERE "Series" = 'wnba finals' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.