answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT COUNT(team) FROM table_22056184_1 WHERE position = "7th"
How many teams have 7th position?
CREATE TABLE table_22056184_1 (team VARCHAR, position VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2119" AND diagnoses.icd9_code = "70714"
provide the number of patients whose admission year is less than 2119 and diagnoses icd9 code is 70714?
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text )
SELECT COUNT(high_assists) FROM table_23248869_10 WHERE game = 81
How many values for high assists when the game is 81?
CREATE TABLE table_23248869_10 (high_assists VARCHAR, game VARCHAR)
SELECT MIN(poles) FROM table_22056184_1 WHERE series = "British Formula Renault 2.0" AND f_laps = 1
How many poles when British formula renault 2.0 series and f/laps 1?
CREATE TABLE table_22056184_1 (poles INTEGER, series VARCHAR, f_laps VARCHAR)
SELECT MIN(year) FROM table_name_49 WHERE city = "chester-le-street" AND score = "345 runs"
What is the lowest year that has chester-le-street as the city, with 345 runs as the score?
CREATE TABLE table_name_49 ( year INTEGER, city VARCHAR, score VARCHAR )
SELECT COUNT(date) FROM table_23248869_8 WHERE high_points = "David Lee (30)"
How many times was the high points david lee (30)
CREATE TABLE table_23248869_8 (date VARCHAR, high_points VARCHAR)
SELECT points FROM table_22056184_1 WHERE poles = 1
How many points when pole are 1?
CREATE TABLE table_22056184_1 (points VARCHAR, poles VARCHAR)
SELECT "2012/ 13" FROM table_46979 WHERE "2007/ 08" = 'lq' AND "2006/ 07" = 'lq' AND "2009/ 10" = 'tournament not held'
What was the 2012/13 result for the tournament that had a 2006/07 and 2007/08 finish of LQ, with the tournament not held in 2009/10?
CREATE TABLE table_46979 ( "2004/ 05" text, "2006/ 07" text, "2007/ 08" text, "2009/ 10" text, "2010/ 11" text, "2011/ 12" text, "2012/ 13" text )
SELECT high_assists FROM table_23248869_8 WHERE score = "L 85–118 (OT)"
Who had the high assists when the score was l 85–118 (ot)
CREATE TABLE table_23248869_8 (high_assists VARCHAR, score VARCHAR)
SELECT COUNT(wiaa_classification) FROM table_22058547_1 WHERE high_school = "Fort Vancouver"
how many wiaa classifications does fort vancouver high school have?
CREATE TABLE table_22058547_1 (wiaa_classification VARCHAR, high_school VARCHAR)
SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN student_record ON student_record.course_id = course.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.department = 'AAPTIS' AND program_course.workload = (SELECT MAX(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 INNER JOIN course AS COURSEalias1 ON PROGRAM_COURSEalias1.course_id = COURSEalias1.course_id WHERE COURSEalias1.department = 'AAPTIS') AND student_record.student_id = 1
What courses that I 've taken are among the hardest in the AAPTIS department ?
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters int, num_enrolled int, has_discussion varchar, has_lab varchar, has_projects varchar, has_exams varchar, num_reviews int, clarity_score int, easiness_score int, helpfulness_score int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_project varchar, has_final_exam varchar, textbook varchar, class_address varchar, allow_audit varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, tough_tests int, heavy_papers int, cares_for_students int, heavy_assignments int, respected int, participation int, heavy_reading int, tough_grader int, hilarious int, would_take_again int, good_lecture int, no_skip int ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_graduation_semester int, degree varchar, minor varchar, internship varchar ) CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int )
SELECT record FROM table_23248869_8 WHERE high_rebounds = "David Lee (8)"
What was the record when the high rebounds was david lee (8)
CREATE TABLE table_23248869_8 (record VARCHAR, high_rebounds VARCHAR)
SELECT high_school FROM table_22058547_1 WHERE mascot = "Storm"
How many high schools have storm mascots?
CREATE TABLE table_22058547_1 (high_school VARCHAR, mascot VARCHAR)
SELECT AVG(sales__billion_) AS $_ FROM table_name_5 WHERE company = "walmart" AND profits__billion_$_ > 15.7
What is the average sales in billions of walmart, which has more than 15.7 billion in profits?
CREATE TABLE table_name_5 ( sales__billion_ INTEGER, company VARCHAR, profits__billion_$_ VARCHAR )
SELECT COUNT(score) FROM table_23248869_8 WHERE record = "19–34"
How many times was the record 19–34
CREATE TABLE table_23248869_8 (score VARCHAR, record VARCHAR)
SELECT wiaa_classification FROM table_22058547_1 WHERE high_school = "Vancouver iTech Prepratory"
What wiaa classifications does vancouver itech prepratory have?
CREATE TABLE table_22058547_1 (wiaa_classification VARCHAR, high_school VARCHAR)
SELECT no FROM table_1827690_4 WHERE elected = "1462/63"
When 1462/63 was the elected what was the no.?
CREATE TABLE table_1827690_4 ( no VARCHAR, elected VARCHAR )
SELECT score FROM table_23248869_8 WHERE record = "19–35"
What was the score when the record was 19–35
CREATE TABLE table_23248869_8 (score VARCHAR, record VARCHAR)
SELECT type FROM table_22058547_1 WHERE mascot = "Trappers"
What school classifications have trappers as mascot?
CREATE TABLE table_22058547_1 (type VARCHAR, mascot VARCHAR)
SELECT MIN(year) FROM table_name_64 WHERE sideline_reporter_s_ = "michelle tafoya and suzy kolber"
What was the earliest year featuring Sideline reporter(s) of michelle tafoya and suzy kolber?
CREATE TABLE table_name_64 ( year INTEGER, sideline_reporter_s_ VARCHAR )
SELECT MIN(game) FROM table_23248869_8 WHERE high_points = "David Lee (30)"
What was the game when high points was david lee (30)
CREATE TABLE table_23248869_8 (game INTEGER, high_points VARCHAR)
SELECT played FROM table_2208838_4 WHERE season = "1989"
How many games were played in the 1989 season?
CREATE TABLE table_2208838_4 (played VARCHAR, season VARCHAR)
SELECT runs_conceded FROM table_15700367_6 WHERE name = "Chaminda Vaas"
How many runs conceded for chaminda vaas?
CREATE TABLE table_15700367_6 ( runs_conceded VARCHAR, name VARCHAR )
SELECT COUNT(population__2010_census_) FROM table_232458_1 WHERE pop_density__per_km²_ = "7,447.32"
If the population density is 7,447.32, what is the population total number?
CREATE TABLE table_232458_1 (population__2010_census_ VARCHAR, pop_density__per_km²_ VARCHAR)
SELECT played FROM table_2208838_4 WHERE points = 927
How many games were played by the player with 927 points?
CREATE TABLE table_2208838_4 (played VARCHAR, points VARCHAR)
SELECT name, distance FROM aircraft
Show name and distance for all aircrafts.
CREATE TABLE flight ( flno number, origin text, destination text, distance number, departure_date time, arrival_date time, price number, aid number ) CREATE TABLE employee ( eid number, name text, salary number ) CREATE TABLE aircraft ( aid number, name text, distance number ) CREATE TABLE certificate ( eid number, aid number )
SELECT pop_density__per_km²_ FROM table_232458_1 WHERE no_of_barangays = 19
If the number of barangays is 19, what is the population density?
CREATE TABLE table_232458_1 (pop_density__per_km²_ VARCHAR, no_of_barangays VARCHAR)
SELECT team FROM table_2208838_4 WHERE average = "20.4"
Which team had an average of 20.4?
CREATE TABLE table_2208838_4 (team VARCHAR, average VARCHAR)
SELECT date FROM table_16729063_2 WHERE opponent = "Los Angeles Raiders"
What date was the opponent the Los Angeles Raiders?
CREATE TABLE table_16729063_2 ( date VARCHAR, opponent VARCHAR )
SELECT MIN(population__2010_census_) FROM table_232458_1 WHERE area__km²_ = "66.34"
If the area is 66.34, what is the minimum (2010 census) population?
CREATE TABLE table_232458_1 (population__2010_census_ INTEGER, area__km²_ VARCHAR)
SELECT date_of_appointment FROM table_22133191_3 WHERE position_in_table = "10th"
What was the date of appointment for the 10th person in position?
CREATE TABLE table_22133191_3 (date_of_appointment VARCHAR, position_in_table VARCHAR)
SELECT "Home team" FROM table_33339 WHERE "Home team score" = '9.11 (65)'
WHAT HOME TEAM SCORED 9.11 (65)?
CREATE TABLE table_33339 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT city___municipality FROM table_232458_1 WHERE pop_density__per_km²_ = "1,388.88"
What is the name of the city/municipality if the population is 1,388.88?
CREATE TABLE table_232458_1 (city___municipality VARCHAR, pop_density__per_km²_ VARCHAR)
SELECT date_of_vacancy FROM table_22133191_3 WHERE manner_of_departure = "End of caretaker contract"
What is the date of vacancy for the person that left because of end of caretaker contract?
CREATE TABLE table_22133191_3 (date_of_vacancy VARCHAR, manner_of_departure VARCHAR)
SELECT to_par FROM table_name_93 WHERE country = "united states" AND score < 72 AND place = "t3" AND player = "ed furgol"
How far to par did ed furgol from the United States get when he scored less than 72 and was placed at t3?
CREATE TABLE table_name_93 ( to_par VARCHAR, player VARCHAR, place VARCHAR, country VARCHAR, score VARCHAR )
SELECT COUNT(rank) FROM table_23248420_1 WHERE country = "England" AND county = "Merseyside" AND city_town = "Birkenhead"
When birkenhead is the city/town and merseyside is the county and england is the country how many ranks are there?
CREATE TABLE table_23248420_1 (rank VARCHAR, city_town VARCHAR, country VARCHAR, county VARCHAR)
SELECT COUNT(prefecture) FROM table_221398_1 WHERE area__km²_ = "361.719"
How many prefectures have an area of 361.719 kilometers squared?
CREATE TABLE table_221398_1 (prefecture VARCHAR, area__km²_ VARCHAR)
SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY AVG(SALARY)
For all employees who have the letters D or S in their first name, visualize a bar chart about the distribution of hire_date and the average of salary bin hire_date by time, sort by the Y from low to high.
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 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 departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_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 job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) )
SELECT city_town FROM table_23248420_1 WHERE rank = 2
When 2 is the rank what is the city/town?
CREATE TABLE table_23248420_1 (city_town VARCHAR, rank VARCHAR)
SELECT prefecture FROM table_221398_1 WHERE number_in_map = "39"
What prefecture is listed in the map as number 39?
CREATE TABLE table_221398_1 (prefecture VARCHAR, number_in_map VARCHAR)
SELECT "Label" FROM table_61083 WHERE "Date of release" = 'september 20, 2005'
What label is released on September 20, 2005?
CREATE TABLE table_61083 ( "Date of release" text, "Title" text, "Billboard peak" real, "RIAA cert." text, "Label" text )
SELECT county FROM table_23248420_1 WHERE region_province = "North West" AND rank = 20
When 20 is the rank and north west is the region/province what is the county?
CREATE TABLE table_23248420_1 (county VARCHAR, region_province VARCHAR, rank VARCHAR)
SELECT COUNT(pop_density___km²_) FROM table_221398_1 WHERE number_in_map = "16"
How many prefectures have a population density of 16 people/kilometers squared?
CREATE TABLE table_221398_1 (pop_density___km²_ VARCHAR, number_in_map VARCHAR)
SELECT "Format" FROM table_5783 WHERE "City of License" = 'st. george' AND "Frequency" = '0 107.3 fm'
Which format is in St. George with a frequency of 0 107.3 fm?
CREATE TABLE table_5783 ( "Call sign" text, "Frequency" text, "City of License" text, "Owner" text, "Format" text )
SELECT COUNT(population) FROM table_23248420_1 WHERE city_town = "Fleetwood"
When fleetwood is the city/town how many sets of population are there?
CREATE TABLE table_23248420_1 (population VARCHAR, city_town VARCHAR)
SELECT COUNT(wins) FROM table_2216245_2 WHERE winnings = "$95,180"
How many wins did he have when he had $95,180 in winnings?
CREATE TABLE table_2216245_2 (wins VARCHAR, winnings VARCHAR)
SELECT MAX(total) FROM table_name_37 WHERE nation = "poland"
What was the most total medals awarded to Poland?
CREATE TABLE table_name_37 ( total INTEGER, nation VARCHAR )
SELECT MAX(rank) FROM table_23248420_1 WHERE population = 142900
When 142900 is the population what is the highest rank?
CREATE TABLE table_23248420_1 (rank INTEGER, population VARCHAR)
SELECT COUNT(top_10) FROM table_2216245_2 WHERE winnings = "$80,490"
How many top 10s did he have the year he won $80,490?
CREATE TABLE table_2216245_2 (top_10 VARCHAR, winnings VARCHAR)
SELECT SUM(margin) FROM table_name_40 WHERE country = "canada"
What is canada's margin?
CREATE TABLE table_name_40 ( margin INTEGER, country VARCHAR )
SELECT county FROM table_23248420_1 WHERE population = 31901
When 31901 is the population what is the county?
CREATE TABLE table_23248420_1 (county VARCHAR, population VARCHAR)
SELECT MIN(wins) FROM table_2216245_2
What is his lowest number of wins?
CREATE TABLE table_2216245_2 (wins INTEGER)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "0" AND diagnoses.short_title = "Preterm NEC 1750-1999g"
how many patients with death staus 0 have been diagnosed with preterm nec1750-1999g?
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 ) 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 prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text )
SELECT score FROM table_23248910_5 WHERE record = "11-3"
What was the score against the team with an 11-3 record against the Hawks?
CREATE TABLE table_23248910_5 (score VARCHAR, record VARCHAR)
SELECT MAX(top_5) FROM table_2216245_2 WHERE team_s_ = "#28/#49 Jay Robinson Racing"
How many top 5s when he was on team #28/#49 jay robinson racing?
CREATE TABLE table_2216245_2 (top_5 INTEGER, team_s_ VARCHAR)
SELECT "Written by" FROM table_29533 WHERE "Prod. code" = '322'
Name who wrote the production code 322
CREATE TABLE table_29533 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "U.S. viewers (millions)" text, "Original U.S. air date" text, "Prod. code" real )
SELECT high_rebounds FROM table_23248910_5 WHERE record = "5-2"
Who had the most rebounds in the game against the team with a 5-2 record against the Hawks?
CREATE TABLE table_23248910_5 (high_rebounds VARCHAR, record VARCHAR)
SELECT original_air_date FROM table_2221484_2 WHERE series__number = 258
What date did episode 258 in the series originally air?
CREATE TABLE table_2221484_2 (original_air_date VARCHAR, series__number VARCHAR)
SELECT stadium FROM table_15190346_2 WHERE bowl_game = "1994 Gator Bowl"
What stadium was the 1994 Gator Bowl in?
CREATE TABLE table_15190346_2 ( stadium VARCHAR, bowl_game VARCHAR )
SELECT location_attendance FROM table_23248910_6 WHERE team = "Cavaliers"
What location and it's attendance was the game against the cavaliers?
CREATE TABLE table_23248910_6 (location_attendance VARCHAR, team VARCHAR)
SELECT directed_by FROM table_2221484_2 WHERE series__number = 266
Who directed episode 266 in the series?
CREATE TABLE table_2221484_2 (directed_by VARCHAR, series__number VARCHAR)
SELECT AVG(patient.admissionweight) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '018-119251') AND NOT patient.admissionweight IS NULL AND STRFTIME('%y-%m', patient.unitadmittime) <= '2105-11' GROUP BY STRFTIME('%y-%m', patient.unitadmittime)
what was the monthly average value of weight for patient 018-119251 until 11/2105?
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 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 medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime 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 )
SELECT high_points FROM table_23248910_6 WHERE team = "Raptors"
Who scored the highest points and how much against the raptors?
CREATE TABLE table_23248910_6 (high_points VARCHAR, team VARCHAR)
SELECT MIN(season) FROM table_2223177_3
Name the least season
CREATE TABLE table_2223177_3 (season INTEGER)
SELECT JOB_ID, AVG(DEPARTMENT_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY AVG(DEPARTMENT_ID)
For all employees who have the letters D or S in their first name, visualize a bar chart about the distribution of job_id and the average of department_id , and group by attribute job_id, order the average of department id in ascending order.
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 countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,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 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) )
SELECT location_attendance FROM table_23248910_6 WHERE team = "Nets"
What location and it's attendance was the game against the Nets?
CREATE TABLE table_23248910_6 (location_attendance VARCHAR, team VARCHAR)
SELECT btu_gal FROM table_2224692_1 WHERE kwh_gal = "24.04"
What's the BTU/Gal of the fuel whose kWh/Gal is 24.04?
CREATE TABLE table_2224692_1 (btu_gal VARCHAR, kwh_gal VARCHAR)
SELECT interface FROM table_name_58 WHERE product = "xerox travel scanner 100"
What is the interface of the product xerox travel scanner 100?
CREATE TABLE table_name_58 ( interface VARCHAR, product VARCHAR )
SELECT high_assists FROM table_23248910_10 WHERE date = "April 2"
List all players with highest assists from April 2.
CREATE TABLE table_23248910_10 (high_assists VARCHAR, date VARCHAR)
SELECT hp__hr_gal FROM table_2224692_1 WHERE gge = "0.9000"
What's the HP -hr/gal of the fuel whose GGE is 0.9000?
CREATE TABLE table_2224692_1 (hp__hr_gal VARCHAR, gge VARCHAR)
SELECT opposing_teams FROM table_name_81 WHERE date = "11/10/1991"
What is Opposing Teams, when Date is '11/10/1991'?
CREATE TABLE table_name_81 ( opposing_teams VARCHAR, date VARCHAR )
SELECT high_points FROM table_23248910_10 WHERE date = "April 7"
List high points from the April 7 game.
CREATE TABLE table_23248910_10 (high_points VARCHAR, date VARCHAR)
SELECT percentage_yield FROM table_222448_1 WHERE dpmo = "3.4"
What is the percentage yield for a DPMO of 3.4?
CREATE TABLE table_222448_1 (percentage_yield VARCHAR, dpmo VARCHAR)
SELECT COUNT("team") FROM table_203_654 WHERE "points" > 10
in 1926 brazilian football , how many teams scored above 10 points in the season ?
CREATE TABLE table_203_654 ( id number, "position" number, "team" text, "points" number, "played" number, "won" number, "drawn" number, "lost" number, "for" number, "against" number, "difference" number )
SELECT team FROM table_23248910_9 WHERE date = "March 5"
What is every team on March 5?
CREATE TABLE table_23248910_9 (team VARCHAR, date VARCHAR)
SELECT COUNT(percentage_yield) FROM table_222448_1 WHERE percent_defective = "6.7%"
How many percentage yield figures are there when 6.7% are defective?
CREATE TABLE table_222448_1 (percentage_yield VARCHAR, percent_defective VARCHAR)
SELECT DISTINCT state FROM college WHERE enr < (SELECT MAX(enr) FROM college)
Find the states where have the colleges whose enrollments are less than the largest size.
CREATE TABLE player ( pid number, pname text, ycard text, hs number ) CREATE TABLE college ( cname text, state text, enr number ) CREATE TABLE tryout ( pid number, cname text, ppos text, decision text )
SELECT high_points FROM table_23248910_9 WHERE team = "Pistons"
Who is every high points for the Pistons team?
CREATE TABLE table_23248910_9 (high_points VARCHAR, team VARCHAR)
SELECT long_term_c_pk FROM table_222448_1 WHERE short_term_c_pk = "2.00"
What is long-term C PK when the short-term C PK is 2.00?
CREATE TABLE table_222448_1 (long_term_c_pk VARCHAR, short_term_c_pk VARCHAR)
SELECT "TOTAL Time in Office:" FROM table_64675 WHERE "Rank:" < '18' AND "Premier:" = 'joh bjelke-petersen'
What is the TOTAL Time in Office with a rank smaller than 18, and premier is Joh Bjelke-Petersen?
CREATE TABLE table_64675 ( "Rank:" real, "Premier:" text, "Assumed Office:" text, "Left Office:" text, "TOTAL Time in Office:" text )
SELECT score FROM table_23248910_9 WHERE record = "46-25"
What is every score with a record of 46-25?
CREATE TABLE table_23248910_9 (score VARCHAR, record VARCHAR)
SELECT sigma__with_15σ_shift_ FROM table_222448_1 WHERE percent_defective = "69%"
What is the sigma (with 1.5σ shift) when there are 69% defective?
CREATE TABLE table_222448_1 (sigma__with_15σ_shift_ VARCHAR, percent_defective VARCHAR)
SELECT bosnian FROM table_24807774_1 WHERE cook_islands = "Sri Lankan"
how many bosnian in cook islands is sri lankan
CREATE TABLE table_24807774_1 ( bosnian VARCHAR, cook_islands VARCHAR )
SELECT COUNT(high_rebounds) FROM table_23248940_10 WHERE record = "34-32"
How many people had high rebounds during the game with a record of 34-32?
CREATE TABLE table_23248940_10 (high_rebounds VARCHAR, record VARCHAR)
SELECT percent_defective FROM table_222448_1 WHERE sigma__with_15σ_shift_ = "2.5"
When sigma (with 1.5σ shift) is 2.5, what percent is defective?
CREATE TABLE table_222448_1 (percent_defective VARCHAR, sigma__with_15σ_shift_ VARCHAR)
SELECT t1.startdate FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'neo*iv*chlorothiazide' AND admissions.subject_id = 85131 AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-19 month')) AS t1 JOIN (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'd5w' AND admissions.subject_id = 85131 AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-19 month')) AS t2 ON t1.subject_id = t2.subject_id WHERE DATETIME(t1.startdate) = DATETIME(t2.startdate) ORDER BY t1.startdate DESC LIMIT 1
when was patient 85131 prescribed the drug neo*iv*chlorothiazide and d5w at the same time for the last time until 19 months ago?
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) 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 procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) 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 cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) 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 labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) 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 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 )
SELECT COUNT(high_assists) FROM table_23248940_10 WHERE game = 71
How many people led in assists on game 71?
CREATE TABLE table_23248940_10 (high_assists VARCHAR, game VARCHAR)
SELECT COUNT(us_viewers__millions_) FROM table_22265225_1 WHERE no_in_series = "36"
How many times was u.s. Viewers listed for episode 36 in the series?
CREATE TABLE table_22265225_1 (us_viewers__millions_ VARCHAR, no_in_series VARCHAR)
SELECT Product_Name, AVG(Product_Price) FROM Products GROUP BY Product_Name ORDER BY Product_Name
A bar chart about what are the different product names? What is the average product price for each of them?, sort X from low to high order.
CREATE TABLE Customer_Orders ( Order_ID INTEGER, Customer_ID INTEGER, Store_ID INTEGER, Order_Date DATETIME, Planned_Delivery_Date DATETIME, Actual_Delivery_Date DATETIME, Other_Order_Details VARCHAR(255) ) CREATE TABLE Performers_in_Bookings ( Order_ID INTEGER, Performer_ID INTEGER ) CREATE TABLE Ref_Payment_Methods ( payment_method_code CHAR(10), payment_method_description VARCHAR(80) ) CREATE TABLE Invoices ( Invoice_ID INTEGER, Order_ID INTEGER, payment_method_code CHAR(15), Product_ID INTEGER, Order_Quantity VARCHAR(288), Other_Item_Details VARCHAR(255), Order_Item_ID INTEGER ) CREATE TABLE Order_Items ( Order_Item_ID INTEGER, Order_ID INTEGER, Product_ID INTEGER, Order_Quantity VARCHAR(288), Other_Item_Details VARCHAR(255) ) CREATE TABLE Drama_Workshop_Groups ( Workshop_Group_ID INTEGER, Address_ID INTEGER, Currency_Code CHAR(15), Marketing_Region_Code CHAR(15), Store_Name VARCHAR(255), Store_Phone VARCHAR(255), Store_Email_Address VARCHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Bookings ( Booking_ID INTEGER, Customer_ID INTEGER, Workshop_Group_ID VARCHAR(100), Status_Code CHAR(15), Store_ID INTEGER, Order_Date DATETIME, Planned_Delivery_Date DATETIME, Actual_Delivery_Date DATETIME, Other_Order_Details VARCHAR(255) ) CREATE TABLE Services ( Service_ID INTEGER, Service_Type_Code CHAR(15), Workshop_Group_ID INTEGER, Product_Description VARCHAR(255), Product_Name VARCHAR(255), Product_Price DECIMAL(20,4), Other_Product_Service_Details VARCHAR(255) ) CREATE TABLE Bookings_Services ( Order_ID INTEGER, Product_ID INTEGER ) CREATE TABLE Addresses ( Address_ID VARCHAR(100), Line_1 VARCHAR(255), Line_2 VARCHAR(255), City_Town VARCHAR(255), State_County VARCHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Marketing_Regions ( Marketing_Region_Code CHAR(15), Marketing_Region_Name VARCHAR(255), Marketing_Region_Descriptrion VARCHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Invoice_Items ( Invoice_Item_ID INTEGER, Invoice_ID INTEGER, Order_ID INTEGER, Order_Item_ID INTEGER, Product_ID INTEGER, Order_Quantity INTEGER, Other_Item_Details VARCHAR(255) ) CREATE TABLE Ref_Service_Types ( Service_Type_Code CHAR(15), Parent_Service_Type_Code CHAR(15), Service_Type_Description VARCHAR(255) ) CREATE TABLE Products ( Product_ID VARCHAR(100), Product_Name VARCHAR(255), Product_Price DECIMAL(20,4), Product_Description VARCHAR(255), Other_Product_Service_Details VARCHAR(255) ) CREATE TABLE Clients ( Client_ID INTEGER, Address_ID INTEGER, Customer_Email_Address VARCHAR(255), Customer_Name VARCHAR(255), Customer_Phone VARCHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Stores ( Store_ID VARCHAR(100), Address_ID INTEGER, Marketing_Region_Code CHAR(15), Store_Name VARCHAR(255), Store_Phone VARCHAR(255), Store_Email_Address VARCHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Customers ( Customer_ID VARCHAR(100), Address_ID INTEGER, Customer_Name VARCHAR(255), Customer_Phone VARCHAR(255), Customer_Email_Address VARCHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Performers ( Performer_ID INTEGER, Address_ID INTEGER, Customer_Name VARCHAR(255), Customer_Phone VARCHAR(255), Customer_Email_Address VARCHAR(255), Other_Details VARCHAR(255) )
SELECT location_attendance FROM table_23248940_10 WHERE team = "Washington"
What was the location and it's attendance when the Bobcats played against Washington?
CREATE TABLE table_23248940_10 (location_attendance VARCHAR, team VARCHAR)
SELECT us_viewers__millions_ FROM table_22265225_1 WHERE no_in_season = "12"
How many million U.s. Viewers watched episode 12 in the season?
CREATE TABLE table_22265225_1 (us_viewers__millions_ VARCHAR, no_in_season VARCHAR)
SELECT LAST_NAME, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY MANAGER_ID DESC
For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about manager_id over the last_name by a bar chart, could you show in desc by the Y-axis?
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 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 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) ) 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 countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) )
SELECT record FROM table_23248940_7 WHERE team = "Milwaukee"
Name the record for milwaukee
CREATE TABLE table_23248940_7 (record VARCHAR, team VARCHAR)
SELECT original_air_date FROM table_22265225_1 WHERE production_code = "218"
What day did the episode with a production code of 218 originally air?
CREATE TABLE table_22265225_1 (original_air_date VARCHAR, production_code VARCHAR)
SELECT SUM(area_km_2) FROM table_name_75 WHERE official_name = "glenelg"
Can you tell me the sum of Area km 2 that has the Official Name of glenelg?
CREATE TABLE table_name_75 ( area_km_2 INTEGER, official_name VARCHAR )
SELECT location_attendance FROM table_23248940_7 WHERE record = "10-14"
Name the location attendance for 10-14
CREATE TABLE table_23248940_7 (location_attendance VARCHAR, record VARCHAR)
SELECT COUNT(no_in_season) FROM table_22265225_1 WHERE no_in_series = "29"
How many episodes were listed as number 29 in the series?
CREATE TABLE table_22265225_1 (no_in_season VARCHAR, no_in_series VARCHAR)
SELECT COUNT(basketball_arena) FROM table_1974545_3 WHERE capacity = "3,000"
How many basketball arenas are there that belong to a school with a capacity of 3,000?
CREATE TABLE table_1974545_3 ( basketball_arena VARCHAR, capacity VARCHAR )
SELECT record FROM table_23248940_7 WHERE date = "December 8"
Name the record for december 8
CREATE TABLE table_23248940_7 (record VARCHAR, date VARCHAR)
SELECT COUNT(sp) FROM table_22265261_1 WHERE position = "2nd"
What was the Sp of the 2nd Position?
CREATE TABLE table_22265261_1 (sp VARCHAR, position VARCHAR)