VishalCh/book-train huggingface dataset:
Schema:
CREATE TABLE diagnoses_icd (
    row_id number,
    subject_id number,
    hadm_id number,
    icd9_code text,
    charttime 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 outputevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    value number
)

CREATE TABLE patients (
    row_id number,
    subject_id number,
    gender text,
    dob time,
    dod time
)

CREATE TABLE icustays (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    first_careunit text,
    last_careunit text,
    first_wardid number,
    last_wardid number,
    intime time,
    outtime time
)

CREATE TABLE procedures_icd (
    row_id number,
    subject_id number,
    hadm_id number,
    icd9_code text,
    charttime time
)

CREATE TABLE microbiologyevents (
    row_id number,
    subject_id number,
    hadm_id number,
    charttime time,
    spec_type_desc text,
    org_name 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 d_icd_diagnoses (
    row_id number,
    icd9_code text,
    short_title text,
    long_title text
)

CREATE TABLE admissions (
    row_id number,
    subject_id number,
    hadm_id number,
    admittime time,
    dischtime time,
    admission_type text,
    admission_location text,
    discharge_location text,
    insurance text,
    language text,
    marital_status text,
    ethnicity text,
    age number
)

CREATE TABLE labevents (
    row_id number,
    subject_id number,
    hadm_id number,
    itemid number,
    charttime time,
    valuenum number,
    valueuom text
)

CREATE TABLE cost (
    row_id number,
    subject_id number,
    hadm_id number,
    event_type text,
    event_id number,
    chargetime time,
    cost number
)

CREATE TABLE d_items (
    row_id number,
    itemid number,
    label text,
    linksto 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_labitems (
    row_id number,
    itemid number,
    label text
)

CREATE TABLE inputevents_cv (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    amount number
)

CREATE TABLE d_icd_procedures (
    row_id number,
    icd9_code text,
    short_title text,
    long_title text
)

Question: tell me the name of the last specimen test patient 26612 had received in 12/2102?

SQL:
SELECT microbiologyevents.spec_type_desc FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 26612) AND STRFTIME('%y-%m', microbiologyevents.charttime) = '2102-12' ORDER BY microbiologyevents.charttime DESC LIMIT 1
Schema:
CREATE TABLE table_name_38 (
    date VARCHAR,
    score VARCHAR
)

Question: When was the game that ended with a score of 6-4?

SQL:
SELECT date FROM table_name_38 WHERE score = "6-4"
Schema:
CREATE TABLE table_name_54 (
    goals VARCHAR,
    player VARCHAR
)

Question: How many goals were scored by Eugene Galekovi ?

SQL:
SELECT goals FROM table_name_54 WHERE player = "eugene galeković"
Schema:
CREATE TABLE phone (
    Name text,
    Phone_ID int,
    Memory_in_G int,
    Carrier text,
    Price real
)

CREATE TABLE market (
    Market_ID int,
    District text,
    Num_of_employees int,
    Num_of_shops real,
    Ranking int
)

CREATE TABLE phone_market (
    Market_ID int,
    Phone_ID text,
    Num_of_stock int
)

Question: Plot total number of memory in g by grouped by carrier as a bar graph, display by the sum memory in g in asc.

SQL:
SELECT Carrier, SUM(Memory_in_G) FROM phone GROUP BY Carrier ORDER BY SUM(Memory_in_G)
Schema:
CREATE TABLE table_75308 (
    "Source" text,
    "Date" text,
    "Blagojevich (D)" text,
    "Topinka (R)" text,
    "Remainder" text
)

Question: Which Source has a Remainder of 15%, and a Topinka of 26%?

SQL:
SELECT "Source" FROM table_75308 WHERE "Remainder" = '15%' AND "Topinka (R)" = '26%'
Schema:
CREATE TABLE table_name_2 (
    date VARCHAR,
    record VARCHAR
)

Question: What is the date of the Cubs game when the Cubs had a record of 1-0?

SQL:
SELECT date FROM table_name_2 WHERE record = "1-0"
Schema:
CREATE TABLE prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
)

CREATE TABLE demographic (
    subject_id text,
    hadm_id text,
    name text,
    marital_status text,
    age text,
    dob text,
    gender text,
    language text,
    religion text,
    admission_type text,
    days_stay text,
    insurance text,
    ethnicity text,
    expire_flag text,
    admission_location text,
    discharge_location text,
    diagnosis text,
    dod text,
    dob_year text,
    dod_year text,
    admittime text,
    dischtime text,
    admityear text
)

