VishalCh/book-train huggingface dataset:
Schema:
CREATE TABLE table_61636 (
    "Date" text,
    "Opponent" text,
    "Score" text,
    "Loss" text,
    "Attendance" real,
    "Record" text,
    "Arena" text,
    "Points" real
)

Question: What is the Opponent at the Honda Center on March 29?

SQL:
SELECT "Opponent" FROM table_61636 WHERE "Arena" = 'honda center' AND "Date" = 'march 29'
Schema:
CREATE TABLE table_2850912_10 (
    nhl_team VARCHAR,
    player VARCHAR
)

Question: Which team drafted Ron Annear?

SQL:
SELECT nhl_team FROM table_2850912_10 WHERE player = "Ron Annear"
Schema:
CREATE TABLE table_name_13 (
    wins VARCHAR,
    season VARCHAR,
    podiums VARCHAR,
    races VARCHAR
)

Question: How many wins has a podiums greater than 1 and 9 as the races with a season after 1984?

SQL:
SELECT COUNT(wins) FROM table_name_13 WHERE podiums > 1 AND races = 9 AND season > 1984
Schema:
CREATE TABLE table_204_244 (
    id number,
    "year" number,
    "album" text,
    "peak\nus" number,
    "peak\nus\nholiday" number,
    "certifications\n(sales threshold)" text
)

Question: how many album entries are there ?

SQL:
SELECT COUNT("album") FROM table_204_244
Schema:
CREATE TABLE table_22713 (
    "Rank" real,
    "Peak" text,
    "Country" text,
    "Island" text,
    "Elevation (m)" real,
    "Prominence (m)" real,
    "Col (m)" real
)

Question: What is the highest value for col(m) when prominence(m) is 3755?

