answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT MIN(year) FROM table_name_41 WHERE seat_factor = "68%" AND flying_hours > 105 OFFSET 579
What was the earliest year that had more than 105,579 flying hours and a seat factor of 68%?
CREATE TABLE table_name_41 (year INTEGER, seat_factor VARCHAR, flying_hours VARCHAR)
SELECT "Overall place" FROM table_70393 WHERE "Yacht name" = 'lg flatron'
Which Overall place has a Yacht name of lg flatron?
CREATE TABLE table_70393 ( "Overall place" text, "Yacht name" text, "Skipper" text, "Points" text, "Combined elapsed time" text )
SELECT winning_driver FROM table_25773116_2 WHERE date = "April 11"
Who won the April 11 race?
CREATE TABLE table_25773116_2 (winning_driver VARCHAR, date VARCHAR)
SELECT player FROM table_name_98 WHERE club = "balmain tigers"
What player played for the Balmain Tigers?
CREATE TABLE table_name_98 (player VARCHAR, club VARCHAR)
SELECT MAX(total) FROM table_name_16 WHERE to_par = "+3"
What is the maximum total when the To par is +3?
CREATE TABLE table_name_16 ( total INTEGER, to_par VARCHAR )
SELECT location FROM table_25773116_2 WHERE pole_position = "Daniel Erickson" AND fastest_lap = "Cole Morgan"
Where was the race where Cole Morgan had the fastest lap and Daniel Erickson had pole position?
CREATE TABLE table_25773116_2 (location VARCHAR, pole_position VARCHAR, fastest_lap VARCHAR)
SELECT nationality FROM table_name_96 WHERE player = "darren lockyer" AND position = "five-eighth"
What was the nationality of five-eighth player Darren Lockyer?
CREATE TABLE table_name_96 (nationality VARCHAR, player VARCHAR, position VARCHAR)
SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Name DESC
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and price , and group by attribute name, display by the bar in desc.
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
SELECT COUNT(round) FROM table_25773116_2 WHERE date = "May 8"
How many rounds were played on May 8?
CREATE TABLE table_25773116_2 (round VARCHAR, date VARCHAR)
SELECT nationality FROM table_name_21 WHERE player = "greg inglis"
What nationality did Greg Inglis hold?
CREATE TABLE table_name_21 (nationality VARCHAR, player VARCHAR)
SELECT "Home team" FROM table_33255 WHERE "Venue" = 'windy hill'
What team plays at home at Windy Hill?
CREATE TABLE table_33255 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT pole_position FROM table_25773116_2 WHERE fastest_lap = "Victor Carbone" AND location = "Braselton, Georgia"
Who had pole position for the races in Braselton, Georgia where Victor Carbone had fastest lap?
CREATE TABLE table_25773116_2 (pole_position VARCHAR, fastest_lap VARCHAR, location VARCHAR)
SELECT location FROM table_name_40 WHERE year = 1998
Where was the match played in 1998?
CREATE TABLE table_name_40 (location VARCHAR, year VARCHAR)
SELECT title FROM table_1130632_1 WHERE us_viewers__million_ = "19.48"
What are the title that have 19.48 million u.s. viewers?
CREATE TABLE table_1130632_1 ( title VARCHAR, us_viewers__million_ VARCHAR )
SELECT location FROM table_25773116_2 WHERE winning_team = "Audette Racing"
Where did Audette Racing win?
CREATE TABLE table_25773116_2 (location VARCHAR, winning_team VARCHAR)
SELECT home_team AS score FROM table_name_62 WHERE home_team = "footscray"
What was Footscray's Home team score?
CREATE TABLE table_name_62 (home_team VARCHAR)
SELECT COUNT(*) > 0 FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8016)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [diastolic]' AND d_items.linksto = 'chartevents') AND chartevents.valuenum > 68.0 AND DATETIME(chartevents.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month')
in the last month, was patient 8016's arterial bp [diastolic] greater than 68.0?
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom 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 ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time )
SELECT director_s_ FROM table_25764073_3 WHERE writer_s_ = "Peter Gawler"
Name the directors for peter gawler
CREATE TABLE table_25764073_3 (director_s_ VARCHAR, writer_s_ VARCHAR)
SELECT away_team FROM table_name_54 WHERE home_team = "collingwood"
Who faced Collingwood as an away team?
CREATE TABLE table_name_54 (away_team VARCHAR, home_team VARCHAR)
SELECT "Home" FROM table_75922 WHERE "Opponent" = 'marek dupnitsa'
What is the home score with marek dupnitsa as opponent?
CREATE TABLE table_75922 ( "Season" text, "Competition" text, "Round" text, "Opponent" text, "Home" text, "Away" text )
SELECT MIN(episode__number) FROM table_25764073_3 WHERE writer_s_ = "Anne Brooksbank and Vicki Madden"
Name the least episode number for anne brooksbank and vicki madden
CREATE TABLE table_25764073_3 (episode__number INTEGER, writer_s_ VARCHAR)
SELECT SUM(points) FROM table_name_94 WHERE goal_difference = 8
How many total points belong to the team with a goal difference of 8?
CREATE TABLE table_name_94 (points INTEGER, goal_difference VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Medicaid" AND diagnoses.long_title = "Congestive heart failure, unspecified"
count the number of medicaid patients who have unspecified congestive heart failure diagnoses.
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE 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 text, admittime text, dischtime text, admityear text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text )
SELECT title FROM table_25764073_3 WHERE season__number = 35
Name the title for season number 35
CREATE TABLE table_25764073_3 (title VARCHAR, season__number VARCHAR)
SELECT k_league_classic FROM table_name_3 WHERE teams < 10
What K League classic had less than 10 teams?
CREATE TABLE table_name_3 (k_league_classic VARCHAR, teams INTEGER)
SELECT "State" FROM table_12476 WHERE "Royal house" = 'jiang'
Which state has a royal house of Jiang?
CREATE TABLE table_12476 ( "State" text, "Type" text, "Name" text, "Title" text, "Royal house" text, "From" text )
SELECT points_per_game FROM table_25774493_3 WHERE rebounds_per_game = "15.0"
What were the points per game in the selection where the rebounds per game were 15.0?
CREATE TABLE table_25774493_3 (points_per_game VARCHAR, rebounds_per_game VARCHAR)
SELECT SUM(teams) FROM table_name_48 WHERE season < 2008 AND k_league_classic = "runners-up" AND manager = "kim ho"
How many teams played before 2008, had a K League Classic of runners-up, and a Manager of kim ho?
CREATE TABLE table_name_48 (teams INTEGER, manager VARCHAR, season VARCHAR, k_league_classic VARCHAR)
SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'Artificial Neural Network' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid
Fetch me some papers on Artificial Neural Network
CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE dataset ( datasetid int, datasetname varchar ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE field ( fieldid int )
SELECT blocks_per_game FROM table_25774493_3 WHERE field_goal_percentage = ".594 (2nd)"
What were the blocks per game in the selection where the field goal percentage was .594 (2nd)?
CREATE TABLE table_25774493_3 (blocks_per_game VARCHAR, field_goal_percentage VARCHAR)
SELECT away_team AS score FROM table_name_8 WHERE venue = "junction oval"
What was the score of the away team at Junction Oval venue?
CREATE TABLE table_name_8 (away_team VARCHAR, venue VARCHAR)
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', prescriptions.startdate)) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 96833 AND admissions.dischtime IS NULL) AND prescriptions.drug = 'acetazolamide sodium' ORDER BY prescriptions.startdate LIMIT 1
how many hours have passed since the first time that patient 96833 was prescribed acetazolamide sodium during their current hospital visit?
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text )
SELECT name FROM table_25794010_1 WHERE company = "company D"
Name the name for company d
CREATE TABLE table_25794010_1 (name VARCHAR, company VARCHAR)
SELECT away_team FROM table_name_52 WHERE home_team = "collingwood"
When Collingwood was the home team who was the opposing away team?
CREATE TABLE table_name_52 (away_team VARCHAR, home_team VARCHAR)
SELECT DISTINCT advisory_requirement FROM course WHERE department = 'INSTHUM' AND number = 212
Are there any useful courses to take before taking INSTHUM 212 ?
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) 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_project varchar, has_final_exam varchar, textbook varchar, class_address varchar, allow_audit varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters int, num_enrolled int, has_discussion varchar, has_lab varchar, has_projects varchar, has_exams varchar, num_reviews int, clarity_score int, easiness_score int, helpfulness_score int ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_graduation_semester int, degree varchar, minor varchar, internship varchar ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, tough_tests int, heavy_papers int, cares_for_students int, heavy_assignments int, respected int, participation int, heavy_reading int, tough_grader int, hilarious int, would_take_again int, good_lecture int, no_skip int )
SELECT name FROM table_25794010_1 WHERE organization_date = "Unknown"
Name the name for organization date being unknown
CREATE TABLE table_25794010_1 (name VARCHAR, organization_date VARCHAR)
SELECT away_team AS score FROM table_name_35 WHERE venue = "junction oval"
What is the team score of the away team at Junction Oval?
CREATE TABLE table_name_35 (away_team VARCHAR, venue VARCHAR)
SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(EMPLOYEE_ID) DESC
For those employees who did not have any job in the past, give me the comparison about the sum of employee_id over the hire_date bin hire_date by weekday, list total number of employee id from high to low order.
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 regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) 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(4,0) )
SELECT name FROM table_25794010_1 WHERE county = "Desha"
Name the name for desha
CREATE TABLE table_25794010_1 (name VARCHAR, county VARCHAR)
SELECT home_team FROM table_name_93 WHERE venue = "lake oval"
What team is from Lake Oval?
CREATE TABLE table_name_93 (home_team VARCHAR, venue VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.icd9_code = "25040"
provide the number of patients whose death status is 1 and diagnoses icd9 code is 25040?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE 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 text, admittime text, dischtime text, admityear text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT company FROM table_25794010_1 WHERE county = "Desha"
Name the company for desha county
CREATE TABLE table_25794010_1 (company VARCHAR, county VARCHAR)
SELECT runner_up FROM table_name_81 WHERE winner = "ilhwa chunma"
Who is the runner-up for Ilhwa Chunma?
CREATE TABLE table_name_81 (runner_up VARCHAR, winner VARCHAR)
SELECT "venue" FROM table_204_813 ORDER BY "year" DESC LIMIT 1
where was the location of the last venue held ?
CREATE TABLE table_204_813 ( id number, "year" number, "competition" text, "venue" text, "position" text, "event" text, "notes" text )
SELECT writer_s_ FROM table_25800134_1 WHERE series__number = 56
Who wrote the episode with series number 56?
CREATE TABLE table_25800134_1 (writer_s_ VARCHAR, series__number VARCHAR)
SELECT MIN(crowd) FROM table_name_45 WHERE away_team = "collingwood"
What was the attendance when Collingwood was the away team?
CREATE TABLE table_name_45 (crowd INTEGER, away_team VARCHAR)
SELECT "Liberal ticket" FROM table_6924 WHERE "Free Libertarian ticket" = 'robert s. flanzer'
Robert S. Flanzer was the Free Libertarian ticket with who listed as the Liberal Ticket?
CREATE TABLE table_6924 ( "Office" text, "Democratic ticket" text, "Republican ticket" text, "Conservative ticket" text, "Liberal ticket" text, "Free Libertarian ticket" text, "Socialist Labor ticket" text )
SELECT MAX(series__number) FROM table_25800134_1 WHERE airdate = "February 16, 1957"
What is largest series number for the episode that aired February 16, 1957?
CREATE TABLE table_25800134_1 (series__number INTEGER, airdate VARCHAR)
SELECT SUM(crowd) FROM table_name_92 WHERE away_team = "hawthorn"
What was the attendance of the Hawthorn as the away team?
CREATE TABLE table_name_92 (crowd INTEGER, away_team VARCHAR)
SELECT "Rank" FROM table_67019 WHERE "Games" = '426'
What is the rank that shows 426 games?
CREATE TABLE table_67019 ( "Rank" text, "Games" text, "Player" text, "Club" text, "Career span" text )
SELECT director FROM table_25800134_1 WHERE airdate = "December 15, 1956"
Who directed the episodes that aired December 15, 1956?
CREATE TABLE table_25800134_1 (director VARCHAR, airdate VARCHAR)
SELECT venue FROM table_name_43 WHERE home_team = "richmond"
Where did Richmond play as the home team?
CREATE TABLE table_name_43 (venue VARCHAR, home_team VARCHAR)
SELECT directed_by FROM table_27776266_1 WHERE us_viewers__million_ = "14.11"
Who directed the episode with an audience of 14.11 million?
CREATE TABLE table_27776266_1 ( directed_by VARCHAR, us_viewers__million_ VARCHAR )
SELECT writer_s_ FROM table_25800134_1 WHERE airdate = "December 1, 1956"
Who wrote the episode that aired December 1, 1956?
CREATE TABLE table_25800134_1 (writer_s_ VARCHAR, airdate VARCHAR)
SELECT home_team AS score FROM table_name_25 WHERE away_team = "carlton"
What is the home team score for the game with the away team Carlton?
CREATE TABLE table_name_25 (home_team VARCHAR, away_team VARCHAR)
SELECT ACC_Road, School_ID FROM basketball_match GROUP BY ACC_Home, ACC_Road ORDER BY ACC_Road DESC
Visualize a bar chart about the distribution of ACC_Road and School_ID , and group by attribute ACC_Home, order by the bars in desc.
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text )
SELECT writer_s_ FROM table_25800134_13 WHERE airdate = "October 14, 1968"
Who was the writer of the episode that originally aired on October 14, 1968?
CREATE TABLE table_25800134_13 (writer_s_ VARCHAR, airdate VARCHAR)
SELECT away_team FROM table_name_72 WHERE venue = "windy hill"
What is the away team for the game at Windy Hill?
CREATE TABLE table_name_72 (away_team VARCHAR, venue VARCHAR)
SELECT DISTINCT paper.year, writes.paperid FROM author, paper, writes WHERE author.authorname LIKE 'Michael Armstrong' AND paper.year LIKE '199' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid
What paper did Michael Armstrong wrote in the 90s ?
CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE dataset ( datasetid int, datasetname varchar ) CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE field ( fieldid int ) CREATE TABLE venue ( venueid int, venuename varchar )
SELECT MAX(season__number) FROM table_25800134_14 WHERE airdate = "February 2, 1970"
What is the season # for the episode with air date february 2, 1970?
CREATE TABLE table_25800134_14 (season__number INTEGER, airdate VARCHAR)
SELECT circuit FROM table_name_11 WHERE date = "10/08/86"
For the race held on 10/08/86, what was the circuit?
CREATE TABLE table_name_11 (circuit VARCHAR, date VARCHAR)
SELECT activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_Participates_in AS T2 ON T1.actid = T2.actid GROUP BY T1.actid ORDER BY COUNT(*) DESC
Show all the activity names and the number of faculty involved in each activity Show bar chart, and list by the Y in descending.
CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER ) CREATE TABLE Faculty_Participates_in ( FacID INTEGER, actid INTEGER ) CREATE TABLE Activity ( actid INTEGER, activity_name varchar(25) ) CREATE TABLE Faculty ( FacID INTEGER, Lname VARCHAR(15), Fname VARCHAR(15), Rank VARCHAR(15), Sex VARCHAR(1), Phone INTEGER, Room VARCHAR(5), Building VARCHAR(13) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) )
SELECT writer_s_ FROM table_25800134_17 WHERE airdate = "September 11, 1972"
Who was the writer who wrote the episode that was aired on September 11, 1972?
CREATE TABLE table_25800134_17 (writer_s_ VARCHAR, airdate VARCHAR)
SELECT circuit FROM table_name_41 WHERE winning_team = "cabin racing"
What circuit saw Cabin Racing as the winning team?
CREATE TABLE table_name_41 (circuit VARCHAR, winning_team VARCHAR)
SELECT 2007 FROM table_name_54 WHERE 2003 = "1r"
What is 2007, when 2003 is 1R?
CREATE TABLE table_name_54 ( Id VARCHAR )
SELECT director FROM table_25800134_19 WHERE series__number = 626
Who directed episode number 626 in the series?
CREATE TABLE table_25800134_19 (director VARCHAR, series__number VARCHAR)
SELECT winning_driver FROM table_name_84 WHERE winning_car = "march - honda 86j" AND winning_team = "team nova"
Who was the winning driver driving the winning car March - Honda 86j, with the winning team Team Nova?
CREATE TABLE table_name_84 (winning_driver VARCHAR, winning_car VARCHAR, winning_team VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2124" AND procedures.long_title = "Percutaneous [endoscopic] gastrostomy [PEG]"
count the number of patients whose admission year is less than 2124 and procedure long title is percutaneous [endoscopic] gastrostomy [peg]?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE 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 )
SELECT writer_s_ FROM table_25800134_2 WHERE season__number = 24
Who are all the writers of episodes in season 24?
CREATE TABLE table_25800134_2 (writer_s_ VARCHAR, season__number VARCHAR)
SELECT name FROM table_name_84 WHERE lane = 5
Who was in Lane 5?
CREATE TABLE table_name_84 (name VARCHAR, lane VARCHAR)
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Lauren Sarringhaus%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.offering_id AND semester.semester = 'Spring-Summer' AND semester.semester_id = course_offering.semester AND semester.year = 2000
In Spring-Summer 2000 , what courses does Prof. Lauren Sarringhaus teach ?
CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_graduation_semester int, degree varchar, minor varchar, internship varchar ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, tough_tests int, heavy_papers int, cares_for_students int, heavy_assignments int, respected int, participation int, heavy_reading int, tough_grader int, hilarious int, would_take_again int, good_lecture int, no_skip int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) 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_project varchar, has_final_exam varchar, textbook varchar, class_address varchar, allow_audit varchar ) CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters int, num_enrolled int, has_discussion varchar, has_lab varchar, has_projects varchar, has_exams varchar, num_reviews int, clarity_score int, easiness_score int, helpfulness_score int ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int )
SELECT title FROM table_25800134_2 WHERE airdate = "May 10, 1958"
What is the title of the episode that aired on May 10, 1958?
CREATE TABLE table_25800134_2 (title VARCHAR, airdate VARCHAR)
SELECT time FROM table_name_86 WHERE name = "arkady vyatchanin"
What was Arkady Vyatchanin's time?
CREATE TABLE table_name_86 (time VARCHAR, name VARCHAR)
SELECT MIN("Production code") FROM table_486
what is the minimum production code
CREATE TABLE table_486 ( "Season #" real, "Series #" real, "Title" text, "Canadian airdate" text, "U.S. airdate" text, "Production code" real )
SELECT writer_s_ FROM table_25800134_4 WHERE season__number = 15
Who was the writer of episode 15?
CREATE TABLE table_25800134_4 (writer_s_ VARCHAR, season__number VARCHAR)
SELECT away_team AS score FROM table_name_28 WHERE home_team = "north melbourne"
What is the away team's score when north melbourne is the home team?
CREATE TABLE table_name_28 (away_team VARCHAR, home_team VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.icd9_code = "309"
provide the number of patients whose procedure icd9 code is 309.
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 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 text, admittime text, dischtime text, admityear text ) 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 )
SELECT title FROM table_25800134_4 WHERE season__number = 33
What is the title of #33?
CREATE TABLE table_25800134_4 (title VARCHAR, season__number VARCHAR)
SELECT MIN(crowd) FROM table_name_8 WHERE away_team = "fitzroy"
What is the smallest crowd with fitzroy as the home team?
CREATE TABLE table_name_8 (crowd INTEGER, away_team VARCHAR)
SELECT Aircraft, COUNT(*) FROM aircraft AS T1 JOIN match AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*)
List the names of aircrafts and the number of times it won matches Plot them as bar chart, could you list from low to high by the y-axis please?
CREATE TABLE match ( Round real, Location text, Country text, Date text, Fastest_Qualifying text, Winning_Pilot text, Winning_Aircraft text ) CREATE TABLE airport ( Airport_ID int, Airport_Name text, Total_Passengers real, %_Change_2007 text, International_Passengers real, Domestic_Passengers real, Transit_Passengers real, Aircraft_Movements real, Freight_Metric_Tonnes real ) CREATE TABLE airport_aircraft ( ID int, Airport_ID int, Aircraft_ID int ) CREATE TABLE aircraft ( Aircraft_ID int(11), Aircraft varchar(50), Description varchar(50), Max_Gross_Weight varchar(50), Total_disk_area varchar(50), Max_disk_Loading varchar(50) ) CREATE TABLE pilot ( Pilot_Id int(11), Name varchar(50), Age int(11) )
SELECT COUNT(director) FROM table_25800134_4 WHERE series__number = 158
How many directors worked on #158?
CREATE TABLE table_25800134_4 (director VARCHAR, series__number VARCHAR)
SELECT school_club_team FROM table_name_36 WHERE round > 8 AND position = "linebacker"
What school did the linebacker who was drafted after round 8 come from?
CREATE TABLE table_name_36 (school_club_team VARCHAR, round VARCHAR, position VARCHAR)
SELECT MIN("April") FROM table_34390 WHERE "Opponent" = 'new york rangers' AND "Game" < '82'
What is the lowest value in April with New York Rangers as opponent for a game less than 82?
CREATE TABLE table_34390 ( "Game" real, "April" real, "Opponent" text, "Score" text, "Record" text, "Points" real )
SELECT COUNT(writer_s_) FROM table_25800134_3 WHERE season__number = 1
How many writers were for season #1?
CREATE TABLE table_25800134_3 (writer_s_ VARCHAR, season__number VARCHAR)
SELECT pens FROM table_name_80 WHERE player = "siaosi atiola"
How many pens does Siaosi Atiola have?
CREATE TABLE table_name_80 (pens VARCHAR, player VARCHAR)
SELECT COUNT(rank) FROM table_name_14 WHERE gold = 0 AND nation = "namibia" AND total < 1
How many ranks have 0 golds, a Nation of namibia, and a Total smaller than 1?
CREATE TABLE table_name_14 ( rank VARCHAR, total VARCHAR, gold VARCHAR, nation VARCHAR )
SELECT director FROM table_25800134_3 WHERE airdate = "May 2, 1959"
Who was the director for the episode on May 2, 1959?
CREATE TABLE table_25800134_3 (director VARCHAR, airdate VARCHAR)
SELECT pens FROM table_name_17 WHERE draw = "0" AND player = "sione mafi pahulu"
What pens have a draw of 0 when the player is sione mafi pahulu?
CREATE TABLE table_name_17 (pens VARCHAR, draw VARCHAR, player VARCHAR)
SELECT MAX("No. in series") FROM table_27502 WHERE "Title" = 'Tough Love'
What episode number in the series is 'tough love'?
CREATE TABLE table_27502 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text )
SELECT no_in_series FROM table_25810656_3 WHERE production_code = 204
Name the number in series for production code being 204
CREATE TABLE table_25810656_3 (no_in_series VARCHAR, production_code VARCHAR)
SELECT lost FROM table_name_63 WHERE conv = "0" AND span = "2006-"
What is the lost for span 2006- when conv is 0?
CREATE TABLE table_name_63 (lost VARCHAR, conv VARCHAR, span VARCHAR)
SELECT viewers__in_millions_ FROM table_24639086_3 WHERE series__number = 14
What is the amount of viewers if the series number is 14?
CREATE TABLE table_24639086_3 ( viewers__in_millions_ VARCHAR, series__number VARCHAR )
SELECT COUNT(title) FROM table_25810656_3 WHERE no_in_series = 25
Name the number of title for number in series being 25
CREATE TABLE table_25810656_3 (title VARCHAR, no_in_series VARCHAR)
SELECT tries FROM table_name_83 WHERE player = "fakahau valu"
How many tries does Fakahau Valu have?
CREATE TABLE table_name_83 (tries VARCHAR, player VARCHAR)
SELECT MONTH(CreationDate), PostTypeId, COUNT(Id) FROM Posts WHERE YEAR(CreationDate) = '##Year##' AND PostTypeId <= 2 AND Score <= 0 GROUP BY MONTH(CreationDate), PostTypeId ORDER BY MONTH(CreationDate)
Positive score questions per month.
CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) 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 Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) 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 CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number )
SELECT MAX(stage) FROM table_25802618_15 WHERE winner = "Mikhail Ignatiev"
What was the latest stage won by Mikhail Ignatiev?
CREATE TABLE table_25802618_15 (stage INTEGER, winner VARCHAR)
SELECT college FROM table_name_62 WHERE pick > 101 AND position = "punter"
What school did the punter picked after 101 attend?
CREATE TABLE table_name_62 (college VARCHAR, pick VARCHAR, position VARCHAR)
SELECT meter_700, ID FROM swimmer
Return a bar chart about the distribution of meter_700 and ID .
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text )
SELECT race FROM table_2581397_4 WHERE weight__kg_ = "55" AND winner_2nd = "1st - Jim And Tonic"
In what race was the weight in kg 55 and the winner/2nd 1st - Jim and Tonic?
CREATE TABLE table_2581397_4 (race VARCHAR, weight__kg_ VARCHAR, winner_2nd VARCHAR)
SELECT player FROM table_name_51 WHERE pick = 176
What player was picked 176?
CREATE TABLE table_name_51 (player VARCHAR, pick VARCHAR)