CREATE TABLE lab (
    subject_id text,
    hadm_id text,
    itemid text,
    charttime text,
    flag text,
    value_unit text,
    label text,
    fluid text
)

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

Question: what is marital status and primary disease of subject id 74032?

SQL:
SELECT demographic.marital_status, demographic.diagnosis FROM demographic WHERE demographic.subject_id = "74032"

Question: give me the number of patients whose year of death is less than or equal to 2158 and procedure icd9 code is 3615?

SQL:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2158.0" AND procedures.icd9_code = "3615"

Question: give the number of patients whose drug code is phen10i and lab test category is blood gas.

SQL:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "PHEN10I" AND lab."CATEGORY" = "Blood Gas"
Schema:
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
)

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 prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
)

Question: what is date of birth and diagnoses short title of subject id 66411?

SQL:
SELECT demographic.dob, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "66411"

Question: Find the number of patients who were transferred within this facility and were born before the year 2150.

SQL:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND demographic.dob_year < "2150"

Question: How many patients were admitted with pure hyperglyceridemia before 2187?

SQL:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2187" AND diagnoses.long_title = "Pure hyperglyceridemia"
Schema:
CREATE TABLE table_9850 (
    "Volume:Issue" text,
    "Issue Date(s)" text,
    "Weeks on Top" text,
    "Song" text,
    "Artist" text
)

Question: What is the name of the artist that issued the single on 23 February?

SQL:
SELECT "Artist" FROM table_9850 WHERE "Issue Date(s)" = '23 february'
Schema:
CREATE TABLE table_8232 (
    "Game" text,
    "Date" text,
    "Home Team" text,
    "Result" text,
    "Road Team" text
)

Question: What is the result of the game on April 17 against Los Angeles?

SQL:
SELECT "Result" FROM table_8232 WHERE "Road Team" = 'los angeles' AND "Date" = 'april 17'
Schema:
CREATE TABLE table_24561550_1 (
    record VARCHAR,
    wildcats_points VARCHAR
)

Question: List the record from the game where Wildcats had 48 points.

SQL:
SELECT record FROM table_24561550_1 WHERE wildcats_points = 48
Schema:
CREATE TABLE customers (
    customer_id number,
    customer_first_name text,
    customer_last_name text,
    customer_address text,
    customer_phone text,
    customer_email text,
    other_customer_details text
)

CREATE TABLE financial_transactions (
    transaction_id number,
    previous_transaction_id number,
    account_id number,
    card_id number,
    transaction_type text,
    transaction_date time,
    transaction_amount number,
    transaction_comment text,
    other_transaction_details text
)

CREATE TABLE customers_cards (
    card_id number,
    customer_id number,
    card_type_code text,
    card_number text,
    date_valid_from time,
    date_valid_to time,
    other_card_details text
)

CREATE TABLE accounts (
    account_id number,
    customer_id number,
    account_name text,
    other_account_details text
)

Question: Show all card type codes and the number of cards in each type.

SQL:
SELECT card_type_code, COUNT(*) FROM customers_cards GROUP BY card_type_code
Schema:
CREATE TABLE table_23048 (
    "Week #" text,
    "Theme" text,
    "Song choice" text,
    "Original artist" text,
    "Order #" text,
    "Result" text
)

Question: Name the song choice for michael jackson

SQL:
SELECT "Song choice" FROM table_23048 WHERE "Original artist" = 'Michael Jackson'
Schema:
CREATE TABLE table_name_17 (
    points INTEGER,
    lost VARCHAR,
    name VARCHAR
)

Question: How many points did the ESC Riverrats Geretsried, who lost more than 3 games, score?

SQL:
SELECT SUM(points) FROM table_name_17 WHERE lost > 3 AND name = "esc riverrats geretsried"
Schema:
CREATE TABLE table_name_4 (
    crowd VARCHAR,
    away_team VARCHAR
)

Question: How big was the crowd when the away team was Richmond?

SQL:
SELECT crowd FROM table_name_4 WHERE away_team = "richmond"
Schema:
CREATE TABLE table_3334 (
    "Settlement" text,
    "Cyrillic Name Other Names" text,
    "Type" text,
    "Population (2011)" real,
    "Largest ethnic group (2002)" text,
    "Dominant religion (2002)" text
)

Question: Name the cyrillic name for melenci

