VishalCh/book-train huggingface dataset:
Schema:
CREATE TABLE table_name_12 (
    game INTEGER,
    high_rebounds VARCHAR
)

Question: Which Game is the highest one that has High rebounds of pau gasol (11)?

SQL:
SELECT MAX(game) FROM table_name_12 WHERE high_rebounds = "pau gasol (11)"
Schema:
CREATE TABLE table_name_29 (
    qual_2 VARCHAR,
    qual_1 VARCHAR
)

Question: What was the second qualification time with a first qualification time of 1:02.813?

SQL:
SELECT qual_2 FROM table_name_29 WHERE qual_1 = "1:02.813"
Schema:
CREATE TABLE table_2850912_10 (
    position VARCHAR,
    nhl_team VARCHAR
)

Question: What position was the player who was drafted by the Washington Capitals?

SQL:
SELECT position FROM table_2850912_10 WHERE nhl_team = "Washington Capitals"
Schema:
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 jobs (
    JOB_ID varchar(10),
    JOB_TITLE varchar(35),
    MIN_SALARY decimal(6,0),
    MAX_SALARY decimal(6,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 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 regions (
    REGION_ID decimal(5,0),
    REGION_NAME varchar(25)
)

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

Question: For those employees who was hired before 2002-06-21, return a bar chart about the distribution of job_id and the sum of employee_id , and group by attribute job_id, and I want to sort by the y-axis in desc.

SQL:
SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY SUM(EMPLOYEE_ID) DESC
Schema:
CREATE TABLE table_67645 (
    "Year" real,
    "Literature" text,
    "Music" text,
    "Film" text,
    "Performing arts" text
)

Question: Name the literature for pradit prasarttong

SQL:
SELECT "Literature" FROM table_67645 WHERE "Performing arts" = 'pradit prasarttong'
Schema:
CREATE TABLE table_34993 (
    "Name" text,
    "Years" text,
    "Seasons" real,
    "Lost" real,
    "Pct." real
)

Question: What is the years coached by the person with a win percentage of 0.667 and 380 losses?

SQL:
SELECT "Years" FROM table_34993 WHERE "Pct." = '0.667' AND "Lost" = '380'
Schema:
CREATE TABLE table_204_398 (
    id number,
    "title" text,
    "year" number,
    "publisher" text,
    "developer" text,
    "platforms" text
)

Question: which project had greatest number of platforms ?

SQL:
SELECT "title" FROM table_204_398 ORDER BY "platforms" DESC LIMIT 1
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 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 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: give me the number of patients whose days of hospital stay is greater than 1 and procedure short title is hemodialysis?

SQL:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "1" AND procedures.short_title = "Hemodialysis"

Question: provide the number of patients whose insurance is government and procedure icd9 code is 92?

SQL:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.icd9_code = "92"
Schema:
CREATE TABLE table_name_42 (
    pick__number VARCHAR,
    overall VARCHAR,
    college VARCHAR
)

Question: What is College of Ohio State's pick number with an overall lower than 145?

SQL:
SELECT pick__number FROM table_name_42 WHERE overall < 145 AND college = "ohio state"
Schema:
CREATE TABLE table_name_4 (
    date VARCHAR,
    opponent VARCHAR,
    venue VARCHAR
)

Question: What was the date when the opponent was Sheffield Scimitars and the venue was Home?

SQL:
SELECT date FROM table_name_4 WHERE opponent = "sheffield scimitars" AND venue = "home"
Schema:
CREATE TABLE table_65989 (
    "Rank" text,
    "Nation" text,
    "Gold" real,
    "Silver" real,
    "Bronze" real,
    "Total" real
)

Question: Which Rank has a Silver of 1, and a Gold of 0, and a Nation of austria?

SQL:
SELECT "Rank" FROM table_65989 WHERE "Silver" = '1' AND "Gold" = '0' AND "Nation" = 'austria'
Schema:
CREATE TABLE table_name_49 (
    highest_point VARCHAR,
    rank VARCHAR
)

Question: What is the highest amount of points for rank 95?

SQL:
SELECT highest_point FROM table_name_49 WHERE rank = 95
Schema:
CREATE TABLE order_items (
    order_item_id number,
    order_id number,
    product_id number,
    order_quantity text
)

CREATE TABLE customers (
    customer_id number,
    payment_method_code text,
    customer_number text,
    customer_name text,
    customer_address text,
    customer_phone text,
    customer_email text
)

CREATE TABLE customer_address_history (
    customer_id number,
    address_id number,
    date_from time,
    date_to time
)

CREATE TABLE customer_orders (
    order_id number,
    customer_id number,
    order_date time,
    order_status_code text
)

CREATE TABLE addresses (
    address_id number,
    line_1_number_building text,
    city text,
    zip_postcode text,
    state_province_county text,
    country text
)

CREATE TABLE products (
    product_id number,
    product_type_code text,
    product_name text,
    product_price number
)

CREATE TABLE contacts (
    contact_id number,
    customer_id number,
    gender text,
    first_name text,
    last_name text,
    contact_phone text
)

Question: Show the customer name, customer address city, date from, and date to for each customer address history.

SQL:
SELECT T2.customer_name, T3.city, T1.date_from, T1.date_to FROM customer_address_history AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id JOIN addresses AS T3 ON T1.address_id = T3.address_id
Schema:
CREATE TABLE table_1176371_1 (
    t20_matches INTEGER,
    name_of_ground VARCHAR
)

Question: What is the maximum t20 on green lane?

SQL:
SELECT MAX(t20_matches) FROM table_1176371_1 WHERE name_of_ground = "Green Lane"
Schema:
CREATE TABLE table_1753 (
    "DVD Title" text,
    "No. of Discs" real,
    "Year" text,
    "No. of Episodes" real,
    "Region 1" text,
    "Region 2" text,
    "Region 4" text
)

Question: What is the largest number of episodes for a 1989 season dvd release?

SQL:
SELECT MAX("No. of Episodes") FROM table_1753 WHERE "Year" = '1989'
Schema:
CREATE TABLE table_30683 (
    "No. in series" real,
    "Title" text,
    "Directed by" text,
    "Written by" text,
    "Original air date" text,
    "U.S. viewers (million)" text
)

Question: How many millions of U.S. viewers watched the episode titled 'New Beginnings'?

SQL:
SELECT "U.S. viewers (million)" FROM table_30683 WHERE "Title" = 'New Beginnings'
Schema:
CREATE TABLE College (
    cName varchar(20),
    state varchar(2),
    enr numeric(5,0)
)

CREATE TABLE Player (
    pID numeric(5,0),
    pName varchar(20),
    yCard varchar(3),
    HS numeric(5,0)
)

CREATE TABLE Tryout (
    pID numeric(5,0),
    cName varchar(20),
    pPos varchar(8),
    decision varchar(3)
)

Question: Bar chart, the-axis is the state, and the Y axis is each state's the smallest enrollment.

SQL:
SELECT state, MIN(enr) FROM College GROUP BY state
Schema:
CREATE TABLE table_23394920_1 (
    station_type VARCHAR,
    callsign VARCHAR
)

Question: When dwhr-tv is the call sign how many station types are there?

SQL:
SELECT COUNT(station_type) FROM table_23394920_1 WHERE callsign = "DWHR-TV"
Schema:
CREATE TABLE table_name_32 (
    wins INTEGER,
    points INTEGER
)

Question: What is the average Wins, when Points is less than '19'?

SQL:
SELECT AVG(wins) FROM table_name_32 WHERE points < 19
Schema:
CREATE TABLE table_201_10 (
    id number,
    "#" number,
    "name" text,
    "office" text,
    "political party" text,
    "occupation" text
)

Question: how many mayors were in office for a total of 9 years ?

SQL:
SELECT COUNT("name") FROM table_201_10 WHERE "office" - "office" = 9
Schema:
CREATE TABLE table_name_74 (
    loss VARCHAR,
    record VARCHAR
)

Question: Who got the loss for the game ending in a record of 55-41?

SQL:
SELECT loss FROM table_name_74 WHERE record = "55-41"
Schema:
CREATE TABLE table_name_45 (
    venue VARCHAR,
    result VARCHAR
)

Question: Which venue has 1st as the result?

SQL:
SELECT venue FROM table_name_45 WHERE result = "1st"
Schema:
CREATE TABLE table_name_13 (
    year INTEGER,
    mintage INTEGER
)

Question: What was the average year for a coin that had a mintage smaller than 10,000?

SQL:
SELECT AVG(year) FROM table_name_13 WHERE mintage < 10 OFFSET 000
Schema:
CREATE TABLE table_2249087_1 (
    south_american_rank INTEGER,
    nation VARCHAR
)

Question: Name the south american rank for venezuela

SQL:
SELECT MIN(south_american_rank) FROM table_2249087_1 WHERE nation = "Venezuela"
Schema:
CREATE TABLE table_name_4 (
    score VARCHAR,
    date VARCHAR,
    away_team VARCHAR
)

Question: For the game on 13 December 1975 with Halifax Town as the away team what was the score?

SQL:
SELECT score FROM table_name_4 WHERE date = "13 december 1975" AND away_team = "halifax town"
Schema:
CREATE TABLE table_7828 (
    "Country" text,
    "2010" real,
    "2011" real,
    "2012" real,
    "2013" real
)

Question: What is the lowest number of participants in 2010 when there were 0 participants in 2012?

SQL:
SELECT MIN("2010") FROM table_7828 WHERE "2012" < '0'
Schema:
CREATE TABLE table_20539 (
    "Team" text,
    "Outgoing manager" text,
    "Manner of departure" text,
    "Date of vacancy" text,
    "Replaced by" text,
    "Date of appointment" text
)

Question: When was the date of appointment for the manager replacing Wim Jansen?

SQL:
SELECT "Date of appointment" FROM table_20539 WHERE "Outgoing manager" = 'Wim Jansen'
Schema:
CREATE TABLE table_27614571_1 (
    song_choice VARCHAR,
    theme VARCHAR
)

Question: What was Barreto's song choice when the theme was samba?

SQL:
SELECT song_choice FROM table_27614571_1 WHERE theme = "Samba"
Schema:
CREATE TABLE CLASS (
    CLASS_CODE varchar(5),
    CRS_CODE varchar(10),
    CLASS_SECTION varchar(2),
    CLASS_TIME varchar(20),
    CLASS_ROOM varchar(8),
    PROF_NUM int
)

CREATE TABLE DEPARTMENT (
    DEPT_CODE varchar(10),
    DEPT_NAME varchar(30),
    SCHOOL_CODE varchar(8),
    EMP_NUM int,
    DEPT_ADDRESS varchar(20),
    DEPT_EXTENSION varchar(4)
)

CREATE TABLE ENROLL (
    CLASS_CODE varchar(5),
    STU_NUM int,
    ENROLL_GRADE varchar(50)
)

CREATE TABLE PROFESSOR (
    EMP_NUM int,
    DEPT_CODE varchar(10),
    PROF_OFFICE varchar(50),
    PROF_EXTENSION varchar(4),
    PROF_HIGH_DEGREE varchar(5)
)

CREATE TABLE EMPLOYEE (
    EMP_NUM int,
    EMP_LNAME varchar(15),
    EMP_FNAME varchar(12),
    EMP_INITIAL varchar(1),
    EMP_JOBCODE varchar(5),
    EMP_HIREDATE datetime,
    EMP_DOB datetime
)

CREATE TABLE STUDENT (
    STU_NUM int,
    STU_LNAME varchar(15),
    STU_FNAME varchar(15),
    STU_INIT varchar(1),
    STU_DOB datetime,
    STU_HRS int,
    STU_CLASS varchar(2),
    STU_GPA float(8),
    STU_TRANSFER numeric,
    DEPT_CODE varchar(18),
    STU_PHONE varchar(4),
    PROF_NUM int
)

CREATE TABLE COURSE (
    CRS_CODE varchar(10),
    DEPT_CODE varchar(10),
    CRS_DESCRIPTION varchar(35),
    CRS_CREDIT float(8)
)

Question: Give me a histogram for what are the total number of credits offered by each department?, could you rank by the names from low to high?

SQL:
SELECT DEPT_CODE, SUM(T1.CRS_CREDIT) FROM COURSE AS T1 JOIN CLASS AS T2 ON T1.CRS_CODE = T2.CRS_CODE GROUP BY T1.DEPT_CODE ORDER BY DEPT_CODE
Schema:
CREATE TABLE table_1653 (
    "Season" text,
    "Series" text,
    "Team Name" text,
    "Races" real,
    "Poles" real,
    "Wins" real,
    "Points" real,
    "Final Placing" text
)

Question: What was the max points you when when you place 9th?

SQL:
SELECT MAX("Points") FROM table_1653 WHERE "Final Placing" = '9th'
Schema:
CREATE TABLE table_59667 (
    "Player" text,
    "Country" text,
    "Year(s) won" text,
    "Total" real,
    "To par" text,
    "Finish" text
)

Question: What was the finish for Lanny Wadkins of the United States?

SQL:
SELECT "Finish" FROM table_59667 WHERE "Country" = 'united states' AND "Player" = 'lanny wadkins'
Schema:
CREATE TABLE table_72167 (
    "Year" real,
    "Champion" text,
    "Score" text,
    "Runner-Up" text,
    "Location" text,
    "Semi-Finalist #1" text,
    "Semi-Finalist #2" text
)

Question: List the scores of all games when Miami were listed as the first Semi finalist

SQL:
SELECT "Score" FROM table_72167 WHERE "Semi-Finalist #1" = 'Miami'
Schema:
CREATE TABLE table_name_31 (
    category VARCHAR,
    outcome VARCHAR,
    year VARCHAR
)

Question: What category was the nominated in after 2008?

SQL:
SELECT category FROM table_name_31 WHERE outcome = "nominated" AND year > 2008
Schema:
CREATE TABLE table_27465 (
    "June 10-11" text,
    "March 27-29" text,
    "January 15-16" text,
    "November 3" text,
    "August 21-22" text
)

Question: How many times does November 3rd occur when January 15, 1991 does?

SQL:
SELECT COUNT("November 3") FROM table_27465 WHERE "January 15-16" = 'January 15, 1991'
Schema:
CREATE TABLE table_31800 (
    "Week" real,
    "Date" text,
    "Opponent" text,
    "Result" text,
    "Venue" text,
    "Attendance" text
)

Question: Which date has a week larger than 14?

SQL:
SELECT "Date" FROM table_31800 WHERE "Week" > '14'
Schema:
CREATE TABLE diagnosis (
    diagnosisid number,
    patientunitstayid number,
    diagnosisname text,
    diagnosistime time,
    icd9code text
)

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 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 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 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 intakeoutput (
    intakeoutputid number,
    patientunitstayid number,
    cellpath text,
    celllabel text,
    cellvaluenumeric number,
    intakeoutputtime time
)

Question: count the number of times patient 006-76924 has had an urinary catheter output: indwelling/continuous ure output since 12/02/2100.

SQL:
SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-76924')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutput.celllabel = 'urinary catheter output: indwelling/continuous ure' AND STRFTIME('%y-%m-%d', intakeoutput.intakeoutputtime) >= '2100-12-02'
Schema:
CREATE TABLE table_name_54 (
    overall INTEGER,
    college VARCHAR,
    pick__number VARCHAR
)

Question: What is the overall number of the player from Utah with a pick # higher than 7?

SQL:
SELECT SUM(overall) FROM table_name_54 WHERE college = "utah" AND pick__number < 7
Schema:
CREATE TABLE table_name_83 (
    score VARCHAR,
    december VARCHAR
)

Question: What is the score for the Dec 11 game?

SQL:
SELECT score FROM table_name_83 WHERE december = 11
Schema:
CREATE TABLE table_6350 (
    "Country" text,
    "Gold" real,
    "Silver" real,
    "Bronze" real,
    "Total" real
)

Question: What is the total when bronze has a silver larger than 2?

SQL:
SELECT COUNT("Bronze") FROM table_6350 WHERE "Silver" > '2'
Schema:
CREATE TABLE table_16581695_3 (
    no_in_season VARCHAR,
    production_code VARCHAR
)

Question: How many seasons have a production code of 204?

SQL:
SELECT COUNT(no_in_season) FROM table_16581695_3 WHERE production_code = 204
Schema:
CREATE TABLE table_21378 (
    "Official Name" text,
    "Status" text,
    "Area km 2" text,
    "Population" real,
    "Census Ranking" text
)

Question: What is Petersville's census ranking?

SQL:
SELECT "Census Ranking" FROM table_21378 WHERE "Official Name" = 'Petersville'
Schema:
CREATE TABLE table_37217 (
    "Player" text,
    "Position" text,
    "Date of Birth (Age)" text,
    "Caps" real,
    "Club/province" text
)

Question: Which Club or province has a caps larger than 15 and has Chris Cusiter playing for them?

SQL:
SELECT "Club/province" FROM table_37217 WHERE "Caps" > '15' AND "Player" = 'chris cusiter'
Schema:
CREATE TABLE table_65614 (
    "Wimmera FL" text,
    "Wins" real,
    "Byes" real,
    "Losses" real,
    "Draws" real,
    "Against" real
)

Question: Which Byes have an Against larger than 1018, and a Wimmera FL of horsham diggers?

SQL:
SELECT MIN("Byes") FROM table_65614 WHERE "Against" > '1018' AND "Wimmera FL" = 'horsham diggers'
Schema:
CREATE TABLE table_203_764 (
    id number,
    "name" text,
    "date" number,
    "nation" text,
    "displacement" text,
    "speed" text,
    "number" number,
    "notes" text
)

Question: how many tons does the te class displace ?

SQL:
SELECT "displacement" FROM table_203_764 WHERE "name" = 'te-class'
Schema:
CREATE TABLE table_77874 (
    "Home team" text,
    "Home team score" text,
    "Away team" text,
    "Away team score" text,
    "Venue" text,
    "Crowd" real,
    "Date" text
)

Question: When the Home team score was 15.18 (108), what's the lowest Crowd turnout?

SQL:
SELECT MIN("Crowd") FROM table_77874 WHERE "Home team score" = '15.18 (108)'
Schema:
CREATE TABLE table_204_796 (
    id number,
    "network name" text,
    "flagship" text,
    "programming type" text,
    "owner" text,
    "affiliates" number
)

Question: tell me the number of stations tv azteca owns .

SQL:
SELECT COUNT("network name") FROM table_204_796 WHERE "owner" = 'tv azteca'
Schema:
CREATE TABLE table_name_2 (
    place VARCHAR,
    score VARCHAR
)

Question: What place has the score of 67-74=141?

SQL:
SELECT place FROM table_name_2 WHERE score = 67 - 74 = 141
Schema:
CREATE TABLE table_176524_2 (
    census_ranking VARCHAR,
    official_name VARCHAR
)

Question: What is the census ranking for the Perth parish?

SQL:
SELECT census_ranking FROM table_176524_2 WHERE official_name = "Perth"
Schema:
CREATE TABLE table_10100 (
    "Date" text,
    "Visitor" text,
    "Score" text,
    "Home" text,
    "Leading scorer" text,
    "Attendance" real,
    "Record" text
)

Question: Who was the home team on March 5, 2008?

SQL:
SELECT "Home" FROM table_10100 WHERE "Date" = 'march 5, 2008'
Schema:
CREATE TABLE table_12962773_5 (
    player VARCHAR,
    no VARCHAR
)

Question: how many player with no being 12

SQL:
SELECT COUNT(player) FROM table_12962773_5 WHERE no = 12
Schema:
CREATE TABLE table_12045 (
    "Driver" text,
    "Car #" real,
    "Make" text,
    "Points" real,
    "Laps" real,
    "Winnings" text
)

Question: Which driver has a # smaller than 40, less than 151 points, and Winnings of $84,400?

SQL:
SELECT "Make" FROM table_12045 WHERE "Car #" < '40' AND "Points" < '151' AND "Winnings" = '$84,400'
Schema:
CREATE TABLE Employees (
    Employee_ID INTEGER,
    Role_Code CHAR(15),
    Employee_Name VARCHAR(255),
    Gender_MFU CHAR(1),
    Date_of_Birth DATETIME,
    Other_Details VARCHAR(255)
)

CREATE TABLE Roles (
    Role_Code CHAR(15),
    Role_Name VARCHAR(255),
    Role_Description VARCHAR(255)
)

CREATE TABLE Documents_to_be_Destroyed (
    Document_ID INTEGER,
    Destruction_Authorised_by_Employee_ID INTEGER,
    Destroyed_by_Employee_ID INTEGER,
    Planned_Destruction_Date DATETIME,
    Actual_Destruction_Date DATETIME,
    Other_Details VARCHAR(255)
)

CREATE TABLE Ref_Calendar (
    Calendar_Date DATETIME,
    Day_Number INTEGER
)

CREATE TABLE Document_Locations (
    Document_ID INTEGER,
    Location_Code CHAR(15),
    Date_in_Location_From DATETIME,
    Date_in_Locaton_To DATETIME
)

CREATE TABLE Ref_Locations (
    Location_Code CHAR(15),
    Location_Name VARCHAR(255),
    Location_Description VARCHAR(255)
)

CREATE TABLE Ref_Document_Types (
    Document_Type_Code CHAR(15),
    Document_Type_Name VARCHAR(255),
    Document_Type_Description VARCHAR(255)
)

CREATE TABLE All_Documents (
    Document_ID INTEGER,
    Date_Stored DATETIME,
    Document_Type_Code CHAR(15),
    Document_Name CHAR(255),
    Document_Description CHAR(255),
    Other_Details VARCHAR(255)
)

Question: How many documents in different starting date? Return a line chart grouping by starting date.

SQL:
SELECT Date_in_Location_From, COUNT(Date_in_Location_From) FROM Document_Locations GROUP BY Date_in_Location_From
Schema:
CREATE TABLE table_64729 (
    "Draw" real,
    "Artist" text,
    "Song" text,
    "Points" real,
    "Place" real
)

Question: How many places have an Artist of august , and a Draw smaller than 6?

SQL:
SELECT COUNT("Place") FROM table_64729 WHERE "Artist" = 'augustė' AND "Draw" < '6'
Schema:
CREATE TABLE table_79596 (
    "Game" text,
    "Date" text,
    "Opponent" text,
    "Score" text,
    "Location Attendance" text,
    "Record" text
)

Question: On what date was game 3?

SQL:
SELECT "Date" FROM table_79596 WHERE "Game" = '3'
Schema:
CREATE TABLE table_240936_2 (
    region_4__australia_ VARCHAR,
    region_1__us_ VARCHAR
)

Question: What is the region 4 (Aus) date associated with a region 1 (US) date of January 16, 2007?

SQL:
SELECT region_4__australia_ FROM table_240936_2 WHERE region_1__us_ = "January 16, 2007"
Schema:
CREATE TABLE table_name_84 (
    react INTEGER,
    mark VARCHAR,
    heat VARCHAR
)

Question: What is the highest React that has a 7.61 Mark and a heat bigger than 1?

SQL:
SELECT MAX(react) FROM table_name_84 WHERE mark = "7.61" AND heat > 1