VishalCh/book-train huggingface dataset:
Schema:
CREATE TABLE table_3509 (
    "Year" real,
    "Qatari Male" real,
    "Qatari Female" real,
    "Total Qatari" real,
    "Non Qatari Male" real,
    "Non Qatari Female" real,
    "Total Non Qatar" real,
    "Total Male" real,
    "Total Female" real,
    "Grand Total" real
)

Question: If the qatari female is 918, what is the total number of females?

SQL:
SELECT "Total Female" FROM table_3509 WHERE "Qatari Female" = '918'
Schema:
CREATE TABLE table_name_36 (
    county VARCHAR,
    year_left VARCHAR
)

Question: what is the county when the year left is 1998?

SQL:
SELECT county FROM table_name_36 WHERE year_left = "1998"
Schema:
CREATE TABLE table_42062 (
    "8:00" text,
    "8:30" text,
    "9:00" text,
    "9:30" text,
    "10:00" text
)

Question: When Grey's Anatomy aired at 9:30 what aired at 9:00?

SQL:
SELECT "9:00" FROM table_42062 WHERE "9:30" = 'grey''s anatomy'
Schema:
CREATE TABLE table_name_60 (
    team_wins INTEGER,
    individual_winners VARCHAR,
    total_wins VARCHAR
)

Question: Which Team wins has an Individual winner smaller than 1 and Total win larger than 1?

SQL:
SELECT SUM(team_wins) FROM table_name_60 WHERE individual_winners < 1 AND total_wins > 1
Schema:
CREATE TABLE table_36826 (
    "Title" text,
    "Genre" text,
    "C=64" text,
    "ZX Spectrum" text,
    "Others" text,
    "Year" real,
    "Format" text
)

Question: Which ZX Spectrum has a Year larger than 1984, and a Genre of arcade/strategy?

SQL:
SELECT "ZX Spectrum" FROM table_36826 WHERE "Year" > '1984' AND "Genre" = 'arcade/strategy'
Schema:
CREATE TABLE table_38946 (
    "Game" real,
    "December" real,
    "Opponent" text,
    "Score" text,
    "Record" text,
    "Points" real
)

Question: After December 19, what is the Game number with a Record of 21 4 7?

SQL:
SELECT COUNT("Game") FROM table_38946 WHERE "Record" = '21–4–7' AND "December" > '19'
Schema:
CREATE TABLE student (
    id text,
    name text,
    dept_name text,
    tot_cred number
)

CREATE TABLE advisor (
    s_id text,
    i_id text
)

CREATE TABLE course (
    course_id text,
    title text,
    dept_name text,
    credits number
)

CREATE TABLE instructor (
    id text,
    name text,
    dept_name text,
    salary number
)

CREATE TABLE teaches (
    id text,
    course_id text,
    sec_id text,
    semester text,
    year number
)

CREATE TABLE section (
    course_id text,
    sec_id text,
    semester text,
    year number,
    building text,
    room_number text,
    time_slot_id text
)

CREATE TABLE takes (
    id text,
    course_id text,
    sec_id text,
    semester text,
    year number,
    grade text
)

CREATE TABLE classroom (
    building text,
    room_number text,
    capacity number
)

CREATE TABLE department (
    dept_name text,
    building text,
    budget number
)

CREATE TABLE time_slot (
    time_slot_id text,
    day text,
    start_hr number,
    start_min number,
    end_hr number,
    end_min number
)

CREATE TABLE prereq (
    course_id text,
    prereq_id text
)

Question: What are the distinct buildings with capacities of greater than 50?

SQL:
SELECT DISTINCT building FROM classroom WHERE capacity > 50
Schema:
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 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 COURSE (
    CRS_CODE varchar(10),
    DEPT_CODE varchar(10),
    CRS_DESCRIPTION varchar(35),
    CRS_CREDIT float(8)
)

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 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 CLASS (
    CLASS_CODE varchar(5),
    CRS_CODE varchar(10),
    CLASS_SECTION varchar(2),
    CLASS_TIME varchar(20),
    CLASS_ROOM varchar(8),
    PROF_NUM int
)

Question: Bar chart x axis dept code y axis minimal stu gpa, and display Y-axis in descending order.

