table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
CREATE TABLE table_9451 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
What is Home Team, when Date is 18 February 1956, and when Tie No is 3?
SELECT "Home team" FROM table_9451 WHERE "Date" = '18 february 1956' AND "Tie no" = '3'
CREATE TABLE table_7899 ( "Week" real, "Date" text, "TV Time" text, "Opponent" text, "Result" text )
How many weeks has the opponent been san francisco 49ers?
SELECT COUNT("Week") FROM table_7899 WHERE "Opponent" = 'san francisco 49ers'
CREATE TABLE table_name_20 ( date_of_birth__age_ VARCHAR, position VARCHAR, caps VARCHAR )
When was the lock with 10 caps born?
SELECT date_of_birth__age_ FROM table_name_20 WHERE position = "lock" AND caps = 10
CREATE TABLE table_62553 ( "Year" real, "Milan \u2013 San Remo" text, "Tour of Flanders" text, "Paris\u2013Roubaix" text, "Li\u00e8ge\u2013Bastogne\u2013Li\u00e8ge" text, "Giro di Lombardia" text )
Which Giro di Lombardia has a Paris Roubaix of servais knaven ( ned )?
SELECT "Giro di Lombardia" FROM table_62553 WHERE "Paris\u2013Roubaix" = 'servais knaven ( ned )'
CREATE TABLE table_204_308 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
country with the most bronze medals .
SELECT "nation" FROM table_204_308 ORDER BY "bronze" DESC LIMIT 1
CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Has_amenity ( dormid INTEGER, amenid INTEGER ) CREATE TABLE Dorm ( dormid INTEGER, dorm_name VARC...
Return a histogram on how many students are from each city, and which cities have more than one cities?
SELECT city_code, COUNT(*) FROM Student GROUP BY city_code
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
give the number of patients who were born before the year 1882 and whose item id is 51482
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "1882" AND lab.itemid = "51482"
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, sy...
has patient 021-79544 been prescribed any prescription drugs on this hospital visit?
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-79544' AND patient.hospitaldischargetime IS NULL))
CREATE TABLE table_44341 ( "Team" text, "Tries for" text, "Tries against" text, "Try diff" text, "Points for" text, "Points against" text, "Points diff" text )
What team has +119 Points diff?
SELECT "Team" FROM table_44341 WHERE "Points diff" = '+119'
CREATE TABLE table_34781 ( "County" text, "Monument name" text, "Year built" real, "City or Town" text, "Latitude" text, "Longitude" text )
What County has a Longitude of 85 45 43 w?
SELECT "County" FROM table_34781 WHERE "Longitude" = '85°45′43″w'
CREATE TABLE table_name_61 ( home_team VARCHAR, week VARCHAR )
What is the home team in week 1?
SELECT home_team FROM table_name_61 WHERE week = "1"
CREATE TABLE table_31208 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
When la salle is the team who has the highest amount of points?
SELECT "High points" FROM table_31208 WHERE "Team" = 'La Salle'
CREATE TABLE table_name_48 ( Id VARCHAR )
What 1953 has 2 as a 1949, and 3 as 1952?
SELECT 1953 FROM table_name_48 WHERE 1949 = "2" AND 1952 = "3"
CREATE TABLE table_name_58 ( country VARCHAR, player VARCHAR )
What country does Tiger Woods come from?
SELECT country FROM table_name_58 WHERE player = "tiger woods"
CREATE TABLE table_train_96 ( "id" int, "gender" string, "elevated_creatinine" float, "diabetic" string, "cerebrovascular_disease" bool, "moca_score" int, "parkinsonism" bool, "NOUSE" float )
diabetes type i and ii
SELECT * FROM table_train_96 WHERE diabetic = 'i' OR diabetic = 'ii'
CREATE TABLE table_77402 ( "Place" text, "Player" text, "Country" text, "Score" real, "To par" text )
What is the total number of Score, when Country is 'United States', and when Player is 'Lee Trevino'?
SELECT COUNT("Score") FROM table_77402 WHERE "Country" = 'united states' AND "Player" = 'lee trevino'
CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, ...
i would like to see the flights from BALTIMORE to PHILADELPHIA please
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 = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHIL...
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense...
mine old date and time.
SELECT Id, Score FROM Posts WHERE Score >= 10 AND (Title LIKE '%date%' OR Title LIKE '%Date%' OR Title LIKE '%time%' OR Title LIKE '%Time%') AND Tags LIKE '%python%' ORDER BY CreationDate DESC LIMIT 100
CREATE TABLE table_21198 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
What was the final score in game 15?
SELECT "Score" FROM table_21198 WHERE "Game" = '15'
CREATE TABLE repair ( repair_ID int, name text, Launch_Date text, Notes text ) CREATE TABLE repair_assignment ( technician_id int, repair_ID int, Machine_ID int ) CREATE TABLE machine ( Machine_ID int, Making_Year int, Class text, Team text, Machine_series text, val...
What are the names of the technicians and how many machines are they assigned to repair.
SELECT Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_id = T2.technician_id GROUP BY T2.Name
CREATE TABLE table_8761 ( "Rider" text, "Bike" text, "Laps" real, "Time" text, "Grid" real )
Which Grid has Laps smaller than 22, and a Bike of honda cbr1000rr, and a Rider of luca morelli?
SELECT MIN("Grid") FROM table_8761 WHERE "Laps" < '22' AND "Bike" = 'honda cbr1000rr' AND "Rider" = 'luca morelli'
CREATE TABLE table_name_54 ( number VARCHAR, acquisition_via VARCHAR, school_club_team VARCHAR )
What number has an acquisition via the Rookie Draft, and is part of a School/club team at Cal State Fullerton?
SELECT number FROM table_name_54 WHERE acquisition_via = "rookie draft" AND school_club_team = "cal state fullerton"
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE...
For all employees who have the letters D or S in their first name, a bar chart shows the distribution of hire_date and the average of manager_id bin hire_date by time.
SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
CREATE TABLE table_60066 ( "Club" text, "Head Coach" text, "City" text, "Stadium" text, "2003\u20132004 season" text )
What club does Manuel Fernandes coach?
SELECT "Club" FROM table_60066 WHERE "Head Coach" = 'manuel fernandes'
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE prescriptions ( ...
among the patients with age 30s , what was the top five prescribed drugs?
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 30 AND 39) GROUP BY prescriptions.drug) AS t1 WHERE t1.c1 <= 5
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate tim...
Get email MD5 hashes for StackExchange users.
SELECT Id, DisplayName, EmailHash FROM Users WHERE EmailHash = '5e7308ff7122df9ebbee7b52956a2ea3' LIMIT 50
CREATE TABLE d_labitems ( row_id number, itemid number, label 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_diagnoses ( row_id number, icd9_code text, ...
this year patient 16088 had undergone any venous cath nec procedure?
SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'venous cath nec') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 16088) AND DATETIME(procedures_...
CREATE TABLE table_73254 ( "Locale" text, "Skip" text, "W" real, "L" real, "PF" real, "PA" real, "Ends Won" real, "Ends Lost" real, "Blank Ends" real, "Stolen Ends" real, "Shot Pct." real )
What is the total of blank ends at Prince Edward Island?
SELECT MAX("Blank Ends") FROM table_73254 WHERE "Locale" = 'Prince Edward Island'
CREATE TABLE table_7829 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
What was the game result on November 29, 1959?
SELECT "Result" FROM table_7829 WHERE "Date" = 'november 29, 1959'
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25...
Give me a bar chart to compare the number of departments located in different cities, and rank in ascending by the x-axis.
SELECT CITY, COUNT(CITY) FROM locations GROUP BY CITY ORDER BY CITY
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 te...
provide the number of patients whose ethnicity is black/cape verdean and days of hospital stay is greater than 7?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND demographic.days_stay > "7"
CREATE TABLE table_50731 ( "BR No." text, "Lot No." real, "Date" real, "Built at" text, "Boiler type" text )
What year is the date when the boiler type is forward topfeed, the built at is Crewe, and lot number is less than 187?
SELECT COUNT("Date") FROM table_50731 WHERE "Boiler type" = 'forward topfeed' AND "Built at" = 'crewe' AND "Lot No." < '187'
CREATE TABLE table_25063 ( "Name" text, "#" real, "Position" text, "Height" text, "Weight" real, "Year" text, "Home Town" text, "High School" text )
How many height entries are there for players from bayside high school?
SELECT COUNT("Height") FROM table_25063 WHERE "High School" = 'Bayside'
CREATE TABLE table_204_796 ( id number, "network name" text, "flagship" text, "programming type" text, "owner" text, "affiliates" number )
who has the most number of affiliates ?
SELECT "network name" FROM table_204_796 ORDER BY "affiliates" DESC LIMIT 1
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 int ) CREATE TABLE music_festival ( ID int, Musi...
Return the number of music festivals of each category in a bar chart, and could you order x axis in descending order?
SELECT Category, COUNT(*) FROM music_festival GROUP BY Category ORDER BY Category DESC
CREATE TABLE table_name_63 ( player VARCHAR, to_par VARCHAR, country VARCHAR )
Which united states player had a To par of 12?
SELECT player FROM table_name_63 WHERE to_par = 12 AND country = "united states"
CREATE TABLE table_203_651 ( id number, "year" number, "competition" text, "venue" text, "position" text, "notes" text )
what are the number of times she came in 2nd position for the european championships ?
SELECT COUNT(*) FROM table_203_651 WHERE "position" = 2 AND "competition" = 'european championships'
CREATE TABLE table_33995 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text )
Which is the lowest round to have a pick of 12 and position of linebacker?
SELECT MIN("Round") FROM table_33995 WHERE "Pick #" = '12' AND "Position" = 'linebacker'
CREATE TABLE Documents_to_be_Destroyed ( Document_ID INTEGER, Destruction_Authorised_by_Employee_ID INTEGER, Destroyed_by_Employee_ID INTEGER, Planned_Destruction_Date DATETIME, Actual_Destruction_Date DATETIME, Other_Details VARCHAR(255) ) CREATE TABLE Employees ( Employee_ID INTEGER, ...
Show all calendar dates and bin by year in a line chart.
SELECT Calendar_Date, COUNT(Calendar_Date) FROM Ref_Calendar
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 procedures ( ...
count the number of patients whose gender is m and diagnoses short title is ath ext ntv art gngrene?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.short_title = "Ath ext ntv art gngrene"
CREATE TABLE table_12513 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Raiders points" real, "Opponents" real, "First Downs" real, "Record" text, "Streak" text, "Attendance" real )
What was the streak for the game after 8 on Nov 22?
SELECT "Streak" FROM table_12513 WHERE "Game" > '8' AND "Date" = 'nov 22'
CREATE TABLE table_203_102 ( id number, "event" text, "performance" text, "athlete" text, "nation" text, "place" text, "date" text )
how many records were set in beijing ?
SELECT COUNT(*) FROM table_203_102 WHERE "place" = 'beijing'
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost numb...
tell me the sex of patient 55027.
SELECT patients.gender FROM patients WHERE patients.subject_id = 55027
CREATE TABLE table_name_4 ( gold INTEGER, bronze VARCHAR, total VARCHAR, rank VARCHAR )
What nation won the fewest gold medals while being in Rank 1, with a total of 37 medals and more than 7 bronze medals?
SELECT MIN(gold) FROM table_name_4 WHERE total = 37 AND rank = "1" AND bronze > 7
CREATE TABLE table_203_691 ( id number, "week" number, "date" text, "opponent" text, "result" text, "attendance" number )
who would the next opponent be after week 4 ?
SELECT "opponent" FROM table_203_691 WHERE "week" = 4 + 1
CREATE TABLE book_club ( book_club_id int, Year int, Author_or_Editor text, Book_Title text, Publisher text, Category text, Result text ) CREATE TABLE culture_company ( Company_name text, Type text, Incorporated_in text, Group_Equity_Shareholding real, book_club_id text,...
Return a pie on how many books fall into each category?
SELECT Category, COUNT(*) FROM book_club GROUP BY Category
CREATE TABLE table_5596 ( "Date Released" text, "Institute" text, "Socialist" text, "Social Democratic" text, "Green-Communist" text, "Left Bloc" text, "People's Party" text, "Lead" text )
Name the lead with left bloc of 8.4%
SELECT "Lead" FROM table_5596 WHERE "Left Bloc" = '8.4%'
CREATE TABLE table_9840 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" real, "Record" text )
Who was the visitor on April 2?
SELECT "Visitor" FROM table_9840 WHERE "Date" = 'april 2'
CREATE TABLE table_name_22 ( college VARCHAR, player VARCHAR )
what college has paul seiler as a player?
SELECT college FROM table_name_22 WHERE player = "paul seiler"
CREATE TABLE table_name_57 ( issue_price__bu_ VARCHAR, _clarification_needed_ VARCHAR, mintage__proof_ VARCHAR )
What's listed as the Issue Price (BU) [Clarification Needed] with a Mintage (Proof) of 29,586?
SELECT issue_price__bu_ AS "_clarification_needed_" FROM table_name_57 WHERE mintage__proof_ = "29,586"
CREATE TABLE table_19995378_1 ( no_in_season VARCHAR, us_viewers__millions_ VARCHAR )
How many episodes with different series numbers were seen by 8.69 people in the US?
SELECT COUNT(no_in_season) FROM table_19995378_1 WHERE us_viewers__millions_ = "8.69"
CREATE TABLE table_name_88 ( bronze VARCHAR, gold VARCHAR, total VARCHAR )
How much Bronze has a Gold larger than 0, and a Total smaller than 1?
SELECT COUNT(bronze) FROM table_name_88 WHERE gold > 0 AND total < 1
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 prescription...
calculate the total number of patients who had radical neck dissection, unilateral
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Radical neck dissection, unilateral"
CREATE TABLE people ( People_ID int, Name text, Country text, Is_Male text, Age int ) CREATE TABLE wedding ( Church_ID int, Male_ID int, Female_ID int, Year int ) CREATE TABLE church ( Church_ID int, Name text, Organized_by text, Open_Date int, Continuation_of t...
Show all countries and the number of people from each country in a pie chart.
SELECT Country, COUNT(*) FROM people GROUP BY Country
CREATE TABLE domain_keyword ( did int, kid int ) CREATE TABLE cite ( cited int, citing int ) CREATE TABLE publication ( abstract varchar, cid int, citation_num int, jid int, pid int, reference_num int, title varchar, year int ) CREATE TABLE domain ( did int, na...
return me the paper in Databases area with the most citations .
SELECT publication.title FROM domain, domain_publication, publication WHERE domain.did = domain_publication.did AND domain.name = 'Databases' AND publication.pid = domain_publication.pid ORDER BY publication.citation_num DESC LIMIT 1
CREATE TABLE member ( member_id text, name text, nationality text, role text ) CREATE TABLE performance ( performance_id number, date text, host text, location text, attendance number ) CREATE TABLE member_attendance ( member_id number, performance_id number, num_of_pie...
List the names of members who did not attend any performance.
SELECT name FROM member WHERE NOT member_id IN (SELECT member_id FROM member_attendance)
CREATE TABLE table_13456 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the least total number of medals when the bronze medals is 1, and Czech Republic (CZE) is the nation?
SELECT MIN("Total") FROM table_13456 WHERE "Bronze" = '1' AND "Nation" = 'czech republic (cze)'
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, Last...
Posts per day versus total badges earned.
SELECT DATE(p.CreationDate) AS PostDate, COUNT(p.Id) AS Posts, (SELECT COUNT(b.Id) / 100 FROM Badges AS b WHERE b.UserId = u.Id AND b.Date <= DATE(p.CreationDate)) AS BadgesEarned FROM Posts AS p, Users AS u WHERE u.Id = @UserId AND p.OwnerUserId = u.Id GROUP BY DATE(p.CreationDate), u.Id ORDER BY DATE(p.CreationDate)
CREATE TABLE table_32303 ( "Round" real, "Overall" real, "Player" text, "Position" text, "College" text )
How many rounds have an Overall larger than 17, and a Position of quarterback?
SELECT COUNT("Round") FROM table_32303 WHERE "Overall" > '17' AND "Position" = 'quarterback'
CREATE TABLE complaints ( complaint_id number, product_id number, customer_id number, complaint_outcome_code text, complaint_status_code text, complaint_type_code text, date_complaint_raised time, date_complaint_closed time, staff_id number ) CREATE TABLE customers ( customer_id...
What are the emails and phone numbers of custoemrs who have never filed a complaint?
SELECT email_address, phone_number FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM complaints)
CREATE TABLE table_66438 ( "Date" text, "Tournament" text, "Surface" text, "Partnering" text, "Opponents in the final" text, "Score" text )
Which Surface has a score of 7-5, 5-7, 6-3?
SELECT "Surface" FROM table_66438 WHERE "Score" = '7-5, 5-7, 6-3'
CREATE TABLE table_64276 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text )
Which round did the bout that led to a 1-0 record end in?
SELECT "Round" FROM table_64276 WHERE "Record" = '1-0'
CREATE TABLE table_27260 ( "Season" real, "Series" text, "Team" text, "Races" real, "Wins" real, "Poles" real, "F.L." real, "Podiums" real, "Points" text, "Position" text )
what were his points when he was in 8th position?
SELECT "Points" FROM table_27260 WHERE "Position" = '8th'
CREATE TABLE products ( product_id text, product_name text, product_price number, product_description text, other_product_service_details text ) CREATE TABLE customers ( customer_id text, address_id number, customer_name text, customer_phone text, customer_email_address text, ...
Give me the descriptions of the service types that cost more than 100.
SELECT T1.service_type_description FROM ref_service_types AS T1 JOIN services AS T2 ON T1.service_type_code = T2.service_type_code WHERE T2.product_price > 100
CREATE TABLE table_18140 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Results" text, "Candidates" text )
Who is the incumbent of Florida 9?
SELECT "Incumbent" FROM table_18140 WHERE "District" = 'Florida 9'
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 t...
provide the number of patients whose diagnoses icd9 code is v4511 and lab test fluid is other body fluid?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "V4511" AND lab.fluid = "Other Body Fluid"
CREATE TABLE table_name_85 ( record VARCHAR, score VARCHAR )
What was the record when the score was 11-10?
SELECT record FROM table_name_85 WHERE score = "11-10"
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, ...
find the number of medicaid patients who had transplant from live non-related donor.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Medicaid" AND procedures.long_title = "Transplant from live non-related donor"
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
how many patients have a diagnosis of malignant neoplastic bladder nec along with joint fluid lab test done?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Malig neo bladder NEC" AND lab.fluid = "Joint Fluid"
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, ...
give the number of patients of hispanic/latino-puerto rican ethnicity who were admitted as newborn.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "NEWBORN" AND demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN"
CREATE TABLE table_204_445 ( id number, "year" number, "competition" text, "venue" text, "position" text, "notes" text )
what was the top position in which he finished ?
SELECT MIN("position") FROM table_204_445
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 PostFeedback ( Id number, PostId number, IsAnonymous...
Rank in Germany based on reputation.
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Views, AccountId, Age, UpVotes, DownVotes FROM Users WHERE LOWER(Location) LIKE LOWER('%Germany%') AND Reputation >= 578 ORDER BY Reputation
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 procedures ( ...
what is the number of patients with a diagnoses of diaphragmatic hernia without mention of obstruction or gangrene who had urine lab test?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Diaphragmatic hernia without mention of obstruction or gangrene" AND lab.fluid = "Urine"
CREATE TABLE table_17287 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
How many times is the score 98 90?
SELECT COUNT("Location Attendance") FROM table_17287 WHERE "Score" = '98–90'
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 airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE time_int...
show the flights from PITTSBURGH to SAN FRANCISCO again on monday
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, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND date_day.day_number = 21 AND date_day.month_number = 2...
CREATE TABLE table_name_51 ( gdp_2012_millions_of_euro VARCHAR, population_in_millions VARCHAR, gdp__nominal__per_capita_2012_euro VARCHAR )
What is GDP 2012 Millions of Euro, when Population in Millions is less than 1.3, and when GDP (Nominal) Per Capita 2012 Euro is 20,700(p)?
SELECT gdp_2012_millions_of_euro FROM table_name_51 WHERE population_in_millions < 1.3 AND gdp__nominal__per_capita_2012_euro = "20,700(p)"
CREATE TABLE table_6340 ( "Name" text, "Circuit" text, "Date" text, "Winning driver" text, "Winning constructor" text, "Report" text )
Who is Winning driver on 18 may?
SELECT "Winning driver" FROM table_6340 WHERE "Date" = '18 may'
CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zone_code varchar, minimum_connect_time int ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE airline ( airline_co...
find me the cheapest one way fare i can get from BOSTON to DENVER
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_...
CREATE TABLE table_train_214 ( "id" int, "gender" string, "lead_ecg" bool, "systolic_blood_pressure_sbp" int, "qt_interval" bool, "urine_dipstick_protein" int, "stroke" bool, "transient_ischemic_attack" bool, "qtc" int, "long_qt_syndrome" bool, "cardiovascular_disease" bool, ...
mean triplicate 12 _ lead ecg demonstrating qt interval ( corrected ) ( qtc ) > 450 msec in male and > 470 msec in female at the screening visit
SELECT * FROM table_train_214 WHERE lead_ecg = 1 OR (qt_interval = 1 OR (gender = 'male' AND qtc > 450) OR (gender = 'female' AND qtc > 470))
CREATE TABLE table_name_67 ( class VARCHAR, pos VARCHAR, year VARCHAR )
Name the class for 4th position with year before 2006
SELECT class FROM table_name_67 WHERE pos = "4th" AND year < 2006
CREATE TABLE inst ( instid number, name text, country text ) CREATE TABLE papers ( paperid number, title text ) CREATE TABLE authorship ( authid number, instid number, paperid number, authorder number ) CREATE TABLE authors ( authid number, lname text, fname text )
Retrieve the country that has published the most papers.
SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE table_203_784 ( id number, "no. in\nseries" number, "no. in\nseason" number, "performer" text, "appearance" text, "air date" text )
how many performers appeared on the air date 21 january 2011 ?
SELECT COUNT("performer") FROM table_203_784 WHERE "air date" = '21 january 2011'
CREATE TABLE table_30058355_7 ( fri_26_aug VARCHAR, wed_24_aug VARCHAR )
What is every entry for Friday August 26 when the entry for Wednesday August 24 is 23' 52.67 94.807mph?
SELECT fri_26_aug FROM table_30058355_7 WHERE wed_24_aug = "23' 52.67 94.807mph"
CREATE TABLE table_57166 ( "Round" real, "Grand Prix" text, "Date" text, "Location" text, "Pole Position" text, "Fastest Lap" text, "Winning Driver" text, "Winning Constructor" text, "Report" text )
Who is the winner constructor with driver riccardo patrese?
SELECT "Winning Constructor" FROM table_57166 WHERE "Winning Driver" = 'riccardo patrese'
CREATE TABLE table_name_66 ( interview INTEGER, swimsuit VARCHAR, average VARCHAR )
What was the highest Interview score from a contestant who had a swimsuit score of 8.857 and an Average score over 9.097?
SELECT MAX(interview) FROM table_name_66 WHERE swimsuit = 8.857 AND average > 9.097
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, LastEditorDispl...
Number of users authored at least one post.
SELECT COUNT(DISTINCT OwnerUserId) FROM Posts
CREATE TABLE table_name_21 ( ties INTEGER, games_played VARCHAR, wins VARCHAR, goals_against VARCHAR )
For teams with fewer than 5 wins, goals against over 37, and fewer than 8 games played, what is the average number of ties?
SELECT AVG(ties) FROM table_name_21 WHERE wins < 5 AND goals_against > 37 AND games_played < 8
CREATE TABLE table_46722 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
What team has a Record of 50 28?
SELECT "Team" FROM table_46722 WHERE "Record" = '50–28'
CREATE TABLE table_58810 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
Who was the away team on 30 January 1988, when the home team was Everton?
SELECT "Away team" FROM table_58810 WHERE "Home team" = 'everton' AND "Date" = '30 january 1988'
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, d...
what is the price of a diagnosis for uterine leiomyoma nos?
SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'diagnoses_icd' AND cost.event_id IN (SELECT diagnoses_icd.row_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'uterine leiomyoma nos'))
CREATE TABLE table_12369913_1 ( result VARCHAR, original_title VARCHAR )
How many results are there with the original title of ani ohev otach roza ( )?
SELECT COUNT(result) FROM table_12369913_1 WHERE original_title = "Ani Ohev Otach Roza (אני אוהב אותך רוזה)"
CREATE TABLE table_63986 ( "Team #1" text, "Agg." text, "Team #2" text, "1st leg" text, "2nd leg" text )
What was the first leg score of the matchup with a 2nd leg of 80-70?
SELECT "1st leg" FROM table_63986 WHERE "2nd leg" = '80-70'
CREATE TABLE table_name_35 ( report VARCHAR, away_team VARCHAR )
What's the report about townsville crocodiles as an away team?
SELECT report FROM table_name_35 WHERE away_team = "townsville crocodiles"
CREATE TABLE table_2897457_2 ( pick__number VARCHAR, player VARCHAR )
How many draft picks is player byron dafoe?
SELECT COUNT(pick__number) FROM table_2897457_2 WHERE player = "Byron Dafoe"
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE swimme...
Find the names of stadiums that some Australian swimmers have been to, and count them by a pie chart
SELECT T4.Name, COUNT(T4.Name) FROM swimmer AS t1 JOIN record AS t2 ON t1.ID = t2.Swimmer_ID JOIN event AS t3 ON t2.Event_ID = t3.ID JOIN stadium AS t4 ON t4.ID = t3.Stadium_ID WHERE t1.Nationality = 'Australia' GROUP BY T4.Name
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, ...
tell me the top three diagnosis that has the highest two year mortality rate?
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t4.icd9_code FROM (SELECT t3.icd9_code, DENSE_RANK() OVER (ORDER BY t3.c1 DESC) AS c2 FROM (SELECT t2.icd9_code, 100 - SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t2.chartt...
CREATE TABLE table_name_5 ( tournament VARCHAR, location VARCHAR )
What tournament was located in Colorado?
SELECT tournament FROM table_name_5 WHERE location = "colorado"
CREATE TABLE table_41898 ( "Ballarat FL" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real )
What is the smallest losses when the wins are 5 and the against less than 1852?
SELECT MIN("Losses") FROM table_41898 WHERE "Wins" = '5' AND "Against" < '1852'
CREATE TABLE table_5335 ( "Specification" text, "Gender" text, "Junior High School (12\u201315 yrs)" text, "Senior High School (15\u201318 yrs)" text, "University students and Adults (18yrs+)" text )
What value for university students and adult goes with male gender for minimum weight?
SELECT "University students and Adults (18yrs+)" FROM table_5335 WHERE "Gender" = 'male' AND "Specification" = 'minimum weight'
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
Of all the teachers , which one teaches PEDDENT 599 ?
SELECT DISTINCT instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'PEDDENT' AND course.number = 599 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offerin...