VishalCh/book-train huggingface dataset:
Schema:
CREATE TABLE cost (
    costid number,
    uniquepid text,
    patienthealthsystemstayid number,
    eventtype text,
    eventid number,
    chargetime time,
    cost number
)

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 diagnosis (
    diagnosisid number,
    patientunitstayid number,
    diagnosisname text,
    diagnosistime time,
    icd9code text
)

CREATE TABLE lab (
    labid number,
    patientunitstayid number,
    labname text,
    labresult number,
    labresulttime time
)

CREATE TABLE medication (
    medicationid number,
    patientunitstayid number,
    drugname text,
    dosage text,
    routeadmin text,
    drugstarttime time,
    drugstoptime time
)

CREATE TABLE microlab (
    microlabid number,
    patientunitstayid number,
    culturesite text,
    organism text,
    culturetakentime time
)

CREATE TABLE treatment (
    treatmentid number,
    patientunitstayid number,
    treatmentname text,
    treatmenttime 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 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
)

Question: count the number of patients diagnosed with acute respiratory failure who did not come back to the hospital within 2 months of the diagnosis.

SQL:
SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'acute respiratory failure') AS t1) - (SELECT COUNT(DISTINCT t2.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'acute respiratory failure') AS t2 JOIN patient ON t2.uniquepid = patient.uniquepid WHERE t2.diagnosistime < patient.hospitaladmittime AND DATETIME(patient.hospitaladmittime) BETWEEN DATETIME(t2.diagnosistime) AND DATETIME(t2.diagnosistime, '+2 month'))
Schema:
CREATE TABLE Faculty_Participates_in (
    FacID INTEGER,
    actid INTEGER
)

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)
)

CREATE TABLE Activity (
    actid INTEGER,
    activity_name varchar(25)
)

CREATE TABLE Participates_in (
    stuid INTEGER,
    actid INTEGER
)

Question: How many faculty members participate in each activity? Return the activity names and the number of faculty members by a bar chart, and display Y-axis in asc order.

SQL:
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(*)
Schema:
CREATE TABLE table_1691800_2 (
    population__2010_ VARCHAR,
    municipality VARCHAR
)

Question: what is the population where municipality is san jacinto?

SQL:
SELECT population__2010_ FROM table_1691800_2 WHERE municipality = "San Jacinto"
Schema:
CREATE TABLE table_name_10 (
    nba_draft VARCHAR,
    school VARCHAR
)

Question: What is the NBA Draft for the School Bishop O'Connell High School?

SQL:
SELECT nba_draft FROM table_name_10 WHERE school = "bishop o'connell high school"
Schema:
CREATE TABLE table_33305 (
    "Round" real,
    "Overall" real,
    "Player" text,
    "Position" text,
    "College" text
)

Question: What is the average round in which a Safety with an overall rank higher than 89 was drafted?

SQL:
SELECT AVG("Round") FROM table_33305 WHERE "Position" = 'safety' AND "Overall" > '89'
Schema:
CREATE TABLE table_33270 (
    "Dance" text,
    "Best dancer" text,
    "Best score" real,
    "Worst dancer" text,
    "Worst score" real
)

Question: What is the average Worst score for Mario Lopez as the Best dancer and Tango as the Dance?

SQL:
SELECT AVG("Worst score") FROM table_33270 WHERE "Best dancer" = 'mario lopez' AND "Dance" = 'tango'
Schema:
CREATE TABLE allergy (
    allergyid number,
    patientunitstayid number,
    drugname text,
    allergyname text,
    allergytime time
)

CREATE TABLE lab (
    labid number,
    patientunitstayid number,
    labname text,
    labresult number,
    labresulttime 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 microlab (
    microlabid number,
    patientunitstayid number,
    culturesite text,
    organism text,
    culturetakentime time
)

CREATE TABLE cost (
    costid number,
    uniquepid text,
    patienthealthsystemstayid number,
    eventtype text,
    eventid number,
    chargetime time,
    cost number
)

CREATE TABLE treatment (
    treatmentid number,
    patientunitstayid number,
    treatmentname text,
    treatmenttime time
)

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
)

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 medication (
    medicationid number,
    patientunitstayid number,
    drugname text,
    dosage text,
    routeadmin text,
    drugstarttime time,
    drugstoptime time
)