SQL:
SELECT DEPT_CODE, MIN(STU_GPA) FROM STUDENT GROUP BY DEPT_CODE ORDER BY MIN(STU_GPA) DESC
Schema:
CREATE TABLE table_name_62 (
    decision VARCHAR,
    visitor VARCHAR
)

Question: No Decision listed above has a visitor of Montreal.

SQL:
SELECT decision FROM table_name_62 WHERE visitor = "montreal"
Schema:
CREATE TABLE table_name_21 (
    high_points VARCHAR,
    date VARCHAR
)

Question: What player had the high point on July 7?

SQL:
SELECT high_points FROM table_name_21 WHERE date = "july 7"
Schema:
CREATE TABLE table_7343 (
    "Date" text,
    "Time" text,
    "Home" text,
    "Away" text,
    "Score" text,
    "Ground" text
)

Question: When did the team play an away game against the Toronto Eagles?

SQL:
SELECT "Date" FROM table_7343 WHERE "Away" = 'toronto eagles'
Schema:
CREATE TABLE table_name_14 (
    golden_point_s__scorer VARCHAR,
    away VARCHAR,
    home VARCHAR
)

Question: What Golden point(s) scorer has the Away Brisbane Broncos and Home South Sydney Rabbitohs?

SQL:
SELECT golden_point_s__scorer FROM table_name_14 WHERE away = "brisbane broncos" AND home = "south sydney rabbitohs"
Schema:
CREATE TABLE table_name_55 (
    party VARCHAR,
    minister VARCHAR
)

Question: What is Party, when Minister is 'Franco Frattini'?

SQL:
SELECT party FROM table_name_55 WHERE minister = "franco frattini"
Schema:
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)
)

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 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 countries (
    COUNTRY_ID varchar(2),
    COUNTRY_NAME varchar(40),
    REGION_ID decimal(10,0)
)

Question: For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, show me about the distribution of job_id and the average of employee_id , and group by attribute job_id in a bar chart, could you rank in ascending by the X-axis?

SQL:
SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY JOB_ID
Schema:
CREATE TABLE table_39540 (
    "Wind Farm" text,
    "Capacity (MW)" real,
    "Turbines" real,
    "Turbine Vendor" text,
    "Size (MW)" text,
    "County" text
)

Question: What is the size of the windfarm in wexford that has more than 19 turbines and a vendor of Enercon?

SQL:
SELECT "Size (MW)" FROM table_39540 WHERE "Turbines" > '19' AND "Turbine Vendor" = 'enercon' AND "County" = 'wexford'
Schema:
CREATE TABLE table_23155 (
    "LGA Name" text,
    "Area (km 2 )" real,
    "Census 2006 population" real,
    "Administrative capital" text,
    "Postal Code" real
)

Question: What is the maximum 2006 census population of LGA name Opobo/Nkoro?

SQL:
SELECT MAX("Census 2006 population") FROM table_23155 WHERE "LGA Name" = 'Opobo/Nkoro'
Schema:
CREATE TABLE table_name_60 (
    jushin_liger VARCHAR,
    gran_hamada VARCHAR
)

Question: Which Jushin Liger has a Gran Hamada of kendo kashin?

SQL:
SELECT jushin_liger FROM table_name_60 WHERE gran_hamada = "kendo kashin"
Schema:
CREATE TABLE table_60251 (
    "Name" text,
    "Volume" text,
    "Engine" text,
    "Fuel" text,
    "Output" text,
    "Torque" text,
    "Engine ID code(s)" text,
    "0\u2013100km/h,s" real,
    "Top speed" text,
    "Years" text
)

Question: What engine has an output of ps (kw; hp) @4700 rpm?

SQL:
SELECT "Engine" FROM table_60251 WHERE "Output" = 'ps (kw; hp) @4700 rpm'
Schema:
CREATE TABLE table_31014 (
    "Rnd" text,
    "Circuit" text,
    "AP Winning Team" text,
    "BP Winning Team" text,
    "CM Winning Team" text,
    "CP Winning Team" text,
    "DM Winning Team" text,
    "DP Winning Team" text,
    "EM Winning Team" text,
    "EP Winning Team" text,
    "FM Winning Team" text,
    "FP Winning Team" text,
    "GM Winning Team" text,
    "GP Winning Team" text,
    "HM Winning Team" text,
    "HP Winning Team" text,
    "Results" text
)

