answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT date FROM table_name_78 WHERE home = "washington" AND visitor = "florida" AND record = "8-15-2"
Which date has a Home of washington, a Visitor of florida, and a Record of 8-15-2?
CREATE TABLE table_name_78 (date VARCHAR, record VARCHAR, home VARCHAR, visitor VARCHAR)
SELECT position_in_e4s_ratings_b FROM table_22170495_6 WHERE original_airing_on_channel_4 = "June 30, 2010"
What is the position in e4s ratings b when June 30, 2010 is the original airing on channel 4?
CREATE TABLE table_22170495_6 (position_in_e4s_ratings_b VARCHAR, original_airing_on_channel_4 VARCHAR)
SELECT demographic.age, demographic.expire_flag FROM demographic WHERE demographic.name = "Jerry Deberry"
tell me the age and death status of patient jerry deberry.
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE 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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT SUM(attendance) FROM table_name_69 WHERE record = "5-9-0"
What is the total of attendance with a Record of 5-9-0?
CREATE TABLE table_name_69 (attendance INTEGER, record VARCHAR)
SELECT original_airing_on_channel_4 FROM table_22170495_6 WHERE title = "Being Alive"
When is the original airing on channel 4 with being alive as the title?
CREATE TABLE table_22170495_6 (original_airing_on_channel_4 VARCHAR, title VARCHAR)
SELECT "Rank" FROM table_76047 WHERE "Silver" = '1' AND "Gold" > '1'
Which rank has 1 silver medal and more than 1 gold medal?
CREATE TABLE table_76047 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT score FROM table_name_2 WHERE date = "november 2"
Which score has a Date of november 2?
CREATE TABLE table_name_2 (score VARCHAR, date VARCHAR)
SELECT COUNT(position_in_channel_4s_ratings_a) FROM table_22170495_6 WHERE original_airing_on_channel_4 = "February 24, 2010"
How many position in channel 4s ratings a have February 24, 2010 as the original airing on channel 4?
CREATE TABLE table_22170495_6 (position_in_channel_4s_ratings_a VARCHAR, original_airing_on_channel_4 VARCHAR)
SELECT c.Text, c.Id AS "comment_link", CreationDate FROM Comments AS c WHERE c.Text LIKE '%##keyword##%' AND LENGTH(c.Text) <= 25 ORDER BY CreationDate DESC LIMIT 100
Search number of comments given by keyword..
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 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 PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount 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 Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) 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 PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE PostTypes ( Id number, Name 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 Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense 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 ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostTags ( PostId number, TagId number )
SELECT length FROM table_name_29 WHERE junctions = "sh 359 us 59" AND route_name = "fm 2895"
What's the length of route FM 2895 with junctions sh 359 us 59?
CREATE TABLE table_name_29 (length VARCHAR, junctions VARCHAR, route_name VARCHAR)
SELECT type FROM table_22180353_1 WHERE registration = "HB-OPU"
What are all types where registration is HB-OPU?
CREATE TABLE table_22180353_1 (type VARCHAR, registration VARCHAR)
SELECT appointmentid FROM appointment ORDER BY start DESC LIMIT 1
What is the id of the appointment that started most recently?
CREATE TABLE prescribes ( physician number, patient number, medication number, date time, appointment number, dose text ) CREATE TABLE undergoes ( patient number, procedures number, stay number, dateundergoes time, physician number, assistingnurse number ) CREATE TABLE trained_in ( physician number, treatment number, certificationdate time, certificationexpires time ) CREATE TABLE stay ( stayid number, patient number, room number, staystart time, stayend time ) CREATE TABLE room ( roomnumber number, roomtype text, blockfloor number, blockcode number, unavailable boolean ) CREATE TABLE department ( departmentid number, name text, head number ) CREATE TABLE affiliated_with ( physician number, department number, primaryaffiliation boolean ) CREATE TABLE patient ( ssn number, name text, address text, phone text, insuranceid number, pcp number ) CREATE TABLE medication ( code number, name text, brand text, description text ) CREATE TABLE on_call ( nurse number, blockfloor number, blockcode number, oncallstart time, oncallend time ) CREATE TABLE nurse ( employeeid number, name text, position text, registered boolean, ssn number ) CREATE TABLE appointment ( appointmentid number, patient number, prepnurse number, physician number, start time, end time, examinationroom text ) CREATE TABLE procedures ( code number, name text, cost number ) CREATE TABLE physician ( employeeid number, name text, position text, ssn number ) CREATE TABLE block ( blockfloor number, blockcode number )
SELECT termini FROM table_name_2 WHERE junctions = "i-35 fm 3338 sh 255"
What's the termini of the route with junctions of i-35 fm 3338 sh 255?
CREATE TABLE table_name_2 (termini VARCHAR, junctions VARCHAR)
SELECT registration FROM table_22180353_1 WHERE type = "T 6 G"
What is every registration for the type of T 6 G?
CREATE TABLE table_22180353_1 (registration VARCHAR, type VARCHAR)
SELECT "GTU Winning Team" FROM table_850 WHERE "TO Winning Team" = 'Steve Ross'
Who was the GTU winning team when the TO winning team was Steve Ross?
CREATE TABLE table_850 ( "Rnd" real, "Circuit" text, "GTO Winning Team" text, "GTU Winning Team" text, "TO Winning Team" text, "TU Winning Team" text, "Results" text )
SELECT junctions FROM table_name_98 WHERE termini = "aguilares, texas us 59"
What are the junctions of the route with termini aguilares, texas us 59?
CREATE TABLE table_name_98 (junctions VARCHAR, termini VARCHAR)
SELECT construction AS date FROM table_22180353_1 WHERE registration = "HB-HOS"
What is every construction date for the registration of HB-HOS?
CREATE TABLE table_22180353_1 (construction VARCHAR, registration VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "SINGLE" AND procedures.long_title = "Single internal mammary-coronary artery bypass"
what is the number of patients whose marital status is single and procedure long title is single internal mammary-coronary artery bypass?
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 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 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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT route_name FROM table_name_49 WHERE termini = "fm 1472 sh 255"
What route has termini of fm 1472 sh 255?
CREATE TABLE table_name_49 (route_name VARCHAR, termini VARCHAR)
SELECT conformity_to_original_design FROM table_22180353_1 WHERE registration = "HB-DAI"
What is every conformity to original design if registration is HB-DAI?
CREATE TABLE table_22180353_1 (conformity_to_original_design VARCHAR, registration VARCHAR)
SELECT Governor, COUNT(Governor) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 GROUP BY Governor ORDER BY COUNT(Governor) DESC
A bar chart for finding the number of the parties associated with the delegates from district 1 Who served as governors of the parties?, show in desc by the y-axis.
CREATE TABLE party ( Party_ID int, Year real, Party text, Governor text, Lieutenant_Governor text, Comptroller text, Attorney_General text, US_Senate text ) CREATE TABLE election ( Election_ID int, Counties_Represented text, District int, Delegate text, Party int, First_Elected real, Committee text ) CREATE TABLE county ( County_Id int, County_name text, Population real, Zip_code text )
SELECT termini FROM table_name_40 WHERE population_area = "aguilares"
What termini does the route with a population Area of aguilares have?
CREATE TABLE table_name_40 (termini VARCHAR, population_area VARCHAR)
SELECT MAX(season__number) FROM table_2219961_2 WHERE director = "Eric Tuchman"
What is the latest season number that Eric Tuchman directed?
CREATE TABLE table_2219961_2 (season__number INTEGER, director VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "6" AND lab."CATEGORY" = "Blood Gas"
give me the number of patients whose days of hospital stay is greater than 6 and lab test category is blood gas?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text )
SELECT length FROM table_name_99 WHERE junctions = "ur 1472 sh 255"
What's the length of the route with junctions of ur 1472 sh 255?
CREATE TABLE table_name_99 (length VARCHAR, junctions VARCHAR)
SELECT COUNT(season__number) FROM table_2219961_2 WHERE nbc_airdate = "October 2, 2001"
How man seasons have the air date of October 2, 2001?
CREATE TABLE table_2219961_2 (season__number VARCHAR, nbc_airdate VARCHAR)
SELECT "Date" FROM table_52959 WHERE "Away team" = 'essendon'
What is the date when the away team is essendon?
CREATE TABLE table_52959 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT champion FROM table_name_47 WHERE location = "morrisville, nc" AND semi_finalist__number2 = "clemson"
Which champion was from the location of Morrisville, NC, and whose SemiFinalist #2 of Clemson?
CREATE TABLE table_name_47 (champion VARCHAR, location VARCHAR, semi_finalist__number2 VARCHAR)
SELECT report FROM table_2220432_1 WHERE team = "Roush Fenway Racing"
What was the report in the race where the winning team was Roush Fenway Racing?
CREATE TABLE table_2220432_1 (report VARCHAR, team VARCHAR)
SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'abdmnal pain oth spcf st') AND DATETIME(diagnoses_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')) AS t1 JOIN (SELECT admissions.subject_id, labevents.itemid, labevents.charttime FROM labevents JOIN admissions ON labevents.hadm_id = admissions.hadm_id WHERE DATETIME(labevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.charttime AND DATETIME(t1.charttime, 'start of month') = DATETIME(t2.charttime, 'start of month') GROUP BY t2.itemid) AS t3 WHERE t3.c1 <= 3)
what are the three most commonly ordered laboratory tests for patients who were previously diagnosed with abdmnal pain oth spcf st in the same month, this year?
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) 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_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 d_labitems ( row_id number, itemid number, label text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) 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_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name 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 patients ( row_id number, subject_id number, gender text, dob time, dod time ) 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 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 labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text )
SELECT champion FROM table_name_78 WHERE score = "12-1"
Which champion got a score of 12-1?
CREATE TABLE table_name_78 (champion VARCHAR, score VARCHAR)
SELECT miles__km_ FROM table_2220432_1 WHERE average_speed__mph_ = "136.117"
What was the miles (km) for the race that had an average speed of 136.117 MPH?
CREATE TABLE table_2220432_1 (miles__km_ VARCHAR, average_speed__mph_ VARCHAR)
SELECT COUNT(hometown) FROM table_29598261_1 WHERE name = "Faisal Aden"
how many hometowns for faisal aden?
CREATE TABLE table_29598261_1 ( hometown VARCHAR, name VARCHAR )
SELECT champion FROM table_name_36 WHERE year = 2005 AND semi_finalist__number1 = "western carolina"
Who was champion in 2005 where the semi-finalist was #1 in western Carolina?
CREATE TABLE table_name_36 (champion VARCHAR, year VARCHAR, semi_finalist__number1 VARCHAR)
SELECT miles__km_ FROM table_2226343_1 WHERE date = "February 25"
What are the miles when February 25 is the date?
CREATE TABLE table_2226343_1 (miles__km_ VARCHAR, date VARCHAR)
SELECT COUNT(artist) FROM table_21378339_5 WHERE televote_points = 7
Name the artist for 7 points
CREATE TABLE table_21378339_5 ( artist VARCHAR, televote_points VARCHAR )
SELECT runner_up FROM table_name_66 WHERE year < 2006 AND champion = "elon"
Which runner-up placed in a year prior to 2006 and whose Champion was Elon?
CREATE TABLE table_name_66 (runner_up VARCHAR, year VARCHAR, champion VARCHAR)
SELECT laps FROM table_2226343_1 WHERE average_speed__mph_ = "141.911"
How many laps have an average speed of 141.911?
CREATE TABLE table_2226343_1 (laps VARCHAR, average_speed__mph_ VARCHAR)
SELECT labevents.charttime FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'bilirubin, total') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 30235) AND DATETIME(labevents.charttime) <= DATETIME(CURRENT_TIME(), '-29 month') ORDER BY labevents.charttime LIMIT 1
what was the first time until 29 months ago patient 30235 received a bilirubin, total lab test?
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_icd_procedures ( row_id number, icd9_code text, short_title text, long_title 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 labevents ( row_id number, subject_id number, hadm_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 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 d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) 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 procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text )
SELECT wheel_arrangement FROM table_name_5 WHERE builder’s_model = "cf-16-4" AND total_produced = 16
What is the wheel arrangement of cf-16-4, and 16 produced?
CREATE TABLE table_name_5 (wheel_arrangement VARCHAR, builder’s_model VARCHAR, total_produced VARCHAR)
SELECT manufacturer FROM table_2226343_1 WHERE average_speed__mph_ = "150.088"
Who is the manufacturer when 150.088 is the average speed (mph)?
CREATE TABLE table_2226343_1 (manufacturer VARCHAR, average_speed__mph_ VARCHAR)
SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass"
What are the enrollment dates of all the tests that have result 'Pass', and count them by a bar chart
CREATE TABLE Course_Authors_and_Tutors ( author_id INTEGER, author_tutor_ATB VARCHAR(3), login_name VARCHAR(40), password VARCHAR(40), personal_name VARCHAR(80), middle_name VARCHAR(80), family_name VARCHAR(80), gender_mf VARCHAR(1), address_line_1 VARCHAR(80) ) CREATE TABLE Student_Tests_Taken ( registration_id INTEGER, date_test_taken DATETIME, test_result VARCHAR(255) ) CREATE TABLE Subjects ( subject_id INTEGER, subject_name VARCHAR(120) ) CREATE TABLE Students ( student_id INTEGER, date_of_registration DATETIME, date_of_latest_logon DATETIME, login_name VARCHAR(40), password VARCHAR(10), personal_name VARCHAR(40), middle_name VARCHAR(40), family_name VARCHAR(40) ) CREATE TABLE Courses ( course_id INTEGER, author_id INTEGER, subject_id INTEGER, course_name VARCHAR(120), course_description VARCHAR(255) ) CREATE TABLE Student_Course_Enrolment ( registration_id INTEGER, student_id INTEGER, course_id INTEGER, date_of_enrolment DATETIME, date_of_completion DATETIME )
SELECT power_output FROM table_name_88 WHERE wheel_arrangement = "b-b" AND build_date = "1952"
What is the power of b-b wheel arrangement, built in 1952?
CREATE TABLE table_name_88 (power_output VARCHAR, wheel_arrangement VARCHAR, build_date VARCHAR)
SELECT manufacturer FROM table_2226343_1 WHERE date = "June 22"
Who is the manufacturer for the date of June 22?
CREATE TABLE table_2226343_1 (manufacturer VARCHAR, date VARCHAR)
SELECT COUNT(grid) FROM table_name_8 WHERE manufacturer = "honda" AND rider = "yuki takahashi" AND laps > 22
How many grids have a Manufacturer of honda, a Rider of yuki takahashi, and more than 22 laps?
CREATE TABLE table_name_8 ( grid VARCHAR, laps VARCHAR, manufacturer VARCHAR, rider VARCHAR )
SELECT build_date FROM table_name_36 WHERE service = "freight" AND wheel_arrangement = "c-c"
When was the build date for c-c wheel arrangement and freight service?
CREATE TABLE table_name_36 (build_date VARCHAR, service VARCHAR, wheel_arrangement VARCHAR)
SELECT laps FROM table_2226343_1 WHERE race_time = "3:31:24"
How many laps have a race time of 3:31:24?
CREATE TABLE table_2226343_1 (laps VARCHAR, race_time VARCHAR)
SELECT "Name" FROM table_13339 WHERE "Indication" = 'autoimmune disease and inflammation'
Which study included autoimmune disease and inflammation?
CREATE TABLE table_13339 ( "Name" text, "Platform" text, "Indication" text, "Status" text, "Collaboration" text )
SELECT build_date FROM table_name_14 WHERE prr_class = "ff20" AND builder’s_model = "erie built"
When was the build date for ff20 PRR class and erie built builder's model?
CREATE TABLE table_name_14 (build_date VARCHAR, prr_class VARCHAR, builder’s_model VARCHAR)
SELECT laps FROM table_2226343_1 WHERE average_speed__mph_ = "140.22"
How many laps have an average speed (mph) of 140.22?
CREATE TABLE table_2226343_1 (laps VARCHAR, average_speed__mph_ VARCHAR)
SELECT MIN("Total") FROM table_32958 WHERE "Institution" = 'higher secondary school' AND "Aided" > '14'
Which higher secondary school listing has the lowest total and an Aided amount larger than 14?
CREATE TABLE table_32958 ( "Institution" text, "Government" real, "Aided" real, "Unaided" real, "Total" real )
SELECT AVG(debut) FROM table_name_33 WHERE player = "radoslava topalova" AND years_played < 2
what is the debut when the play er is radoslava topalova and the years played is less than 2?
CREATE TABLE table_name_33 (debut INTEGER, player VARCHAR, years_played VARCHAR)
SELECT director FROM table_22265716_1 WHERE original_title = "Три летња дана"
Who directed the film with the original title of три летња дана?
CREATE TABLE table_22265716_1 (director VARCHAR, original_title VARCHAR)
SELECT from_club FROM table_name_80 WHERE player = "robinho"
What is From Club, when Player is 'Robinho'?
CREATE TABLE table_name_80 ( from_club VARCHAR, player VARCHAR )
SELECT average_attendance FROM table_name_46 WHERE season = "2011" AND games < 519 AND _number_of_teams > 14 AND sport = "association football"
What was the average attendance of the 2011 season that had games smaller than 519 with several teams bigger than 14 that were also part of the sport of association football?
CREATE TABLE table_name_46 (average_attendance VARCHAR, sport VARCHAR, _number_of_teams VARCHAR, season VARCHAR, games VARCHAR)
SELECT director FROM table_22265716_1 WHERE film_title_used_in_nomination = "Three Summer Days"
Who directed the film with the title three summer days?
CREATE TABLE table_22265716_1 (director VARCHAR, film_title_used_in_nomination VARCHAR)
SELECT COUNT("Callsign") FROM table_3798 WHERE "Location" = 'Masinloc, Zambales'
How many call signs does the location masinloc, zambales have?
CREATE TABLE table_3798 ( "Branding" text, "Callsign" text, "Frequency" text, "Power (kW)" text, "Location" text )
SELECT SUM(average_attendance) FROM table_name_11 WHERE games = 1311
What was the total number of average attendance for games of 1311?
CREATE TABLE table_name_11 (average_attendance INTEGER, games VARCHAR)
SELECT director FROM table_22265716_1 WHERE original_title = "Лепа села лепо горе"
Who is the director of the film with the title лепа села лепо горе?
CREATE TABLE table_22265716_1 (director VARCHAR, original_title VARCHAR)
SELECT DISTINCT writes.paperid FROM author, writes WHERE author.authorname = 'kurtis heimerl' AND writes.authorid = author.authorid
Papers written by kurtis heimerl
CREATE TABLE dataset ( datasetid int, datasetname varchar ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE field ( fieldid int ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int )
SELECT season FROM table_name_72 WHERE _number_of_teams > 14 AND league = "super rugby"
When was the season that had more teams larger than 14 in the super rugby league?
CREATE TABLE table_name_72 (season VARCHAR, _number_of_teams VARCHAR, league VARCHAR)
SELECT us_viewers__million_ FROM table_22261877_1 WHERE production_code = "6ACX16"
How many viewers in millions watched the episode with the production code 6acx16?
CREATE TABLE table_22261877_1 (us_viewers__million_ VARCHAR, production_code VARCHAR)
SELECT MIN("Population (January 1, 2008)") FROM table_20641 WHERE "Largest city" = 'Roskilde'
What is the minimum population of the region in which Roskilde is the largest city?
CREATE TABLE table_20641 ( "Danish name" text, "English name" text, "Seat of administration" text, "Largest city" text, "Population (January 1, 2008)" real, "Area (km\u00b2)" real, "Pop. density (per km\u00b2)" text )
SELECT label FROM table_name_96 WHERE catalog__number = "83061-2"
What is the label for the album with a catalog number of 83061-2?
CREATE TABLE table_name_96 (label VARCHAR, catalog__number VARCHAR)
SELECT original_air_date FROM table_22261877_1 WHERE production_code = "6ACX19"
What is the air date of the episode with the production code 6acx19?
CREATE TABLE table_22261877_1 (original_air_date VARCHAR, production_code VARCHAR)
SELECT MAX(vitalperiodic.respiration) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-187132')) AND NOT vitalperiodic.respiration IS NULL AND DATETIME(vitalperiodic.observationtime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-1 day')
what was the maximum value for respiration for patient 022-187132 during yesterday?
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) 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 cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, hospitaladmitsource text, unitadmittime time, unitdischargetime time, hospitaldischargetime time, hospitaldischargestatus text ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time )
SELECT catalog__number FROM table_name_36 WHERE region = "united kingdom"
What is the catalog number of the album whose region is the United Kingdom?
CREATE TABLE table_name_36 (catalog__number VARCHAR, region VARCHAR)
SELECT original_air_date FROM table_2226817_2 WHERE production_code = "1.12"
What is the original air date for the production code of 1.12?
CREATE TABLE table_2226817_2 (original_air_date VARCHAR, production_code VARCHAR)
SELECT event FROM table_name_74 WHERE opponent = "vinny magalhães"
What was the event for vinny magalh es?
CREATE TABLE table_name_74 ( event VARCHAR, opponent VARCHAR )
SELECT region FROM table_name_60 WHERE catalog__number = "7567-83061-2"
What is the region for the album with a catalog number of 7567-83061-2?
CREATE TABLE table_name_60 (region VARCHAR, catalog__number VARCHAR)
SELECT no_in_series FROM table_2226817_2 WHERE production_code = "1.11"
How many number of series have a production code of 1.11?
CREATE TABLE table_2226817_2 (no_in_series VARCHAR, production_code VARCHAR)
SELECT SUM(money___) AS $__ FROM table_name_37 WHERE place = "5"
What is the Money of the Player in Place 5?
CREATE TABLE table_name_37 ( money___ INTEGER, place VARCHAR )
SELECT label FROM table_name_84 WHERE catalog__number = "83061-4"
What is the label for the album with a catalog number of 83061-4?
CREATE TABLE table_name_84 (label VARCHAR, catalog__number VARCHAR)
SELECT MAX(no_in_series) FROM table_2226817_2 WHERE production_code = "1.11"
How many number of series have the production code of 1.11?
CREATE TABLE table_2226817_2 (no_in_series INTEGER, production_code VARCHAR)
SELECT destination, COUNT(destination) FROM flight WHERE price > 300 GROUP BY destination ORDER BY destination DESC
How many flights with price higher than 300 for each destination city? Return a bar chart, I want to show X-axis from high to low order.
CREATE TABLE flight ( flno number(4,0), origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date date, arrival_date date, price number(7,2), aid number(9,0) ) CREATE TABLE aircraft ( aid number(9,0), name varchar2(30), distance number(6,0) ) CREATE TABLE certificate ( eid number(9,0), aid number(9,0) ) CREATE TABLE employee ( eid number(9,0), name varchar2(30), salary number(10,2) )
SELECT catalog__number FROM table_name_8 WHERE label = "atlantic records" AND region = "united states"
What is the catalog number of the album whose label is Atlantic Records and region is the United States?
CREATE TABLE table_name_8 (catalog__number VARCHAR, label VARCHAR, region VARCHAR)
SELECT written_by FROM table_2226817_2 WHERE original_air_date = "April 5, 1987"
Who wrote when the original airdate is April 5, 1987?
CREATE TABLE table_2226817_2 (written_by VARCHAR, original_air_date VARCHAR)
SELECT COUNT(*) FROM table_204_724 WHERE "outcome" = 'runner-up'
what is the total number of runner ups listed on the chart ?
CREATE TABLE table_204_724 ( id number, "outcome" text, "no." number, "date" text, "tournament" text, "surface" text, "partner" text, "opponents in the final" text, "score in the final" text )
SELECT school_club_team FROM table_name_78 WHERE position = "center" AND player = "rafael araújo"
What school/club team did the center Rafael Araújo play for?
CREATE TABLE table_name_78 (school_club_team VARCHAR, position VARCHAR, player VARCHAR)
SELECT directed_by FROM table_2226817_2 WHERE production_code = "1.02"
Who directed when the production code is 1.02?
CREATE TABLE table_2226817_2 (directed_by VARCHAR, production_code VARCHAR)
SELECT "Semifinalists" FROM table_50565 WHERE "Finalist" = 'andrei chesnokov'
Which Semifinalists have a Finalist of andrei chesnokov?
CREATE TABLE table_50565 ( "Tournament" text, "Surface" text, "Week" text, "Winner and score" text, "Finalist" text, "Semifinalists" text )
SELECT nationality FROM table_name_53 WHERE position = "guard" AND school_club_team = "florida international"
What is the nationality of the guard who played for Florida International?
CREATE TABLE table_name_53 (nationality VARCHAR, position VARCHAR, school_club_team VARCHAR)
SELECT production_code FROM table_2226817_4 WHERE original_air_date = "November 27, 1988"
Name the production code for november 27, 1988
CREATE TABLE table_2226817_4 (production_code VARCHAR, original_air_date VARCHAR)
SELECT "Player" FROM table_8461 WHERE "To par" = '–4' AND "Score" = '74-70-68=212'
What is the Player that has a To standard of 4, and a Score of 74-70-68=212?
CREATE TABLE table_8461 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
SELECT player FROM table_name_83 WHERE position = "guard/forward"
What player had the position guard/forward?
CREATE TABLE table_name_83 (player VARCHAR, position VARCHAR)
SELECT original_air_date FROM table_2226817_4 WHERE production_code = "3.04"
Name the original air date for 3.04 production code
CREATE TABLE table_2226817_4 (original_air_date VARCHAR, production_code VARCHAR)
SELECT "Games started" FROM table_1005 WHERE "Player" = 'Hugh White'
How many Games Started are there for Hugh White ?
CREATE TABLE table_1005 ( "Player" text, "Position" text, "Games started" text, "Hometown" text, "Height" text, "Weight" real, "Class" text, "Prior experience" text )
SELECT driver FROM table_name_62 WHERE laps = 45
Who is the driver for laps of 45
CREATE TABLE table_name_62 (driver VARCHAR, laps VARCHAR)
SELECT written_by FROM table_2226817_4 WHERE original_air_date = "April 9, 1989"
Name who wrote the episode that aired april 9, 1989
CREATE TABLE table_2226817_4 (written_by VARCHAR, original_air_date VARCHAR)
SELECT "Frequency" FROM table_31719 WHERE "Call sign" = 'cjjc-fm'
What is the call frequency sign of cjjc-fm?
CREATE TABLE table_31719 ( "Frequency" text, "Call sign" text, "Branding" text, "Format" text, "Owner" text )
SELECT visitor FROM table_name_90 WHERE date = "december 17"
Who was the visiting team on December 17?
CREATE TABLE table_name_90 (visitor VARCHAR, date VARCHAR)
SELECT COUNT(no_in_season) FROM table_2226817_4 WHERE production_code = "3.09"
Name the number of number in season for 3.09
CREATE TABLE table_2226817_4 (no_in_season VARCHAR, production_code VARCHAR)
SELECT "Record" FROM table_2968 WHERE "Opponent" = 'Stampeders'
If the opponent is the Stampeders, what is the record?
CREATE TABLE table_2968 ( "Week" real, "Date" text, "Opponent" text, "Location" text, "Final Score" text, "Attendance" real, "Record" text )
SELECT COUNT(attendance) FROM table_name_31 WHERE visitor = "miami" AND home = "washington"
How many people were at Washington's home game against Miami?
CREATE TABLE table_name_31 (attendance VARCHAR, visitor VARCHAR, home VARCHAR)
SELECT COUNT(original_air_date) FROM table_2226817_12 WHERE production_code = "11.19"
when was the episode premiere if the production code is 11.19?
CREATE TABLE table_2226817_12 (original_air_date VARCHAR, production_code VARCHAR)
SELECT DISTINCT firstname FROM list WHERE classroom = 107
What are the first names of students studying in room 107?
CREATE TABLE list ( firstname VARCHAR, classroom VARCHAR )
SELECT home FROM table_name_63 WHERE visitor = "minnesota"
Who was the home team that played against the visiting team Minnesota?
CREATE TABLE table_name_63 (home VARCHAR, visitor VARCHAR)
SELECT title FROM table_2226817_12 WHERE original_air_date = "March 2, 1997"
what is the name of the episode whose premiere was in march 2, 1997?
CREATE TABLE table_2226817_12 (title VARCHAR, original_air_date VARCHAR)
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', icustays.intime)) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 5828) AND icustays.outtime IS NULL
how many days have elapsed since patient 5828 was admitted to the intensive care unit currently?
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) 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_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 ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title 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 chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE procedures_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 cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name 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 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 patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number )
SELECT COUNT(attendance) FROM table_name_17 WHERE record = "17-7"
What was total attendance on the day they went 17-7?
CREATE TABLE table_name_17 (attendance VARCHAR, record VARCHAR)