SQL:
SELECT "Cyrillic Name Other Names" FROM table_3334 WHERE "Settlement" = 'Melenci'
Schema:
CREATE TABLE table_train_185 (
    "id" int,
    "dyscrasia" bool,
    "bleeding" int,
    "panic_disorder" bool,
    "renal_disease" bool,
    "anxiety" bool,
    "creatinine_clearance_cl" float,
    "alcohol_abuse" bool,
    "retinopathy" bool,
    "NOUSE" float
)

Question: current alcohol abuse

SQL:
SELECT * FROM table_train_185 WHERE alcohol_abuse = 1
Schema:
CREATE TABLE table_22736523_1 (
    result VARCHAR,
    week__number VARCHAR
)

Question: For week number of the top 40, what was the results?

SQL:
SELECT result FROM table_22736523_1 WHERE week__number = "Top 40"
Schema:
CREATE TABLE table_name_26 (
    age_groups VARCHAR,
    competition_name VARCHAR
)

Question: What are the age groups for the Big League World Series?

SQL:
SELECT age_groups FROM table_name_26 WHERE competition_name = "big league world series"
Schema:
CREATE TABLE table_58997 (
    "Place" text,
    "Player" text,
    "Country" text,
    "Score" text,
    "To par" real,
    "Money ( \u00a3 )" text
)

Question: What is the money with a Score of 76-70-75-72=293?

SQL:
SELECT "Money ( \u00a3 )" FROM table_58997 WHERE "Score" = '76-70-75-72=293'
Schema:
CREATE TABLE table_name_61 (
    year VARCHAR,
    organization VARCHAR,
    team VARCHAR
)

Question: Which year has an Organization of new york yankees, and a Team of johnson city yankees?

SQL:
SELECT year FROM table_name_61 WHERE organization = "new york yankees" AND team = "johnson city yankees"
Schema:
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 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 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
)

Question: what is minimum age of patients whose primary disease is coronary artery disease\coronary artery bypass graft with mvr; ? maze and admission year is greater than or equal to 2146?

SQL:
SELECT MIN(demographic.age) FROM demographic WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT WITH MVR; ? MAZE" AND demographic.admityear >= "2146"

Question: calculate the minimum age of patients who are 83 years of age or older and were hospitalized for 43 days.

SQL:
SELECT MIN(demographic.age) FROM demographic WHERE demographic.age >= "83" AND demographic.days_stay = "43"
Schema:
CREATE TABLE region (
    region_id number,
    region_code text,
    region_name text
)

CREATE TABLE affected_region (
    region_id number,
    storm_id number,
    number_city_affected number
)

CREATE TABLE storm (
    storm_id number,
    name text,
    dates_active text,
    max_speed number,
    damage_millions_usd number,
    number_deaths number
)

Question: What are the names of storms that did not affect two or more regions?

SQL:
SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING COUNT(*) >= 2
Schema:
CREATE TABLE table_12802 (
    "Draft" real,
    "Round" real,
    "Pick" real,
    "Player" text,
    "Nationality" text
)

Question: What is the average pick of player paul maclean, who had a draft before 1978?

SQL:
SELECT AVG("Pick") FROM table_12802 WHERE "Player" = 'paul maclean' AND "Draft" < '1978'
Schema:
CREATE TABLE table_1745843_9 (
    class VARCHAR,
    part_3 VARCHAR
)

Question: Name the class for boten

SQL:
SELECT class FROM table_1745843_9 WHERE part_3 = "boten"
Schema:
CREATE TABLE table_26635 (
    "Episode #" text,
    "Segment 1" text,
    "Segment 2" text,
    "Original airdate" text,
    "Lessons taught" text
)

Question: Name the segment 1 for episode # 2/225

SQL:
SELECT "Segment 1" FROM table_26635 WHERE "Episode #" = '2/225'
Schema:
CREATE TABLE table_name_12 (
    director VARCHAR,
    release_date VARCHAR,
    series VARCHAR,
    production_num VARCHAR
)

Question: Who was the director of the movie having a release date of 1934-09-15, an MM Series and a production number less than 6494?

SQL:
SELECT director FROM table_name_12 WHERE series = "mm" AND production_num < 6494 AND release_date = "1934-09-15"
Schema:
CREATE TABLE table_name_32 (
    pick__number INTEGER,
    name VARCHAR,
    round VARCHAR
)

Question: Which Pick # is the highest one that has a Name of william middleton, and a Round larger than 5?

SQL:
SELECT MAX(pick__number) FROM table_name_32 WHERE name = "william middleton" AND round > 5
Schema:
CREATE TABLE table_14163 (
    "Order" real,
    "Published as serial" text,
    "Published as novel" text,
    "Fictional narrator" text,
    "Year in novel" text
)