Question: Who was the HP winning team when the EP winning team was Hans Zereis and the GM winning team was Charles Gibson?

SQL:
SELECT "HP Winning Team" FROM table_31014 WHERE "EP Winning Team" = 'Hans Zereis' AND "GM Winning Team" = 'Charles Gibson'
Schema:
CREATE TABLE table_name_7 (
    extra_points INTEGER,
    player VARCHAR,
    touchdowns VARCHAR
)

Question: What mean number of extra points was there when James Lawrence was a player and the touchdown number was less than 1?

SQL:
SELECT AVG(extra_points) FROM table_name_7 WHERE player = "james lawrence" AND touchdowns < 1
Schema:
CREATE TABLE table_203_305 (
    id number,
    "round" number,
    "#" number,
    "player" text,
    "nationality" text,
    "college/junior/club team (league)" text
)

Question: who is the only player to have denmark listed as their nationality ?

SQL:
SELECT "player" FROM table_203_305 WHERE "nationality" = 'denmark'
Schema:
CREATE TABLE table_28138035_26 (
    year_location VARCHAR,
    womens_singles VARCHAR
)

Question: What year and where was the tournament when fan ying won the womens singles?

SQL:
SELECT year_location FROM table_28138035_26 WHERE womens_singles = "Fan Ying"
Schema:
CREATE TABLE countries (
    COUNTRY_ID varchar(2),
    COUNTRY_NAME varchar(40),
    REGION_ID decimal(10,0)
)

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 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 regions (
    REGION_ID decimal(5,0),
    REGION_NAME varchar(25)
)

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: For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of phone_number and employee_id , show X-axis in desc order please.

SQL:
SELECT PHONE_NUMBER, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY PHONE_NUMBER DESC
Schema:
CREATE TABLE table_name_24 (
    label VARCHAR,
    album VARCHAR
)

Question: What label shows an Album of cover version v?

SQL:
SELECT label FROM table_name_24 WHERE album = "cover version v"
Schema:
CREATE TABLE table_name_7 (
    genre VARCHAR,
    title VARCHAR
)

Question: What genre was Music in the Air?

SQL:
SELECT genre FROM table_name_7 WHERE title = "music in the air"
Schema:
CREATE TABLE table_23740 (
    "County" text,
    "Obama%" text,
    "Obama#" real,
    "McCain%" text,
    "McCain#" real
)

Question: In how many counties di McCain win 41.62% of the vote?

SQL:
SELECT COUNT("County") FROM table_23740 WHERE "McCain%" = '41.62%'
Schema:
CREATE TABLE table_11206916_2 (
    date_of_appointment VARCHAR,
    outgoing_manager VARCHAR
)

Question: What is the date of appointment for outgoing manager Campbell Money

SQL:
SELECT date_of_appointment FROM table_11206916_2 WHERE outgoing_manager = "Campbell Money"
Schema:
CREATE TABLE table_1808 (
    "Year" real,
    "Lok Sabha" text,
    "Members of Parliament" text,
    "Party Won" text,
    "Winners % votes" text,
    "Trailing Party" text,
    "Trailing Party % votes" text
)

Question: What year was the winners vote 55.99%?

SQL:
SELECT MIN("Year") FROM table_1808 WHERE "Winners % votes" = '55.99%'
Schema:
CREATE TABLE table_name_73 (
    points INTEGER,
    losses VARCHAR,
    position VARCHAR
)

Question: What is the lowest number of points of the team with 2 losses and a lower than 1 position?

SQL:
SELECT MIN(points) FROM table_name_73 WHERE losses = 2 AND position > 1
Schema:
CREATE TABLE table_57966 (
    "Home team" text,
    "Home team score" text,
    "Away team" text,
    "Away team score" text,
    "Venue" text,
    "Crowd" real,
    "Date" text
)

Question: What is the away team's score when the Home team score is 14.18 (102)?

SQL:
SELECT "Away team score" FROM table_57966 WHERE "Home team score" = '14.18 (102)'
Schema:
CREATE TABLE table_204_966 (
    id number,
    "region" text,
    "date" text,
    "label" text,
    "format" text,
    "catalog" text
)

Question: what label was italy on ?

