VishalCh/book-train huggingface dataset:
Schema:
CREATE TABLE table_33397 (
    "Home team" text,
    "Home team score" text,
    "Away team" text,
    "Away team score" text,
    "Venue" text,
    "Crowd" real,
    "Date" text
)

Question: What was the crowd size when the away team scored 7.19 (61)?

SQL:
SELECT COUNT("Crowd") FROM table_33397 WHERE "Away team score" = '7.19 (61)'
Schema:
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
)

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

CREATE TABLE prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
)

Question: what is the marital status and days of hospital stay of subject id 6983?

SQL:
SELECT demographic.marital_status, demographic.days_stay FROM demographic WHERE demographic.subject_id = "6983"
Schema:
CREATE TABLE table_44017 (
    "Team" text,
    "Driver" text,
    "Class" text,
    "Chassis" text,
    "Rounds" text
)

Question: Which driver was in 8 rounds with a chassis of dallara f306?

SQL:
SELECT "Driver" FROM table_44017 WHERE "Chassis" = 'dallara f306' AND "Rounds" = '8'
Schema:
CREATE TABLE table_name_8 (
    points INTEGER,
    place INTEGER
)

Question: Which places have points larger than 10?

SQL:
SELECT MIN(points) FROM table_name_8 WHERE place > 10
Schema:
CREATE TABLE table_5865 (
    "Pick #" text,
    "Player" text,
    "Position" text,
    "Nationality" text,
    "NHL team" text,
    "College/junior/club team" text
)

Question: What is the Position for the brandon wheat kings (wchl)?

SQL:
SELECT "Position" FROM table_5865 WHERE "College/junior/club team" = 'brandon wheat kings (wchl)'
Schema:
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
)

Question: Give me the comparison about the sum of Weight over the Sex , and group by attribute Sex, and could you show Sex in desc order?

SQL:
SELECT Sex, SUM(Weight) FROM people GROUP BY Sex ORDER BY Sex DESC

Question: Return a bar chart about the distribution of Date_of_Birth and Height , display in desc by the names please.

SQL:
SELECT Date_of_Birth, Height FROM people ORDER BY Date_of_Birth DESC
Schema:
CREATE TABLE table_2971 (
    "April 2013 Cum. Rank" real,
    "Name" text,
    "Rank (all) 2012" real,
    "Rank (all) 2013" real,
    "2013 Rank (oil companies)" text,
    "2013 rev (bil. USD )" text,
    "2013 Profit (mil. USD )" real,
    "Assets (bil. USD )" text,
    "Market cap March 15 (mil. USD )" real
)

Question: What was the Forbers rank (all companies) in 2012 for cenovus energy?

SQL:
SELECT "Rank (all) 2012" FROM table_2971 WHERE "Name" = 'Cenovus Energy'
Schema:
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
)

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
)

Question: what is minimum age of patients whose marital status is single and primary disease is hypertension;rule out coronary artery disease\cardiac cath?

SQL:
SELECT MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "HYPERTENSION;RULE OUT CORONARY ARTERY DISEASE\CARDIAC CATH"
Schema:
CREATE TABLE table_13183076_3 (
    us_viewers__million_ VARCHAR,
    production_code VARCHAR
)

Question: How many U.S. viewers (million) are there for the episode whose Production code is 3T7051?

SQL:
SELECT us_viewers__million_ FROM table_13183076_3 WHERE production_code = "3T7051"
Schema:
CREATE TABLE table_71894 (
    "Episode" text,
    "First aired" text,
    "Entrepreneur(s)" text,
    "Company or product name" text,
    "Money requested (\u00a3)" text,
    "Investing Dragon(s)" text
)

Question: Which Investing Dragon(s) belong to Episode 9 with the Entrepreneur Ashley Sayed?

SQL:
SELECT "Investing Dragon(s)" FROM table_71894 WHERE "Episode" = 'episode 9' AND "Entrepreneur(s)" = 'ashley sayed'
Schema:
CREATE TABLE voting_record (
    stuid number,
    registration_date text,
    election_cycle text,
    president_vote number,
    vice_president_vote number,
    secretary_vote number,
    treasurer_vote number,
    class_president_vote number,
    class_senator_vote number
)

CREATE TABLE student (
    stuid number,
    lname text,
    fname text,
    age number,
    sex text,
    major number,
    advisor number,
    city_code text
)

