VishalCh/book-train huggingface dataset:
Schema:
CREATE TABLE table_14685 (
    "Year" real,
    "Award" text,
    "Category" text,
    "Motive" text,
    "Result" text
)

Question: What is the motive before 2007?

SQL:
SELECT "Motive" FROM table_14685 WHERE "Year" < '2007'
Schema:
CREATE TABLE jobs (
    JOB_ID varchar(10),
    JOB_TITLE varchar(35),
    MIN_SALARY decimal(6,0),
    MAX_SALARY decimal(6,0)
)

CREATE TABLE countries (
    COUNTRY_ID varchar(2),
    COUNTRY_NAME varchar(40),
    REGION_ID decimal(10,0)
)

CREATE TABLE locations (
    LOCATION_ID decimal(4,0),
    STREET_ADDRESS varchar(40),
    POSTAL_CODE varchar(12),
    CITY varchar(30),
    STATE_PROVINCE varchar(25),
    COUNTRY_ID varchar(2)
)

CREATE TABLE job_history (
    EMPLOYEE_ID decimal(6,0),
    START_DATE date,
    END_DATE date,
    JOB_ID varchar(10),
    DEPARTMENT_ID decimal(4,0)
)

CREATE TABLE 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 departments (
    DEPARTMENT_ID decimal(4,0),
    DEPARTMENT_NAME varchar(30),
    MANAGER_ID decimal(6,0),
    LOCATION_ID decimal(4,0)
)

CREATE TABLE regions (
    REGION_ID decimal(5,0),
    REGION_NAME varchar(25)
)

Question: For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of job_id and commission_pct , and list by the JOB_ID in asc.

SQL:
SELECT JOB_ID, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY JOB_ID

Question: For those employees who was hired before 2002-06-21, give me the comparison about the sum of salary over the hire_date bin hire_date by time by a bar chart, order by the y axis in descending.

SQL:
SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY SUM(SALARY) DESC
Schema:
CREATE TABLE table_name_87 (
    lost INTEGER,
    goals_against VARCHAR,
    position VARCHAR,
    points_1 VARCHAR
)

Question: Which Lost has a Position larger than 5, and Points 1 of 37, and less than 63 Goals Against?

SQL:
SELECT AVG(lost) FROM table_name_87 WHERE position > 5 AND points_1 = "37" AND goals_against < 63
Schema:
CREATE TABLE table_71565 (
    "Date" text,
    "Opponent" text,
    "Score" text,
    "Loss" text,
    "Record" text
)

Question: What team was the opponent when the score was 7 1?

SQL:
SELECT "Opponent" FROM table_71565 WHERE "Score" = '7–1'
Schema:
CREATE TABLE table_name_4 (
    record VARCHAR,
    result VARCHAR
)

Question: What is the record for the result w 33-3?

SQL:
SELECT record FROM table_name_4 WHERE result = "w 33-3"
Schema:
CREATE TABLE table_2206 (
    "ILO code" text,
    "Field" text,
    "conclusion date" text,
    "entry into force" text,
    "closure for signature" text,
    "Parties (April 2011)" real,
    "Denunciations (September 2011)" real,
    "revising convention(s)" text,
    "text and ratifications" text
)

Question: What were the revising conventions commentary with a denunciation of 21?

SQL:
SELECT "revising convention(s)" FROM table_2206 WHERE "Denunciations (September 2011)" = '21'
Schema:
CREATE TABLE table_27186 (
    "No. in series" real,
    "No. in season" real,
    "Title" text,
    "Directed by" text,
    "Written by" text,
    "Original air date" text,
    "U.S. viewers (millions)" text
)

Question: Who wrote the episodes that had a viewership of 7.14?

SQL:
SELECT "Written by" FROM table_27186 WHERE "U.S. viewers (millions)" = '7.14'
Schema:
CREATE TABLE table_1301373_1 (
    captain VARCHAR,
    head_coach VARCHAR
)

Question: Who's the captain of the team whose head coach is Alistair Edwards?