SQL:
SELECT "label" FROM table_204_966 WHERE "region" = 'italy'
Schema:
CREATE TABLE table_65762 (
    "Name" text,
    "Nationality" text,
    "4.30" text,
    "4.45" text,
    "4.55" text,
    "Result" real
)

Question: What national has 4.45 for o and 4.55 for xo?

SQL:
SELECT "Nationality" FROM table_65762 WHERE "4.45" = 'o' AND "4.55" = 'xo'
Schema:
CREATE TABLE people (
    people_id number,
    name text,
    height number,
    weight number,
    date_of_birth text
)

CREATE TABLE entrepreneur (
    entrepreneur_id number,
    people_id number,
    company text,
    money_requested number,
    investor text
)

Question: Return the average money requested across all entrepreneurs.

SQL:
SELECT AVG(money_requested) FROM entrepreneur
Schema:
CREATE TABLE table_28157 (
    "Graphics" text,
    "Launch" real,
    "Market" text,
    "CPU" text,
    "Code name" text,
    "Device ID" real,
    "Core clock ( MHz )" text,
    "Execution units" real,
    "Shader model" text,
    "DirectX" text,
    "OpenGL" text,
    "OpenCL" text,
    "Memory bandwidth ( GB/s )" text,
    "DVMT ( MB )" real,
    "CVT HD" text,
    "QSV" text
)

Question: What core clocks ( mhz ) have a 21.3 memory bandwidth ( gb/s )?

SQL:
SELECT "Core clock ( MHz )" FROM table_28157 WHERE "Memory bandwidth ( GB/s )" = '21.3'
Schema:
CREATE TABLE table_31012 (
    "Rnd" text,
    "Circuit" text,
    "AP Winning Team" text,
    "BP Winning Team" text,
    "CM Winning Team" text,
    "CP Winning Team" text,
    "DM Winning Team" text,
    "DP Winning Team" text,
    "EM Winning Team" text,
    "EP Winning Team" text,
    "FM Winning Team" text,
    "FP Winning Team" text,
    "GM Winning Team" text,
    "GP Winning Team" text,
    "HM Winning Team" text,
    "HP Winning Team" text,
    "Results" text
)

Question: Who the GM winning team when the EP winning team was #37 Porsche?

SQL:
SELECT "GM Winning Team" FROM table_31012 WHERE "EP Winning Team" = '#37 Porsche'
Schema:
CREATE TABLE table_name_57 (
    position VARCHAR,
    b_score VARCHAR,
    gymnast VARCHAR
)

Question: What is their position when the b score is more than 8.975 for Ekaterina Kramarenko ( rus )?

SQL:
SELECT position FROM table_name_57 WHERE b_score > 8.975 AND gymnast = "ekaterina kramarenko ( rus )"
Schema:
CREATE TABLE table_train_157 (
    "id" int,
    "gender" string,
    "systolic_blood_pressure_sbp" int,
    "hemoglobin_a1c_hba1c" float,
    "platelets" int,
    "renal_disease" bool,
    "c_reactive_protein" float,
    "creatinine_clearance_cl" float,
    "urine_protein" int,
    "serum_creatinine" float,
    "proteinuria" int,
    "NOUSE" float
)

Question: known renal disease with a baseline serum creatinine > 1.5 mg / dl

SQL:
SELECT * FROM table_train_157 WHERE renal_disease = 1 AND serum_creatinine > 1.5
Schema:
CREATE TABLE election (
    Date VARCHAR,
    Vote_Percent VARCHAR
)

Question: List the dates and vote percents of elections.

SQL:
SELECT Date, Vote_Percent FROM election
Schema:
CREATE TABLE table_2319 (
    "School" text,
    "Location(s)" text,
    "Control" text,
    "Type" text,
    "Enrollment" real,
    "Founded" real
)

Question: What enrollement would you expect if you were attending the university in St. Louis?

SQL:
SELECT "Enrollment" FROM table_2319 WHERE "Location(s)" = 'St. Louis'
Schema:
CREATE TABLE table_203_186 (
    id number,
    "painter" text,
    "composition" number,
    "drawing" number,
    "color" number,
    "expression" number
)

Question: what is the total number of painters who scored 12 in composition ?