SQL:
SELECT MAX("Col (m)") FROM table_22713 WHERE "Prominence (m)" = '3755'
Schema:
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 allergy (
    allergyid number,
    patientunitstayid number,
    drugname text,
    allergyname text,
    allergytime 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 medication (
    medicationid number,
    patientunitstayid number,
    drugname text,
    dosage text,
    routeadmin text,
    drugstarttime time,
    drugstoptime time
)

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

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

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

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

Question: what is the monthly minimum output (ml)-closed/suction drain right abdomen bulb 19 fr. output that patient 027-203413 has had since 11/07/2104?

SQL:
SELECT MIN(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-203413')) AND intakeoutput.celllabel = 'output (ml)-closed/suction drain right abdomen bulb 19 fr.' AND intakeoutput.cellpath LIKE '%output%' AND STRFTIME('%y-%m-%d', intakeoutput.intakeoutputtime) >= '2104-11-07' GROUP BY STRFTIME('%y-%m', intakeoutput.intakeoutputtime)
Schema:
CREATE TABLE table_282413_3 (
    ethnic_group VARCHAR
)

Question: How many times is the ethnic group other: total?

SQL:
SELECT COUNT(2001 AS __percentage) FROM table_282413_3 WHERE ethnic_group = "Other: Total"
Schema:
CREATE TABLE table_50184 (
    "Place" text,
    "Player" text,
    "Country" text,
    "Score" text,
    "To par" real,
    "Money ( $ )" text
)

Question: Where is bobby jones (a)?

SQL:
SELECT "Place" FROM table_50184 WHERE "Player" = 'bobby jones (a)'
Schema:
CREATE TABLE Lives_in (
    stuid INTEGER,
    dormid INTEGER,
    room_number INTEGER
)

CREATE TABLE Student (
    StuID INTEGER,
    LName VARCHAR(12),
    Fname VARCHAR(12),
    Age INTEGER,
    Sex VARCHAR(1),
    Major INTEGER,
    Advisor INTEGER,
    city_code VARCHAR(3)
)

CREATE TABLE Has_amenity (
    dormid INTEGER,
    amenid INTEGER
)

CREATE TABLE Dorm (
    dormid INTEGER,
    dorm_name VARCHAR(20),
    student_capacity INTEGER,
    gender VARCHAR(1)
)

CREATE TABLE Dorm_amenity (
    amenid INTEGER,
    amenity_name VARCHAR(25)
)

Question: Find the number of students whose age is younger than the average age and group by students' last name in a bar chart, could you display by the x-axis from high to low?

SQL:
SELECT LName, COUNT(LName) FROM Student WHERE Age < (SELECT AVG(Age) FROM Student) GROUP BY LName ORDER BY LName DESC
Schema:
CREATE TABLE table_name_89 (
    goals VARCHAR,
    assists VARCHAR,
    player VARCHAR
)

Question: What is Goals, when Assists is greater than 28, and when Player is Steve Walker?

SQL:
SELECT goals FROM table_name_89 WHERE assists > 28 AND player = "steve walker"
Schema:
CREATE TABLE table_name_70 (
    byes INTEGER,
    ballarat_fl VARCHAR,
    against VARCHAR
)

Question: What is the average Byes that has Ballarat FL of Sunbury against more than 1167?

SQL:
SELECT AVG(byes) FROM table_name_70 WHERE ballarat_fl = "sunbury" AND against > 1167
Schema:
CREATE TABLE table_2249029_1 (
    gdp_world_rank VARCHAR,
    asian_rank VARCHAR
)

Question: Name the gdp world rank for asian rank being 20

SQL:
SELECT gdp_world_rank FROM table_2249029_1 WHERE asian_rank = 20
Schema:
CREATE TABLE table_29160596_1 (
    top_mc VARCHAR,
    appearances VARCHAR,
    year_inducted VARCHAR
)

Question: List all the MCs with 5 appearances who were inducted in 2007?

SQL:
SELECT top_mc FROM table_29160596_1 WHERE appearances = 5 AND year_inducted = 2007
Schema:
CREATE TABLE table_204_361 (
    id number,
    "tie no" number,
    "home team" text,
    "score" text,
    "away team" text
)

Question: what comes after fiskeby if

SQL:
SELECT "home team" FROM table_204_361 WHERE id = (SELECT id FROM table_204_361 WHERE "home team" = 'fiskeby if') + 1
Schema:
CREATE TABLE table_name_47 (
    country VARCHAR,
    score VARCHAR
)

Question: For what country does the golfer play who has a score of 72-65=137?

SQL:
SELECT country FROM table_name_47 WHERE score = 72 - 65 = 137
Schema:
CREATE TABLE table_name_35 (
    year VARCHAR,
    runner_up VARCHAR
)

Question: When was the runner-up Jane Geddes?

SQL:
SELECT year FROM table_name_35 WHERE runner_up = "jane geddes"
Schema:
CREATE TABLE table_45309 (
    "Date" text,
    "Ship" text,
    "Type" text,
    "Nationality" text,
    "Tonnage GRT" real,
    "Fate" text
)

Question: what is the nationality when the ship is willerby?

SQL:
SELECT "Nationality" FROM table_45309 WHERE "Ship" = 'willerby'
Schema:
CREATE TABLE table_60037 (
    "Letter" text,
    "American" text,
    "British" text,
    "Australian" text,
    "Examples" text
)

Question: What are the examples for the Australian ?

SQL:
SELECT "Examples" FROM table_60037 WHERE "Australian" = 'æ'
Schema:
CREATE TABLE table_57891 (
    "Date" text,
    "Visitor" text,
    "Score" text,
    "Home" text,
    "Leading scorer" text,
    "Record" text
)

Question: What is the Date with a Leading scorer with maurice williams (25), and a Score with 102 105?

SQL:
SELECT "Date" FROM table_57891 WHERE "Leading scorer" = 'maurice williams (25)' AND "Score" = '102–105'
Schema:
CREATE TABLE cost (
    costid number,
    uniquepid text,
    patienthealthsystemstayid number,
    eventtype text,
    eventid number,
    chargetime time,
    cost number
)

CREATE TABLE vitalperiodic (
    vitalperiodicid number,
    patientunitstayid number,
    temperature number,
    sao2 number,
    heartrate number,
    respiration number,
    systemicsystolic number,
    systemicdiastolic number,
    systemicmean number,
    observationtime time
)

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

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

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 lab (
    labid number,
    patientunitstayid number,
    labname text,
    labresult number,
    labresulttime time
)

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

CREATE TABLE patient (
    uniquepid text,
    patienthealthsystemstayid number,
    patientunitstayid number,
    gender text,
    age text,
    ethnicity text,
    hospitalid number,
    wardid number,
    admissionheight number,
    admissionweight number,
    dischargeweight number,
    hospitaladmittime time,
    hospitaladmitsource text,
    unitadmittime time,
    unitdischargetime time,
    hospitaldischargetime time,
    hospitaldischargestatus text
)

Question: when was patient 030-52395 received an intake for the first time since 03/26/2102.

SQL:
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-52395')) AND intakeoutput.cellpath LIKE '%intake%' AND STRFTIME('%y-%m-%d', intakeoutput.intakeoutputtime) >= '2102-03-26' ORDER BY intakeoutput.intakeoutputtime LIMIT 1
Schema:
CREATE TABLE table_name_81 (
    capacity INTEGER,
    position_in_2004 VARCHAR
)

Question: What's the highest capacity for a position of 5 in 2004?

SQL:
SELECT MAX(capacity) FROM table_name_81 WHERE position_in_2004 = "5"
Schema:
CREATE TABLE table_51428 (
    "Player" text,
    "Height" text,
    "School" text,
    "Hometown" text,
    "College" text,
    "NBA Draft" text
)

Question: What is the NBA draft for ohio state?

SQL:
SELECT "NBA Draft" FROM table_51428 WHERE "College" = 'ohio state'
Schema:
CREATE TABLE table_203_206 (
    id number,
    "rank" number,
    "nation" text,
    "gold" number,
    "silver" number,
    "bronze" number,
    "total" number
)

Question: what country won the same number of bronze as great britain , yet did not win a gold medal ?

SQL:
SELECT "nation" FROM table_203_206 WHERE "nation" <> 'great britain' AND "bronze" = (SELECT "bronze" FROM table_203_206 WHERE "nation" = 'great britain') AND "gold" = 0
Schema:
CREATE TABLE intakeoutput (
    intakeoutputid number,
    patientunitstayid number,
    cellpath text,
    celllabel text,
    cellvaluenumeric number,
    intakeoutputtime 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 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
)

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

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

Question: when was patient 015-96048 last prescribed for tylenol on their last hospital visit?

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 = '015-96048' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1)) AND medication.drugname = 'tylenol' ORDER BY medication.drugstarttime DESC LIMIT 1
Schema:
CREATE TABLE table_1342013_37 (
    incumbent VARCHAR,
    district VARCHAR
)