Question: Which advisors are advising more than 2 students?

SQL:
SELECT advisor FROM student GROUP BY advisor HAVING COUNT(*) > 2
Schema:
CREATE TABLE table_name_15 (
    to_par VARCHAR,
    player VARCHAR
)

Question: What was willie wood's to par?

SQL:
SELECT to_par FROM table_name_15 WHERE player = "willie wood"
Schema:
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 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 treatment (
    treatmentid number,
    patientunitstayid number,
    treatmentname text,
    treatmenttime time
)

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

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

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

Question: what was the four most often given procedures for patients 40s?

SQL:
SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 40 AND 49) GROUP BY treatment.treatmentname) AS t1 WHERE t1.c1 <= 4

Question: tell me the top five most common diagnoses of patients with an age of 20s until 2104?

SQL:
SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 20 AND 29) AND STRFTIME('%y', diagnosis.diagnosistime) <= '2104' GROUP BY diagnosis.diagnosisname) AS t1 WHERE t1.c1 <= 5
Schema:
CREATE TABLE table_14845 (
    "Minister" text,
    "Party" text,
    "Start date" text,
    "End date" text,
    "Prime Minister" text
)

Question: Name the end date for robert goebbels

SQL:
SELECT "End date" FROM table_14845 WHERE "Minister" = 'robert goebbels'
Schema:
CREATE TABLE Reviewer (
    rID int,
    name text
)

CREATE TABLE Rating (
    rID int,
    mID int,
    stars int,
    ratingDate date
)

CREATE TABLE Movie (
    mID int,
    title text,
    year int,
    director text
)

Question: Give me a scatter chart to show the star rating of the movie and reviewer id, group the title.

SQL:
SELECT rID, stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY title
Schema:
CREATE TABLE table_1806 (
    "No. in series" real,
    "No. in season" real,
    "Title" text,
    "Directed by" text,
    "Written by" text,
    "Original air date" text,
    "Prod. code" text,
    "Viewers (millions)" text
)

Question: What's the production code of the episode titled 'He ain't a hottie, he's my brother'?

SQL:
SELECT "Prod. code" FROM table_1806 WHERE "Title" = 'He Ain''t a Hottie, He''s My Brother'
Schema:
CREATE TABLE table_name_60 (
    home_team VARCHAR,
    away_team VARCHAR
)

Question: What is the home team score that played away team carlton?

SQL:
SELECT home_team AS score FROM table_name_60 WHERE away_team = "carlton"
Schema:
CREATE TABLE table_204_951 (
    id number,
    "candidate" text,
    "votes" number,
    "percentage" text,
    "counties" number,
    "delegates" number
)

Question: who received more votes , duncan hunter or alan keyes ?

SQL:
SELECT "candidate" FROM table_204_951 WHERE "candidate" IN ('duncan hunter', 'alan keyes') ORDER BY "votes" DESC LIMIT 1
Schema:
CREATE TABLE table_5067 (
    "Game" real,
    "Date" text,
    "Team" text,
    "Score" text,
    "High points" text,
    "High rebounds" text,
    "High assists" text,
    "Location Attendance" text,
    "Record" text
)

Question: What is the sum of Game on february 28?

SQL:
SELECT SUM("Game") FROM table_5067 WHERE "Date" = 'february 28'
Schema:
CREATE TABLE table_name_7 (
    type_of_game VARCHAR,
    results¹ VARCHAR
)

Question: What type of game had a result of 1:2?

SQL:
SELECT type_of_game FROM table_name_7 WHERE results¹ = "1:2"
Schema:
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
)

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

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 microlab (
    microlabid number,
    patientunitstayid number,
    culturesite text,
    organism text,
    culturetakentime time
)

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

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

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

Question: tell me the name of the drug to which patient 007-849 was allergic in this hospital encounter?

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 = '007-849' AND patient.hospitaldischargetime IS NULL))
Schema:
CREATE TABLE table_44277 (
    "Place" text,
    "Player" text,
    "Country" text,
    "Score" text,
    "To par" text,
    "Money ( $ )" real
)

Question: What place is South Africa?

SQL:
SELECT "Place" FROM table_44277 WHERE "Country" = 'south africa'
Schema:
CREATE TABLE table_name_31 (
    date VARCHAR,
    result VARCHAR
)