SQL:
SELECT COUNT("painter") FROM table_203_186 WHERE "composition" = 12
Schema:
CREATE TABLE table_29728596_2 (
    away_team VARCHAR,
    competition VARCHAR,
    home_team VARCHAR
)

Question: Who were the away teams when the competition was the 1st republic of srpska football day and the home team was u 14 republic of srpska?

SQL:
SELECT away_team FROM table_29728596_2 WHERE competition = "1st ``Republic of Srpska Football Day``" AND home_team = "U 14 Republic of Srpska"
Schema:
CREATE TABLE table_name_32 (
    chassis VARCHAR,
    year VARCHAR,
    entrant VARCHAR
)

Question: Which chassis did fondmetal f1 spa use after 1990?

SQL:
SELECT chassis FROM table_name_32 WHERE year > 1990 AND entrant = "fondmetal f1 spa"
Schema:
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 lab (
    labid number,
    patientunitstayid number,
    labname text,
    labresult number,
    labresulttime 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 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 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 treatment (
    treatmentid number,
    patientunitstayid number,
    treatmentname text,
    treatmenttime time
)

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

Question: what is the number of patients who are in ward 650 until 2104?

SQL:
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.wardid = 650 AND STRFTIME('%y', patient.unitadmittime) <= '2104'
Schema:
CREATE TABLE table_10194 (
    "Date" text,
    "Course" text,
    "Distance" text,
    "Type" text,
    "Winner" text
)

Question: How far is the olbia to sassari route?

SQL:
SELECT "Distance" FROM table_10194 WHERE "Course" = 'olbia to sassari'
Schema:
CREATE TABLE table_4377 (
    "Date" text,
    "Venue" text,
    "Score" text,
    "Result" text,
    "Competition" text
)

Question: What competition was held 1 March 1909?

SQL:
SELECT "Competition" FROM table_4377 WHERE "Date" = '1 march 1909'
Schema:
CREATE TABLE table_204_882 (
    id number,
    "number" number,
    "builder" text,
    "entered service" text,
    "withdrawn" text,
    "notes" text
)

Question: can you find the top entered service ?

SQL:
SELECT "entered service" FROM table_204_882 WHERE id = 1
Schema:
CREATE TABLE lab (
    subject_id text,
    hadm_id text,
    itemid text,
    charttime text,
    flag text,
    value_unit text,
    label text,
    fluid text
)

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

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

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: provide the number of patients whose ethnicity is black/cape verdean and age is less than 68?

SQL:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND demographic.age < "68"
Schema:
CREATE TABLE table_80361 (
    "Tournament" text,
    "2008" text,
    "2009" text,
    "2010" text,
    "2011" text,
    "2012" text
)

Question: Name the 2011 when 2010 is 2r

SQL:
SELECT "2011" FROM table_80361 WHERE "2010" = '2r'
Schema:
CREATE TABLE table_2468961_4 (
    title VARCHAR,
    no_in_series VARCHAR
)

Question: What was the title of series number 56?

SQL:
SELECT title FROM table_2468961_4 WHERE no_in_series = 56
Schema:
CREATE TABLE table_9055 (
    "Outcome" text,
    "Date" real,
    "Championship" text,
    "Surface" text,
    "Opponent" text,
    "Score" text
)

Question: What was the championship during the match with the opponent of richard fromberg?

SQL:
SELECT "Championship" FROM table_9055 WHERE "Opponent" = 'richard fromberg'
Schema:
CREATE TABLE table_68346 (
    "Rank" real,
    "Team" text,
    "Country" text,
    "Value ($M)" real,
    "Debt as % of value" real,
    "% change on year" text,
    "Revenue ($M)" real,
    "Operating income ($m)" real
)

Question: Name the most revenue for operating income more than 27 for hamburg and debt as % of value less than 0

SQL:
SELECT MAX("Revenue ($M)") FROM table_68346 WHERE "Operating income ($m)" > '27' AND "Team" = 'hamburg' AND "Debt as % of value" < '0'
Schema:
CREATE TABLE table_9742 (
    "Game" text,
    "Date" text,
    "Home Team" text,
    "Result" text,
    "Road Team" text
)

Question: What is the result for game 5?

SQL:
SELECT "Result" FROM table_9742 WHERE "Game" = 'game 5'