Question: What is the incumbent for pennsylvania 15

SQL:
SELECT incumbent FROM table_1342013_37 WHERE district = "Pennsylvania 15"
Schema:
CREATE TABLE table_55019 (
    "Home team" text,
    "Home team score" text,
    "Away team" text,
    "Away team score" text,
    "Venue" text,
    "Crowd" real,
    "Date" text
)

Question: At what Venue was the Home team score 17.19 (121)?

SQL:
SELECT "Venue" FROM table_55019 WHERE "Home team score" = '17.19 (121)'
Schema:
CREATE TABLE table_2402864_1 (
    playoffs VARCHAR,
    open_cup VARCHAR,
    year VARCHAR
)

Question: What was the playoff result where the league did not qualify in the Open Cup in 1998?

SQL:
SELECT playoffs FROM table_2402864_1 WHERE open_cup = "Did not qualify" AND year = 1998
Schema:
CREATE TABLE table_name_83 (
    driver VARCHAR,
    year VARCHAR
)

Question: Who was the driver in 1964?

SQL:
SELECT driver FROM table_name_83 WHERE year = "1964"
Schema:
CREATE TABLE table_203_274 (
    id number,
    "church name" text,
    "address" text,
    "community" text,
    "school" text
)

Question: which is the first church located in los angeles ?

SQL:
SELECT "church name" FROM table_203_274 WHERE "community" = 'los angeles' ORDER BY id LIMIT 1
Schema:
CREATE TABLE table_8511 (
    "Rank" real,
    "Team" text,
    "Round1" real,
    "Round2" real,
    "Round3" real,
    "Round4" real,
    "Round5" real,
    "Total Points" real
)

Question: what is the lowest round2 when round5 is 71 and round4 is more than 64?

