answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT pages FROM table_name_69 WHERE date = "1987-08"
How many pages does the story from 1987-08 have?
CREATE TABLE table_name_69 (pages VARCHAR, date VARCHAR)
SELECT musical_guest__song_performed_ FROM table_name_2 WHERE air_date = "13 july 2008"
What is the Musical Guest (Song performed) for the episode aired on 13 july 2008?
CREATE TABLE table_name_2 ( musical_guest__song_performed_ VARCHAR, air_date VARCHAR )
SELECT settlement FROM table_2562572_44 WHERE cyrillic_name_other_names = "Локве (Romanian: Locve)"
Which settlement has the cyrillic and other name of локве (romanian: locve)?
CREATE TABLE table_2562572_44 (settlement VARCHAR, cyrillic_name_other_names VARCHAR)
SELECT story AS code FROM table_name_38 WHERE date = "2002-12"
What is the story code of the story published on 2002-12?
CREATE TABLE table_name_38 (story VARCHAR, date VARCHAR)
SELECT Team, COUNT(*) FROM technician GROUP BY Team
Create a bar chart showing the total number across team
CREATE TABLE repair ( repair_ID int, name text, Launch_Date text, Notes text ) CREATE TABLE technician ( technician_id real, Name text, Team text, Starting_Year real, Age int ) CREATE TABLE machine ( Machine_ID int, Making_Year int, Class text, Team text, Machine_series text, value_points real, quality_rank int ) CREATE TABLE repair_assignment ( technician_id int, repair_ID int, Machine_ID int )
SELECT MAX(population__2011_) FROM table_2562572_44 WHERE cyrillic_name_other_names = "Добрица"
What is the population of the settlement with the cyrillic name of добрица?
CREATE TABLE table_2562572_44 (population__2011_ INTEGER, cyrillic_name_other_names VARCHAR)
SELECT winning_driver FROM table_name_12 WHERE winning_car = "wolf wr3"
Which driver drove car Wolf WR3?
CREATE TABLE table_name_12 (winning_driver VARCHAR, winning_car VARCHAR)
SELECT "County" FROM table_25212 WHERE "District name" = 'Charyl Stockwell Academy'
If the name of the district is the Charyl Stockwell Academy, what is the county name?
CREATE TABLE table_25212 ( "District name" text, "Dist. ID" real, "ISD" text, "County" text, "Authorizing agency" text, "Date opened" text, "Services" text )
SELECT settlement FROM table_2562572_46 WHERE cyrillic_name_other_names = "Војводинци (Romanian: Voivodinţ)"
Which settlement has a cyrillic and other name of војводинци (romanian: voivodinţ)?
CREATE TABLE table_2562572_46 (settlement VARCHAR, cyrillic_name_other_names VARCHAR)
SELECT winning_driver FROM table_name_66 WHERE winning_car = "mclaren m23" AND circuit = "snetterton"
Which driver drove car McLaren M23 at the Snetterton Circuit?
CREATE TABLE table_name_66 (winning_driver VARCHAR, winning_car VARCHAR, circuit VARCHAR)
SELECT MAX(margin) FROM table_22754310_1 WHERE party = "NCO" AND winner = "P. Ramachandran"
Name the most margin for nco party and p. ramachandran won
CREATE TABLE table_22754310_1 ( margin INTEGER, party VARCHAR, winner VARCHAR )
SELECT dominant_religion__2002_ FROM table_2562572_46 WHERE cyrillic_name_other_names = "Војводинци (Romanian: Voivodinţ)"
What was the dominant religion in 2002 of the settlement with the cyrillic and other name of војводинци (romanian: voivodinţ)?
CREATE TABLE table_2562572_46 (dominant_religion__2002_ VARCHAR, cyrillic_name_other_names VARCHAR)
SELECT winning_car FROM table_name_35 WHERE circuit = "oulton park" AND winning_driver = "tony trimmer"
What car did Tony Trimmer drive at the Oulton Park Circuit?
CREATE TABLE table_name_35 (winning_car VARCHAR, circuit VARCHAR, winning_driver VARCHAR)
SELECT AVG("Week") FROM table_42057 WHERE "Result" = 'l 13-16' AND "Opponent" = 'at buffalo bills'
Which Week has a Result of l 13-16 and an Opponent of at buffalo bills?
CREATE TABLE table_42057 ( "Week" real, "Date" text, "TV Time" text, "Opponent" text, "Result" text )
SELECT MAX(population__2011_) FROM table_2562572_46 WHERE cyrillic_name_other_names = "Ватин"
What was the population in 2011 of the settlement with the cyrillic name of ватин?
CREATE TABLE table_2562572_46 (population__2011_ INTEGER, cyrillic_name_other_names VARCHAR)
SELECT date FROM table_name_69 WHERE name = "international gold cup"
What date did the International Gold Cup take place?
CREATE TABLE table_name_69 (date VARCHAR, name VARCHAR)
SELECT SUM(loses) FROM table_name_84 WHERE points > 30 AND goals_scored > 59 AND position > 5
How many loses have points greater than 30, goals scored greater than 59, with a position greater than 5?
CREATE TABLE table_name_84 ( loses INTEGER, position VARCHAR, points VARCHAR, goals_scored VARCHAR )
SELECT largest_ethnic_group__2002_ FROM table_2562572_46 WHERE settlement = "Sočica"
What was the largest ethnic group in sočica?
CREATE TABLE table_2562572_46 (largest_ethnic_group__2002_ VARCHAR, settlement VARCHAR)
SELECT theme FROM table_name_6 WHERE days < 148 AND series = "season 3"
What's the theme for a series of season 3 with smaller than 148 days?
CREATE TABLE table_name_6 (theme VARCHAR, days VARCHAR, series VARCHAR)
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE program_course.category LIKE '%ULCS%' AND semester.semester = 'FA' AND semester.year = 2016
Is there an CLIMATE 400 -level course that contains 4 credits ?
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 semester ( semester_id int, semester varchar, year 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 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 area ( course_id int, area varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) 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 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 program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) 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 program ( program_id int, name varchar, college varchar, introduction 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 instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int )
SELECT population__2011_ FROM table_2562572_46 WHERE settlement = "Pavliš"
What was the 2011 population of pavliš?
CREATE TABLE table_2562572_46 (population__2011_ VARCHAR, settlement VARCHAR)
SELECT home_team AS score FROM table_name_96 WHERE away_team = "collingwood"
What is the home team score when the away team is Collingwood?
CREATE TABLE table_name_96 (home_team VARCHAR, away_team VARCHAR)
SELECT HIRE_DATE, EMPLOYEE_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_DATE DESC
For all employees who have the letters D or S in their first name, draw a line chart about the change of employee_id over hire_date , and list in desc by the x axis please.
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,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 job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) 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 largest_ethnic_group__2002_ FROM table_2562572_46 WHERE cyrillic_name_other_names = "Ватин"
What was the largest ethnic group in 2002 of the settlement with the cyrillic name of ватин?
CREATE TABLE table_2562572_46 (largest_ethnic_group__2002_ VARCHAR, cyrillic_name_other_names VARCHAR)
SELECT crowd FROM table_name_57 WHERE away_team = "geelong"
What is the crowd size when Geelong is the away team?
CREATE TABLE table_name_57 (crowd VARCHAR, away_team VARCHAR)
SELECT AVG(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.dob_year > "2175"
what is average age of patients whose marital status is single and year of birth is greater than 2175?
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE 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 )
SELECT dominant_religion__2002_ FROM table_2562572_50 WHERE settlement = "Mala Remeta"
What was the dominant religion (2002) of the Mala Remeta settlement?
CREATE TABLE table_2562572_50 (dominant_religion__2002_ VARCHAR, settlement VARCHAR)
SELECT MAX(crowd) FROM table_name_33 WHERE away_team = "geelong"
What is the highest crowd population when the away team is Geelong?
CREATE TABLE table_name_33 (crowd INTEGER, away_team VARCHAR)
SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Code
For those records from the products and each product's manufacturer, find name and the average of code , and group by attribute name, and visualize them by a bar chart, rank by the Y-axis in asc.
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 type FROM table_2562572_50 WHERE settlement = "Krušedol Selo"
What type of settlemen is Krušedol Selo?
CREATE TABLE table_2562572_50 (type VARCHAR, settlement VARCHAR)
SELECT away_team FROM table_name_82 WHERE venue = "arden street oval"
What away team plays at Arden Street Oval?
CREATE TABLE table_name_82 (away_team VARCHAR, venue VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND lab.itemid = "50803"
give me the number of patients whose ethnicity is american indian/alaska native and item id is 50803?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE 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 ) 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 )
SELECT COUNT(type) FROM table_2562572_50 WHERE settlement = "Neradin"
How many types of settlement if Neradin?
CREATE TABLE table_2562572_50 (type VARCHAR, settlement VARCHAR)
SELECT name FROM table_name_56 WHERE pressure = "985hpa (29.09inhg)"
Which name has a pressure of 985hpa (29.09inhg)?
CREATE TABLE table_name_56 (name VARCHAR, pressure VARCHAR)
SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 26156) AND STRFTIME('%y', procedures_icd.charttime) <= '2104' ORDER BY procedures_icd.charttime LIMIT 1
first time patient 26156 got surgery until 2104?
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto 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 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 cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) 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 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_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) 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 outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE procedures_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 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 )
SELECT type FROM table_2562572_50 WHERE settlement = "Jazak"
What type of settlement is Jazak?
CREATE TABLE table_2562572_50 (type VARCHAR, settlement VARCHAR)
SELECT dates_active FROM table_name_75 WHERE name = "07"
What dates was the storm called 07 active?
CREATE TABLE table_name_75 (dates_active VARCHAR, name VARCHAR)
SELECT "GDP per capita (US$)" FROM table_71503 WHERE "Population" = '56,210,000'
What is the GDP of the nation with 56,210,000 people?
CREATE TABLE table_71503 ( "Member countries" text, "Population" text, "Area (km\u00b2)" text, "GDP (billion US$)" text, "GDP per capita (US$)" text )
SELECT settlement FROM table_2562572_53 WHERE population__2011_ = 9443
What is the name of the settlement that had a population of 9443 in 2011?
CREATE TABLE table_2562572_53 (settlement VARCHAR, population__2011_ VARCHAR)
SELECT MAX(metres) FROM table_name_33 WHERE finalized = "2015" AND floors < 40 AND feet > 509
Which building was built in 2015, has less than 40 floors and is larger than 509 feet?
CREATE TABLE table_name_33 (metres INTEGER, feet VARCHAR, finalized VARCHAR, floors VARCHAR)
SELECT district FROM table_name_52 WHERE incumbent = "benjamin eggleston"
What district has benjamin eggleston for incumbent?
CREATE TABLE table_name_52 ( district VARCHAR, incumbent VARCHAR )
SELECT COUNT(type) FROM table_2562572_53 WHERE settlement = "Nova Pazova"
How many different types of settlements does Nova Pazova fall into?
CREATE TABLE table_2562572_53 (type VARCHAR, settlement VARCHAR)
SELECT MAX(floors) FROM table_name_97 WHERE metres > 220
What is the highest floor for the building measuring 220 meters?
CREATE TABLE table_name_97 (floors INTEGER, metres INTEGER)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT WITH MVR; ? MAZE" AND demographic.age < "85"
What is the number of patients less than 85 years old who have coronary artery disease or coronary artery bypass graft with mvr or maze primary disease?
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text )
SELECT largest_ethnic_group__2002_ FROM table_2562572_53 WHERE cyrillic_name = "Сурдук"
What ethnic group had the largest population in сурдук in 2002?
CREATE TABLE table_2562572_53 (largest_ethnic_group__2002_ VARCHAR, cyrillic_name VARCHAR)
SELECT COUNT(total) FROM table_name_24 WHERE year_built = 2010
How many entries feature a year built of 2010?
CREATE TABLE table_name_24 (total VARCHAR, year_built VARCHAR)
SELECT MIN("Wickets") FROM table_30110
What is the fewest number of wickets recorded?
CREATE TABLE table_30110 ( "Player" text, "Matches" real, "Overs" text, "Wickets" real, "Average" text, "Economy" text, "BBI" text, "4wi" real )
SELECT COUNT(dominant_religion__2002_) FROM table_2562572_53 WHERE population__2011_ = 17105
How many dominant religions were in the settlement that had a population of 17105?
CREATE TABLE table_2562572_53 (dominant_religion__2002_ VARCHAR, population__2011_ VARCHAR)
SELECT numbers FROM table_name_34 WHERE model = "lc" AND year_built = 2009
What are the numbers for lc models built in 2009?
CREATE TABLE table_name_34 (numbers VARCHAR, model VARCHAR, year_built VARCHAR)
SELECT MAX(overall) FROM table_name_33 WHERE slalom = "39" AND season < 1996
What is the highest overall prior to 1996 with a slalom of 39?
CREATE TABLE table_name_33 ( overall INTEGER, slalom VARCHAR, season VARCHAR )
SELECT COUNT(population__2011_) FROM table_2562572_53 WHERE cyrillic_name = "Сурдук"
What was the population of сурдук in 2011?
CREATE TABLE table_2562572_53 (population__2011_ VARCHAR, cyrillic_name VARCHAR)
SELECT opponent FROM table_name_2 WHERE record = "5-2"
Who has a Record of 5-2?
CREATE TABLE table_name_2 (opponent VARCHAR, record VARCHAR)
SELECT position FROM table_name_7 WHERE pick = "146"
Tell me the position for pick of 146
CREATE TABLE table_name_7 ( position VARCHAR, pick VARCHAR )
SELECT MAX(meas_num) FROM table_256286_13 WHERE description = "Extending Eminent Domain Over Roads and Ways"
When extending eminent domain over roads and ways is the description what is the highest means number?
CREATE TABLE table_256286_13 (meas_num INTEGER, description VARCHAR)
SELECT report FROM table_name_78 WHERE race_name = "champion spark plug 300"
For the race Champion Spark Plug 300, what is the report?
CREATE TABLE table_name_78 (report VARCHAR, race_name VARCHAR)
SELECT room FROM faculty WHERE rank = "Professor" AND building = "NEB"
What are the rooms for members of the faculty who are professors and who live in building NEB?
CREATE TABLE minor_in ( stuid number, dno number ) CREATE TABLE enrolled_in ( stuid number, cid text, grade text ) CREATE TABLE member_of ( facid number, dno number, appt_type text ) CREATE TABLE course ( cid text, cname text, credits number, instructor number, days text, hours text, dno number ) CREATE TABLE faculty ( facid number, lname text, fname text, rank text, sex text, phone number, room text, building text ) CREATE TABLE department ( dno number, division text, dname text, room text, building text, dphone number ) CREATE TABLE gradeconversion ( lettergrade text, gradepoint number ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text )
SELECT COUNT(type) FROM table_256286_13 WHERE description = "Restoring Capital Punishment"
When restoring capital punishment is the description how many types are there?
CREATE TABLE table_256286_13 (type VARCHAR, description VARCHAR)
SELECT winning_team FROM table_name_15 WHERE winning_driver = "emerson fittipaldi" AND pole_position = "michael andretti" AND circuit = "cleveland burke lakefront airport"
For the race held at the Cleveland Burke Lakefront Airport circuit, with winning driver Emerson Fittipaldi and pole position Michael Andretti, what was the winning team?
CREATE TABLE table_name_15 (winning_team VARCHAR, circuit VARCHAR, winning_driver VARCHAR, pole_position VARCHAR)
SELECT Fname, COUNT(Fname) FROM Student WHERE Sex = 'F' GROUP BY Fname ORDER BY Fname DESC
A bar chart about the number of first name for all female students whose sex is F, list by the x-axis in descending.
CREATE TABLE Has_Allergy ( StuID INTEGER, Allergy VARCHAR(20) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Allergy_Type ( Allergy VARCHAR(20), AllergyType VARCHAR(20) )
SELECT MIN(no_votes) FROM table_256286_13
What is the lowest overall amount of no votes?
CREATE TABLE table_256286_13 (no_votes INTEGER)
SELECT AVG(fatalities) FROM table_name_84 WHERE epicenter = "damghan"
What is the average number of deaths for earthquakes centered in Damghan?
CREATE TABLE table_name_84 (fatalities INTEGER, epicenter VARCHAR)
SELECT "composer" FROM table_204_969 WHERE id = (SELECT id FROM table_204_969 WHERE "composer" = 'pete doherty') + 1
which composer is listed below pete doherty ?
CREATE TABLE table_204_969 ( id number, "composer" text, "title" text, "genre" text, "date" number, "notes" text )
SELECT urban_settlement FROM table_2562572_7 WHERE city___municipality = "Kovin"
What was the urban settlement when the city / municipality was kovin?
CREATE TABLE table_2562572_7 (urban_settlement VARCHAR, city___municipality VARCHAR)
SELECT home_team AS score FROM table_name_42 WHERE away_team = "richmond"
What was the score of the home team when Richmond was the away team?
CREATE TABLE table_name_42 (home_team VARCHAR, away_team VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "SINGLE" AND diagnoses.long_title = "Syncope and collapse"
give me the number of patients whose marital status is single and diagnoses long title is syncope and collapse?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title 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 )
SELECT COUNT(population__1991_) FROM table_2562572_7 WHERE population__2002_ = 14250
What is the population (1991) where population (2002) was 14250?
CREATE TABLE table_2562572_7 (population__1991_ VARCHAR, population__2002_ VARCHAR)
SELECT result FROM table_name_33 WHERE score = "48-12" AND city = "perth"
What was the result of the match that took place in Perth, featuring a score of 48-12?
CREATE TABLE table_name_33 (result VARCHAR, score VARCHAR, city VARCHAR)
SELECT "To par" FROM table_47375 WHERE "Country" = 'united states' AND "Score" > '69' AND "Player" = 'payne stewart'
When Payne Stewart of the United States scored higher than 69, what was the To Par?
CREATE TABLE table_47375 ( "Place" text, "Player" text, "Country" text, "Score" real, "To par" text )
SELECT MIN(population__1991_) FROM table_2562572_7 WHERE cyrillic_name = "Панчево"
What is the population (1991) when cyrillic name is панчево?
CREATE TABLE table_2562572_7 (population__1991_ INTEGER, cyrillic_name VARCHAR)
SELECT result FROM table_name_81 WHERE score = "48-12" AND city = "penrith"
What was the result of the match in Penrith that featured a score of 48-12?
CREATE TABLE table_name_81 (result VARCHAR, score VARCHAR, city VARCHAR)
SELECT STU_FNAME, SUM(STU_GPA) FROM STUDENT WHERE STU_GPA < (SELECT AVG(STU_GPA) FROM STUDENT) GROUP BY STU_FNAME
What is the first name and GPA of every student that has a GPA lower than average.
CREATE TABLE COURSE ( CRS_CODE varchar(10), DEPT_CODE varchar(10), CRS_DESCRIPTION varchar(35), CRS_CREDIT float(8) ) CREATE TABLE CLASS ( CLASS_CODE varchar(5), CRS_CODE varchar(10), CLASS_SECTION varchar(2), CLASS_TIME varchar(20), CLASS_ROOM varchar(8), PROF_NUM int ) 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 ENROLL ( CLASS_CODE varchar(5), STU_NUM int, ENROLL_GRADE varchar(50) ) CREATE TABLE DEPARTMENT ( DEPT_CODE varchar(10), DEPT_NAME varchar(30), SCHOOL_CODE varchar(8), EMP_NUM int, DEPT_ADDRESS varchar(20), DEPT_EXTENSION varchar(4) ) CREATE TABLE STUDENT ( STU_NUM int, STU_LNAME varchar(15), STU_FNAME varchar(15), STU_INIT varchar(1), STU_DOB datetime, STU_HRS int, STU_CLASS varchar(2), STU_GPA float(8), STU_TRANSFER numeric, DEPT_CODE varchar(18), STU_PHONE varchar(4), PROF_NUM int ) CREATE TABLE PROFESSOR ( EMP_NUM int, DEPT_CODE varchar(10), PROF_OFFICE varchar(50), PROF_EXTENSION varchar(4), PROF_HIGH_DEGREE varchar(5) )
SELECT settlement AS destiny FROM table_2562572_56 WHERE settlement = "Aleksandrovo"
What is the settlement destiny in Aleksandrovo?
CREATE TABLE table_2562572_56 (settlement VARCHAR)
SELECT home_team AS score FROM table_name_51 WHERE away_team = "st kilda"
What is the home team score when st kilda is the away team?
CREATE TABLE table_name_51 (home_team VARCHAR, away_team VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2126.0" AND procedures.long_title = "(Aorto)coronary bypass of two coronary arteries"
what is the number of patients whose year of death is less than or equal to 2126 and procedure long title is (aorto)coronary bypass of two coronary arteries?
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 ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_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 )
SELECT cyrillic_name_other_names FROM table_2562572_56 WHERE settlement = "Novi Vladimirovac"
What is the Cyrillic name for Novi Vladimirovac?
CREATE TABLE table_2562572_56 (cyrillic_name_other_names VARCHAR, settlement VARCHAR)
SELECT home_team AS score FROM table_name_64 WHERE away_team = "st kilda"
What is the home team score when st kilda is the away team?
CREATE TABLE table_name_64 (home_team VARCHAR, away_team VARCHAR)
SELECT "song" FROM table_204_915 WHERE "song" <> '"soms"' AND "points" = (SELECT "points" FROM table_204_915 WHERE "song" = '"soms"')
bernadette 's soms and which other song earned the same number of points ?
CREATE TABLE table_204_915 ( id number, "draw" number, "artist" text, "song" text, "points" number, "place" text )
SELECT COUNT(population__2011_) FROM table_2562572_54 WHERE settlement = "Krčedin"
How many items appear in the population 2011 column for the krčedin settlement?
CREATE TABLE table_2562572_54 (population__2011_ VARCHAR, settlement VARCHAR)
SELECT venue FROM table_name_62 WHERE home_team = "fitzroy"
What venue featured fitzroy as the home squad?
CREATE TABLE table_name_62 (venue VARCHAR, home_team VARCHAR)
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'PHILADELPHIA' AND ground_service.city_code = city.city_code
what is the ground transportation available in the city of PHILADELPHIA
CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, night text, season text, basis_days text ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airline text, departure_flight_number int, stop_time int ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time int, dual_carrier text, flight_days text, flight_id int, flight_number int, from_airport varchar, meal_code text, stops int, time_elapsed int, to_airport varchar ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) 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 aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, length int, weight int, capacity int, pay_load int, cruising_speed int, range_miles int, pressurized varchar ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) 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, round_trip_required varchar ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text )
SELECT dominant_religion__2002_ FROM table_2562572_54 WHERE population__2011_ = 2337
What is the dominant religion in 2002 for the population of 2337 in 2011?
CREATE TABLE table_2562572_54 (dominant_religion__2002_ VARCHAR, population__2011_ VARCHAR)
SELECT home_team AS score FROM table_name_26 WHERE venue = "brunswick street oval"
What is the home team score at brunswick street oval?
CREATE TABLE table_name_26 (home_team VARCHAR, venue VARCHAR)
SELECT MIN(year) FROM table_name_42 WHERE author = "reki kawahara"
what is the earliest year when the author is reki kawahara?
CREATE TABLE table_name_42 ( year INTEGER, author VARCHAR )
SELECT MIN(population__2011_) FROM table_2562572_54 WHERE settlement = "Čortanovci"
What is the lowest population in 2011 for the settlement of čortanovci?
CREATE TABLE table_2562572_54 (population__2011_ INTEGER, settlement VARCHAR)
SELECT nationality FROM table_name_85 WHERE position = "guard" AND school_country = "ucla"
What nationality is the guard from ucla?
CREATE TABLE table_name_85 (nationality VARCHAR, position VARCHAR, school_country VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.long_title = "Other preterm infants, 2,000-2,499 grams"
give me the number of patients whose diagnoses long title is other preterm infants, 2,000-2,499 grams?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, 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 )
SELECT largest_ethnic_group__2002_ FROM table_2562572_54 WHERE cyrillic_name_other_names = "Бешка"
What is the largest ethnic group in 2002 for the cyrillic name, other name of бешка?
CREATE TABLE table_2562572_54 (largest_ethnic_group__2002_ VARCHAR, cyrillic_name_other_names VARCHAR)
SELECT position FROM table_name_29 WHERE player = "farmar, jordan jordan farmar"
What position is played by farmar, jordan jordan farmar?
CREATE TABLE table_name_29 (position VARCHAR, player VARCHAR)
SELECT COUNT("ecclesiastical jurisdictions") FROM table_204_876 WHERE "established" < 1990
how many roman catholic dioceses were established in angola before 1990 ?
CREATE TABLE table_204_876 ( id number, "ecclesiastical jurisdictions" text, "latin name" text, "type" text, "rite" text, "ecclesiastical province" text, "established" text, "area (km2)" number )
SELECT MIN(population__2002_) FROM table_2562572_8 WHERE population__2011_ = 30076
What was the lowes population of 2002 when the 2011 population was 30076?
CREATE TABLE table_2562572_8 (population__2002_ INTEGER, population__2011_ VARCHAR)
SELECT region FROM table_name_30 WHERE venue = "william r. johnson coliseum"
What region is William R. Johnson Coliseum in?
CREATE TABLE table_name_30 (region VARCHAR, venue VARCHAR)
SELECT "team" FROM table_204_750 ORDER BY "capacity" DESC LIMIT 1
which of the teams had the top number of capacity ?
CREATE TABLE table_204_750 ( id number, "team" text, "stadium" text, "capacity" number, "seated" number )
SELECT dominant_religion__2002_ FROM table_2562572_9 WHERE cyrillic_name_other_names = "Степановићево"
What is the dominant religion in степановићево during 2002?
CREATE TABLE table_2562572_9 (dominant_religion__2002_ VARCHAR, cyrillic_name_other_names VARCHAR)
SELECT host FROM table_name_78 WHERE city = "nashville"
What was the host for the round in Nashville?
CREATE TABLE table_name_78 (host VARCHAR, city VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "62" AND diagnoses.long_title = "Acute glomerulonephritis with other specified pathological lesion in kidney"
what is the number of patients whose age is less than 62 and diagnoses long title is acute glomerulonephritis with other specified pathological lesion in kidney?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE 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 )
SELECT cyrillic_name_other_names FROM table_2562572_9 WHERE population__2011_ = 2125
What is the cyrillic name for the settlement with the population of 2125?
CREATE TABLE table_2562572_9 (cyrillic_name_other_names VARCHAR, population__2011_ VARCHAR)
SELECT host FROM table_name_12 WHERE venue = "hammons student center"
What was the host of the round at Hammons Student Center?
CREATE TABLE table_name_12 (host VARCHAR, venue VARCHAR)
SELECT T3.name, T3.time FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T2.location = 'London' ORDER BY T3.time DESC
Show all train names and times in stations in London in descending order by train time.
CREATE TABLE train ( train_id number, name text, time text, service text ) CREATE TABLE train_station ( train_id number, station_id number ) CREATE TABLE station ( station_id number, name text, annual_entry_exit number, annual_interchanges number, total_passengers number, location text, main_services text, number_of_platforms number )
SELECT type FROM table_2562572_9 WHERE cyrillic_name_other_names = "Футог"
What type of settlement is футог?
CREATE TABLE table_2562572_9 (type VARCHAR, cyrillic_name_other_names VARCHAR)
SELECT city FROM table_name_76 WHERE venue = "university gym (gold mine)"
What city is University Gym (Gold Mine) in?
CREATE TABLE table_name_76 (city VARCHAR, venue VARCHAR)