Question: What Date has a Result of l 21 34?

SQL:
SELECT date FROM table_name_31 WHERE result = "l 21–34"
Schema:
CREATE TABLE table_7372 (
    "Position" real,
    "Team" text,
    "Points" real,
    "Played" real,
    "Drawn" real,
    "Lost" real,
    "Against" real,
    "Difference" text
)

Question: What is the largest lost stat when the difference is - 19?

SQL:
SELECT MAX("Lost") FROM table_7372 WHERE "Difference" = '- 19'
Schema:
CREATE TABLE table_name_9 (
    constructor VARCHAR,
    grid VARCHAR
)

Question: Tell me the constructor for grid of 17

SQL:
SELECT constructor FROM table_name_9 WHERE grid = 17
Schema:
CREATE TABLE table_name_92 (
    crowd INTEGER,
    home_team VARCHAR
)

Question: How big was the crowd of the Home team of Collingwood?

SQL:
SELECT MAX(crowd) FROM table_name_92 WHERE home_team = "collingwood"
Schema:
CREATE TABLE table_name_52 (
    leading_scorer VARCHAR,
    date VARCHAR
)

Question: Who is the leading scorer of the game on 13 February 2008?

SQL:
SELECT leading_scorer FROM table_name_52 WHERE date = "13 february 2008"
Schema:
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
)

CREATE TABLE prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
)

