answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT institution FROM table_27816698_2 WHERE location = "Bakersfield, California"
Which institution was located in bakersfield, california?
CREATE TABLE table_27816698_2 (institution VARCHAR, location VARCHAR)
SELECT away FROM table_name_61 WHERE result = "1-5 aet"
Who was the Away team on the result of 1-5 aet?
CREATE TABLE table_name_61 (away VARCHAR, result VARCHAR)
SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor
How many entrepreneurs correspond to each investor.
CREATE TABLE entrepreneur ( Entrepreneur_ID int, People_ID int, Company text, Money_Requested real, Investor text ) CREATE TABLE people ( People_ID int, Name text, Height real, Weight real, Date_of_Birth text )
SELECT MIN(games_played) FROM table_27816332_2 WHERE total_points = 6
Name the least games played for 6 points
CREATE TABLE table_27816332_2 (games_played INTEGER, total_points VARCHAR)
SELECT season FROM table_name_54 WHERE date = "30 august 1980"
What season had a date of 30 august 1980
CREATE TABLE table_name_54 (season VARCHAR, date VARCHAR)
SELECT COUNT(pick__number) FROM table_name_87 WHERE position = "center" AND round < 6
What was the pick # for a center picked before round 6?
CREATE TABLE table_name_87 ( pick__number VARCHAR, position VARCHAR, round VARCHAR )
SELECT manufacturer FROM table_27821519_1 WHERE no = 50
who is the manufacturer is no.50?
CREATE TABLE table_27821519_1 (manufacturer VARCHAR, no VARCHAR)
SELECT round FROM table_name_9 WHERE home = "fc augsburg" AND result = "3-0"
What round had a home of FC augsburg with the result of 3-0?
CREATE TABLE table_name_9 (round VARCHAR, home VARCHAR, result VARCHAR)
SELECT SUM(points) FROM table_name_80 WHERE premiers = "brisbane broncos"
What's the total sum of points scored by the Brisbane Broncos?
CREATE TABLE table_name_80 ( points INTEGER, premiers VARCHAR )
SELECT title FROM table_27823058_1 WHERE written_by = "Katie Palmer"
Which episodes did Katie Palmer write?
CREATE TABLE table_27823058_1 (title VARCHAR, written_by VARCHAR)
SELECT in_office FROM table_name_58 WHERE member = "mark coulton"
What is the office held by member Mark Coulton?
CREATE TABLE table_name_58 (in_office VARCHAR, member VARCHAR)
SELECT questions.Id AS "post_link", 'site://posts/' + CAST(questions.Id AS TEXT) + '/timeline|timeline' AS "Timeline link", COUNT(*) AS "Number of bounties", SUM(Votes.BountyAmount) AS "Total bounty amount" FROM Posts AS questions LEFT JOIN Votes AS votes ON Votes.PostId = questions.Id WHERE Votes.VoteTypeId = 8 GROUP BY questions.Id HAVING COUNT(*) > 1 ORDER BY COUNT(*) DESC
Questions with multiple bounties by any users.
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 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 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 ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) 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 ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description 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 Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense 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 PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE PostTags ( PostId number, TagId number ) 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 FlagTypes ( Id number, Name text, Description text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostTypes ( Id number, Name 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 )
SELECT MAX(series__number) FROM table_27823058_1
What's the highest series number ?
CREATE TABLE table_27823058_1 (series__number INTEGER)
SELECT in_office FROM table_name_71 WHERE electorate = "hume"
What office is held by Electorate Hume?
CREATE TABLE table_name_71 (in_office VARCHAR, electorate VARCHAR)
SELECT "Fatalities" FROM table_25617 WHERE "Brief description" = 'Ditched 300 m short of runway'
How many fatalities were there in the crash described as ditched 300 m short of runway?
CREATE TABLE table_25617 ( "date (dd.mm.yyyy)" text, "Tail number" text, "Location" text, "Fatalities" text, "Brief description" text )
SELECT commandery AS capital FROM table_278229_1 WHERE commandery = "Changsha 長沙"
when changsha 長沙 is the commandery what is the commandery capital?
CREATE TABLE table_278229_1 (commandery VARCHAR)
SELECT member FROM table_name_7 WHERE state = "nt"
Which memeber has nt as the state?
CREATE TABLE table_name_7 (member VARCHAR, state VARCHAR)
SELECT MAX("Round") FROM table_34465 WHERE "Position" = 'cornerback'
Which cornerback has the highest round?
CREATE TABLE table_34465 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text )
SELECT MIN(no_of_counties) FROM table_278229_1 WHERE commandery = "Yidu 宜都"
When yidu 宜都 is the commandery what is the lowest number of countries?
CREATE TABLE table_278229_1 (no_of_counties INTEGER, commandery VARCHAR)
SELECT member FROM table_name_64 WHERE state = "nsw" AND first_elected = "1952" AND party = "alp"
Which memeber has nsw as the state, a first elected of 1952, and alp as the party?
CREATE TABLE table_name_64 (member VARCHAR, party VARCHAR, state VARCHAR, first_elected VARCHAR)
SELECT incumbent FROM table_name_3 WHERE district = "ohio 13"
Who is the Incumbent that has a District of ohio 13 in Democratic Party?
CREATE TABLE table_name_3 ( incumbent VARCHAR, district VARCHAR )
SELECT commandery AS capital FROM table_278229_1 WHERE commandery = "Nanhai 南海"
When nanhai 南海 is the commandery what is the commandery capital?
CREATE TABLE table_278229_1 (commandery VARCHAR)
SELECT party FROM table_name_14 WHERE state = "wa" AND member = "hon victor garland"
Which party has wa as the state, and hon victor garland as the memeber?
CREATE TABLE table_name_14 (party VARCHAR, state VARCHAR, member VARCHAR)
SELECT "Name" FROM table_60410 WHERE "Venue" = 'motherwell'
What is Name, when Venue is 'Motherwell'?
CREATE TABLE table_60410 ( "Date" real, "Name" text, "Venue" text, "Winner" text, "Runner-up" text, "Score" text )
SELECT commandery AS capital FROM table_278229_1 WHERE commandery = "Gaoliang 高涼"
When gaoliang 高涼 is the commandery what is the commandery capital?
CREATE TABLE table_278229_1 (commandery VARCHAR)
SELECT party FROM table_name_25 WHERE first_elected = "1966" AND state = "qld" AND member = "donald milner cameron"
Which party has a first elected of 1966, qld as the state, and donald milner cameron as the member?
CREATE TABLE table_name_25 (party VARCHAR, member VARCHAR, first_elected VARCHAR, state VARCHAR)
SELECT "days available" - "days available" + 1 FROM table_204_839 WHERE "program" = 'fbn live'
how many days is fbn live available each week ?
CREATE TABLE table_204_839 ( id number, "et" text, "days available" text, "program" text, "host(s)" text, "description" text )
SELECT title FROM table_27832075_2 WHERE episode__number = "9-10"
What is the title of episode number 9-10?
CREATE TABLE table_27832075_2 (title VARCHAR, episode__number VARCHAR)
SELECT member FROM table_name_70 WHERE first_elected = "1972" AND party = "alp" AND state = "vic" AND electorate = "gellibrand"
Which memeber has a first elected of 1972, alp as the party, vic as the state, and an electorate of gellibrand?
CREATE TABLE table_name_70 (member VARCHAR, electorate VARCHAR, state VARCHAR, first_elected VARCHAR, party VARCHAR)
SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '016-38131') AND DATETIME(medication.drugstarttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '016-38131') AND DATETIME(medication.drugstarttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-1 day')
what were the new prescriptions of patient 016-38131 today compared to the prescription they received yesterday?
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 treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime 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 allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime 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 lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time )
SELECT us_viewers__millions_ FROM table_27832075_2 WHERE series__number = 69
How many million U.S. viewers wtched episode 69 of the series?
CREATE TABLE table_27832075_2 (us_viewers__millions_ VARCHAR, series__number VARCHAR)
SELECT location FROM table_name_13 WHERE left = "2013" AND nickname = "royals"
Where was the game played with a 2013 left and Royals nickname?
CREATE TABLE table_name_13 (location VARCHAR, left VARCHAR, nickname VARCHAR)
SELECT SUM(year) FROM table_name_89 WHERE position = "12th"
What is the total year with a Position of 12th?
CREATE TABLE table_name_89 ( year INTEGER, position VARCHAR )
SELECT directed_by FROM table_27832075_2 WHERE episode__number = "23"
Who directed episode number 23 in the season?
CREATE TABLE table_27832075_2 (directed_by VARCHAR, episode__number VARCHAR)
SELECT joined FROM table_name_2 WHERE founded < 1856 AND current_conference = "big south (ncaa division i)"
What joined that was founded prior to year 1856 and whose current conference is the Big South (NCAA Division I)?
CREATE TABLE table_name_2 (joined VARCHAR, founded VARCHAR, current_conference VARCHAR)
SELECT "Region" FROM table_57963 WHERE "Catalogue" = '9362486152' AND "Date" = 'september 3, 2004'
What region is the catalogue number 9362486152 that was from September 3, 2004 from?
CREATE TABLE table_57963 ( "Region" text, "Date" text, "Label" text, "Format" text, "Catalogue" text )
SELECT title FROM table_27832075_2 WHERE episode__number = "12"
What is the name of episode number 12 of the season?
CREATE TABLE table_27832075_2 (title VARCHAR, episode__number VARCHAR)
SELECT SUM(founded) FROM table_name_47 WHERE left = "1976"
What is the total number of teams founded that were left in 1976?
CREATE TABLE table_name_47 (founded INTEGER, left VARCHAR)
SELECT "Surface" FROM table_51661 WHERE "Date" = 'april 24, 2003'
What surface was the April 24, 2003 match played on?
CREATE TABLE table_51661 ( "Edition" text, "Round" text, "Date" text, "Surface" text, "Opponent" text, "Result" text )
SELECT rider_names FROM table_27833186_1 WHERE best_conditioned_horse = "Basia"
What are all the Riders whose best-conditioned horse is Basia?
CREATE TABLE table_27833186_1 (rider_names VARCHAR, best_conditioned_horse VARCHAR)
SELECT set_1 FROM table_name_33 WHERE date = "08 jul" AND set_2 = "25–21"
What is the Set 1 when the date is 08 jul, and a Set 2 of 25–21?
CREATE TABLE table_name_33 (set_1 VARCHAR, date VARCHAR, set_2 VARCHAR)
SELECT gpu_frequency FROM table_name_27 WHERE release_date = "june 2013" AND sspec_number = "sr17l(c0)"
What is the GPU frequency for the processor released in June 2013, with a sSpec number of sr17l(c0)?
CREATE TABLE table_name_27 ( gpu_frequency VARCHAR, release_date VARCHAR, sspec_number VARCHAR )
SELECT distance__miles_ FROM table_27833186_1 WHERE horse_name = "Koona"
What was the distance (in miles) of the championship were the winning horse was Koona?
CREATE TABLE table_27833186_1 (distance__miles_ VARCHAR, horse_name VARCHAR)
SELECT score FROM table_name_71 WHERE set_2 = "24–26"
What is the Score for Set 2 of 24–26?
CREATE TABLE table_name_71 (score VARCHAR, set_2 VARCHAR)
SELECT province FROM table_29012710_1 WHERE number_of_dairy_farms = 200
what is the location where there are over 200 cattle businesses
CREATE TABLE table_29012710_1 ( province VARCHAR, number_of_dairy_farms VARCHAR )
SELECT rider_names FROM table_27833186_1 WHERE location = "Euer Valley, CA" AND horse_name = "Magic Sirocco"
Who were the winning riders of the championship in Euer Valley, CA and whose horse was Magic Sirocco?
CREATE TABLE table_27833186_1 (rider_names VARCHAR, location VARCHAR, horse_name VARCHAR)
SELECT report FROM table_name_15 WHERE set_1 = "19–25"
What shows for Report hen there is a set 1 of 19–25?
CREATE TABLE table_name_15 (report VARCHAR, set_1 VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Medicare" AND diagnoses.icd9_code = "41021"
count the number of patients whose insurance is medicare and diagnoses icd9 code is 41021?
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 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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT COUNT(rider_names) FROM table_27833186_1 WHERE horse_name = "OMR Tsunami"
How many different riders are there that won riding Omr Tsunami?
CREATE TABLE table_27833186_1 (rider_names VARCHAR, horse_name VARCHAR)
SELECT date FROM table_name_38 WHERE time = "17:37" AND set_4 = "25–15"
What is the Date with a Time of 17:37, and the Set 4 is 25–15?
CREATE TABLE table_name_38 (date VARCHAR, time VARCHAR, set_4 VARCHAR)
SELECT SUM(cost.cost) FROM cost WHERE cost.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 57169)
how much did patient 57169 pay in hospital in total during their stay?
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) 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 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 d_labitems ( row_id number, itemid number, label text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_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 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 outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE 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 patients ( row_id number, subject_id number, gender text, dob time, dod time ) 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 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 )
SELECT distance__miles_ FROM table_27833186_1 WHERE best_conditioned_horse = "Freedom"
What was the total distance (in miles) of the championship where the best conditioned horse was Freedom?
CREATE TABLE table_27833186_1 (distance__miles_ VARCHAR, best_conditioned_horse VARCHAR)
SELECT report FROM table_name_12 WHERE score = "3–1" AND set_1 = "19–25"
What is the Report with a Score of 3–1, and Set 1 is 19–25?
CREATE TABLE table_name_12 (report VARCHAR, score VARCHAR, set_1 VARCHAR)
SELECT name FROM table_1211545_2 WHERE heavy_vehicle__2_axles_ = "R20.50"
What is the name of the plaza where the told for heavy vehicles with 2 axles is r20.50?
CREATE TABLE table_1211545_2 ( name VARCHAR, heavy_vehicle__2_axles_ VARCHAR )
SELECT COUNT(series__number) FROM table_27833469_1 WHERE us_viewers__millions_ = "15.8"
How many series numbers are there when there were 15.8 u.s. viewers (millions)?
CREATE TABLE table_27833469_1 (series__number VARCHAR, us_viewers__millions_ VARCHAR)
SELECT report FROM table_name_79 WHERE date = "08 jul" AND score = "3–1"
What is the Report for 08 jul, and a Score of 3–1?
CREATE TABLE table_name_79 (report VARCHAR, date VARCHAR, score VARCHAR)
SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY SUM(MANAGER_ID) DESC
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the sum of manager_id over the hire_date bin hire_date by time by a bar chart, and list Y-axis from high to low order.
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) 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 departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) )
SELECT title FROM table_27833469_1 WHERE season__number = "11"
What is the title of the episode number 11 of the season?
CREATE TABLE table_27833469_1 (title VARCHAR, season__number VARCHAR)
SELECT nation FROM table_name_37 WHERE record = "7.39"
What is the Nation with a Record that is 7.39?
CREATE TABLE table_name_37 (nation VARCHAR, record VARCHAR)
SELECT "Visitor" FROM table_10116 WHERE "Decision" = 'biron' AND "Date" = 'october 4'
Who was the visiting team where the decision was Biron on October 4?
CREATE TABLE table_10116 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" real, "Record" text )
SELECT series__number FROM table_27833469_1 WHERE season__number = "10"
What is the series number for the episode number 10 of the season?
CREATE TABLE table_27833469_1 (series__number VARCHAR, season__number VARCHAR)
SELECT date FROM table_name_87 WHERE record = "7.39"
What is the Date with a Record that is 7.39?
CREATE TABLE table_name_87 (date VARCHAR, record VARCHAR)
SELECT "NFL Club" FROM table_59351 WHERE "Pick" = '153'
What is the NFL club with pick # 153?
CREATE TABLE table_59351 ( "Player" text, "Round" real, "Pick" real, "Position" text, "NFL Club" text )
SELECT approximate_translation FROM table_2784232_1 WHERE morphological_category = "1st. plur. perfect"
What are the the approximate translations when the Morphological Category is 1st. plur. perfect?
CREATE TABLE table_2784232_1 (approximate_translation VARCHAR, morphological_category VARCHAR)
SELECT episode FROM table_name_23 WHERE xii_season = "4 118 160 (26 september 2010)"
What is Episode, when XII Season is 4 118 160 (26 september 2010)?
CREATE TABLE table_name_23 (episode VARCHAR, xii_season VARCHAR)
SELECT "Time" FROM table_75860 WHERE "Ground" = 'humber college north'
What is the Time with a Ground that is humber college north?
CREATE TABLE table_75860 ( "Date" text, "Time" text, "Home" text, "Away" text, "Score" text, "Ground" text )
SELECT approximate_translation FROM table_2784232_1 WHERE morphological_category = "masc. sing. active participle"
What are the approximate translations when the morphological category is masc. sing. active participle?
CREATE TABLE table_2784232_1 (approximate_translation VARCHAR, morphological_category VARCHAR)
SELECT vii_season FROM table_name_29 WHERE episode = "11"
What is VII Season, when Episode is 11?
CREATE TABLE table_name_29 (vii_season VARCHAR, episode VARCHAR)
SELECT MAX("Year") FROM table_63635 WHERE "Result" = 'nominated' AND "Nominee(s)" = 'neal baer'
What is the latest year when Neal Baer was a nominee, and the result was nominated?
CREATE TABLE table_63635 ( "Year" real, "Category" text, "Nominee(s)" text, "Episode" text, "Result" text )
SELECT COUNT(hebrew_form) FROM table_2784232_1 WHERE arabic_form = "yuktibu يكتب"
How many hebrew forms are there for the arabic form yuktibu يكتب?
CREATE TABLE table_2784232_1 (hebrew_form VARCHAR, arabic_form VARCHAR)
SELECT xii_season FROM table_name_57 WHERE episode = "6"
What is XII Season, when Episode is 6?
CREATE TABLE table_name_57 (xii_season VARCHAR, episode VARCHAR)
SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'acute renal failure - due to sepsis' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t1 JOIN (SELECT patient.uniquepid, lab.labname, lab.labresulttime FROM lab JOIN patient ON lab.patientunitstayid = patient.patientunitstayid WHERE DATETIME(lab.labresulttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.diagnosistime < t2.labresulttime AND DATETIME(t2.labresulttime) BETWEEN DATETIME(t1.diagnosistime) AND DATETIME(t1.diagnosistime, '+2 month') GROUP BY t2.labname) AS t3 WHERE t3.c1 <= 4
in a year before, what are the top four most frequent lab tests ordered for patients within 2 months after being diagnosed with acute renal failure - due to sepsis?
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE 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 allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time )
SELECT COUNT(arabic_form) FROM table_2784232_1 WHERE morphological_category = "1st. plur. perfect"
How many Arabic forms are there for the 1st. plur. perfect category?
CREATE TABLE table_2784232_1 (arabic_form VARCHAR, morphological_category VARCHAR)
SELECT episode FROM table_name_83 WHERE viii_season = "5 082 535 (19 october 2008)"
What is Episode, when VIII Season is 5 082 535 (19 October 2008)?
CREATE TABLE table_name_83 (episode VARCHAR, viii_season VARCHAR)
SELECT nba_draft FROM table_name_38 WHERE college = "lsu"
What is the NBA Draft status of the person who went to college at LSU?
CREATE TABLE table_name_38 ( nba_draft VARCHAR, college VARCHAR )
SELECT viewers__millions_ FROM table_27847088_1 WHERE series_no = 45
How many were the viewers (in millions) of the series no. 45?
CREATE TABLE table_27847088_1 (viewers__millions_ VARCHAR, series_no VARCHAR)
SELECT xiii_season FROM table_name_82 WHERE viii_season = "4 780 743 (2 november 2008)"
What is XIII Season, when VIII Season is 4 780 743 (2 november 2008)?
CREATE TABLE table_name_82 (xiii_season VARCHAR, viii_season VARCHAR)
SELECT meter_300, meter_100 FROM swimmer ORDER BY meter_300 DESC
Give me the comparison about meter_100 over the meter_300 , and could you order by the bar from high to low?
CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text ) CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int )
SELECT COUNT(opponent) FROM table_27862483_4 WHERE score = "7-6"
How many games did UCLA's baseball team win with a score 7-6 during May of 2010?
CREATE TABLE table_27862483_4 (opponent VARCHAR, score VARCHAR)
SELECT AVG(lost) FROM table_name_47 WHERE points = 28 AND drawn < 8
Which Lost has Points of 28 and a Drawn smaller than 8?
CREATE TABLE table_name_47 (lost INTEGER, points VARCHAR, drawn VARCHAR)
SELECT "Offer Team" FROM table_70647 WHERE "Player" = 'david backes'
What was David Backes' Offer Team?
CREATE TABLE table_70647 ( "Player" text, "Date" text, "Original Team" text, "Offer Team" text, "Result" text )
SELECT total_wins FROM table_27864661_6 WHERE first_title = 2004
How many wins are listed when the first title is 2004?
CREATE TABLE table_27864661_6 (total_wins VARCHAR, first_title VARCHAR)
SELECT COUNT(against) FROM table_name_96 WHERE points > 31 AND drawn > 6
How many Againsts have Points larger than 31 and a Drawn larger than 6?
CREATE TABLE table_name_96 (against VARCHAR, points VARCHAR, drawn VARCHAR)
SELECT "name" FROM table_203_465 ORDER BY "area (km2)" LIMIT 1
which locality has the least amount of area according to this chart ?
CREATE TABLE table_203_465 ( id number, "name" text, "population (2002 census)" number, "population (2007 estimation)" number, "population (2011 census)" number, "area (km2)" number, "density (pop/km2)" number )
SELECT network FROM table_27871460_2 WHERE state_or_territory = "Illinois"
Which network was located in Illinois?
CREATE TABLE table_27871460_2 (network VARCHAR, state_or_territory VARCHAR)
SELECT MAX(mccain_number) FROM table_name_47 WHERE others_percentage = "1.6%" AND mccain_percentage = "40.5%" AND obama_number < 256 OFFSET 299
What is the highest number of votes for McCain in a county that voted 1.6% for other, 40.5% for McCain, and fewer than 256,299 votes for Obama?
CREATE TABLE table_name_47 (mccain_number INTEGER, obama_number VARCHAR, others_percentage VARCHAR, mccain_percentage VARCHAR)
SELECT "population\n(2011)" FROM table_204_43 WHERE "name" = 'aberdeen'
what is the total population for aberdeen in 2011 ?
CREATE TABLE table_204_43 ( id number, "name" text, "rural\nmunicipality (rm)" text, "population\n(2011)" number, "population\n(2006)" number, "change\n(%)" number, "land\narea\n(km2)" number, "population\ndensity\n(per km2)" number )
SELECT MAX(channel_number) FROM table_27871460_2
What is the highest channel number?
CREATE TABLE table_27871460_2 (channel_number INTEGER)
SELECT round FROM table_name_50 WHERE behinds = 1
What is the Round with 1 Behinds?
CREATE TABLE table_name_50 (round VARCHAR, behinds VARCHAR)
SELECT "Cyrillic Name Other Names" FROM table_3336 WHERE "Settlement" = 'Lazarevo'
Name the cyrillic name for lazarevo
CREATE TABLE table_3336 ( "Settlement" text, "Cyrillic Name Other Names" text, "Type" text, "Population (2011)" real, "Largest ethnic group (2002)" text, "Dominant religion (2002)" text )
SELECT state_or_territory FROM table_27871460_2 WHERE channel_number = 7
Which state or territory had a channel number of exactly 7?
CREATE TABLE table_27871460_2 (state_or_territory VARCHAR, channel_number VARCHAR)
SELECT goals FROM table_name_29 WHERE round = "round 15"
What is the goals for Round 15?
CREATE TABLE table_name_29 (goals VARCHAR, round VARCHAR)
SELECT name FROM table_name_92 WHERE country = "italy" AND giro_wins = 0 AND young_rider = 0 AND maglia_rosa < 3
Who is from italy has 0 giro wins, 0 young rider and less than 3 maglia rosa?
CREATE TABLE table_name_92 ( name VARCHAR, maglia_rosa VARCHAR, young_rider VARCHAR, country VARCHAR, giro_wins VARCHAR )
SELECT date FROM table_27882867_4 WHERE location_attendance = "Omni Coliseum 10,330"
Name the date for omni coliseum 10,330
CREATE TABLE table_27882867_4 (date VARCHAR, location_attendance VARCHAR)
SELECT COUNT(attendance) FROM table_name_44 WHERE date = "31 january 1987"
What was the Attendance on 31 January 1987?
CREATE TABLE table_name_44 (attendance VARCHAR, date VARCHAR)
SELECT Name, COUNT(Name) FROM Products GROUP BY Name ORDER BY Name DESC
What is the number of names for each product in the store?, and sort by the Name in descending.
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
SELECT location_attendance FROM table_27882867_4 WHERE game = 3
Name the location attendance for 3 game
CREATE TABLE table_27882867_4 (location_attendance VARCHAR, game VARCHAR)
SELECT location_attendance FROM table_name_62 WHERE score = "w 89–86 (ot)"
What was the location and attendance with a score of w 89–86 (ot)?
CREATE TABLE table_name_62 (location_attendance VARCHAR, score VARCHAR)
SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE program_course.category LIKE '%ULCS%'
Who are the upper-level class teachers ?
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 gsi ( course_offering_id int, student_id int ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_graduation_semester int, degree varchar, minor varchar, internship varchar ) CREATE TABLE 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 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 requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) 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 area ( course_id int, area varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar )
SELECT location_attendance FROM table_27882867_4 WHERE score = "L 93-105"
Name the location attendance for l 93-105
CREATE TABLE table_27882867_4 (location_attendance VARCHAR, score VARCHAR)