Question: what lab test did patient 006-207754 last receive since 97 months ago?

SQL:
SELECT lab.labname FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-207754')) AND DATETIME(lab.labresulttime) >= DATETIME(CURRENT_TIME(), '-97 month') ORDER BY lab.labresulttime DESC LIMIT 1
Schema:
CREATE TABLE roller_coaster (
    Status VARCHAR
)

Question: Show the different statuses and the numbers of roller coasters for each status.

SQL:
SELECT Status, COUNT(*) FROM roller_coaster GROUP BY Status
Schema:
CREATE TABLE table_name_1 (
    character VARCHAR,
    year VARCHAR,
    award_ceremony VARCHAR
)

Question: Which character was nominated in the 2010 Indian Television Academy Awards?

SQL:
SELECT character FROM table_name_1 WHERE year = 2010 AND award_ceremony = "indian television academy awards"
Schema:
CREATE TABLE table_name_35 (
    score VARCHAR,
    date VARCHAR
)

Question: What was the score on May 3?

SQL:
SELECT score FROM table_name_35 WHERE date = "may 3"
Schema:
CREATE TABLE table_203_166 (
    id number,
    "pos" text,
    "no" number,
    "rider" text,
    "manufacturer" text,
    "laps" number,
    "time" text,
    "grid" number,
    "points" number
)

Question: which rider completed all 21 laps of the 2008 malaysian motorcycle grand prixwith the longest time ?

SQL:
SELECT "rider" FROM table_203_166 WHERE "laps" = 21 ORDER BY "pos" DESC LIMIT 1
Schema:
CREATE TABLE table_19654 (
    "No. in series" real,
    "No. in season" real,
    "Title" text,
    "Directed by" text,
    "Written by" text,
    "Original air date" text,
    "Production code" real
)

Question: Who directed the episode with the production code 176252?

SQL:
SELECT "Directed by" FROM table_19654 WHERE "Production code" = '176252'
Schema:
CREATE TABLE table_203_630 (
    id number,
    "rank" number,
    "nation" text,
    "gold" number,
    "silver" number,
    "bronze" number,
    "total" number
)

Question: who won more gold medals , brazil or china ?

SQL:
SELECT "nation" FROM table_203_630 WHERE "nation" IN ('brazil', 'china') ORDER BY "gold" DESC LIMIT 1
Schema:
CREATE TABLE table_53058 (
    "Home team" text,
    "Home team score" text,
    "Away team" text,
    "Away team score" text,
    "Venue" text,
    "Crowd" real,
    "Date" text
)

Question: What date was the game played at Punt Road Oval?

SQL:
SELECT "Date" FROM table_53058 WHERE "Venue" = 'punt road oval'
Schema:
CREATE TABLE table_3873 (
    "Game" real,
    "Date" text,
    "Team" text,
    "Score" text,
    "High points" text,
    "High rebounds" text,
    "High assists" text,
    "Location Attendance" text,
    "Series" text
)

Question: What is the series number when al horford (10) had the high rebounds?

SQL:
SELECT "Series" FROM table_3873 WHERE "High rebounds" = 'Al Horford (10)'
Schema:
CREATE TABLE microlab (
    microlabid number,
    patientunitstayid number,
    culturesite text,
    organism text,
    culturetakentime time
)

CREATE TABLE intakeoutput (
    intakeoutputid number,
    patientunitstayid number,
    cellpath text,
    celllabel text,
    cellvaluenumeric number,
    intakeoutputtime time
)

CREATE TABLE allergy (
    allergyid number,
    patientunitstayid number,
    drugname text,
    allergyname text,
    allergytime time
)

CREATE TABLE diagnosis (
    diagnosisid number,
    patientunitstayid number,
    diagnosisname text,
    diagnosistime time,
    icd9code text
)

CREATE TABLE medication (
    medicationid number,
    patientunitstayid number,
    drugname text,
    dosage text,
    routeadmin text,
    drugstarttime time,
    drugstoptime time
)