SQL:
SELECT captain FROM table_1301373_1 WHERE head_coach = "Alistair Edwards"
Schema:
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 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 jobs (
    JOB_ID varchar(10),
    JOB_TITLE varchar(35),
    MIN_SALARY decimal(6,0),
    MAX_SALARY decimal(6,0)
)

CREATE TABLE regions (
    REGION_ID decimal(5,0),
    REGION_NAME varchar(25)
)

CREATE TABLE countries (
    COUNTRY_ID varchar(2),
    COUNTRY_NAME varchar(40),
    REGION_ID decimal(10,0)
)

CREATE TABLE locations (
    LOCATION_ID decimal(4,0),
    STREET_ADDRESS varchar(40),
    POSTAL_CODE varchar(12),
    CITY varchar(30),
    STATE_PROVINCE varchar(25),
    COUNTRY_ID varchar(2)
)

Question: Scatter plot to show department id on x axis and sum salary on y axis.

SQL:
SELECT DEPARTMENT_ID, SUM(SALARY) FROM employees GROUP BY DEPARTMENT_ID
Schema:
CREATE TABLE actor (
    actor_id number,
    first_name text,
    last_name text,
    last_update time
)

CREATE TABLE film (
    film_id number,
    title text,
    description text,
    release_year time,
    language_id number,
    original_language_id number,
    rental_duration number,
    rental_rate number,
    length number,
    replacement_cost number,
    rating text,
    special_features text,
    last_update time
)

CREATE TABLE customer (
    customer_id number,
    store_id number,
    first_name text,
    last_name text,
    email text,
    address_id number,
    active boolean,
    create_date time,
    last_update time
)

CREATE TABLE category (
    category_id number,
    name text,
    last_update time
)

CREATE TABLE film_actor (
    actor_id number,
    film_id number,
    last_update time
)

CREATE TABLE city (
    city_id number,
    city text,
    country_id number,
    last_update time
)

CREATE TABLE address (
    address_id number,
    address text,
    address2 text,
    district text,
    city_id number,
    postal_code text,
    phone text,
    last_update time
)

CREATE TABLE country (
    country_id number,
    country text,
    last_update time
)

CREATE TABLE rental (
    rental_id number,
    rental_date time,
    inventory_id number,
    customer_id number,
    return_date time,
    staff_id number,
    last_update time
)

CREATE TABLE inventory (
    inventory_id number,
    film_id number,
    store_id number,
    last_update time
)

CREATE TABLE store (
    store_id number,
    manager_staff_id number,
    address_id number,
    last_update time
)

CREATE TABLE payment (
    payment_id number,
    customer_id number,
    staff_id number,
    rental_id number,
    amount number,
    payment_date time,
    last_update time
)

CREATE TABLE film_category (
    film_id number,
    category_id number,
    last_update time
)

CREATE TABLE film_text (
    film_id number,
    title text,
    description text
)

CREATE TABLE staff (
    staff_id number,
    first_name text,
    last_name text,
    address_id number,
    picture others,
    email text,
    store_id number,
    active boolean,
    username text,
    password text,
    last_update time
)

CREATE TABLE language (
    language_id number,
    name text,
    last_update time
)

Question: Return the name of the category to which the film 'HUNGER ROOF' belongs.

SQL:
SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id = T2.category_id JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'HUNGER ROOF'
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 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 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 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 treatment (
    treatmentid number,
    patientunitstayid number,
    treatmentname text,
    treatmenttime 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
)

Question: until 8 months ago, when was the first time that patient 002-56583 was prescribed medication via dialysis?

SQL:
SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-56583')) AND medication.routeadmin = 'dialysis' AND DATETIME(medication.drugstarttime) <= DATETIME(CURRENT_TIME(), '-8 month') ORDER BY medication.drugstarttime LIMIT 1
Schema:
CREATE TABLE table_203_374 (
    id number,
    "rank" number,
    "nation" text,
    "gold" number,
    "silver" number,
    "bronze" number,
    "total" number
)

Question: what country is listed before france ?

