table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
⌀
CREATE TABLE table_10823 ( "Year" real, "Artist" text, "Mintage (Proof)" text, "Issue Price (Proof)" text, "Mintage (BU)[ clarification needed ]" text, "Issue Price (BU)[ clarification needed ]" text )
Who is the Artist with an Issue Price (BU) [Clarification Needed] of n/a along with a Year larger than 2004, and Mintage (Proof) of 25,000?
SELECT "Artist" FROM table_10823 WHERE "Issue Price (BU)[ clarification needed ]" = 'n/a' AND "Year" > '2004' AND "Mintage (Proof)" = '25,000'
CREATE TABLE table_2562572_2 ( population__2002_ VARCHAR, population__2011_ VARCHAR )
What is the number of 2002 populations having a 2011 population of exactly 5399?
SELECT COUNT(population__2002_) FROM table_2562572_2 WHERE population__2011_ = 5399
CREATE TABLE table_76483 ( "Model" text, "Sensor Size" text, "Resolution" text, "Active Pixels" text, "Display" text )
Which model has a sensor sized 48x36 mm, pixels of 6726 x 5040, and a 33 mp resolution?
SELECT "Model" FROM table_76483 WHERE "Sensor Size" = '48x36 mm' AND "Active Pixels" = '6726 x 5040' AND "Resolution" = '33 mp'
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) 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, h...
what diagnosis did patient 54825 receive during their last hospital visit for the last time?
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT diagnoses_icd.icd9_code FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 54825 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime D...
CREATE TABLE table_name_43 ( country VARCHAR, player VARCHAR )
What country has david toms as the player?
SELECT country FROM table_name_43 WHERE player = "david toms"
CREATE TABLE table_24825 ( "Institution" text, "Location" text, "Enrollment" text, "Athletic nickname" text, "School Colors" text, "Founded" real )
For the location of quezon city , metro manila what is the athletic nickname?
SELECT "Athletic nickname" FROM table_24825 WHERE "Location" = 'Quezon City , Metro Manila'
CREATE TABLE table_name_74 ( byes VARCHAR, draws INTEGER )
What's the total byes for more than 1 draw?
SELECT COUNT(byes) FROM table_name_74 WHERE draws > 1
CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, ...
yes i'd like a flight from LONG BEACH to ST. LOUIS by way of DALLAS
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ST. LOUIS' AND CITY_2....
CREATE TABLE table_13745 ( "Year" real, "Title" text, "Director" text, "Studio(s)" text, "Notes" text )
What is the Year of Rio?
SELECT "Year" FROM table_13745 WHERE "Title" = 'rio'
CREATE TABLE table_name_75 ( tournament VARCHAR )
Which tournament had a 1994 finish of RR and 1996 and 1998 finishes of A?
SELECT tournament FROM table_name_75 WHERE 1996 = "a" AND 1998 = "a" AND 1994 = "rr"
CREATE TABLE table_203_13 ( id number, "year" number, "champion" text, "score" text, "runner-up" text, "coach" text )
how many times did boston college score more than 7 points in a game ?
SELECT COUNT(*) FROM table_203_13 WHERE "score" > 7 AND "champion" = 'boston college'
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of job_id and salary .
SELECT JOB_ID, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200)
CREATE TABLE table_5557 ( "Number" real, "Builder" text, "Type" text, "Date" real, "Works number" real )
Which Date has a Builder of alco schenectady, and a Number larger than 835, and Works number of 56566?
SELECT AVG("Date") FROM table_5557 WHERE "Builder" = 'alco schenectady' AND "Number" > '835' AND "Works number" = '56566'
CREATE TABLE EMPLOYEE ( EMP_NUM int, EMP_LNAME varchar(15), EMP_FNAME varchar(12), EMP_INITIAL varchar(1), EMP_JOBCODE varchar(5), EMP_HIREDATE datetime, EMP_DOB datetime ) CREATE TABLE DEPARTMENT ( DEPT_CODE varchar(10), DEPT_NAME varchar(30), SCHOOL_CODE varchar(8), EMP_NU...
List the first name of all employees with job code PROF ordered by their date of birth, and count them by a bar chart
SELECT EMP_FNAME, COUNT(EMP_FNAME) FROM EMPLOYEE WHERE EMP_JOBCODE = 'PROF' GROUP BY EMP_FNAME ORDER BY EMP_DOB
CREATE TABLE table_66071 ( "Game" text, "Date" text, "Opponent" text, "Result" text, "Record" text )
What is the record for Game 8?
SELECT "Record" FROM table_66071 WHERE "Game" = '8'
CREATE TABLE table_35636 ( "Date" text, "City" text, "Opponent" text, "Results\u00b9" text, "Type of game" text )
What were the results on September 7?
SELECT "Results\u00b9" FROM table_35636 WHERE "Date" = 'september 7'
CREATE TABLE table_5343 ( "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
Gold larger than 0, and a Bronze larger than 1 includes what total number of silver?
SELECT COUNT("Silver") FROM table_5343 WHERE "Gold" > '0' AND "Bronze" > '1'
CREATE TABLE table_name_9 ( score VARCHAR, opponent VARCHAR )
What is Score, when Opponent is '@ New York Knicks'?
SELECT score FROM table_name_9 WHERE opponent = "@ new york knicks"
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid num...
how much of a difference has patient 015-7988 made in its potassium levels last measured on the last hospital visit compared to the first value measured on the last hospital visit?
SELECT (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-7988' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospit...
CREATE TABLE table_name_60 ( Id VARCHAR )
What is the 1989 result of the tournament in which Katerina Maleeva finished 4r in 1991?
SELECT 1989 FROM table_name_60 WHERE 1991 = "4r"
CREATE TABLE table_34320 ( "Date" text, "Episode" real, "Performer 1" text, "Performer 2" text, "Performer 3" text, "Performer 4" text )
What is the total number of episodes where jim sweeney was the 1st performer and steve steen was the 2nd performer?
SELECT COUNT("Episode") FROM table_34320 WHERE "Performer 1" = 'jim sweeney' AND "Performer 2" = 'steve steen'
CREATE TABLE table_52746 ( "Date" text, "Visiting Team" text, "Final Score" text, "Host Team" text, "Stadium" text )
What was the final score in the game against the Cincinnati Bengals?
SELECT "Final Score" FROM table_52746 WHERE "Visiting Team" = 'cincinnati bengals'
CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostLinks ( Id num...
Historical question grades by week.
SELECT COUNT(Id) FROM Users
CREATE TABLE table_10102 ( "Venue" text, "Hosted" real, "Average" real, "Highest" real, "Lowest" real, "Total" real, "Last Year" text, "Up/Down" text )
What is the smallest hosted when the average is less than 35,208 and total is greater than 593,202?
SELECT MIN("Hosted") FROM table_10102 WHERE "Average" < '35,208' AND "Total" > '593,202'
CREATE TABLE table_9313 ( "Player" text, "Team" text, "Matches" real, "Innings" real, "Runs" real, "Average" real, "Highest Score" text, "100s" real )
What is the largest number of innings with less than 342 runs and more than 4 matches?
SELECT MAX("Innings") FROM table_9313 WHERE "Runs" < '342' AND "Matches" > '4'
CREATE TABLE table_17070 ( "Player" text, "Position" text, "School" text, "Hometown" text, "College" text )
WHAT IS THE HOMETOWN OF TONY STEWARD?
SELECT "Hometown" FROM table_17070 WHERE "Player" = 'Tony Steward'
CREATE TABLE table_1616608_2 ( game_modes VARCHAR, pinyin VARCHAR )
What game modes are there when the pinyin is zh g n y b ?
SELECT game_modes FROM table_1616608_2 WHERE pinyin = "Zhígǎn Yī Bǐ"
CREATE TABLE table_79316 ( "Rank" real, "Heat" real, "Lane" real, "Nationality" text, "Time" text )
Can you tell me the Time that has the Heat of 1, and the Lane of 2?
SELECT "Time" FROM table_79316 WHERE "Heat" = '1' AND "Lane" = '2'
CREATE TABLE table_11734041_11 ( position VARCHAR, school_club_team_country VARCHAR )
What is the position of the player that came from the school/club team/country of Purdue?
SELECT position FROM table_11734041_11 WHERE school_club_team_country = "Purdue"
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_s...
what is the distance from LAX airport to LOS ANGELES
SELECT DISTINCT airport_service.miles_distant FROM airport, airport_service, city WHERE airport.airport_code = 'LAX' AND airport.airport_code = airport_service.airport_code AND city.city_code = airport_service.city_code AND city.city_name = 'LOS ANGELES'
CREATE TABLE table_name_82 ( role VARCHAR, tournament VARCHAR )
What is the Role in the 1st Division Honduras Tournament?
SELECT role FROM table_name_82 WHERE tournament = "1st division honduras"
CREATE TABLE table_16059 ( "Round" real, "Choice" real, "Overall" real, "Player name" text, "Position" text, "College" text )
Which overall pick was traded to the Cleveland Browns?
SELECT "Overall" FROM table_16059 WHERE "College" = 'Traded to the Cleveland Browns'
CREATE TABLE Customer ( CustomerId integer, FirstName varchar(40), LastName varchar(20), Company varchar(80), Address varchar(70), City varchar(40), State varchar(40), Country varchar(40), PostalCode varchar(10), Phone varchar(24), Fax varchar(24), Email varchar(60), ...
What are the number of the invoice dates for customers with the first name Astrid and the last name Gruber?, and I want to show by the total number from low to high please.
SELECT InvoiceDate, COUNT(InvoiceDate) FROM Customer AS T1 JOIN Invoice AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.FirstName = "Astrid" AND LastName = "Gruber" ORDER BY COUNT(InvoiceDate)
CREATE TABLE table_name_34 ( national_university_of_ireland VARCHAR, agricultural_panel VARCHAR, labour_panel VARCHAR )
I want to know the total number of national university of ireland with agricultural panel of 0 and labour panel more than 0
SELECT COUNT(national_university_of_ireland) FROM table_name_34 WHERE agricultural_panel = 0 AND labour_panel > 0
CREATE TABLE table_41630 ( "Rank" real, "Location" text, "Total Passengers" real, "Annual change" text, "Capacity in use" text )
What is the average rank of the airport in S o Paulo with passengers totaling less than 18,795,596?
SELECT AVG("Rank") FROM table_41630 WHERE "Location" = 'são paulo' AND "Total Passengers" < '18,795,596'
CREATE TABLE table_19624708_1 ( handicap__st_lb_ VARCHAR, horse VARCHAR )
Which handicap has the horse knowhere?
SELECT handicap__st_lb_ FROM table_19624708_1 WHERE horse = "Knowhere"
CREATE TABLE table_67384 ( "Position" text, "Number" real, "Name" text, "Class" text, "Injury (Status)" text, "Last Update" text )
for the position of rb what is the name?
SELECT "Name" FROM table_67384 WHERE "Position" = 'rb'
CREATE TABLE table_60447 ( "Year" real, "Delegate" text, "Hometown" text, "Placement in Miss Universe" text, "Other awards" text )
What kind of Placement in Miss Universe that rosita cornell capuyon is in?
SELECT "Placement in Miss Universe" FROM table_60447 WHERE "Delegate" = 'rosita cornell capuyon'
CREATE TABLE table_70971 ( "Year" text, "Venue" text, "Winners" text, "Runner-up" text, "3rd place" text )
Who was the runner-up in 1980 at the Pocking venue?
SELECT "Runner-up" FROM table_70971 WHERE "Venue" = 'pocking' AND "Year" = '1980'
CREATE TABLE table_1467 ( "C/W 15+" real, "Oblast\\Age" text, "15 to 17" real, "18 to 19" real, "20 to 24" real, "25 to 29" real, "30 to 34" real, "35 to 39" real, "40 to 44" real, "45 to 49" real, "50 to 54" real, "55 to 59" real, "60 to 64" real, "65 to 69" real...
If oblast\age is Komis in Nenetskiy Ao, what is the total number of 65 to 69?
SELECT COUNT("65 to 69") FROM table_1467 WHERE "Oblast\\Age" = 'Komis in Nenetskiy AO'
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 )
For those records from the products and each product's manufacturer, find name and code , and group by attribute name, and visualize them by a bar chart, and sort from low to high by the Code.
SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Code
CREATE TABLE table_47750 ( "Elector" text, "Nationality" text, "Order and title" text, "Elevated" text, "Elevator" text )
When Giovanni Gaetano Orsini was the elector who was the elevator?
SELECT "Elevator" FROM table_47750 WHERE "Elector" = 'giovanni gaetano orsini'
CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE offering_instructor ( ...
Does every upper-level class have exams ?
SELECT COUNT(*) = 0 FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.has_exams = 'N' AND program_course.category LIKE '%ULCS%'
CREATE TABLE table_203_721 ( id number, "school" text, "location" text, "control" text, "type" text, "enrollment" number, "founded" number )
what is the total number of schools listed in the table ?
SELECT COUNT("school") FROM table_203_721
CREATE TABLE table_12323 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
What did the United States score in the T5?
SELECT "Score" FROM table_12323 WHERE "Country" = 'united states' AND "Place" = 't5'
CREATE TABLE table_28003469_1 ( approx_duration VARCHAR, event_details VARCHAR )
What is every value for approximate duration when event details is women's foil?
SELECT approx_duration FROM table_28003469_1 WHERE event_details = "Women's Foil"
CREATE TABLE table_203_834 ( id number, "rank" number, "census subdivision" text, "province" text, "type" text, "land area\n(km2, 2011)" number, "population 2011" number, "population 2006" number, "population 2001" number, "population 1996" number, "change in % 2006-2011" num...
were there more or less people living in ottawa than in vancouver in 2011 ?
SELECT (SELECT "population 2011" FROM table_203_834 WHERE "census subdivision" = 'ottawa') > (SELECT "population 2011" FROM table_203_834 WHERE "census subdivision" = 'vancouver')
CREATE TABLE table_17675675_2 ( tries_against VARCHAR, club VARCHAR )
For club Swansea Uplands RFC, what is the amount of tries against?
SELECT tries_against FROM table_17675675_2 WHERE club = "Swansea Uplands RFC"
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConce...
extract the top posts from the stackoverflow data.
SELECT Title, Tags FROM Posts WHERE NOT Posts.Title IS NULL LIMIT 100
CREATE TABLE table_56594 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
what's the highest lap that contains the driver of graham hill and a grid that is larger than 18?
SELECT MAX("Laps") FROM table_56594 WHERE "Driver" = 'graham hill' AND "Grid" > '18'
CREATE TABLE table_name_98 ( date VARCHAR, attendance VARCHAR )
On what date was the attendance 24,976?
SELECT date FROM table_name_98 WHERE attendance = "24,976"
CREATE TABLE table_name_93 ( born___died VARCHAR, connection_with_australia VARCHAR )
What is the Born Died for the person whose family moved to Australia at age 6?
SELECT born___died FROM table_name_93 WHERE connection_with_australia = "family moved to australia at age 6"
CREATE TABLE table_54747 ( "Father" text, "Birth" text, "Marriage" text, "Became Queen" text, "Ceased to be Queen" text, "Death" text, "Spouse" text )
What is the birth date of the person who died on 18 October 1335?
SELECT "Birth" FROM table_54747 WHERE "Death" = '18 october 1335'
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId...
Inactive Question above than 6 month.
SELECT * FROM Posts WHERE Id = 25279607
CREATE TABLE table_name_16 ( year VARCHAR, finish VARCHAR )
What year did the finish of 15 happen in?
SELECT year FROM table_name_16 WHERE finish = "15"
CREATE TABLE table_name_28 ( lost INTEGER, points VARCHAR, played VARCHAR )
What is the average for games Lost where the Points are 25 and games Played are more than 18?
SELECT AVG(lost) FROM table_name_28 WHERE points = 25 AND played > 18
CREATE TABLE table_name_75 ( wins INTEGER, rank VARCHAR, played VARCHAR )
What is the highest Wins, when Rank is greater than 2, and when Played is less than 5?
SELECT MAX(wins) FROM table_name_75 WHERE rank > 2 AND played < 5
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
how many patients whose procedure long title is angiocardiography of right heart structures and lab test fluid is blood?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Angiocardiography of right heart structures" AND lab.fluid = "Blood"
CREATE TABLE table_16894 ( "Name" text, "Number" text, "Builder" text, "Date built" text, "Wheel arrangement" text, "Driving wheels" text, "Cylinders" text, "Boiler pressure" text, "Notes" text )
Which locomotives 12' x 17' are both ex-industrial and built by Manning Wardle?
SELECT "Name" FROM table_16894 WHERE "Notes" = 'Ex-industrial' AND "Builder" = 'Manning Wardle'
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit ...
count the number of drugs that have been prescribed patient 61751 in 2105.
SELECT COUNT(*) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 61751) AND STRFTIME('%y', prescriptions.startdate) = '2105'
CREATE TABLE table_1342292_42 ( candidates VARCHAR, incumbent VARCHAR )
Who are all the candidates when Sam Rayburn was incumbent?
SELECT candidates FROM table_1342292_42 WHERE incumbent = "Sam Rayburn"
CREATE TABLE table_30919 ( "No. overall" real, "No. for series" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "UK viewers (million)" text )
What was the airdate of the episode with a UK viewership of 6.02 million?
SELECT "Original air date" FROM table_30919 WHERE "UK viewers (million)" = '6.02'
CREATE TABLE table_name_8 ( deleted VARCHAR, name VARCHAR )
What site in the RCA Del Caribe was deleted?
SELECT deleted FROM table_name_8 WHERE name = "rca del caribe"
CREATE TABLE table_203_747 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
what is the difference between the total amount of medals won by qatar and indonesia ?
SELECT ABS((SELECT "total" FROM table_203_747 WHERE "nation" = 'qatar') - (SELECT "total" FROM table_203_747 WHERE "nation" = 'indonesia'))
CREATE TABLE conference ( cid int, homepage varchar, name varchar ) CREATE TABLE domain_author ( aid int, did int ) CREATE TABLE publication ( abstract varchar, cid int, citation_num int, jid int, pid int, reference_num int, title varchar, year int ) CREATE TABLE d...
return me all the researchers in ' University of Michigan ' .
SELECT author.name FROM author, organization WHERE organization.name = 'University of Michigan' AND organization.oid = author.oid
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, ...
how many patients whose admission year is less than 2197 and lab test fluid is other body fluid?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2197" AND lab.fluid = "Other Body Fluid"
CREATE TABLE table_25264 ( "Week #" text, "Theme" text, "Song choice" text, "Original artist" text, "Order #" text, "Result" text )
If Crazy In Love is the song choice, what is the theme?
SELECT "Theme" FROM table_25264 WHERE "Song choice" = 'Crazy In Love'
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number...
Percent of Questions Accepted and Answered to Total Questions. This was written in an attempt to provide stats for this: http://www.reddit.com/r/Wordpress/comments/ljlsy/what_do_you_guys_think_of/ I'm not 100% sure this is correct, but I'm pretty sure it is close. Would love it if someone who knows the schema better ca...
SELECT Questions, Accepted, Answered, CAST(Questions - Answered AS INT) AS Unanswered, CAST(CAST(Accepted / Questions * 100 AS FLOAT(5, 1)) AS TEXT(5)) + '%' AS PercentAccepted, CAST(CAST(Answered / Questions * 100 AS FLOAT(5, 1)) AS TEXT(5)) + '%' AS PercentAnswered FROM (SELECT COUNT(*) * 1.0 AS Questions, SUM(CASE W...
CREATE TABLE track ( Track_ID int, Name text, Location text, Seating real, Year_Opened real ) CREATE TABLE race ( Race_ID int, Name text, Class text, Date text, Track_ID text )
Show the race class and number of races in each class in a pie chart.
SELECT Class, COUNT(*) FROM race GROUP BY Class
CREATE TABLE table_64461 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location/Attendance" text, "Record" text )
What was the score of the game at the Chicago Stadium?
SELECT "Score" FROM table_64461 WHERE "Location/Attendance" = 'chicago stadium'
CREATE TABLE table_name_37 ( player VARCHAR, score VARCHAR )
Who was the player with a score of 70-69=139?
SELECT player FROM table_name_37 WHERE score = 70 - 69 = 139
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, hospit...
since 6 years ago, when did patient 006-185446 last visit the hospital?
SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '006-185446' AND DATETIME(patient.hospitaladmittime) >= DATETIME(CURRENT_TIME(), '-6 year') ORDER BY patient.hospitaladmittime DESC LIMIT 1
CREATE TABLE table_name_79 ( hometown_school VARCHAR, team VARCHAR, pick VARCHAR, position VARCHAR )
What Hometown/School had a pick above 30, position of OF and team of Cleveland Indians?
SELECT hometown_school FROM table_name_79 WHERE pick > 30 AND position = "of" AND team = "cleveland indians"
CREATE TABLE table_test_23 ( "id" int, "previous_mi" bool, "anemia" bool, "left_ventricular_ejection_fraction_lvef" int, "tolerate_gadolinium_contrast_media" bool, "renal_disease" bool, "creatinine_clearance_cl" float, "estimated_glomerular_filtration_rate_egfr" int, "tolerate_magnet...
severe liver and / or kidney dysfunction
SELECT * FROM table_test_23 WHERE liver_disease = 1 OR kidney_disease = 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 prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
how many of the patients with icd9 code 5012 remained admitted in hospital for more than 27 days?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "27" AND procedures.icd9_code = "5012"
CREATE TABLE table_52015 ( "D 40 \u221a" text, "D 41 \u221a" text, "D 42 \u221a" text, "D 43 \u221a" text, "D 44 \u221a" text, "D 45 O" text, "D 46 O" text, "R 53 +" text, "R 52 +" text, "R 51 +" text )
Name the D 45 O which has R 51 + of d 30
SELECT "D 45 O" FROM table_52015 WHERE "R 51 +" = 'd 30'
CREATE TABLE table_65692 ( "School" text, "Location" text, "Mascot" text, "Enrollment" real, "IHSAA Class" text, "IHSAA Football Class" text, "County" text )
What is the IHSAA Football class at Culver?
SELECT "IHSAA Football Class" FROM table_65692 WHERE "Location" = 'culver'
CREATE TABLE table_203_345 ( id number, "name" text, "party" text, "took office" number, "left office" number )
who was the only liberal candidate to take office ?
SELECT "name" FROM table_203_345 WHERE "party" = 'liberal'
CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDa...
Questions closed as duplicate of unanswered question of different author.
SELECT * FROM PostHistoryTypes AS PHT JOIN PostHistory AS PH ON PHT.Id = PH.PostHistoryTypeId WHERE PostId = 13552
CREATE TABLE driver ( Driver_ID int, Name text, Party text, Home_city text, Age int ) CREATE TABLE school_bus ( School_ID int, Driver_ID int, Years_Working int, If_full_time bool ) CREATE TABLE school ( School_ID int, Grade text, School text, Location text, Type...
Please give me a pie chart to show the number of home cities of all drivers, I want to show by the y axis from high to low.
SELECT Home_city, COUNT(Home_city) FROM driver GROUP BY Home_city ORDER BY COUNT(Home_city) DESC
CREATE TABLE table_46246 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
What is the Record of the Chicago Black Hawks Home game with the New York Rangers and a Score of 3 2?
SELECT "Record" FROM table_46246 WHERE "Home" = 'chicago black hawks' AND "Visitor" = 'new york rangers' AND "Score" = '3–2'
CREATE TABLE table_21021796_1 ( valves INTEGER )
What is the greatest number of valves?
SELECT MIN(valves) FROM table_21021796_1
CREATE TABLE table_7269 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
What Country Scored 66-69=135?
SELECT "Country" FROM table_7269 WHERE "Score" = '66-69=135'
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ...
count the number of patients who were diagnosed with coronary artery disease - known and who didn't come back to the hospital within 2 months in this year.
SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'coronary artery disease - known' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(C...
CREATE TABLE table_name_1 ( points VARCHAR, year INTEGER )
What is the Focus that has a Year bigger than 1977?
SELECT points FROM table_name_1 WHERE year > 1977
CREATE TABLE table_77092 ( "Date" text, "Round" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real )
What round did the celtic played away on 24 february 1900?
SELECT "Round" FROM table_77092 WHERE "Opponent" = 'celtic' AND "Date" = '24 february 1900'
CREATE TABLE table_19624 ( "Explosion" text, "Location" text, "Date" text, "Yield (approximate)" text, "Altitude (km)" text, "Nation of Origin" text )
What explosion had an altitude of 539 km?
SELECT "Explosion" FROM table_19624 WHERE "Altitude (km)" = '539'
CREATE TABLE table_14724369_1 ( no_in_series VARCHAR, directed_by VARCHAR )
Which series numbers were directed by Monte Young?
SELECT no_in_series FROM table_14724369_1 WHERE directed_by = "Monte Young"
CREATE TABLE table_34853 ( "sSpec number" text, "Frequency" text, "L2 cache" text, "Mult." text, "Voltage" text, "Socket" text, "Release date" text, "Part number(s)" text, "Release price ( USD )" text )
Spec number of slj6d(b1)slj6f(b1) has what mult.?
SELECT "Mult." FROM table_34853 WHERE "sSpec number" = 'slj6d(b1)slj6f(b1)'
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 ( Scho...
Bar chart of acc_percent from each all neutral
SELECT All_Neutral, ACC_Percent FROM basketball_match
CREATE TABLE table_26034 ( "Pos" real, "No." real, "Driver" text, "Team" text, "Chassis/Engine" text, "Laps" real, "Time/Retired" text, "Grid" real, "Laps Led" real, "Points" real )
Which team uses lola t92/00/ buick for their chassis/engine?
SELECT "Team" FROM table_26034 WHERE "Chassis/Engine" = 'Lola T92/00/ Buick'
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
Among patients who had a lab test for urine, how many of them had coronary artery disease or coronary artery bypass graft with MVR maze as their primary disease?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT WITH MVR; ? MAZE" AND lab.fluid = "Urine"
CREATE TABLE trip ( id INTEGER, duration INTEGER, start_date TEXT, start_station_name TEXT, start_station_id INTEGER, end_date TEXT, end_station_name TEXT, end_station_id INTEGER, bike_id INTEGER, subscription_type TEXT, zip_code INTEGER ) CREATE TABLE station ( id INTEG...
In zip code 94107, on which day neither Fog nor Rain was not observed, and count them by a bar chart, and display y axis from low to high order.
SELECT date, COUNT(date) FROM weather WHERE zip_code = 94107 AND events <> "Fog" AND events <> "Rain" ORDER BY COUNT(date)
CREATE TABLE table_name_59 ( attendance VARCHAR, score VARCHAR )
What is the Attendance of the game with a Score of 3 2?
SELECT COUNT(attendance) FROM table_name_59 WHERE score = "3–2"
CREATE TABLE table_name_52 ( opponent VARCHAR, record VARCHAR, october VARCHAR, game VARCHAR )
What is the Opponent before October 31 with a Record of 2-3-1 after Game 5?
SELECT opponent FROM table_name_52 WHERE october < 31 AND game > 5 AND record = "2-3-1"
CREATE TABLE table_64559 ( "Game" text, "Date" text, "Opponent" text, "Score" text, "Location Attendance" text, "Record" text )
Who was the opponent for game 73?
SELECT "Opponent" FROM table_64559 WHERE "Game" = '73'
CREATE TABLE table_40858 ( "Season" text, "Round" text, "Country" text, "Opponent" text, "Result" text )
What was the result of the second round?
SELECT "Result" FROM table_40858 WHERE "Round" = 'second round'
CREATE TABLE table_name_29 ( heavy_attacks VARCHAR, luftflotte_2_sorties VARCHAR )
How many heavy attacks did the 450 Luftflotte 2 conduct?
SELECT COUNT(heavy_attacks) FROM table_name_29 WHERE luftflotte_2_sorties = 450
CREATE TABLE table_name_65 ( visitor VARCHAR, date VARCHAR )
Who was the visiting team on November 26, 2007?
SELECT visitor FROM table_name_65 WHERE date = "november 26, 2007"
CREATE TABLE table_204_95 ( id number, "name" text, "title" text, "first year\nin this position" number, "years at nebraska" text, "alma mater" text )
how many consecutive years did biff jones coach ?
SELECT "years at nebraska" - "years at nebraska" FROM table_204_95 WHERE "name" = 'biff jones'