CREATE TABLE treatment (
    treatmentid number,
    patientunitstayid number,
    treatmentname text,
    treatmenttime 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 lab (
    labid number,
    patientunitstayid number,
    labname text,
    labresult number,
    labresulttime 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 cost (
    costid number,
    uniquepid text,
    patienthealthsystemstayid number,
    eventtype text,
    eventid number,
    chargetime time,
    cost number
)

Question: what is the name of the drug which patient 004-29334 was allergic to since 03/2104?

SQL:
SELECT allergy.drugname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-29334')) AND STRFTIME('%y-%m', allergy.allergytime) >= '2104-03'
Schema:
CREATE TABLE table_26914759_3 (
    manner_of_departure VARCHAR,
    team VARCHAR,
    incoming_manager VARCHAR
)

Question: What was the manner of departure for notts county with an incoming manager of martin allen

SQL:
SELECT manner_of_departure FROM table_26914759_3 WHERE team = "Notts County" AND incoming_manager = "Martin Allen"
Schema:
CREATE TABLE table_29572583_20 (
    player VARCHAR,
    status VARCHAR
)

Question: which player had the status to the fourth round lost to tsvetana pironkova [32] Answers:

SQL:
SELECT player FROM table_29572583_20 WHERE status = "Fourth round lost to Tsvetana Pironkova [32]"
Schema:
CREATE TABLE table_name_44 (
    home VARCHAR,
    visitor VARCHAR,
    date VARCHAR
)

Question: What is the Home team of the event on Thursday, December 11 with Visitor Modo Hockey?

SQL:
SELECT home FROM table_name_44 WHERE visitor = "modo hockey" AND date = "thursday, december 11"
Schema:
CREATE TABLE table_76383 (
    "Round" real,
    "Pick" real,
    "Overall" real,
    "Name" text,
    "Position" text,
    "College" text
)

Question: What is the lowest round for an overall pick of 349 with a pick number in the round over 11?

SQL:
SELECT MIN("Round") FROM table_76383 WHERE "Overall" = '349' AND "Pick" > '11'
Schema:
CREATE TABLE table_38485 (
    "Name" text,
    "Team" text,
    "Qual 1" text,
    "Qual 2" real,
    "Best" real
)

Question: Which team has a qualifying 2 time under 59.612 and a best of 59.14?

SQL:
SELECT "Team" FROM table_38485 WHERE "Qual 2" < '59.612' AND "Best" = '59.14'
Schema:
CREATE TABLE table_18734298_1 (
    title VARCHAR,
    production_code VARCHAR
)

Question: What is the title of the production code 1acx09?

SQL:
SELECT title FROM table_18734298_1 WHERE production_code = "1ACX09"
Schema:
CREATE TABLE regions (
    REGION_ID decimal(5,0),
    REGION_NAME varchar(25)
)

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 job_history (
    EMPLOYEE_ID decimal(6,0),
    START_DATE date,
    END_DATE date,
    JOB_ID varchar(10),
    DEPARTMENT_ID decimal(4,0)
)

CREATE TABLE countries (
    COUNTRY_ID varchar(2),
    COUNTRY_NAME varchar(40),
    REGION_ID decimal(10,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)
)

CREATE TABLE jobs (
    JOB_ID varchar(10),
    JOB_TITLE varchar(35),
    MIN_SALARY decimal(6,0),
    MAX_SALARY decimal(6,0)
)

Question: Show me a line chart to show the change of salary for those employees whose first name does not containing the letter M over the corresponding hire date.

SQL:
SELECT HIRE_DATE, SALARY FROM employees WHERE NOT FIRST_NAME LIKE '%M%'
Schema:
CREATE TABLE table_56896 (
    "Home team" text,
    "Home team score" text,
    "Away team" text,
    "Away team score" text,
    "Venue" text,
    "Crowd" real,
    "Date" text
)

Question: The home team has a score of 12.9 (81) what is the score of the away team?

SQL:
SELECT "Away team score" FROM table_56896 WHERE "Home team score" = '12.9 (81)'
Schema:
CREATE TABLE table_53653 (
    "Place (Posici\u00f3n)" real,
    "Team (Equipo)" text,
    "Played (PJ)" real,
    "Won (PG)" real,
    "Draw (PE)" real,
    "Lost (PP)" real,
    "Goals Scored (GF)" real,
    "Goals Conceded (GC)" real,
    "+/- (Dif.)" real,
    "Points (Pts.)" real
)

Question: What is the average number of goals conceded where more than 19 goals were scored, the team had 31 points, and more than 7 draws?

SQL:
SELECT AVG("Goals Conceded (GC)") FROM table_53653 WHERE "Goals Scored (GF)" > '19' AND "Points (Pts.)" = '31' AND "Draw (PE)" > '7'
Schema:
CREATE TABLE table_3565 (
    "Contestant" text,
    "Place" real,
    "Age" real,
    "Country" text,
    "Federal state" text,
    "City" text,
    "Height" text,
    "Measurements (in cm)" text
)

Question: what measurement does the contestant from sindelfingen have?

SQL:
SELECT "Measurements (in cm)" FROM table_3565 WHERE "City" = 'Sindelfingen'
Schema:
CREATE TABLE ship (
    name VARCHAR,
    ship_id VARCHAR
)

CREATE TABLE captain (
    ship_id VARCHAR
)

Question: Find the name of the ships that have more than one captain.

SQL:
SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id GROUP BY t2.ship_id HAVING COUNT(*) > 1
Schema:
CREATE TABLE table_name_69 (
    runner_up VARCHAR,
    winning_score VARCHAR
)

Question: Which Runner-up has a Winning score of 20 (70-69-64-65=268)?

SQL:
SELECT runner_up FROM table_name_69 WHERE winning_score = −20(70 - 69 - 64 - 65 = 268)
Schema:
CREATE TABLE table_27715173_8 (
    game VARCHAR,
    high_points VARCHAR
)

Question: what is the game where the high points is by manu gin bili (26)?

SQL:
SELECT game FROM table_27715173_8 WHERE high_points = "Manu Ginóbili (26)"
Schema:
CREATE TABLE table_50944 (
    "Rider" text,
    "Manufacturer" text,
    "Laps" real,
    "Time" text,
    "Grid" real
)

Question: What are the average Laps on Grid 15?

SQL:
SELECT AVG("Laps") FROM table_50944 WHERE "Grid" = '15'
Schema:
CREATE TABLE table_66598 (
    "Year" real,
    "Competition" text,
    "Venue" text,
    "Position" text,
    "Event" text,
    "Notes" text
)

Question: What event was in a year later than 2007 and in the 88th position?

SQL:
SELECT "Event" FROM table_66598 WHERE "Year" > '2007' AND "Position" = '88th'
Schema:
CREATE TABLE table_53525 (
    "Position" real,
    "Club" text,
    "Played" real,
    "Points" text,
    "Wins" real,
    "Draws" real,
    "Losses" real,
    "Goals for" real,
    "Goals against" real,
    "Goal Difference" real
)

Question: Which highest 'goals against' number had wins of 19 and a 'goals for' number that was bigger than 53?

SQL:
SELECT MAX("Goals against") FROM table_53525 WHERE "Wins" = '19' AND "Goals for" > '53'
Schema:
CREATE TABLE table_203_871 (
    id number,
    "#" number,
    "player" text,
    "pos" text,
    "pts" number,
    "tries" number,
    "conv" number,
    "pens" number,
    "drop" number,
    "opposition" text,
    "venue" text,
    "date" text
)

Question: what is the name of the first player on this list ?

SQL:
SELECT "player" FROM table_203_871 WHERE id = 1
Schema:
CREATE TABLE table_42917 (
    "m\u00e5cha" text,
    "indicative" text,
    "imperative" text,
    "subjunctive" text,
    "inverse subjunctive" text
)

Question: What inverse subjunctive has as the imperative and a subjunctive of se m chadn?

SQL:
SELECT "inverse subjunctive" FROM table_42917 WHERE "imperative" = '—' AND "subjunctive" = 'se måchadn'
Schema:
CREATE TABLE table_name_76 (
    term_in_office VARCHAR,
    electorate VARCHAR,
    state VARCHAR,
    party VARCHAR
)

Question: Which term in office has a qld state, a Party of labor, and an Electorate of fisher?

SQL:
SELECT term_in_office FROM table_name_76 WHERE state = "qld" AND party = "labor" AND electorate = "fisher"
Schema:
CREATE TABLE Documents (
    document_id INTEGER,
    document_type_code VARCHAR(10),
    grant_id INTEGER,
    sent_date DATETIME,
    response_received_date DATETIME,
    other_details VARCHAR(255)
)

CREATE TABLE Grants (
    grant_id INTEGER,
    organisation_id INTEGER,
    grant_amount DECIMAL(19,4),
    grant_start_date DATETIME,
    grant_end_date DATETIME,
    other_details VARCHAR(255)
)

CREATE TABLE Staff_Roles (
    role_code VARCHAR(10),
    role_description VARCHAR(255)
)

CREATE TABLE Projects (
    project_id INTEGER,
    organisation_id INTEGER,
    project_details VARCHAR(255)
)

CREATE TABLE Research_Outcomes (
    outcome_code VARCHAR(10),
    outcome_description VARCHAR(255)
)

CREATE TABLE Organisations (
    organisation_id INTEGER,
    organisation_type VARCHAR(10),
    organisation_details VARCHAR(255)
)

CREATE TABLE Organisation_Types (
    organisation_type VARCHAR(10),
    organisation_type_description VARCHAR(255)
)

CREATE TABLE Research_Staff (
    staff_id INTEGER,
    employer_organisation_id INTEGER,
    staff_details VARCHAR(255)
)

CREATE TABLE Project_Outcomes (
    project_id INTEGER,
    outcome_code VARCHAR(10),
    outcome_details VARCHAR(255)
)

CREATE TABLE Project_Staff (
    staff_id DOUBLE,
    project_id INTEGER,
    role_code VARCHAR(10),
    date_from DATETIME,
    date_to DATETIME,
    other_details VARCHAR(255)
)

CREATE TABLE Document_Types (
    document_type_code VARCHAR(10),
    document_description VARCHAR(255)
)

CREATE TABLE Tasks (
    task_id INTEGER,
    project_id INTEGER,
    task_details VARCHAR(255),
    "eg Agree Objectives" VARCHAR(1)
)

Question: A bar chart for what are the number of the descriptions of all the project outcomes?, and show X in desc order.

SQL:
SELECT outcome_description, COUNT(outcome_description) FROM Research_Outcomes AS T1 JOIN Project_Outcomes AS T2 ON T1.outcome_code = T2.outcome_code GROUP BY outcome_description ORDER BY outcome_description DESC
Schema:
CREATE TABLE table_name_40 (
    score VARCHAR,
    money___$__ VARCHAR
)

Question: What is the score for the player who won $3,600?

SQL:
SELECT score FROM table_name_40 WHERE money___$__ = "3,600"
Schema:
CREATE TABLE table_72533 (
    "Player" text,
    "Position" text,
    "Starter" text,
    "Touchdowns" real,
    "Extra points" real,
    "Field goals" real,
    "Points" real
)

Question: Name the most field goals

SQL:
SELECT MAX("Field goals") FROM table_72533
Schema:
CREATE TABLE table_53833 (
    "Year" text,
    "Winner" text,
    "Jockey" text,
    "Trainer" text,
    "Owner" text,
    "Distance" text,
    "Time" text,
    "Purse" text
)

Question: What year did jockey Ramon Dominguez have a distance of 1-1/16?

SQL:
SELECT "Year" FROM table_53833 WHERE "Distance" = '1-1/16' AND "Jockey" = 'ramon dominguez'
Schema:
CREATE TABLE table_73867 (
    "Constituency" text,
    "Candidate" text,
    "Affiliation" text,
    "Result - votes" real,
    "Result - %" text,
    "Loss/gain" text
)

Question: What is the largest vote result if loss/gain is -0.5%?

SQL:
SELECT MAX("Result - votes") FROM table_73867 WHERE "Loss/gain" = '-0.5%'
Schema:
CREATE TABLE table_36845 (
    "Game" real,
    "December" real,
    "Opponent" text,
    "Score" text,
    "Record" text
)

Question: What is the sum for December when the record was 22-12-5?

SQL:
SELECT SUM("December") FROM table_36845 WHERE "Record" = '22-12-5'