Question: Which Fictional narrator has a Published as serial of february july 1912, all-story?

SQL:
SELECT "Fictional narrator" FROM table_14163 WHERE "Published as serial" = 'february–july 1912, all-story'
Schema:
CREATE TABLE table_name_75 (
    time_retired VARCHAR,
    qual VARCHAR
)

Question: Which time/retired has a qual of 144.02?

SQL:
SELECT time_retired FROM table_name_75 WHERE qual = 144.02
Schema:
CREATE TABLE treatment (
    treatmentid number,
    patientunitstayid number,
    treatmentname text,
    treatmenttime 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
)

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 lab (
    labid number,
    patientunitstayid number,
    labname text,
    labresult number,
    labresulttime 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 vitalperiodic (
    vitalperiodicid number,
    patientunitstayid number,
    temperature number,
    sao2 number,
    heartrate number,
    respiration number,
    systemicsystolic number,
    systemicdiastolic number,
    systemicmean number,
    observationtime time
)

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

Question: did patient 030-6441 have a wound care procedure at other hospitals?

SQL:
SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '030-6441' AND patient.hospitalid <> (SELECT DISTINCT patient.hospitalid FROM patient WHERE patient.uniquepid = '030-6441' AND patient.hospitaldischargetime IS NULL)) AND treatment.treatmentname = 'wound care'
Schema:
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 labevents (
    row_id number,
    subject_id number,
    hadm_id number,
    itemid number,
    charttime time,
    valuenum number,
    valueuom text
)

CREATE TABLE cost (
    row_id number,
    subject_id number,
    hadm_id number,
    event_type text,
    event_id number,
    chargetime time,
    cost 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 outputevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    value number
)

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 d_labitems (
    row_id number,
    itemid number,
    label text
)

CREATE TABLE d_icd_diagnoses (
    row_id number,
    icd9_code text,
    short_title text,
    long_title text
)

CREATE TABLE procedures_icd (
    row_id number,
    subject_id number,
    hadm_id number,
    icd9_code text,
    charttime time
)

CREATE TABLE patients (
    row_id number,
    subject_id number,
    gender text,
    dob time,
    dod 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 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 diagnoses_icd (
    row_id number,
    subject_id number,
    hadm_id number,
    icd9_code text,
    charttime time
)

CREATE TABLE microbiologyevents (
    row_id number,
    subject_id number,
    hadm_id number,
    charttime time,
    spec_type_desc text,
    org_name 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 d_icd_procedures (
    row_id number,
    icd9_code text,
    short_title text,
    long_title text
)

Question: count the number of patients who until 4 years ago have been prescribed acd-a for crrt.

SQL:
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT prescriptions.hadm_id FROM prescriptions WHERE prescriptions.drug = 'acd-a for crrt' AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-4 year'))
Schema:
CREATE TABLE table_23959 (
    "Season" text,
    "GP" real,
    "W (OT/SO)" text,
    "L (OT/SO)" text,
    "Pts" real,
    "Pts/GP" text,
    "GF \u2013 GA" text,
    "Rank (league/conference)" text,
    "Top Scorer" text
)

Question: In season is 2008 09, how many wins did they have?

SQL:
SELECT "W (OT/SO)" FROM table_23959 WHERE "Season" = '2008–09'
Schema:
CREATE TABLE table_27756014_6 (
    high_points VARCHAR,
    date VARCHAR
)

Question: How many people scored the most points during the game on December 10?

SQL:
SELECT COUNT(high_points) FROM table_27756014_6 WHERE date = "December 10"
Schema:
CREATE TABLE table_33317 (
    "Home team" text,
    "Home team score" text,
    "Away team" text,
    "Away team score" text,
    "Venue" text,
    "Crowd" real,
    "Date" text
)

Question: For the match with a home team score of 11.14 (80), what was the venue?

SQL:
SELECT "Venue" FROM table_33317 WHERE "Home team score" = '11.14 (80)'
Schema:
CREATE TABLE table_3588 (
    "Year" real,
    "Starts" real,
    "Wins" real,
    "Top 10" real,
    "Avg. Start" text,
    "Avg. Finish" text,
    "Winnings" text,
    "Position" text,
    "Team(s)" text
)

Question: How many positions are there for RB1 Motorsports?

SQL:
SELECT COUNT("Position") FROM table_3588 WHERE "Team(s)" = 'RB1 Motorsports'