SQL:
SELECT MIN("Round2") FROM table_8511 WHERE "Round5" = '71' AND "Round4" > '64'
Schema:
CREATE TABLE table_66129 (
    "Week" real,
    "Date" text,
    "Opponent" text,
    "Result" text,
    "Record" text,
    "TV Time" text,
    "Attendance" text
)

Question: What was the attendance for the game against miami dolphins?

SQL:
SELECT "Attendance" FROM table_66129 WHERE "Opponent" = 'miami dolphins'
Schema:
CREATE TABLE table_17360840_6 (
    score VARCHAR,
    date VARCHAR
)

Question: What was the score of the game on December 11?

SQL:
SELECT score FROM table_17360840_6 WHERE date = "December 11"
Schema:
CREATE TABLE table_name_10 (
    date VARCHAR,
    away_team VARCHAR
)

Question: What is the date they played against fitzroy?

SQL:
SELECT date FROM table_name_10 WHERE away_team = "fitzroy"
Schema:
CREATE TABLE table_40447 (
    "Draw" real,
    "Artist" text,
    "Song" text,
    "Result" text,
    "Place" real
)

Question: What is the place of the song 'Never Change'?

SQL:
SELECT SUM("Place") FROM table_40447 WHERE "Song" = 'never change'
Schema:
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 departments (
    DEPARTMENT_ID decimal(4,0),
    DEPARTMENT_NAME varchar(30),
    MANAGER_ID decimal(6,0),
    LOCATION_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 job_history (
    EMPLOYEE_ID decimal(6,0),
    START_DATE date,
    END_DATE date,
    JOB_ID varchar(10),
    DEPARTMENT_ID decimal(4,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 countries (
    COUNTRY_ID varchar(2),
    COUNTRY_NAME varchar(40),
    REGION_ID decimal(10,0)
)

Question: For those employees who was hired before 2002-06-21, draw a bar chart about the distribution of job_id and the amount of job_id , and group by attribute job_id, rank in descending by the the number of job id.

SQL:
SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY COUNT(JOB_ID) DESC
Schema:
CREATE TABLE company (
    Company_ID int,
    Rank int,
    Company text,
    Headquarters text,
    Main_Industry text,
    Sales_billion real,
    Profits_billion real,
    Assets_billion real,
    Market_Value real
)

CREATE TABLE station_company (
    Station_ID int,
    Company_ID int,
    Rank_of_the_Year int
)

CREATE TABLE gas_station (
    Station_ID int,
    Open_Year int,
    Location text,
    Manager_Name text,
    Vice_Manager_Name text,
    Representative_Name text
)

Question: Show the number of companies whose headquarters are not from USA fpr each main industry in a bar chart, show X-axis in ascending order please.

SQL:
SELECT Main_Industry, COUNT(Main_Industry) FROM company WHERE Headquarters <> 'USA' GROUP BY Main_Industry ORDER BY Main_Industry
Schema:
CREATE TABLE table_64035 (
    "Draw" real,
    "Artist" text,
    "Song" text,
    "Percentage" text,
    "Place" real
)

Question: What song placed higher than#4?

SQL:
SELECT "Song" FROM table_64035 WHERE "Place" > '4'
Schema:
CREATE TABLE table_name_95 (
    founded VARCHAR,
    suburb VARCHAR
)

Question: What year was the Beaudesert suburb club founded

SQL:
SELECT founded FROM table_name_95 WHERE suburb = "beaudesert"
Schema:
CREATE TABLE Ref_Detention_Type (
    detention_type_code VARCHAR(10),
    detention_type_description VARCHAR(80)
)

CREATE TABLE Detention (
    detention_id INTEGER,
    detention_type_code VARCHAR(10),
    teacher_id INTEGER,
    datetime_detention_start DATETIME,
    datetime_detention_end DATETIME,
    detention_summary VARCHAR(255),
    other_details VARCHAR(255)
)

CREATE TABLE Assessment_Notes (
    notes_id INTEGER,
    student_id INTEGER,
    teacher_id INTEGER,
    date_of_notes DATETIME,
    text_of_notes VARCHAR(255),
    other_details VARCHAR(255)
)

CREATE TABLE Addresses (
    address_id INTEGER,
    line_1 VARCHAR(120),
    line_2 VARCHAR(120),
    line_3 VARCHAR(120),
    city VARCHAR(80),
    zip_postcode VARCHAR(20),
    state_province_county VARCHAR(50),
    country VARCHAR(50),
    other_address_details VARCHAR(255)
)

CREATE TABLE Teachers (
    teacher_id INTEGER,
    address_id INTEGER,
    first_name VARCHAR(80),
    middle_name VARCHAR(80),
    last_name VARCHAR(80),
    gender VARCHAR(1),
    cell_mobile_number VARCHAR(40),
    email_address VARCHAR(40),
    other_details VARCHAR(255)
)

CREATE TABLE Behavior_Incident (
    incident_id INTEGER,
    incident_type_code VARCHAR(10),
    student_id INTEGER,
    date_incident_start DATETIME,
    date_incident_end DATETIME,
    incident_summary VARCHAR(255),
    recommendations VARCHAR(255),
    other_details VARCHAR(255)
)

CREATE TABLE Students_in_Detention (
    student_id INTEGER,
    detention_id INTEGER,
    incident_id INTEGER
)

CREATE TABLE Ref_Incident_Type (
    incident_type_code VARCHAR(10),
    incident_type_description VARCHAR(80)
)

CREATE TABLE Student_Addresses (
    student_id INTEGER,
    address_id INTEGER,
    date_address_from DATETIME,
    date_address_to DATETIME,
    monthly_rental DECIMAL(19,4),
    other_details VARCHAR(255)
)

CREATE TABLE Ref_Address_Types (
    address_type_code VARCHAR(15),
    address_type_description VARCHAR(80)
)

CREATE TABLE Students (
    student_id INTEGER,
    address_id INTEGER,
    first_name VARCHAR(80),
    middle_name VARCHAR(40),
    last_name VARCHAR(40),
    cell_mobile_number VARCHAR(40),
    email_address VARCHAR(40),
    date_first_rental DATETIME,
    date_left_university DATETIME,
    other_student_details VARCHAR(255)
)

Question: Visualize a bar chart about the distribution of date_address_to and the amount of date_address_to , and group by attribute other_details and bin date_address_to by weekday.

SQL:
SELECT date_address_to, COUNT(date_address_to) FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC
Schema:
CREATE TABLE table_41725 (
    "Name" text,
    "Position" text,
    "Number" real,
    "School/Club Team" text,
    "Season" text,
    "Acquisition via" text
)

Question: How was the player in the position of Center acquired?

SQL:
SELECT "Acquisition via" FROM table_41725 WHERE "Position" = 'center'
Schema:
CREATE TABLE table_39879 (
    "Region" text,
    "Date" text,
    "Label" text,
    "Format" text,
    "Catalog" text
)

Question: Catalog Nebdj068 was released when?

SQL:
SELECT "Date" FROM table_39879 WHERE "Catalog" = 'nebdj068'
Schema:
CREATE TABLE table_40653 (
    "Date" text,
    "Tournament" text,
    "Winning score" text,
    "To par" text,
    "Margin of victory" text,
    "Runner(s)-up" text
)

Question: What was the To par score for the tournament with a margin of victory of 1 stroke?

SQL:
SELECT "To par" FROM table_40653 WHERE "Margin of victory" = '1 stroke'
Schema:
CREATE TABLE table_56418 (
    "Season" text,
    "Cup FinalDate" text,
    "WinningTeam" text,
    "Score" text,
    "LosingTeam" text,
    "Cup Final Attendance" text
)

Question: On what date did the Brisbane Lions (1) win?

SQL:
SELECT "Cup FinalDate" FROM table_56418 WHERE "WinningTeam" = 'brisbane lions (1)'
Schema:
CREATE TABLE table_23078 (
    "Rank" text,
    "Name" text,
    "Lifespan" text,
    "Country" text,
    "Wins" real,
    "Majors" real,
    "Winning span" text,
    "Span (years)" real
)

Question: What is the winning span for the name of bernard gallacher?

SQL:
SELECT "Winning span" FROM table_23078 WHERE "Name" = 'Bernard Gallacher'