answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT score FROM table_23274514_9 WHERE record = "22-53"
What was the score when the record was 22-53?
CREATE TABLE table_23274514_9 (score VARCHAR, record VARCHAR)
SELECT term_ended FROM table_224672_2 WHERE term_began = "January 3, 2007"
When did the term end that began January 3, 2007?
CREATE TABLE table_224672_2 (term_ended VARCHAR, term_began VARCHAR)
SELECT COUNT("Match") FROM table_6282 WHERE "City/Country" = 'karachi, pakistan' AND "Year" > '1996'
How many matches have a City/Country of karachi, pakistan, and a Year larger than 1996?
CREATE TABLE table_6282 ( "Runs" real, "Match" real, "City/Country" text, "Venue" text, "Year" real )
SELECT record FROM table_23274514_9 WHERE team = "Golden State"
What was the record when they played golden state?
CREATE TABLE table_23274514_9 (record VARCHAR, team VARCHAR)
SELECT term_began FROM table_224672_2 WHERE elected = "N/A"
When did the term began when the date of election is N/A?
CREATE TABLE table_224672_2 (term_began VARCHAR, elected VARCHAR)
SELECT T1.country FROM sampledata15 AS T1 JOIN resultsdata15 AS T2 ON T1.sample_pk = T2.sample_pk GROUP BY T1.country ORDER BY T2.concen
Rank the country of product origins in terms of pesticide residues detection.
CREATE TABLE sampledata15 ( sample_pk number, state text, year text, month text, day text, site text, commod text, source_id text, variety text, origin text, country text, disttype text, commtype text, claim text, quantity number, growst text, packst text, distst text ) CREATE TABLE resultsdata15 ( sample_pk number, commod text, commtype text, lab text, pestcode text, testclass text, concen number, lod number, conunit text, confmethod text, confmethod2 text, annotate text, quantitate text, mean text, extract text, determin text )
SELECT COUNT(percentage__2006_) FROM table_2328113_1 WHERE mother_tongue = "French"
How many percentages (2006) are there for the population whose mother tongue is French?
CREATE TABLE table_2328113_1 (percentage__2006_ VARCHAR, mother_tongue VARCHAR)
SELECT term_ended FROM table_224672_2 WHERE term_began = "December 4, 1978"
When did the term end that began December 4, 1978?
CREATE TABLE table_224672_2 (term_ended VARCHAR, term_began VARCHAR)
SELECT opponents FROM table_name_50 WHERE date = "may 6, 2006"
Who competed on may 6, 2006?
CREATE TABLE table_name_50 ( opponents VARCHAR, date VARCHAR )
SELECT MIN(population__2011_) FROM table_2328113_1
What was the minimum population in 2011?
CREATE TABLE table_2328113_1 (population__2011_ INTEGER)
SELECT term_began FROM table_224672_2 WHERE term_ended = "January 3, 1995"
When did the term begin that ended January 3, 1995?
CREATE TABLE table_224672_2 (term_began VARCHAR, term_ended VARCHAR)
SELECT SUM("Points 2") FROM table_44151 WHERE "Goals For" > '52' AND "Team" = 'altrincham'
What is the sum of Altrincham's Points 2 when they had more than 52 Goals For?
CREATE TABLE table_44151 ( "Position" real, "Team" text, "Played" real, "Drawn" real, "Lost" real, "Goals For" real, "Goals Against" real, "Goal Average 1" real, "Points 2" real )
SELECT percentage__2006_ FROM table_2328113_1 WHERE mother_tongue = "Polish"
What was the percentage in 2006 whose natives is Polish?
CREATE TABLE table_2328113_1 (percentage__2006_ VARCHAR, mother_tongue VARCHAR)
SELECT type FROM table_224672_2 WHERE term_ended = "January 3, 2001"
What branch of government was the term that ended on January 3, 2001?
CREATE TABLE table_224672_2 (type VARCHAR, term_ended VARCHAR)
SELECT "canal" FROM table_203_594 ORDER BY "year opened" LIMIT 1
which was the first canal opened in scotland ?
CREATE TABLE table_203_594 ( id number, "canal" text, "length (miles)" number, "locks" number, "max length (ft)" number, "width (ft)" number, "year opened" number, "year abandoned" number, "year restored" number )
SELECT location_attendance FROM table_23284271_11 WHERE high_points = "Dirk Nowitzki , Caron Butler (17)"
Name the location attendance for dirk nowitzki , caron butler (17)
CREATE TABLE table_23284271_11 (location_attendance VARCHAR, high_points VARCHAR)
SELECT position FROM table_22496344_1 WHERE home_town = "Houston, TX" AND high_school = "Worthing"
Where is the position when houston, tx is the hometown and worthing is the high school?
CREATE TABLE table_22496344_1 (position VARCHAR, home_town VARCHAR, high_school VARCHAR)
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'HOUSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'CINCINNATI' AND flight.to_airport = AIRPORT_SERVICE_0.airport_code AND flight.from_airport = AIRPORT_SERVICE_1.airport_code) AND flight.airline_code = 'AA'
AA flights to HOUSTON from CINCINNATI
CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, night text, season text, basis_days text ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, length int, weight int, capacity int, pay_load int, cruising_speed int, range_miles int, pressurized varchar ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airline text, departure_flight_number int, stop_time int ) CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zone_code varchar, minimum_connect_time int ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time int, dual_carrier text, flight_days text, flight_id int, flight_number int, from_airport varchar, meal_code text, stops int, time_elapsed int, to_airport varchar ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_required varchar )
SELECT location_attendance FROM table_23284271_11 WHERE game = 4
Name the location attendance for 4 game
CREATE TABLE table_23284271_11 (location_attendance VARCHAR, game VARCHAR)
SELECT high_school FROM table_22496344_1 WHERE year = "Senior (RS)"
Which highschool has senior (rs) for the year?
CREATE TABLE table_22496344_1 (high_school VARCHAR, year VARCHAR)
SELECT SUM(a.Reputation) FROM (SELECT TOP(2415565) AS Reputation FROM Users ORDER BY Reputation) AS a
no of users every year.
CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number )
SELECT date FROM table_23284271_11 WHERE score = "L 89–92 (OT)"
Name the date for l 89–92 (ot)
CREATE TABLE table_23284271_11 (date VARCHAR, score VARCHAR)
SELECT MIN(_number) FROM table_22496344_1 WHERE home_town = "Conroe, TX"
What is the # when conroe, tx is the hometown?
CREATE TABLE table_22496344_1 (_number INTEGER, home_town VARCHAR)
SELECT plural FROM table_name_33 WHERE singular = "tor (your)"
What is Plural, when Singular is tor (your)?
CREATE TABLE table_name_33 ( plural VARCHAR, singular VARCHAR )
SELECT high_assists FROM table_23284271_11 WHERE series = "1-2"
Name the high assists for 1-2 series
CREATE TABLE table_23284271_11 (high_assists VARCHAR, series VARCHAR)
SELECT MAX(weight) FROM table_22496344_1 WHERE _number = 20
What is the weight when 20 is the number?
CREATE TABLE table_22496344_1 (weight INTEGER, _number VARCHAR)
SELECT october_2012 FROM table_21531764_1 WHERE october_2010 = "9.1"
For the area which was 9.1 in October 2010, what is the figure for October 2012?
CREATE TABLE table_21531764_1 ( october_2012 VARCHAR, october_2010 VARCHAR )
SELECT high_rebounds FROM table_23284271_11 WHERE location_attendance = "American Airlines Center 20,557"
Name the high rebounds for american airlines center 20,557
CREATE TABLE table_23284271_11 (high_rebounds VARCHAR, location_attendance VARCHAR)
SELECT name FROM table_22496344_1 WHERE year = "Senior" AND _number < 10.0
What is the name when senior is the year with the # less than 10.0?
CREATE TABLE table_22496344_1 (name VARCHAR, year VARCHAR, _number VARCHAR)
SELECT "Home team score" FROM table_54551 WHERE "Away team score" = '15.9 (99)'
Which home team score has an Away team score of 15.9 (99)?
CREATE TABLE table_54551 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT COUNT(score) FROM table_23284271_6 WHERE date = "December 27"
Name the score for december 27
CREATE TABLE table_23284271_6 (score VARCHAR, date VARCHAR)
SELECT COUNT(_number) FROM table_22496344_1 WHERE high_school = "Worthing"
What is the # for worthing high school?
CREATE TABLE table_22496344_1 (_number VARCHAR, high_school VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND lab.itemid = "50863"
give me the number of patients whose admission location is clinic referral/premature and item id is 50863?
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title 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 ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text )
SELECT COUNT(high_points) FROM table_23284271_6 WHERE location_attendance = "Pepsi Center 19,756"
Name the total number of high points for pepsi center 19,756
CREATE TABLE table_23284271_6 (high_points VARCHAR, location_attendance VARCHAR)
SELECT COUNT(reason_for_change) FROM table_225094_4 WHERE successor = "Jonathan Jennings"
Name the reason for change for jonathan jennings
CREATE TABLE table_225094_4 (reason_for_change VARCHAR, successor VARCHAR)
SELECT T2.Headquarter, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Headquarter ORDER BY T1.Code
For those records from the products and each product's manufacturer, give me the comparison about the average of code over the headquarter , and group by attribute headquarter by a bar chart, I want to order by the y axis from low to high please.
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
SELECT opponent_in_the_final FROM table_23284597_3 WHERE score_in_the_final = "3–6, 1–6"
Name the opponent in the final for 3–6, 1–6
CREATE TABLE table_23284597_3 (opponent_in_the_final VARCHAR, score_in_the_final VARCHAR)
SELECT date_successor_seated FROM table_225094_4 WHERE reason_for_change = "failure to elect"
Name the date successor seated for failure to elect
CREATE TABLE table_225094_4 (date_successor_seated VARCHAR, reason_for_change VARCHAR)
SELECT week_2 FROM table_name_74 WHERE week_3 = "cidney carson"
Which week 2 had a week 3 of Cidney Carson?
CREATE TABLE table_name_74 ( week_2 VARCHAR, week_3 VARCHAR )
SELECT year FROM table_23284597_3 WHERE opponent_in_the_final = "Guillermo Cañas"
Name the year for guillermo cañas
CREATE TABLE table_23284597_3 (year VARCHAR, opponent_in_the_final VARCHAR)
SELECT successor FROM table_225198_3 WHERE reason_for_change = "James Noble died in previous Congress"
Name the successor for james noble died in previous congress
CREATE TABLE table_225198_3 (successor VARCHAR, reason_for_change VARCHAR)
SELECT SUM("Attendance") FROM table_53421 WHERE "Date" = 'february 3, 2008'
How many people attended the game on February 3, 2008?
CREATE TABLE table_53421 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Attendance" real, "Record" text )
SELECT score FROM table_23285761_10 WHERE team = "Houston"
What was the score for the game against Houston?
CREATE TABLE table_23285761_10 (score VARCHAR, team VARCHAR)
SELECT state__class_ FROM table_225198_3 WHERE vacator = "Isaac D. Barnard (J)"
Name the state class for isaac d. barnard (j)
CREATE TABLE table_225198_3 (state__class_ VARCHAR, vacator VARCHAR)
SELECT AVG("Week") FROM table_76998 WHERE "Opponent" = 'denver broncos'
What is the average number of weeks that the opponent was the Denver Broncos?
CREATE TABLE table_76998 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Kickoff Time" text, "Attendance" text )
SELECT COUNT(record) FROM table_23285805_5 WHERE game = 30
Name the number of records for 30 game
CREATE TABLE table_23285805_5 (record VARCHAR, game VARCHAR)
SELECT successor FROM table_225205_4 WHERE reason_for_change = "Died November 11, 1845"
Who is the successor when the reason for change is died November 11, 1845?
CREATE TABLE table_225205_4 (successor VARCHAR, reason_for_change VARCHAR)
SELECT "Place of birth" FROM table_14246 WHERE "Elevator" = 'alexander iii' AND "Elector" = 'ruggiero di san severino'
What's the Place of birth listed that has an Elevator of ALexander III, and an Elector of Ruggiero Di San Severino?
CREATE TABLE table_14246 ( "Elector" text, "Place of birth" text, "Cardinalatial title" text, "Elevated" text, "Elevator" text )
SELECT team FROM table_23285805_5 WHERE date = "December 19"
Name the team for december 19
CREATE TABLE table_23285805_5 (team VARCHAR, date VARCHAR)
SELECT COUNT(date_successor_seated) FROM table_225205_4 WHERE district = "New Jersey 2nd"
How many date of successor seated is new jersey 2nd in the district?
CREATE TABLE table_225205_4 (date_successor_seated VARCHAR, district VARCHAR)
SELECT "High assists" FROM table_29904 WHERE "Game" = '35'
Who had the most assists and how many did they have in game 35?
CREATE TABLE table_29904 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT location_attendance FROM table_23285849_5 WHERE record = "9-4"
What location and how many people were in attendance where the record was 9-4 for the season?
CREATE TABLE table_23285849_5 (location_attendance VARCHAR, record VARCHAR)
SELECT best_male_artist FROM table_22546460_4 WHERE best_male_mc = "Bankie Travolta"
Who was the Best Male Artist where Bankie Travolta won the Best Male MC?
CREATE TABLE table_22546460_4 (best_male_artist VARCHAR, best_male_mc VARCHAR)
SELECT "Place" FROM table_66264 WHERE "Performance" = '14:11.15'
What place had 14:11.15 as the performance?
CREATE TABLE table_66264 ( "Event" text, "Performance" text, "Athlete" text, "Nation" text, "Place" text, "Date" text )
SELECT high_points FROM table_23285849_5 WHERE record = "3-0"
How scored the most points where the record is 3-0 for the season?
CREATE TABLE table_23285849_5 (high_points VARCHAR, record VARCHAR)
SELECT best_male_mc FROM table_22546460_4 WHERE best_male_lyricist = "Best Album"
Who was the Best Male MC if Best Album won the Best Male Lyricist?
CREATE TABLE table_22546460_4 (best_male_mc VARCHAR, best_male_lyricist VARCHAR)
SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '028-53285')) AND intakeoutput.cellpath LIKE '%output%' AND DATETIME(intakeoutput.intakeoutputtime) <= DATETIME(CURRENT_TIME(), '-1700 day') ORDER BY intakeoutput.intakeoutputtime LIMIT 1
what's the output of patient 028-53285 for the first time until 1700 days ago?
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime 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 vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) 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 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 )
SELECT score FROM table_23285849_10 WHERE high_assists = "Chauncey Billups (7)"
When chauncey billups (7) has the highest amount of assists what is the score?
CREATE TABLE table_23285849_10 (score VARCHAR, high_assists VARCHAR)
SELECT best_male_lyricist FROM table_22546460_4 WHERE best_male_record = "Neshia Nee"
Who was the Best Male Lyricist if Neshia Nee won the Best Male Record?
CREATE TABLE table_22546460_4 (best_male_lyricist VARCHAR, best_male_record VARCHAR)
SELECT "Name" FROM table_66247 WHERE "Heat" = '4' AND "Rank" < '23' AND "Result" = '55.91'
What is the Name of the Player with a Rank of 23 or less, Heat of 4 and Result of 55.91?
CREATE TABLE table_66247 ( "Rank" real, "Heat" real, "Name" text, "Nationality" text, "Result" text )
SELECT score FROM table_23285849_10 WHERE high_points = "J.R. Smith (26)"
When j.r. smith (26) has the highest amount of points what is the score?
CREATE TABLE table_23285849_10 (score VARCHAR, high_points VARCHAR)
SELECT best_female_artist FROM table_22546460_4 WHERE best_male_lyricist = "Best R&B Contributor"
Who won the Best Female Artist where Best R&B Contributor won the Best Male Lyricist?
CREATE TABLE table_22546460_4 (best_female_artist VARCHAR, best_male_lyricist VARCHAR)
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t1.icd9_code FROM (SELECT diagnoses_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnoses_icd WHERE DATETIME(diagnoses_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY diagnoses_icd.icd9_code) AS t1 WHERE t1.c1 <= 4)
give me the top four most common diagnostics during the last year?
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto 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 labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE 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 diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) 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 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 )
SELECT COUNT(game) FROM table_23285849_10 WHERE team = "Clippers"
When the clippers are the team how many games are there?
CREATE TABLE table_23285849_10 (game VARCHAR, team VARCHAR)
SELECT best_female_artist FROM table_22546460_4 WHERE best_male_artist = "Best Lyrical Record"
What won the Best Female Artist if Best Lyrical Record won the Best Male Artist?
CREATE TABLE table_22546460_4 (best_female_artist VARCHAR, best_male_artist VARCHAR)
SELECT player FROM table_name_76 WHERE score = 66
WHAT IS THE PLAYER WITH A SCORE OF 66?
CREATE TABLE table_name_76 ( player VARCHAR, score VARCHAR )
SELECT score FROM table_23285849_10 WHERE high_rebounds = "Aaron Afflalo (9)"
When aaron afflalo (9) has the highest amount of rebounds what is the score?
CREATE TABLE table_23285849_10 (score VARCHAR, high_rebounds VARCHAR)
SELECT best_female_artist FROM table_22546460_4 WHERE best_female_lyricist = "People's Male MC"
What won the Best Female Artist if People's Male MC won the Best Female Lyricist?
CREATE TABLE table_22546460_4 (best_female_artist VARCHAR, best_female_lyricist VARCHAR)
SELECT "Period active" FROM table_15678 WHERE "Genre" = 'pop'
What was the active period for the pop genre?
CREATE TABLE table_15678 ( "Artist" text, "Country of origin" text, "Period active" text, "Release-year of first charted record" real, "Genre" text, "Claimed sales" text )
SELECT high_points FROM table_23285849_10 WHERE high_assists = "Chauncey Billups (4)"
When chauncey billups (4) has the highest amount of assists who has the highest amount of points?
CREATE TABLE table_23285849_10 (high_points VARCHAR, high_assists VARCHAR)
SELECT MIN(states_contested) FROM table_22582663_1 WHERE party_name = "Apna Dal"
What is the lowest number of states contested under apna dal?
CREATE TABLE table_22582663_1 (states_contested INTEGER, party_name VARCHAR)
SELECT JOB_ID, SUM(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY JOB_ID DESC
For all employees who have the letters D or S in their first name, give me the comparison about the sum of salary over the job_id , and group by attribute job_id, and could you sort X-axis in descending order?
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) ) 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 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 jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) )
SELECT location_attendance FROM table_23285849_11 WHERE high_points = "Carmelo Anthony (39)"
When carmelo anthony (39) has the highest amount of points where is the location and what is the attendance?
CREATE TABLE table_23285849_11 (location_attendance VARCHAR, high_points VARCHAR)
SELECT MIN(forfeited_in_seats) FROM table_22582663_1 WHERE seats_won = 19
Where 19 seats were won, what was the minimum number of forfeited seats?
CREATE TABLE table_22582663_1 (forfeited_in_seats INTEGER, seats_won VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admityear < "2170" AND prescriptions.drug = "Clopidogrel Bisulfate"
Bring the list of patients admitted before 2170 who had a clopidogrel bisulfate drug prescription.
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE 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_rebounds) FROM table_23285849_11 WHERE high_points = "Carmelo Anthony (42)"
When carmelo anthony (42) has the highest amount of points how many measurements of highest rebounds are there?
CREATE TABLE table_23285849_11 (high_rebounds VARCHAR, high_points VARCHAR)
SELECT seats_contested FROM table_22582663_1 WHERE party_name = "Akhil Bharatiya Rashtriya Azad Hind Party"
How many akhil bharatiya rashtriya azad hind party seats were contested?
CREATE TABLE table_22582663_1 (seats_contested VARCHAR, party_name VARCHAR)
SELECT DISTINCT semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'BE' AND course.number = 900 AND semester.semester_id = course_offering.semester ORDER BY semester.year LIMIT 1
What is the length of time that the BE 900 has been offered for ?
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 gsi ( course_offering_id int, student_id int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction 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 program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) 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 offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) 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 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 requirement ( requirement_id int, requirement varchar, college varchar )
SELECT record FROM table_23285849_8 WHERE score = "L 106–116 (OT)"
Name the record for l 106–116 (ot)
CREATE TABLE table_23285849_8 (record VARCHAR, score VARCHAR)
SELECT MIN(year) FROM table_22597626_1
When was John McEnroe's minimum year?
CREATE TABLE table_22597626_1 (year INTEGER)
SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '033-22108') AND patient.unitdischargetime IS NULL) AND NOT vitalperiodic.heartrate IS NULL ORDER BY vitalperiodic.heartrate DESC, vitalperiodic.observationtime LIMIT 1
what was the first time that patient 033-22108 had the maximum value of the heartrate on the current intensive care unit visit?
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 microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime 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 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 )
SELECT high_points FROM table_23285849_8 WHERE location_attendance = "Staples Center 18,997"
Name the high points for the staples center 18,997
CREATE TABLE table_23285849_8 (high_points VARCHAR, location_attendance VARCHAR)
SELECT score_in_the_final FROM table_22597626_1 WHERE championship = "US Open"
What were the US Open's final scores?
CREATE TABLE table_22597626_1 (score_in_the_final VARCHAR, championship VARCHAR)
SELECT UserId AS "user_link", SUM(CASE WHEN Class = 1 THEN 1 ELSE 0 END) AS gold, SUM(CASE WHEN Class = 2 THEN 1 ELSE 0 END) AS silver, SUM(CASE WHEN Class = 3 THEN 1 ELSE 0 END) AS bronze, COUNT(Id) AS total FROM Badges WHERE (Name = '##name1?Famous Question##') OR (Name = '##name2?Notable Question##') OR (Name = '##name3?Popular Question##') GROUP BY UserId ORDER BY gold DESC, silver DESC, bronze DESC, total DESC LIMIT 200
User with most famous/notable/popular badges.
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE PostTypes ( Id number, Name text )
SELECT date FROM table_23285849_7 WHERE record = "27-14"
What was the date of the game when the record was 27-14?
CREATE TABLE table_23285849_7 (date VARCHAR, record VARCHAR)
SELECT partner FROM table_2259502_2 WHERE score = "7-5, 2-6, [6-10]"
Who were the partners in games where the score was 7-5, 2-6, [6-10]?
CREATE TABLE table_2259502_2 (partner VARCHAR, score VARCHAR)
SELECT MIN(t1.c1) FROM (SELECT COUNT(DISTINCT diagnoses_icd.hadm_id) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'inf mcrg rstn pncllins') AND STRFTIME('%y', diagnoses_icd.charttime) >= '2103' GROUP BY STRFTIME('%y', diagnoses_icd.charttime)) AS t1
what is the minimum number of patients diagnosed with inf mcrg rstn pncllins yearly since 2103?
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) 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 d_labitems ( row_id number, itemid number, label 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 d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) 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 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 inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number )
SELECT high_points FROM table_23285849_7 WHERE score = "W 97–92 (OT)"
Who had the most points in the game where the score was w 97–92 (ot)?
CREATE TABLE table_23285849_7 (high_points VARCHAR, score VARCHAR)
SELECT opponents FROM table_2259502_2 WHERE championship = "Tokyo"
Who were the opponents in the Tokyo championships?
CREATE TABLE table_2259502_2 (opponents VARCHAR, championship VARCHAR)
SELECT Country, COUNT(*) FROM airport GROUP BY Country
Show me the total number by country in a histogram
CREATE TABLE flight ( id int, Vehicle_Flight_number text, Date text, Pilot text, Velocity real, Altitude real, airport_id int, company_id int ) CREATE TABLE operate_company ( id int, name text, Type text, Principal_activities text, Incorporated_in text, Group_Equity_Shareholding real ) CREATE TABLE airport ( id int, City text, Country text, IATA text, ICAO text, name text )
SELECT record FROM table_23285849_7 WHERE team = "Timberwolves"
What was the record when the timberwolves were played?
CREATE TABLE table_23285849_7 (record VARCHAR, team VARCHAR)
SELECT partner FROM table_2259502_2 WHERE score = "1-6, 2-6"
Who were the partners in games where the score was 1-6, 2-6?
CREATE TABLE table_2259502_2 (partner VARCHAR, score VARCHAR)
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT procedures_icd.hadm_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'spinal struct repair nec') AND STRFTIME('%y', procedures_icd.charttime) <= '2100')
how many patients until 2100 had received a spinal struct repair nec procedure?
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 cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) 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 d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE 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 d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text )
SELECT COUNT(high_points) FROM table_23285849_6 WHERE team = "Heat"
How many players has the highest points in the game against the Heat?
CREATE TABLE table_23285849_6 (high_points VARCHAR, team VARCHAR)
SELECT partner FROM table_2259502_2 WHERE year = 2012
Who were the partners in 2012?
CREATE TABLE table_2259502_2 (partner VARCHAR, year VARCHAR)
SELECT COUNT(losses) FROM table_name_37 WHERE goal_difference = -8 AND position < 10
What is the number of losses when the goal difference was -8, and position is smaller than 10?
CREATE TABLE table_name_37 ( losses VARCHAR, goal_difference VARCHAR, position VARCHAR )
SELECT high_rebounds FROM table_23285849_6 WHERE game = 29
Who tied for highest rebounds in game 29?
CREATE TABLE table_23285849_6 (high_rebounds VARCHAR, game VARCHAR)
SELECT outcome FROM table_2259502_2 WHERE score = "7-5, 2-6, [6-10]"
What was the outcome in games where the score was 7-5, 2-6, [6-10]?
CREATE TABLE table_2259502_2 (outcome VARCHAR, score VARCHAR)
SELECT Draft_Class, Draft_Pick_Number FROM match_season WHERE Position = "Defender" ORDER BY Draft_Pick_Number
Show me a bar chart for what are the draft pick numbers and draft classes for players who play the Defender position?, and list from low to high by the y axis please.
CREATE TABLE player ( Player_ID int, Player text, Years_Played text, Total_WL text, Singles_WL text, Doubles_WL text, Team int ) CREATE TABLE match_season ( Season real, Player text, Position text, Country int, Team int, Draft_Pick_Number int, Draft_Class text, College text ) CREATE TABLE team ( Team_id int, Name text ) CREATE TABLE country ( Country_id int, Country_name text, Capital text, Official_native_language text )
SELECT location_attendance FROM table_23286112_12 WHERE game = 5
Where was game number 5 played?
CREATE TABLE table_23286112_12 (location_attendance VARCHAR, game VARCHAR)