SQL:
SELECT "nation" FROM table_203_374 WHERE id = (SELECT id FROM table_203_374 WHERE "nation" = 'france') - 1
Schema:
CREATE TABLE Participants (
    Participant_ID INTEGER,
    Participant_Type_Code CHAR(15),
    Participant_Details VARCHAR(255)
)

CREATE TABLE Services (
    Service_ID INTEGER,
    Service_Type_Code CHAR(15)
)

CREATE TABLE Events (
    Event_ID INTEGER,
    Service_ID INTEGER,
    Event_Details VARCHAR(255)
)

CREATE TABLE Participants_in_Events (
    Event_ID INTEGER,
    Participant_ID INTEGER
)

Question: List all the participant ids and their details using a bar chart, and rank from high to low by the X-axis.

SQL:
SELECT Participant_Details, Participant_ID FROM Participants ORDER BY Participant_Details DESC
Schema:
CREATE TABLE diagnosis (
    diagnosisid number,
    patientunitstayid number,
    diagnosisname text,
    diagnosistime time,
    icd9code text
)

CREATE TABLE intakeoutput (
    intakeoutputid number,
    patientunitstayid number,
    cellpath text,
    celllabel text,
    cellvaluenumeric number,
    intakeoutputtime 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 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 allergy (
    allergyid number,
    patientunitstayid number,
    drugname text,
    allergyname text,
    allergytime time
)

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

Question: how many patients were diagnosed with stroke during the same month last year after prophylactic antibacterials - for transplant/hiv.

SQL:
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'prophylactic antibacterials - for transplant/hiv' AND DATETIME(treatment.treatmenttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t1 JOIN (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'stroke' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t2 WHERE t1.treatmenttime < t2.diagnosistime AND DATETIME(t1.treatmenttime, 'start of month') = DATETIME(t2.diagnosistime, 'start of month')
Schema:
CREATE TABLE table_name_92 (
    silver INTEGER,
    rank INTEGER
)

Question: What is the largest silver number when the rank is smaller than 1?

SQL:
SELECT MAX(silver) FROM table_name_92 WHERE rank < 1
Schema:
CREATE TABLE table_61752 (
    "Team" text,
    "Outgoing manage" text,
    "Manner" text,
    "Date of vacancy" text,
    "Incoming manager" text,
    "Date of appointment" text
)

Question: Who was the outgoing manager when the incoming manager was augusto in cio?

SQL:
SELECT "Outgoing manage" FROM table_61752 WHERE "Incoming manager" = 'augusto inácio'
Schema:
CREATE TABLE table_79308 (
    "Year" real,
    "Competition" text,
    "Venue" text,
    "Position" text,
    "Notes" text
)

Question: What was the venue after 2012?

SQL:
SELECT "Venue" FROM table_79308 WHERE "Year" > '2012'
Schema:
CREATE TABLE table_name_64 (
    score VARCHAR,
    opponent VARCHAR
)

Question: Name the score for hawthorn opponent

SQL:
SELECT score FROM table_name_64 WHERE opponent = "hawthorn"
Schema:
CREATE TABLE table_47791 (
    "Year" real,
    "Date" text,
    "Winner" text,
    "Result" text,
    "Loser" text,
    "Location" text
)

Question: How many years did the new york giants win with a result of 15-7 at lincoln financial field?

SQL:
SELECT COUNT("Year") FROM table_47791 WHERE "Location" = 'lincoln financial field' AND "Winner" = 'new york giants' AND "Result" = '15-7'
Schema:
CREATE TABLE table_67359 (
    "Image" real,
    "Smith" text,
    "Ashmolean" real,
    "Foster" real,
    "Hahland" real,
    "Dinsmoor" text,
    "Hofkes-Brukker" text,
    "Harrison" text,
    "Cooper" text,
    "BM/Corbett" text
)

Question: What is the cooper with an Ashmolean less than 21, and hahland smaller than 4?

SQL:
SELECT "Cooper" FROM table_67359 WHERE "Ashmolean" < '21' AND "Hahland" < '4'
Schema:
CREATE TABLE table_60550 (
    "Election" text,
    "1st Member" text,
    "1st Party" text,
    "2nd Member" text,
    "2nd Party" text
)

Question: What Election has a 2nd Member of frederick knight, and a 1st Member of sir edmund lechmere, bt?

SQL:
SELECT "Election" FROM table_60550 WHERE "2nd Member" = 'frederick knight' AND "1st Member" = 'sir edmund lechmere, bt'
Schema:
CREATE TABLE diagnoses (
    subject_id text,
    hadm_id text,
    icd9_code text,
    short_title text,
    long_title text
)

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

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

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

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

Question: find the number of patients with blood gas lab test category who were hospitalized for more than 7 days.

SQL:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "7" AND lab."CATEGORY" = "Blood Gas"
Schema:
CREATE TABLE table_name_40 (
    erp_w INTEGER,
    call_sign VARCHAR
)

Question: How many ERP W is it that has a Call sign of w273bs?

SQL:
SELECT SUM(erp_w) FROM table_name_40 WHERE call_sign = "w273bs"
Schema:
CREATE TABLE table_808 (
    "Club" text,
    "Played" text,
    "Won" text,
    "Drawn" text,
    "Lost" text,
    "Points for" text,
    "Points against" text,
    "Tries for" text,
    "Tries against" text,
    "Try bonus" text,
    "Losing bonus" text,
    "Points" text
)

Question: Who is the club that has 30 points?

SQL:
SELECT "Club" FROM table_808 WHERE "Points" = '30'
Schema:
CREATE TABLE table_32451 (
    "Week" text,
    "Date" text,
    "Opponent" text,
    "Result" text,
    "Kickoff" text,
    "Game site" text,
    "Record" text,
    "Attendance" text
)

Question: What is the site of the game with a Record of 6-2?

SQL:
SELECT "Game site" FROM table_32451 WHERE "Record" = '6-2'
Schema:
CREATE TABLE bank (
    branch_ID int,
    bname varchar(20),
    no_of_customers int,
    city varchar(10),
    state varchar(20)
)

CREATE TABLE loan (
    loan_ID varchar(3),
    loan_type varchar(15),
    cust_ID varchar(3),
    branch_ID varchar(3),
    amount int
)

CREATE TABLE customer (
    cust_ID varchar(3),
    cust_name varchar(20),
    acc_type char(1),
    acc_bal int,
    no_of_loans int,
    credit_score int,
    branch_ID int,
    state varchar(20)
)

Question: Can you compare the account balances of customers with the letter 'a' in their names using a bar graph.

SQL:
SELECT cust_name, acc_bal FROM customer WHERE cust_name LIKE '%a%'
Schema:
CREATE TABLE table_name_7 (
    finalist VARCHAR,
    tournament VARCHAR
)

Question: Who was the finalist in Miami?

SQL:
SELECT finalist FROM table_name_7 WHERE tournament = "miami"
Schema:
CREATE TABLE inputevents_cv (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    amount number
)

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

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 cost (
    row_id number,
    subject_id number,
    hadm_id number,
    event_type text,
    event_id number,
    chargetime time,
    cost number
)

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

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 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 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 patients (
    row_id number,
    subject_id number,
    gender text,
    dob time,
    dod time
)

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

CREATE TABLE microbiologyevents (
    row_id number,
    subject_id number,
    hadm_id number,
    charttime time,
    spec_type_desc text,
    org_name text
)

CREATE TABLE d_items (
    row_id number,
    itemid number,
    label text,
    linksto 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 outputevents (
    row_id number,
    subject_id number,
    hadm_id number,
    icustay_id number,
    charttime time,
    itemid number,
    value number
)

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

Question: what is the total number of patients who were admitted to the hospital?

SQL:
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions
Schema:
CREATE TABLE table_8010 (
    "Tie no" text,
    "Home team" text,
    "Score" text,
    "Away team" text,
    "Date" text
)

Question: What is the tie number when Wigan Athletic is the home team?

SQL:
SELECT "Tie no" FROM table_8010 WHERE "Home team" = 'wigan athletic'