CREATE TABLE diagnoses (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

Question: count the number of patients whose primary disease is morbid obesity/sda and year of death is less than or equal to 2183?

SQL:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "MORBID OBESITY/SDA" AND demographic.dod_year <= "2183.0"
Schema:
CREATE TABLE table_68142 (
    "Year" text,
    "Start" text,
    "Qual" text,
    "Rank" text,
    "Finish" text,
    "Laps" real
)

Question: What is the highest laps of the year when the rank was 14?

SQL:
SELECT MAX("Laps") FROM table_68142 WHERE "Rank" = '14'
Schema:
CREATE TABLE table_53907 (
    "Record" text,
    "Year" text,
    "Date" text,
    "Driver" text,
    "Car Make" text,
    "Time" text,
    "Average Speed (mph)" text
)

Question: What day had a time of 29.816?

SQL:
SELECT "Date" FROM table_53907 WHERE "Time" = '29.816'
Schema:
CREATE TABLE table_name_98 (
    series_ep VARCHAR,
    segment_b VARCHAR
)

Question: What series episode has deli meats under segment B?

SQL:
SELECT series_ep FROM table_name_98 WHERE segment_b = "deli meats"
Schema:
CREATE TABLE table_15773 (
    "Year" text,
    "Men's singles" text,
    "Women's singles" text,
    "Men's doubles" text,
    "Women's doubles" text,
    "Mixed doubles" text
)

Question: What year was there no competition in Mixed Doubles?

SQL:
SELECT "Year" FROM table_15773 WHERE "Mixed doubles" = 'no competition'
Schema:
CREATE TABLE table_33381 (
    "Home team" text,
    "Home team score" text,
    "Away team" text,
    "Away team score" text,
    "Venue" text,
    "Crowd" real,
    "Date" text
)

Question: For the game where the away team was North Melbourne, what was the venue?

SQL:
SELECT "Venue" FROM table_33381 WHERE "Away team" = 'north melbourne'
Schema:
CREATE TABLE table_name_43 (
    home_team VARCHAR,
    venue VARCHAR
)

Question: What was the home team score at Kardinia Park?

SQL:
SELECT home_team AS score FROM table_name_43 WHERE venue = "kardinia park"
Schema:
CREATE TABLE table_12962773_12 (
    year_born INTEGER,
    height VARCHAR
)

Question: What year was the player with the height 2.04 born?

SQL:
SELECT MIN(year_born) FROM table_12962773_12 WHERE height = "2.04"
Schema:
CREATE TABLE table_name_96 (
    pick VARCHAR,
    hometown_school VARCHAR
)

Question: What number pick was the player with the hometown school of concordia college?

SQL:
SELECT pick FROM table_name_96 WHERE hometown_school = "concordia college"
Schema:
CREATE TABLE table_name_34 (
    rank INTEGER,
    total VARCHAR,
    silver VARCHAR,
    bronze VARCHAR
)

Question: Which rank has a more than 0 silver, 4 bronze, and a total smaller than 10?

SQL:
SELECT SUM(rank) FROM table_name_34 WHERE silver > 0 AND bronze = 4 AND total < 10
Schema:
CREATE TABLE table_75667 (
    "Call sign" text,
    "Frequency MHz" text,
    "City of license" text,
    "ERP W" text,
    "FCC info" text
)

Question: Which FCC info has an ERP W of 100 watts?

SQL:
SELECT "FCC info" FROM table_75667 WHERE "ERP W" = '100 watts'
Schema:
CREATE TABLE table_name_39 (
    position VARCHAR,
    college VARCHAR
)

Question: What position does the saint louis player play?

SQL:
SELECT position FROM table_name_39 WHERE college = "saint louis"
Schema:
CREATE TABLE table_27496841_3 (
    total_points VARCHAR,
    place VARCHAR
)

Question: Name the total points for 2

SQL:
SELECT total_points FROM table_27496841_3 WHERE place = 2
Schema:
CREATE TABLE table_35155 (
    "Medal" text,
    "Name" text,
    "Games" text,
    "Sport" text,
    "Event" text
)

Question: What medal was awarded in the men's freestyle 52 kg?

SQL:
SELECT "Medal" FROM table_35155 WHERE "Event" = 'men''s freestyle 52 kg'
Schema:
CREATE TABLE table_10951 (
    "Home team" text,
    "Home team score" text,
    "Away team" text,
    "Away team score" text,
    "Venue" text,
    "Crowd" real,
    "Date" text
)

Question: When the away team was geelong, what was the away team score?

SQL:
SELECT "Away team score" FROM table_10951 WHERE "Away team" = 'geelong'
Schema:
CREATE TABLE table_26589 (
    "#" real,
    "Player" text,
    "Country" text,
    "Points" real,
    "Reset points" real,
    "Events" real
)

Question: Name the number of events for 3031

SQL:
SELECT COUNT("Events") FROM table_26589 WHERE "Points" = '3031'
Schema:
CREATE TABLE procedures (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

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

CREATE TABLE diagnoses (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

CREATE TABLE prescriptions (
    subject_id text,
    hadm_id text,
    icustay_id text,
    drug_type text,
    drug text,
    formulary_drug_cd text,
    route text,
    drug_dose text
)

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 the primary disease and diagnosis icd9 code of Josette Orr?

SQL:
SELECT demographic.diagnosis, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Josette Orr"

Question: calculate the number of patients admitted to emergency who had colostomy, not otherwise specified.

SQL:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.long_title = "Colostomy, not otherwise specified"

Question: get the number of urgent hospital admission patients who have prescription for calcium carbonate.

SQL:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "URGENT" AND prescriptions.drug = "Calcium Carbonate"

Question: for how long did the patient id 8323 remain admitted in hospital? also specify death status

SQL:
SELECT demographic.days_stay, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "8323"
Schema:
CREATE TABLE table_63248 (
    "Date" text,
    "Opponent" text,
    "Venue" text,
    "Result" text,
    "Attendance" real
)

Question: Which venue had an opponent of Sunderland and a result of a 1-1 draw?

SQL:
SELECT "Venue" FROM table_63248 WHERE "Opponent" = 'sunderland' AND "Result" = '1-1'
Schema:
CREATE TABLE table_26229 (
    "No" real,
    "Player" text,
    "Height (m)" text,
    "Height (f)" text,
    "Position" text,
    "Year born" real,
    "Current Club" text
)

Question: name the player for number 5

SQL:
SELECT "Player" FROM table_26229 WHERE "No" = '5'
Schema:
CREATE TABLE table_13011 (
    "Country" text,
    "Builder" text,
    "Location" text,
    "Ship" text,
    "Class / type" text
)

Question: What is the country of Palmers Shipbuilding and Iron Company?

SQL:
SELECT "Country" FROM table_13011 WHERE "Builder" = 'palmers shipbuilding and iron company'
Schema:
CREATE TABLE table_36615 (
    "Round" real,
    "Pick #" real,
    "Overall" real,
    "Name" text,
    "Position" text,
    "College" text
)

Question: What is the Pick # with an Overall of 19?

SQL:
SELECT MAX("Pick #") FROM table_36615 WHERE "Overall" = '19'