answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT successor FROM table_2417340_4 WHERE vacator = "Vacant" AND district = "Louisiana 5th"
Who was the successor for vacant louisiana 5th
CREATE TABLE table_2417340_4 (successor VARCHAR, vacator VARCHAR, district VARCHAR)
SELECT depth FROM table_25675509_1 WHERE longitude = "158.091° E"
If the longitude is 158.091° e, what is the depth?
CREATE TABLE table_25675509_1 (depth VARCHAR, longitude VARCHAR)
SELECT "Home team score" FROM table_51672 WHERE "Home team" = 'south melbourne'
What is the Home team score for the Home team from South Melbourne?
CREATE TABLE table_51672 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT successor FROM table_2417345_3 WHERE date_of_successors_formal_installation = "February 23, 1870"
Who were the successors when the date the successors were installed was February 23, 1870?
CREATE TABLE table_2417345_3 (successor VARCHAR, date_of_successors_formal_installation VARCHAR)
SELECT MAX(w) FROM table_25689740_2
What is the highest number for W?
CREATE TABLE table_25689740_2 (w INTEGER)
SELECT number FROM table_name_50 WHERE language = "german"
How many speak german?
CREATE TABLE table_name_50 ( number VARCHAR, language VARCHAR )
SELECT vacator FROM table_2417345_3 WHERE date_of_successors_formal_installation = "February 1, 1871"
Who was the vacator when the successor was formally installed on February 1, 1871?
CREATE TABLE table_2417345_3 (vacator VARCHAR, date_of_successors_formal_installation VARCHAR)
SELECT Ends AS lost FROM table_25689740_2 WHERE pa = 44
What is shown for ends lost when pa is 44?
CREATE TABLE table_25689740_2 (Ends VARCHAR, pa VARCHAR)
SELECT to_par FROM table_name_97 WHERE score = 70 - 73 - 80 - 68 = 291
Which To par has a Score of 70-73-80-68=291?
CREATE TABLE table_name_97 ( to_par VARCHAR, score VARCHAR )
SELECT successor FROM table_2417345_3 WHERE date_of_successors_formal_installation = "March 30, 1870"
Who was the successor that was formally installed on March 30, 1870?
CREATE TABLE table_2417345_3 (successor VARCHAR, date_of_successors_formal_installation VARCHAR)
SELECT original_airdate FROM table_25691838_6 WHERE episode__number = 733
What was the original airdate of episode #733?
CREATE TABLE table_25691838_6 (original_airdate VARCHAR, episode__number VARCHAR)
SELECT score FROM table_name_58 WHERE opponent = "@ tigers" AND date = "july 24"
What's the score for opponent @ Tigers on July 24?
CREATE TABLE table_name_58 ( score VARCHAR, opponent VARCHAR, date VARCHAR )
SELECT date_of_successors_formal_installation FROM table_2417330_3 WHERE successor = "Orville H. Browning (R)"
When did Orville H. Browning (r) succeed?
CREATE TABLE table_2417330_3 (date_of_successors_formal_installation VARCHAR, successor VARCHAR)
SELECT the_wørd FROM table_25691838_6 WHERE production_code = 6084
What was The Word for production code 6084?
CREATE TABLE table_25691838_6 (the_wørd VARCHAR, production_code VARCHAR)
SELECT MIN("Number of electorates (2009)") FROM table_13086 WHERE "District" = 'mathura' AND "Name" = 'mant'
What Number of electorates (2009) has a District of mathura, and a Name of mant?
CREATE TABLE table_13086 ( "Constituency number" text, "Name" text, "Reserved for ( SC / ST /None)" text, "District" text, "Number of electorates (2009)" real )
SELECT date_of_successors_formal_installation FROM table_2417330_3 WHERE state__class_ = "Missouri (3)"
List all dates of succession in the state class Missouri (3).
CREATE TABLE table_2417330_3 (date_of_successors_formal_installation VARCHAR, state__class_ VARCHAR)
SELECT COUNT(the_wørd) FROM table_25691838_6 WHERE episode__number = 727
What was the number of "The Word" segments for episode number 727?
CREATE TABLE table_25691838_6 (the_wørd VARCHAR, episode__number VARCHAR)
SELECT MAX(demographic.age) FROM demographic WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND demographic.days_stay = "27"
what is maximum age of patients whose ethnicity is white - russian and days of hospital stay is 27?
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 COUNT(vacator) FROM table_2417340_3 WHERE date_of_successors_formal_installation = "June 22, 1868"
List the number of vacators when successors were formally installed on June 22, 1868.
CREATE TABLE table_2417340_3 (vacator VARCHAR, date_of_successors_formal_installation VARCHAR)
SELECT COUNT(rebounding_high) FROM table_25696729_8 WHERE season = "Regular season"
Compute the number of times Dennis Rodman recordedhigh rebounds given a regular season
CREATE TABLE table_25696729_8 (rebounding_high VARCHAR, season VARCHAR)
SELECT established FROM table_name_74 WHERE institution = "north jersey phoenix"
What is the year established of North Jersey Phoenix?
CREATE TABLE table_name_74 ( established VARCHAR, institution VARCHAR )
SELECT state__class_ FROM table_2417340_3 WHERE date_of_successors_formal_installation = "June 22, 1868"
List all state classes when successors were formally installed on June 22, 1868.
CREATE TABLE table_2417340_3 (state__class_ VARCHAR, date_of_successors_formal_installation VARCHAR)
SELECT 10 AS _rebounds FROM table_25696729_8 WHERE season = "1991–92"
List all rebounds equal to 10 for Dennis Rodman 's 1991–92 season
CREATE TABLE table_25696729_8 (season VARCHAR)
SELECT t2.drugname FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-70965') AND diagnosis.diagnosisname = 'post spinal surgery - lumbar' AND STRFTIME('%y-%m', diagnosis.diagnosistime) <= '2102-08') AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime, patient.patienthealthsystemstayid FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-70965') AND STRFTIME('%y-%m', medication.drugstarttime) <= '2102-08') AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.diagnosistime < t2.drugstarttime AND t1.patienthealthsystemstayid = t2.patienthealthsystemstayid
what drug was patient 002-70965 prescribed for within the same hospital visit after being diagnosed with post spinal surgery - lumbar until 08/2102?
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE 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, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, hospitaladmitsource text, unitadmittime time, unitdischargetime time, hospitaldischargetime time, hospitaldischargestatus text )
SELECT reason_for_change FROM table_2417395_4 WHERE date_successor_seated = "December 13, 1880"
What was the reason for change to the successor that was seated on December 13, 1880?
CREATE TABLE table_2417395_4 (reason_for_change VARCHAR, date_successor_seated VARCHAR)
SELECT MAX(20 AS _rebounds) FROM table_25696729_8 WHERE double_double = 5
What is the highest rebound Dennis Rodman obtained within the 20 rebounds category given two of the following:points, rebounds, assists, steals, and blocked shots (points) greater equal to 5
CREATE TABLE table_25696729_8 (double_double VARCHAR)
SELECT SUM(attendance) FROM table_name_74 WHERE date = "august 16"
What was the attendance for the game on August 16?
CREATE TABLE table_name_74 ( attendance INTEGER, date VARCHAR )
SELECT district FROM table_2417445_4 WHERE reason_for_vacancy = "Died May 22, 1895"
When the person died May 22, 1895 is the reason for vacancy what is the district?
CREATE TABLE table_2417445_4 (district VARCHAR, reason_for_vacancy VARCHAR)
SELECT original_air_date__uk_ FROM table_2570269_2 WHERE episode__number = "2-01"
If the episode number is 2-01 what is the original UK air date?
CREATE TABLE table_2570269_2 (original_air_date__uk_ VARCHAR, episode__number VARCHAR)
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE instructor.name LIKE '%Emily Mahan%' AND program_course.category LIKE 'ULCS'
Emily Mahan , does he teach any upper-level courses ?
CREATE TABLE gsi ( course_offering_id int, student_id int ) 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 instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE area ( course_id int, area 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 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 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 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 jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction 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 semester ( semester_id int, semester varchar, year int ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar )
SELECT reason_for_vacancy FROM table_2417445_4 WHERE vacator = "Frederick Remann (R)"
When frederick remann (r) is the vacator what is the reason for vacancy?
CREATE TABLE table_2417445_4 (reason_for_vacancy VARCHAR, vacator VARCHAR)
SELECT cast FROM table_2570269_2 WHERE episode_title = "Pressures"
If the episode title is Pressures, what are the names of the cast?
CREATE TABLE table_2570269_2 (cast VARCHAR, episode_title VARCHAR)
SELECT "Final Venue" FROM table_4051 WHERE "Host Nation(s)" = 'England' AND "Runner-up" = '[[|]] 4 points' AND "Winner" = '[[|]] 6 points'
What was the final venue whene England hasted the competition and the runner-up record is [[|]] 4 points and the winner record is [[|]] 6 points?
CREATE TABLE table_4051 ( "Year" real, "Host Nation(s)" text, "Final Venue" text, "Winner" text, "Result" text, "Runner-up" text )
SELECT reason_for_vacancy FROM table_2417445_4 WHERE successor = "Rudolph Kleberg (D)"
When rudolph kleberg (d) is the successor is the reason for vacancy?
CREATE TABLE table_2417445_4 (reason_for_vacancy VARCHAR, successor VARCHAR)
SELECT episode__number FROM table_2570269_2 WHERE episode_title = "Leave Takers"
What is the episode number for episode title Leave Takers?
CREATE TABLE table_2570269_2 (episode__number VARCHAR, episode_title VARCHAR)
SELECT mascot FROM table_name_19 WHERE year_joined > 1952 AND school = "moores hill"
what is the mascot for moores hill that joined later than 1952?
CREATE TABLE table_name_19 ( mascot VARCHAR, year_joined VARCHAR, school VARCHAR )
SELECT reason_for_vacancy FROM table_2417445_4 WHERE district = "Massachusetts 6th"
When massachusetts 6th is the district what is the reason for vacancy?
CREATE TABLE table_2417445_4 (reason_for_vacancy VARCHAR, district VARCHAR)
SELECT cast FROM table_2570269_2 WHERE episode__number = "2-03"
For episode number 2-03, what are the names of the cast?
CREATE TABLE table_2570269_2 (cast VARCHAR, episode__number VARCHAR)
SELECT T2.dept_name, T1.dept_code FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.prof_high_degree = 'Ph.D.' GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 1
Which department has the most professors with a Ph.D.?
CREATE TABLE department ( dept_code text, dept_name text, school_code text, emp_num number, dept_address text, dept_extension text ) CREATE TABLE professor ( emp_num number, dept_code text, prof_office text, prof_extension text, prof_high_degree text ) CREATE TABLE course ( crs_code text, dept_code text, crs_description text, crs_credit number ) CREATE TABLE student ( stu_num number, stu_lname text, stu_fname text, stu_init text, stu_dob time, stu_hrs number, stu_class text, stu_gpa number, stu_transfer number, dept_code text, stu_phone text, prof_num number ) CREATE TABLE enroll ( class_code text, stu_num number, enroll_grade text ) CREATE TABLE employee ( emp_num number, emp_lname text, emp_fname text, emp_initial text, emp_jobcode text, emp_hiredate time, emp_dob time ) CREATE TABLE class ( class_code text, crs_code text, class_section text, class_time text, class_room text, prof_num number )
SELECT date_of_successors_taking_office FROM table_2417445_4 WHERE successor = "Rudolph Kleberg (D)"
When rudolph kleberg (d) is the successor what is the date of successors taking office?
CREATE TABLE table_2417445_4 (date_of_successors_taking_office VARCHAR, successor VARCHAR)
SELECT COUNT(birth_2012) FROM table_25703_2 WHERE january_december_2012 = "Kurgan Oblast"
What is the total number of birth/2012 for January–December 2012 in Kurgan Oblast?
CREATE TABLE table_25703_2 (birth_2012 VARCHAR, january_december_2012 VARCHAR)
SELECT MIN("took office") FROM table_203_345
when did the first provincial representative for gilbert plains take office ?
CREATE TABLE table_203_345 ( id number, "name" text, "party" text, "took office" number, "left office" number )
SELECT geographical_regions FROM table_24192031_2 WHERE contestant = "Laura Jiménez Ynoa"
What geographical region is contestant laura jiménez ynoa from?
CREATE TABLE table_24192031_2 (geographical_regions VARCHAR, contestant VARCHAR)
SELECT death_2012 FROM table_25703_2 WHERE birth_2012 = 127
What were the total number of 2012 deaths when 2012 births were 127?
CREATE TABLE table_25703_2 (death_2012 VARCHAR, birth_2012 VARCHAR)
SELECT MAX("# of total votes") FROM table_2160 WHERE "Election" = '1878'
Name the most number of total votes for election for 1878
CREATE TABLE table_2160 ( "Election" text, "# of candidates nominated" real, "# of seats won" real, "# of total votes" real, "% of popular vote" text, "result" text )
SELECT COUNT(hometown) FROM table_24192031_2 WHERE height = "m (ft 10 1⁄2 in)"
How many hometowns have a height of m (ft 10 1⁄2 in)?
CREATE TABLE table_24192031_2 (hometown VARCHAR, height VARCHAR)
SELECT MIN(birth_2012) FROM table_25703_2 WHERE january_december_2012 = "Tver Oblast"
What were the total number of 2012 births for the January–December 2012 Tver Oblast region?
CREATE TABLE table_25703_2 (birth_2012 INTEGER, january_december_2012 VARCHAR)
SELECT SUM("Works number") FROM table_11413 WHERE "Date" > '1875' AND "Name" = 'gowrie'
What is the total work number of Gowrie after 1875?
CREATE TABLE table_11413 ( "Name" text, "Builder" text, "Type" text, "Date" real, "Works number" real )
SELECT age FROM table_24192031_2 WHERE height = "m (ft 3⁄4 in)"
How old is the person with the height of m (ft 3⁄4 in)?
CREATE TABLE table_24192031_2 (age VARCHAR, height VARCHAR)
SELECT MIN(birth_2012) FROM table_25703_2 WHERE death_2012 = 163
What were the total 2012 births when the 2012 deaths were 163?
CREATE TABLE table_25703_2 (birth_2012 INTEGER, death_2012 VARCHAR)
SELECT All_Home, School_ID FROM basketball_match GROUP BY ACC_Road, All_Home ORDER BY All_Home
Draw a bar chart about the distribution of All_Home and School_ID , and group by attribute ACC_Road, and sort bars in ascending order.
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 ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text )
SELECT viewers__millions_ FROM table_24212608_1 WHERE broadcast_date = 2010
What was the number of viewers in millions for the broadcast from 2010?
CREATE TABLE table_24212608_1 (viewers__millions_ VARCHAR, broadcast_date VARCHAR)
SELECT COUNT(pf) FROM table_25714995_2 WHERE l = 3
How many pf catagories are listed for the skip that had 3 for l
CREATE TABLE table_25714995_2 (pf VARCHAR, l VARCHAR)
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN 20 AND 29) AND DATETIME(procedures_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') GROUP BY procedures_icd.icd9_code) AS t1 WHERE t1.c1 <= 4)
what are the top four most common surgeries of patients of age 20s this year?
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 microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title 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 outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) 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 patients ( row_id number, subject_id number, gender text, dob time, dod 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 chartevents ( row_id number, subject_id number, hadm_id number, icustay_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 d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) 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_items ( row_id number, itemid number, label text, linksto text )
SELECT starring FROM table_24212608_1 WHERE episode = 3
Who starred in episode 3?
CREATE TABLE table_24212608_1 (starring VARCHAR, episode VARCHAR)
SELECT MAX(l) FROM table_25714995_2 WHERE w = 3
How many l's are there for the skip with 3 for w?
CREATE TABLE table_25714995_2 (l INTEGER, w VARCHAR)
SELECT "Elector" FROM table_78930 WHERE "Cardinalatial title" = 'priest of s. sabina and archbishop of reims'
Who is the Elector with a Cardinalatial title of Priest of S. Sabina and Archbishop of Reims?
CREATE TABLE table_78930 ( "Elector" text, "Place of birth" text, "Cardinalatial title" text, "Elevated" text, "Elevator" text )
SELECT COUNT(episode) FROM table_24212608_1 WHERE broadcast_date = 2010
How many episodes were broadcast in 2010?
CREATE TABLE table_24212608_1 (episode VARCHAR, broadcast_date VARCHAR)
SELECT COUNT(Ends) AS won FROM table_25714995_2 WHERE stolen_ends = 8
How many ends won catagories are listed when there are 8 stolen ends?
CREATE TABLE table_25714995_2 (Ends VARCHAR, stolen_ends VARCHAR)
SELECT Date, Vote_Percent FROM election ORDER BY Vote_Percent DESC
Show vote_percent from each date, could you show y axis from high to low order please?
CREATE TABLE election ( Election_ID int, Representative_ID int, Date text, Votes real, Vote_Percent real, Seats real, Place real ) CREATE TABLE representative ( Representative_ID int, Name text, State text, Party text, Lifespan text )
SELECT radio_1_presenter FROM table_24212608_1 WHERE viewers__millions_ = "9.73"
Who was the radio 1 presenter for the broadcast that had 9.73 million viewers?
CREATE TABLE table_24212608_1 (radio_1_presenter VARCHAR, viewers__millions_ VARCHAR)
SELECT extra_points_1_point FROM table_25711913_14 WHERE player = "Germany Schultz"
How many extra points did Germany Schultz score?
CREATE TABLE table_25711913_14 (extra_points_1_point VARCHAR, player VARCHAR)
SELECT Nationality, AVG(ID) FROM swimmer GROUP BY Nationality ORDER BY AVG(ID)
Give me the comparison about the average of ID over the Nationality , and group by attribute Nationality by a bar chart, and list from low to high by the Y.
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 ) 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 )
SELECT powertrain__engine_transmission_ FROM table_24193494_3 WHERE division = "KMD" AND model = "C40LF"
Name the powertrain for kmd and c40lf
CREATE TABLE table_24193494_3 (powertrain__engine_transmission_ VARCHAR, division VARCHAR, model VARCHAR)
SELECT MIN(field_goals__4_points_) FROM table_25711913_14
What is the least number of field goals scored by a player?
CREATE TABLE table_25711913_14 (field_goals__4_points_ INTEGER)
SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'esophagogastroduodenoscopy - with biopsy' AND STRFTIME('%y', treatment.treatmenttime) <= '2102') AS t1 JOIN (SELECT patient.uniquepid, diagnosis.diagnosisname, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE STRFTIME('%y', diagnosis.diagnosistime) <= '2102') AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.treatmenttime < t2.diagnosistime AND DATETIME(t2.diagnosistime) BETWEEN DATETIME(t1.treatmenttime) AND DATETIME(t1.treatmenttime, '+2 month') GROUP BY t2.diagnosisname) AS t3 WHERE t3.c1 <= 5
what are the five most commonly given diagnoses for patients who have received esophagogastroduodenoscopy - with biopsy previously within 2 months until 2102?
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, hospitaladmitsource text, unitadmittime time, unitdischargetime time, hospitaldischargetime time, hospitaldischargestatus text ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text )
SELECT division FROM table_24193494_3 WHERE powertrain__engine_transmission_ = "Detroit Diesel Series 50EGR Allison WB-400R"
Name the division for detroit diesel series 50egr allison wb-400r
CREATE TABLE table_24193494_3 (division VARCHAR, powertrain__engine_transmission_ VARCHAR)
SELECT field_goals__4_points_ FROM table_25711913_14 WHERE touchdowns__5_points_ = 7
How many field goals were scored by the player that got 7 touchdowns?
CREATE TABLE table_25711913_14 (field_goals__4_points_ VARCHAR, touchdowns__5_points_ VARCHAR)
SELECT Sex, COUNT(Sex) FROM people GROUP BY Sex ORDER BY COUNT(Sex)
Show me about the distribution of Sex and the amount of Sex , and group by attribute Sex in a bar chart, and I want to list total number from low to high order please.
CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight real ) CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate real )
SELECT manufacturer FROM table_24193494_3 WHERE order_year = 2011
Name the manufacturer for 2011
CREATE TABLE table_24193494_3 (manufacturer VARCHAR, order_year VARCHAR)
SELECT Ends AS won FROM table_25718552_2 WHERE blank_ends < 3.0
How many ends were won where the blank ends are smaller than 3.0?
CREATE TABLE table_25718552_2 (Ends VARCHAR, blank_ends INTEGER)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2103" AND procedures.icd9_code = "93"
how many patients were admitted before the year 2103 and underwent procedure under icd9 code 93?
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 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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT COUNT(location) FROM table_2419754_1 WHERE nickname = "Billikens"
List the number of locations for the team known as the billikens.
CREATE TABLE table_2419754_1 (location VARCHAR, nickname VARCHAR)
SELECT MAX(Ends) AS won FROM table_25718552_2 WHERE stolen_ends = 3
What is the largest amount of ends won when stolen ends were 3?
CREATE TABLE table_25718552_2 (Ends INTEGER, stolen_ends VARCHAR)
SELECT "Men's Doubles" FROM table_31785 WHERE "Year" = '2012'
Who played men's doubles in 2012?
CREATE TABLE table_31785 ( "Year" text, "Men's Singles" text, "Women's Singles" text, "Men's Doubles" text, "Women's Doubles" text, "Mixed Doubles" text )
SELECT MIN(enrollment) FROM table_2419754_1 WHERE location = "Milwaukee, Wisconsin"
How many people are enrolled at the university in milwaukee, wisconsin
CREATE TABLE table_2419754_1 (enrollment INTEGER, location VARCHAR)
SELECT COUNT(county) FROM table_2572788_1 WHERE milepost = "69.5"
How many counties are at milepost 69.5?
CREATE TABLE table_2572788_1 (county VARCHAR, milepost VARCHAR)
SELECT b.UserId AS "user_link", u.Reputation, b.Date FROM Badges AS b LEFT JOIN Users AS u ON u.Id = b.UserId WHERE b.Name = 'Illuminator' ORDER BY u.Reputation, u.DisplayName
Illuminator badge users by reputation.
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress 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 ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) 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 PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE PostTags ( PostId number, TagId number ) 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 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 CloseReasonTypes ( Id number, Name text, Description text ) 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 PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId 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 ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text )
SELECT MAX(left) FROM table_2419754_1
In what year did the teams leave the conference?
CREATE TABLE table_2419754_1 (left INTEGER)
SELECT town_city FROM table_2572788_1 WHERE station = "Stratford (Limited service)"
In what city or town is Stratford (limited service)?
CREATE TABLE table_2572788_1 (town_city VARCHAR, station VARCHAR)
SELECT MAX(year) FROM table_name_67 WHERE event = "800 m" AND venue = "santiago de chile"
What's the highest Year for the Venue of Santiago De Chile and the Event of 800 m?
CREATE TABLE table_name_67 ( year INTEGER, event VARCHAR, venue VARCHAR )
SELECT institution FROM table_2419754_1 WHERE nickname = "Tigers"
What university team is referred to as the tigers?
CREATE TABLE table_2419754_1 (institution VARCHAR, nickname VARCHAR)
SELECT town_city FROM table_2572788_1 WHERE milepost = "71.1"
At what city or town is milepost 71.1?
CREATE TABLE table_2572788_1 (town_city VARCHAR, milepost VARCHAR)
SELECT COUNT("Fourth place") FROM table_16812 WHERE "Year" = '2003'
How many fourth places were there in 2003?
CREATE TABLE table_16812 ( "Series" real, "Year" text, "Winner" text, "Runner-up" text, "Third place" text, "Fourth place" text, "Fifth place" text, "Sixth place" text, "Host" text )
SELECT magnitude FROM table_24192190_1 WHERE latitude = "43.048° N"
When 43.048° n is the latitude what is the magnitude?
CREATE TABLE table_24192190_1 (magnitude VARCHAR, latitude VARCHAR)
SELECT COUNT(town_city) FROM table_2572788_1 WHERE milepost = "71.1"
How many towns or cities are at milepost 71.1?
CREATE TABLE table_2572788_1 (town_city VARCHAR, milepost VARCHAR)
SELECT school FROM table_name_8 WHERE year_left = 1966 AND mascot = "indians"
Which School has a Year Left of 1966, and a Mascot of indians?
CREATE TABLE table_name_8 ( school VARCHAR, year_left VARCHAR, mascot VARCHAR )
SELECT COUNT(latitude) FROM table_24192190_1 WHERE time__utc_ = "9:47:38"
When 9:47:38 is the time (utc) how many measurements of latitude are there?
CREATE TABLE table_24192190_1 (latitude VARCHAR, time__utc_ VARCHAR)
SELECT milepost FROM table_2572788_1 WHERE town_city = "Beacon Falls"
At what milepost is Beacon Falls?
CREATE TABLE table_2572788_1 (milepost VARCHAR, town_city VARCHAR)
SELECT "Surface" FROM table_61328 WHERE "Opponents in the final" = 'mark edmondson sherwood stewart' AND "Tournament" = 'dallas , u.s.'
which Surface has Opponents in the final of mark edmondson sherwood stewart, and a Tournament of dallas , u.s.?
CREATE TABLE table_61328 ( "Outcome" text, "Date" real, "Tournament" text, "Surface" text, "Partner" text, "Opponents in the final" text, "Score in the final" text )
SELECT COUNT(longitude) FROM table_24192190_1 WHERE latitude = "42.903° N"
When 42.903° n is the latitude how many measurements of longitude are there?
CREATE TABLE table_24192190_1 (longitude VARCHAR, latitude VARCHAR)
SELECT COUNT(writer) FROM table_25737761_4 WHERE _number = 2
How many people wrote episode number 2 of the season?
CREATE TABLE table_25737761_4 (writer VARCHAR, _number VARCHAR)
SELECT location FROM table_name_63 WHERE rank_final = "10"
What is the Location of the Competition with a Rank-Final of 10?
CREATE TABLE table_name_63 ( location VARCHAR, rank_final VARCHAR )
SELECT depth FROM table_24192190_1 WHERE time__utc_ = "11:40:26"
When 11:40:26 is the time (utc) what is the depth?
CREATE TABLE table_24192190_1 (depth VARCHAR, time__utc_ VARCHAR)
SELECT MIN(_number) FROM table_25737761_4 WHERE writer = "Tony Basgallop"
What episode number of the season did Tony Basgallop write?
CREATE TABLE table_25737761_4 (_number INTEGER, writer VARCHAR)
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'CINCINNATI' AND flight.departure_time > 1500 AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'TAMPA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code
list flights from TAMPA to CINCINNATI after 1500
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 food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description 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 state ( state_code text, state_name text, country_name text ) 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 equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) 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 days ( days_code varchar, day_name varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_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 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 time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) 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 airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) 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 compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int )
SELECT main_presenter FROM table_24224647_2 WHERE year_premiered = 2011
Who is every main presenter for the year 2011?
CREATE TABLE table_24224647_2 (main_presenter VARCHAR, year_premiered VARCHAR)
SELECT MAX(_number) FROM table_25737761_4 WHERE no = 11
What episode number of the season is episode number 11 in the series?
CREATE TABLE table_25737761_4 (_number INTEGER, no VARCHAR)
SELECT "Visitor" FROM table_55189 WHERE "Attendance" > '19,141' AND "Date" = 'april 8'
Who was the visiting team on April 8 where more than 19,141 were in attendance?
CREATE TABLE table_55189 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Attendance" real, "Record" text )
SELECT main_presenter FROM table_24224647_2 WHERE region_country = "Estonia"
Who is every main presenter for the Estonia region/country?
CREATE TABLE table_24224647_2 (main_presenter VARCHAR, region_country VARCHAR)