schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text]...
SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN lab ON `<table1>`.hadm_id = lab.hadm_id WHERE `<table1>`.days_stay > "10" AND lab.fluid = "Pleural"
what number of patients with lab test fluid as pleural stayed in the hospital for more than 10 days?
<table0>[VoteTypes] { <col0>[number]:[text] } <table1>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table3>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time...
SELECT 'Aviation SE User Count', COUNT( * ) FROM "stackexchange.aviation".Users AS fu UNION ALL SELECT 'Users of both SO and AviationSE', COUNT( * ) FROM "stackexchange.aviation".Users AS fu JOIN Users AS u ON fu.AccountId = u.AccountId
Site users overlap with SO. Original inspiration: http://data.stackexchange.com/stackoverflow/query/168043/accountid-comparison
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culture...
SELECT 24 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table9>`.`<table9>`resulttime ) ) FROM `<table9>` WHERE `<table9>`.`<table2>`unitstayid IN ( SELECT `<table2>`.`<table2>`unitstayid FROM `<table2>` WHERE `<table2>`.`<table2>`healthsystemstayid IN ( SELECT `<table2>`.`<table2>`healthsystemstayid FROM `...
how many hours have elapsed since the first time patient 030-52327 during their current hospital visit received a lab test for hct?
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[t...
SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN lab ON `<table4>`.hadm_id = lab.hadm_id WHERE `<table4>`.marital_status = "WIDOWED" AND lab.fluid = "Cerebrospinal Fluid ( CSF )"
count the number of patients whose marital status is widowed and lab test fluid is cerebrospinal fluid (csf)?
<table0>[table_11596] { <col0>[Games]:[played] <col1>[real]:[Drawn] <col2>[real]:[Lost] <col3>[real]:[Goals] <col4>[real]:[Goals] <col5>[real]:[Goals] <col6>[difference]:[text] }
SELECT COUNT( "Goals for" ) FROM `<table0>` WHERE "Games played" > '1' AND "Drawn*" > '1' AND "Lost" < '19' AND "Goals against" > '3'
What is the total number of goals that Malaysia scored where they played more than 1 game, had more than 1 draw, lost fewer than 19 games, and had more than 3 goals scored against them?
<table0>[t_kc22] { <col0>[number]:[CHA_ITEM_LEV] <col1>[number]:[DATA_ID] <col2>[text]:[DIRE_TYPE] <col3>[number]:[DOSE_FORM] <col4>[text]:[DOSE_UNIT] <col5>[text]:[EACH_DOSAGE] <col6>[text]:[EXP_OCC_DATE] <col7>[time]:[FLX_MED_ORG_ID] <col8>[text]:[FXBZ] <col9>[number]:[HOSP_DOC_CD] <col10>[text]:[HOSP_DOC_NM] <col11>...
SELECT SUM( t_kc22.AMOUNT ) FROM `<table3>` JOIN t_kc22 JOIN `<table3>`_t_kc22 ON `<table3>`.MED_CLINIC_ID = `<table3>`_t_kc22.MED_CLINIC_ID AND `<table3>`_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE `<table3>`.PERSON_ID = '92950798' AND `<table3>`.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2017-02-25' AND...
从2017年2月25日到2017年11月19日内参保人92950798门诊西药费一共是多少?
<table0>[management] { <col0>[department_ID]:[int] <col1>[head_ID]:[int] <col2>[temporary_acting]:[text] } <table1>[head] { <col0>[head_ID]:[int] <col1>[name]:[text] <col2>[born_state]:[text] <col3>[age]:[real] } <table2>[department] { <col0>[Department_ID]:[int] <col1>[text]:[Creation] <col2>[text]:[Ranking] <col3>[...
SELECT Creation, AVG( Budget_in_Billions ) FROM `<table2>` GROUP BY Creation ORDER BY Creation DESC
Show average of budget in different year and group by department creation time with a line chart, and I want to sort in desc by the Creation.
<table0>[table_203_390] { <col0>[number]:[year] <col1>[number]:[venue] <col2>[text]:[winners] <col3>[text]:[runner] <col4>[text]:[3rd] <col5>[place]:[text] }
SELECT "winners" FROM `<table0>` GROUP BY "winners" ORDER BY COUNT( * ) DESC LIMIT 1
from 2005-2012 , in the team speedway junior world championship , how many more first place wins than all other teams put together ?
<table0>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoticeTypeId] <col2>[number]:[CreationDate] <col3>[time]:[DeletionDate] <col4>[time]:[ExpiryDate] <col5>[time]:[Body] <col6>[text]:[OwnerUserId] <col7>[number]:[DeletionUserId] } <table1>[PostTypes] { <col0>[number]:[text] } <table2>[PostTags] { <col...
SELECT u.Id AS "user_link", u.Reputation FROM `<table11>` AS u WHERE u.Id NOT IN ( SELECT b.UserId FROM `<table10>` AS b INNER JOIN Tags AS t ON t.TagName = b.Name GROUP BY b.UserId, t.Id HAVING COUNT( * ) = 3 ) ORDER BY u.Reputation DESC
Maxium reputation without a gold badge.
<table0>[exists] { <col0>[smart_city_projects]:[project_id] <col1>[INT]:[PRIMARY] <col2>[KEY]:[project_name] <col3>[VARCHAR]:[255] <col4>[start_date]:[DATE] <col5>[end_date]:[DATE] <col6>[INSERT]:[smart_city_projects] <col7>[project_id]:[project_name] <col8>[start_date]:[end_date] <col9>[VALUES]:[Smart] <col10>[Traffic...
SELECT scp.project_id, scp.project_name, scp.start_date, scp.end_date FROM smart_city_projects scp JOIN carbon_offset_projects cop ON scp.start_date <= cop.end_date AND scp.end_date >= cop.start_date;
What are the smart city projects and their details that overlap with any carbon offset project in terms of start and end dates?
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>...
SELECT `<table0>`.expire_flag FROM `<table0>` WHERE `<table0>`.subject_id = "3343"
what is the death status of subject id 3343?
<table0>[table_204_490] { <col0>[number]:[position] <col1>[text]:[name] <col2>[text]:[height] <col3>[text]:[weight] <col4>[text]:[birthdate] <col5>[text]:[birthplace] <col6>[text]:[2009] <col7>[team]:[text] }
SELECT COUNT( "name" ) FROM `<table0>`
how many total of names are listed ?
<table0>[vessels] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[255] <col3>[type]:[VARCHAR] <col4>[255]:[year] }
INSERT INTO vessels ( id, name, type, year ) VALUES ( 1, 'MV Horizon', 'Container Ship', 2010 );
Insert a new vessel into the "vessels" table
<table0>[keyphrase] { <col0>[keyphraseid]:[int] <col1>[keyphrasename]:[varchar] } <table1>[field] { <col0>[fieldid]:[int] } <table2>[author] { <col0>[authorid]:[int] <col1>[authorname]:[varchar] } <table3>[paperkeyphrase] { <col0>[paperid]:[int] <col1>[keyphraseid]:[int] } <table4>[paper] { <col0>[paperid]:[int] <c...
SELECT DISTINCT COUNT( paper.paperid ) FROM paper, venue WHERE paper.year = 2016 AND venue.venueid = paper.venueid AND venue.venuename = 'sigmod'
How many papers were accepted at sigmod 2016 ?
<table0>[management] { <col0>[department_ID]:[int] <col1>[head_ID]:[int] <col2>[temporary_acting]:[text] } <table1>[department] { <col0>[Department_ID]:[int] <col1>[text]:[Creation] <col2>[text]:[Ranking] <col3>[int]:[Budget_in_Billions] <col4>[real]:[Num_Employees] } <table2>[head] { <col0>[head_ID]:[int] <col1>[nam...
SELECT Creation, SUM( Budget_in_Billions ) FROM `<table1>` ORDER BY Creation DESC
Show sum of budget in each year and bin creation time by year in a line chart, rank by the X from high to low.
<table0>[table_name_7] { <col0>[pick]:[INTEGER] <col1>[round]:[VARCHAR] <col2>[player]:[VARCHAR] }
SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 6 AND `<col2>` = "kenneth green"
What is the average Pick when the round was less than 6 for kenneth green?
<table0>[table_name_72] { <col0>[avg_g]:[VARCHAR] <col1>[yards]:[VARCHAR] <col2>[long]:[VARCHAR] <col3>[gp_gs]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col2>` = 50 AND `<col3>` = "3-0" AND `<col1>` > 926
What is the total number of avg/g with a long of 50, a gp-gs of 3-0, and 926 yards?
<table0>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>[number]:[PostId] <col2>[number]:[RevisionGUID] <col3>[CreationDate]:[time] <col4>[UserId]:[number] <col5>[UserDisplayName]:[text] <col6>[Comment]:[text] <col7>[Text]:[text] <col8>[ContentLicense]:[text] } <table1>[Tags] { <col0>[number]:[TagName] <col1>...
SELECT COUNT( Id ) AS c, AVG( UpVotes ), AVG( DownVotes ), Location FROM `<table8>` WHERE Reputation > 14 GROUP BY Location ORDER BY c DESC
Average upvotes and downvotes, number of 'active' users by location. Any user who has more than 14 reputation is considered 'active
<table0>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table1>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmentt...
SELECT t3.`<table8>`name FROM ( SELECT t2.`<table8>`name, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT patient.uniquepid, `<table1>`.`<table1>`time FROM `<table1>` JOIN patient ON `<table1>`.patientunitstayid = patient.patientunitstayid WHERE `<table1>`.`<table1>`name = 'oral hypoglycemic adminis...
what are the five most frequently given laboratory tests for patients who have previously received oral hypoglycemic administration within 2 months until 1 year ago?
<table0>[election] { <col0>[Election_ID]:[int] <col1>[Counties_Represented]:[text] <col2>[District]:[int] <col3>[Delegate]:[text] <col4>[Party]:[int] <col5>[First_Elected]:[real] <col6>[Committee]:[text] } <table1>[county] { <col0>[County_Id]:[int] <col1>[County_name]:[text] <col2>[Population]:[real] <col3>[Zip_code]:...
SELECT Comptroller, COUNT( Comptroller ) FROM `<table0>` AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2 GROUP BY Comptroller
Who were the comptrollers of the parties associated with the delegates from district 1 or district 2, and count them by a bar chart
<table0>[CREATE] { <col0>[SCHEMA]:[exists] <col1>[startups]:[USE] } <table1>[exists] { <col0>[budgets]:[INT] <col1>[startup_id]:[INT] <col2>[budget]:[DECIMAL] <col3>[INSERT]:[budgets] <col4>[startup_id]:[budget] <col5>[VALUES]:[20000000] <col6>[15000000]:[12000000] }
SELECT MAX( budget ) FROM startups.budgets WHERE startup_id IN ( SELECT id FROM startups.startups WHERE country = 'USA' );
What is the maximum budget for a biotech startup in the USA?
<table0>[Has_Allergy] { <col0>[stuid]:[VARCHAR] <col1>[Allergy]:[VARCHAR] } <table1>[Student] { <col0>[fname]:[VARCHAR] <col1>[city_code]:[VARCHAR] <col2>[stuid]:[VARCHAR] }
SELECT DISTINCT T1.fname, T1.city_code FROM `<table1>` AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = "Milk" OR T2.Allergy = "Cat"
Find the different first names and cities of the students who have allergy to milk or cat.
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>...
SELECT `<table0>`.admission_location FROM `<table0>` WHERE `<table0>`.subject_id = "3343"
what is the admission location of subject id 3343?
<table0>[student] { <col0>[stuid]:[number] <col1>[lname]:[text] <col2>[fname]:[text] <col3>[age]:[number] <col4>[sex]:[text] <col5>[major]:[number] <col6>[advisor]:[number] <col7>[city_code]:[text] } <table1>[allergy_type] { <col0>[allergy]:[text] <col1>[allergytype]:[text] } <table2>[has_allergy] { <col0>[stuid]:[nu...
SELECT `<col1>` FROM `<table1>` GROUP BY `<col1>` ORDER BY COUNT( * ) LIMIT 1
Which allergy type has least number of allergies?
<table0>[Artists] { <col0>[ArtistID]:[INT] <col1>[PRIMARY]:[KEY] <col2>[VARCHAR]:[255] <col3>[Nationality]:[VARCHAR] } <table1>[Artworks] { <col0>[ArtworkID]:[INT] <col1>[PRIMARY]:[KEY] <col2>[Title]:[VARCHAR] <col3>[255]:[ArtistID] <col4>[INT]:[Year] <col5>[INT]:[SalePrice] } <table2>[Sales] { <col0>[SaleID]:[INT] <...
SELECT AVG( Artworks.SalePrice ) AS AverageSalePrice FROM `<table0>` INNER JOIN Artworks ON `<table0>`.ArtistID = Artworks.ArtistID INNER JOIN Sales ON Artworks.ArtworkID = Sales.ArtworkID WHERE `<table0>`.Nationality = 'African';
What is the average sale price of artworks by African artists?
<table0>[HealthcareProviders] { <col0>[INT]:[TEXT] <col1>[Location]:[TEXT] <col2>[Specialty]:[TEXT] }
SELECT COUNT( * ) FROM `<table0>` WHERE `<col1>` LIKE 'City%';
What is the total number of healthcare providers in urban areas?
<table0>[table_name_71] { <col0>[seasons]:[VARCHAR] <col1>[coach]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "john mcfadden"
How many seasons has John Mcfadden coached?
<table0>[table_name_40] { <col0>[district]:[VARCHAR] <col1>[place_of_birth]:[VARCHAR] <col2>[delegate]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "baltimore city" AND `<col2>` = "cheryl glenn"
How many districts in Baltimore City does Cheryl Glenn dictate?
<table0>[WorkplaceSafety] { <col0>[INT]:[month] <col1>[VARCHAR]:[incidents] <col2>[INT]:[INSERT] }
SELECT month, COUNT( * ) as incidents FROM `<table0>` GROUP BY month;
List the number of workplace safety incidents for each month in the 'WorkplaceSafety' table
<table0>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table1>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] } <table2>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[Accep...
SELECT TIME_TO_STR( `<table2>`.CreationDate, '%Y' ) AS Year, TIME_TO_STR( `<table2>`.CreationDate, '%m' ) AS Month, SUM( Score ) AS SUM_SCORE, COUNT( * ) AS COUNT_SCORE, AVG( CAST( Score AS FLOAT( 12, 2 ) ) ) AS AVG_SCORE, SUM( CASE WHEN PostTypeId < 3 THEN 1 ELSE 0 END ) AS QnA FROM `<table2>` WHERE PostTypeId < 3 GRO...
Average Score for Questions and Answers by Month Since 2008.
<table0>[investment_portfolios] { <col0>[portfolio_id]:[INT] <col1>[client_id]:[INT] <col2>[portfolio_date]:[DATE] <col3>[region]:[VARCHAR] }
SELECT region, COUNT( * ) as num_portfolios FROM `<table0>` WHERE `<col2>` >= '2021-01-01' AND `<col2>` < '2021-04-01' GROUP BY region;
How many investment portfolios were opened in Q1 2021, by region?
<table0>[Satisfaction] { <col0>[Quarter]:[VARCHAR] <col1>[Category]:[VARCHAR] <col2>[Score]:[INT] }
SELECT AVG( `<col2>` ) FROM `<table0>` WHERE `<col0>` = 'Q1 2020' AND `<col1>` = 'Public Transportation';
What was the average citizen satisfaction score for public transportation in Q1 2020?
<table0>[city] { <col0>[City_ID]:[int] <col1>[Official_Name]:[text] <col2>[Status]:[text] <col3>[Area_km_2]:[real] <col4>[Population]:[real] <col5>[Census_Ranking]:[text] } <table1>[farm_competition] { <col0>[Competition_ID]:[int] <col1>[Year]:[int] <col2>[Theme]:[text] <col3>[Host_city_ID]:[int] <col4>[Hosts]:[text] ...
SELECT Official_Name, COUNT( `<col1>` ) FROM `<table0>` AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_`<table0>`_ID GROUP BY `<col1>` ORDER BY COUNT( `<col1>` )
Show the number of competitions held in each city with a bar chart, and I want to list by the how many official name in asc.
<table0>[table_204_741] { <col0>[number]:[rank] <col1>[number]:[name] <col2>[text]:[nationality] <col3>[text]:[text] <col4>[text]:[text] <col5>[text]:[notes] }
SELECT "rank" FROM `<table0>` WHERE "rank" IN ( 11, 6 ) GROUP BY "rank" ORDER BY COUNT( "name" ) DESC LIMIT 1
were there more names ranked 11th or 6th ?
<table0>[table_name_7] { <col0>[a_league]:[VARCHAR] <col1>[saves]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 39
What is the A-league with 39 saves?
<table0>[CUSTOMER_INTERESTS] { <col0>[city]:[VARCHAR] <col1>[interest]:[VARCHAR] }
SELECT ( COUNT( * ) * 100.0 / ( SELECT COUNT( * ) FROM `<table0>` WHERE `<col0>` = 'Seoul' ) ) FROM `<table0>` WHERE `<col0>` = 'Seoul' AND `<col1>` = 'Sustainable Fashion';
What percentage of customers in Seoul are interested in sustainable fashion?
<table0>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] } <table1>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] }
SELECT Name, `<col0>` FROM `<table0>` WHERE `<col2>` BETWEEN 60 AND 120 ORDER BY `<col0>`
For those products with a price between 60 and 120, return a bar chart about the distribution of name and code , I want to sort from low to high by the Y.
<table0>[table_13619135_5] { <col0>[location_attendance]:[VARCHAR] <col1>[team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Portland"
What was the location and attendance of the game against Portland?
<table0>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[first_careunit]:[text] <col5>[last_careunit]:[text] <col6>[first_wardid]:[number] <col7>[last_wardid]:[number] <col8>[intime]:[time] <col9>[outtime]:[time] } <table1>[d_labitems] { <col0...
SELECT `<table16>`.short_title FROM `<table16>` WHERE `<table16>`.icd9_code IN ( SELECT t1.icd9_code FROM ( SELECT `<table12>`.icd9_code, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table12>` WHERE `<table12>`.hadm_id IN ( SELECT `<table5>`.hadm_id FROM `<table5>` WHERE `<table5>`.age BETWEEN 20 AND 29...
what is the five most common procedure given to patients with age 20s the last year?
<table0>[City] { <col0>[integer]:[text] <col1>[CountryCode]:[text] <col2>[District]:[text] <col3>[Population]:[integer] } <table1>[Country] { <col0>[Code]:[text] <col1>[text]:[Continent] <col2>[text]:[Region] <col3>[text]:[SurfaceArea] <col4>[real]:[IndepYear] <col5>[integer]:[Population] <col6>[integer]:[LifeExpectan...
SELECT T1.Language FROM `<table2>` AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.HeadOfState = 'Pierre Buyoya'
Provide the language used in the country ruled by Pierre Buyoya.
<table0>[developers] { <col0>[INT]:[name] <col1>[VARCHAR]:[salary] <col2>[FLOAT]:[project] }
INSERT INTO developers ( id, name, salary, project ) VALUES ( 3, 'Charlie', 90000.0, 'Technology Accessibility' );
Insert a new record for a developer who works on a technology accessibility project
<table0>[table_name_71] { <col0>[area]:[VARCHAR] <col1>[name]:[VARCHAR] <col2>[years]:[VARCHAR] <col3>[decile]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "1–8" AND `<col3>` < 7 AND `<col1>` = "waikari school"
Which area has Years of 1–8, a Decile smaller than 7, and a Name of waikari school?
<table0>[fare_basis] { <col0>[fare_basis_code]:[text] <col1>[booking_class]:[text] <col2>[class_type]:[text] <col3>[premium]:[text] <col4>[economy]:[text] <col5>[discounted]:[text] <col6>[night]:[text] <col7>[season]:[text] <col8>[basis_days]:[text] } <table1>[flight_leg] { <col0>[flight_id]:[int] <col1>[leg_number]:[...
SELECT DISTINCT flight.flight_id FROM `<table16>` AS AIRPORT_SERVICE_0, `<table16>` 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 = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND flight.from_airport = AIRPORT_SE...
show departures from ATLANTA for AA
<table0>[SpaceMissions] { <col0>[INT]:[mission] <col1>[VARCHAR]:[year] <col2>[INT]:[country] <col3>[VARCHAR]:[INSERT] }
SELECT country, COUNT( * ) AS num_missions FROM `<table0>` GROUP BY country;
What is the total number of space missions conducted by each country in the SpaceMissions table?
<table0>[table_69097] { <col0>[Outcome]:[text] <col1>[Date]:[text] <col2>[Surface]:[text] <col3>[Partnering]:[text] <col4>[Opponents]:[final] <col5>[text]:[Score] }
SELECT "Outcome" FROM `<table0>` WHERE "Date" = 'may 25, 2009'
What was the outcome on May 25, 2009?
<table0>[workshop] { <col0>[Workshop_ID]:[int] <col1>[Date]:[text] <col2>[Venue]:[text] } <table1>[submission] { <col0>[Submission_ID]:[int] <col1>[Scores]:[real] <col2>[Author]:[text] <col3>[College]:[text] } <table2>[Acceptance] { <col0>[Submission_ID]:[int] <col1>[Workshop_ID]:[int] <col2>[Result]:[text] }
SELECT Venue, COUNT( `<col2>` ) FROM `<table0>` GROUP BY `<col2>` ORDER BY `<col2>` DESC
Show the number of venue from each venue, display by the X in desc please.
<table0>[table_2102782_1] { <col0>[archive]:[VARCHAR] <col1>[run_time]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "23:55"
Name the archive for run time of 23:55
<table0>[table_611] { <col0>[Model]:[number] <col1>[text]:[Printer] <col2>[ports]:[text] <col3>[Network]:[ports] <col4>[text]:[Network] <col5>[protocols]:[text] <col6>[Firmware]:[text] <col7>[Notes]:[text] }
SELECT "Printer ports" FROM `<table0>` WHERE "Model number" = 'EX Plus3'
What is the type of the printer ports included in the EX Plus3 model number?
<table0>[table_27057] { <col0>[Branding]:[text] <col1>[Callsign]:[text] <col2>[text]:[Power] <col3>[text]:[Station] <col4>[Type]:[text] <col5>[Location]:[Transmitter] <col6>[site]:[text] }
SELECT "Power kW" FROM `<table0>` WHERE "Station Type" = 'Relay' AND "Callsign" = 'DXCL-TV'
What is the power in KW that has a station type of relay and a callsign of DXCL-TV?
<table0>[table_2182562_2] { <col0>[top_5]:[INTEGER] <col1>[avg_finish]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "8.2"
What was the top 5 in the year with an average finish of 8.2?
<table0>[employee_demographics] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[age] <col2>[INT]:[ethnicity] <col3>[VARCHAR]:[255] <col4>[gender]:[VARCHAR] <col5>[255]:[job_title] <col6>[VARCHAR]:[255] }
SELECT DISTINCT job_title FROM employee_demographics;
List all unique job titles in the employee_demographics table
<table0>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table1>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table2>[regions] { <col0>[REGION_ID]:[deci...
SELECT FIRST_NAME, `<col10>` FROM `<table5>` ORDER BY `<col10>`
You can return a bar chart to show the employees' first name and the corresponding department's id, show in asc by the y-axis.
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[tim...
SELECT `<table6>`.hospitaladmittime FROM `<table6>` WHERE `<table6>`.uniquepid = '003-39001' AND DATETIME( `<table6>`.hospitaladmittime ) >= DATETIME( CURRENT_TIME( ), '-3 year' )
what were the hospital hospital admission times of patient 003-39001 since 3 years ago?
<table0>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table1>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table2>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table3>[ca...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND course.department = 'PHYSIOL' AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'Fal...
During this Fall , which upper-level PHYSIOL classes are being offered ?
<table0>[table_name_2] { <col0>[margin_of_victory]:[VARCHAR] <col1>[winning_score]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = −14( 63 - 67 - 73 - 67 = 270 )
What was the margin of victory when the winning score was −14 (63-67-73-67=270)?
<table0>[table_50020] { <col0>[Place]:[text] <col1>[Player]:[text] <col2>[Country]:[text] <col3>[Score]:[text] <col4>[par]:[text] }
SELECT "To par" FROM `<table0>` WHERE "Country" = 'united states' AND "Place" = 't1' AND "Score" = '76-68=144'
What is the to par of the player from the United States with a place of t1 and a 76-68=144 score?
<table0>[table_name_55] { <col0>[platform]:[VARCHAR] <col1>[current_version]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "0.6.2"
What Platform has a Current Version 0.6.2?
<table0>[SuggestedEdits] { <col0>[number]:[PostId] <col1>[number]:[CreationDate] <col2>[time]:[ApprovalDate] <col3>[time]:[RejectionDate] <col4>[time]:[OwnerUserId] <col5>[number]:[Comment] <col6>[text]:[Text] <col7>[text]:[Title] <col8>[text]:[Tags] <col9>[text]:[RevisionGUID] } <table1>[PostFeedback] { <col0>[number...
SELECT Count, ( 'site://tags/' + TagName + '|' + TagName ) AS TagName, ExcerptPostId AS "post_link", WikiPostId AS "post_link" FROM `<table22>` AS t LEFT JOIN Posts AS pe ON pe.Id = t.ExcerptPostId LEFT JOIN Posts AS pw ON pw.Id = t.WikiPostId WHERE ExcerptPostId IS NULL OR LENGTH( pe.Body ) = 0 ORDER BY Count DESC
Lists the most commonly used tags with empty/missing tag wiki excerpt.. Lists the most commonly used tags with empty/missing tag wiki excerpt.
<table0>[table_63603] { <col0>[Medal]:[count] <col1>[real]:[Date] <col2>[text]:[Athlete] <col3>[text]:[Nation] <col4>[text]:[Sport] <col5>[text]:[Record] <col6>[medal]:[event] }
SELECT "Sport" FROM `<table0>` WHERE "Medal count" = '17'
Which sport has 17 as the medal count?
<table0>[table_name_38] { <col0>[date]:[VARCHAR] <col1>[away_team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "footscray"
When was the game when Footscray was the away team?
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[lab] {...
SELECT MIN( `<table3>`.age ) FROM `<table3>` WHERE `<table3>`.marital_status = "WIDOWED" AND `<table3>`.days_stay = "30"
what is minimum age of patients whose marital status is widowed and days of hospital stay is 30?
<table0>[flight_stop] { <col0>[flight_id]:[int] <col1>[stop_number]:[int] <col2>[stop_days]:[text] <col3>[stop_airport]:[text] <col4>[arrival_time]:[int] <col5>[arrival_airline]:[text] <col6>[arrival_flight_number]:[int] <col7>[departure_time]:[int] <col8>[departure_airline]:[text] <col9>[departure_flight_number]:[int]...
SELECT DISTINCT COUNT( * ), flight.airline_code FROM airport_service, city, flight WHERE city.city_code = airport_service.city_code AND city.city_name = 'ATLANTA' AND flight.from_airport = airport_service.airport_code GROUP BY flight.airline_code
please tell me which airline has the most departures from ATLANTA
<table0>[climate_communication] { <col0>[project]:[VARCHAR] <col1>[country]:[VARCHAR] <col2>[roi]:[FLOAT] <col3>[date]:[DATE] }
DELETE FROM `<table0>` WHERE `<col2>` < 0;
Delete all climate communication projects with a negative ROI.
<table0>[ClinicalTrials] { <col0>[trial_id]:[INT] <col1>[drug_name]:[VARCHAR] <col2>[255]:[trial_status] <col3>[VARCHAR]:[255] }
SELECT drug_name, COUNT( * ) as failure_count FROM `<table0>` WHERE trial_status = 'Failed' GROUP BY drug_name;
Which drugs were tested in clinical trials and failed, grouped by the number of failures?
<table0>[student_record] { <col0>[student_id]:[int] <col1>[course_id]:[int] <col2>[semester]:[int] <col3>[grade]:[varchar] <col4>[varchar]:[transfer_source] <col5>[varchar]:[earn_credit] <col6>[varchar]:[repeat_term] <col7>[varchar]:[test_id] } <table1>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1...
SELECT COUNT( * ) > 0 FROM course, course_offering, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'DHYGRACK' AND course.number = 682 AND offering_instructor.offering_id = course_offering.offering_id AND semester.semester = 'WN' AND semester.semester_id = course...
Can I take the course DHYGRACK 682 right now ?
<table0>[table_79227] { <col0>[Place]:[real] <col1>[Team]:[text] <col2>[Played]:[real] <col3>[Draw]:[real] <col4>[Lost]:[real] <col5>[Goals]:[Scored] <col6>[real]:[Goals] <col7>[Conceded]:[real] <col8>[Points]:[real] }
SELECT SUM( "Goals Conceded" ) FROM `<table0>` WHERE "Draw" > '5' AND "Points" > '21' AND "Played" < '18'
How many goals were conceded by the team with more than 21 points more than 5 draws and less than 18 games played?
<table0>[CREATE] { <col0>[SCHEMA]:[exists] <col1>[biosensors]:[USE] } <table1>[exists] { <col0>[patents]:[INT] <col1>[name]:[VARCHAR] <col2>[255]:[company] <col3>[VARCHAR]:[255] <col4>[country]:[VARCHAR] <col5>[255]:[INSERT] <col6>[patents]:[name] <col7>[company]:[country] <col8>[VALUES]:[PatentA] <col9>[Company1]:[Pa...
SELECT * FROM biosensors.patents WHERE country IN ( 'US', 'CA' );
List all biosensor technology patents that were filed by companies from the US or Canada.
<table0>[table_name_67] { <col0>[opponent]:[VARCHAR] <col1>[high_rebounds]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "pierson ( 6 )"
What is Opponent, when High Rebounds is "Pierson (6)"?
<table0>[restaurants] { <col0>[INT]:[name] <col1>[TEXT]:[location] <col2>[TEXT]:[safety_score] <col3>[INT]:[INSERT] }
SELECT AVG( safety_score ) FROM `<table0>` WHERE location = 'Texas';
What is the average food safety score of restaurants in Texas?
<table0>[match_season] { <col0>[Country]:[VARCHAR] } <table1>[country] { <col0>[Country_name]:[VARCHAR] <col1>[Country_id]:[VARCHAR] }
SELECT Country_name, COUNT( * ) FROM `<table1>` AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name
Show the country names and the corresponding number of players.
<table0>[incidents_germany] { <col0>[INT]:[report_date] <col1>[DATE]:[industry] <col2>[TEXT]:[incident_count] <col3>[INT]:[INSERT] }
SELECT industry, AVG( incident_count ) as avg_incidents FROM `<table0>` WHERE report_date >= DATE_TRUNC( 'quarter', NOW( ) - INTERVAL '1 quarter' ) GROUP BY industry ORDER BY avg_incidents DESC LIMIT 1;
Which industries in Germany have the highest workplace safety incident rate in the last quarter?
<table0>[mobile_subscribers] { <col0>[subscriber_id]:[INT] <col1>[first_name]:[VARCHAR] <col2>[last_name]:[VARCHAR] <col3>[billing_address]:[VARCHAR] <col4>[100]:[last_updated_date] }
SELECT subscriber_id, first_name, last_name, `<col3>` FROM `<table0>` WHERE last_updated_date < DATE_SUB( CURRENT_DATE, INTERVAL 6 MONTH );
Which mobile subscribers have not updated their billing address in the last 6 months?
<table0>[table_15856] { <col0>[Player]:[text] <col1>[text]:[Nationality] <col2>[text]:[Position] <col3>[text]:[Years] <col4>[Toronto]:[text] <col5>[School]:[Club] <col6>[Team]:[text] }
SELECT "Position" FROM `<table0>` WHERE "School/Club Team" = 'Baylor'
What position did the player from Baylor play?
<table0>[table_name_11] { <col0>[result]:[VARCHAR] <col1>[opponent]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "igor samoilenco"
Opponent of igor samoilenco had what result?
<table0>[table_name_9] { <col0>[class]:[VARCHAR] <col1>[year]:[VARCHAR] <col2>[road_number]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 1939 AND `<col2>` < 3508
Which class starts after 1939 and has a road number smaller than 3508?
<table0>[domain_publication] { <col0>[int]:[pid] } <table1>[author] { <col0>[aid]:[int] <col1>[homepage]:[varchar] <col2>[name]:[varchar] <col3>[oid]:[int] } <table2>[organization] { <col0>[continent]:[varchar] <col1>[homepage]:[varchar] <col2>[name]:[varchar] <col3>[oid]:[int] } <table3>[domain_conference] { <col0>...
SELECT COUNT( DISTINCT ( publication.title ) ) FROM journal, publication WHERE journal.name = 'PVLDB' AND publication.jid = journal.jid
return me the number of papers on PVLDB .
<table0>[Property] { <col0>[INT]:[property_type] <col1>[VARCHAR]:[affordability_score] <col2>[INT]:[city] <col3>[VARCHAR]:[INSERT] }
SELECT `<table0>`.property_type, MAX( `<table0>`.affordability_score ) AS max_affordability_score, MIN( `<table0>`.affordability_score ) AS min_affordability_score FROM `<table0>` WHERE `<table0>`.city = 'InclusiveCity' GROUP BY `<table0>`.property_type;
What is the maximum and minimum housing affordability score for properties in the "InclusiveCity" schema, grouped by property type?
<table0>[paper] { <col0>[paperid]:[int] <col1>[title]:[varchar] <col2>[venueid]:[int] <col3>[year]:[int] <col4>[numciting]:[int] <col5>[numcitedby]:[int] <col6>[journalid]:[int] } <table1>[paperdataset] { <col0>[paperid]:[int] <col1>[datasetid]:[int] } <table2>[cite] { <col0>[citingpaperid]:[int] <col1>[citedpaperid]...
SELECT DISTINCT keyphrase.keyphrasename, paper.year FROM author, keyphrase, paper, paperkeyphrase, writes WHERE author.authorname = 'michael jordan' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid ...
recent research interests of michael jordan
<table0>[table_name_42] { <col0>[to_par]:[VARCHAR] <col1>[country]:[VARCHAR] <col2>[player]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "united states" AND `<col2>` = "dave stockton"
which To par has a Country of united states, and a Player of dave stockton?
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug...
SELECT MAX( `<table4>`.age ) FROM `<table4>` WHERE `<table4>`.marital_status = "WIDOWED" AND `<table4>`.admission_type = "EMERGENCY"
what is the maximum age of patients whose marital status is widowed and admission type is emergency?
<table0>[ocean_acidity] { <col0>[ocean]:[VARCHAR] <col1>[255]:[location] <col2>[VARCHAR]:[255] <col3>[acidity]:[FLOAT] }
SELECT MAX( `<col3>` ) FROM `<table0>` WHERE `<col0>` = 'Arctic';
What is the maximum ocean acidity level in the Arctic Ocean?
<table0>[table_75283] { <col0>[Date]:[text] <col1>[Visitor]:[text] <col2>[Score]:[text] <col3>[Home]:[text] <col4>[Record]:[text] }
SELECT "Record" FROM `<table0>` WHERE "Home" = 'edmonton oilers' AND "Score" = '3–6'
Which Record has a Home of edmonton oilers, and a Score of 3 6?
<table0>[Employees] { <col0>[INT]:[name] <col1>[VARCHAR]:[position] <col2>[VARCHAR]:[left_company] }
UPDATE Employees SET position = 'Senior Software Engineer' WHERE name = 'Juan Garcia';
Update the position of an employee in the Employees table
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] ...
SELECT COUNT( * ) > 0 FROM `<table8>` WHERE `<table8>`.`<table1>`unitstayid IN ( SELECT `<table1>`.`<table1>`unitstayid FROM `<table1>` WHERE `<table1>`.`<table1>`healthsystemstayid IN ( SELECT `<table1>`.`<table1>`healthsystemstayid FROM `<table1>` WHERE `<table1>`.uniquepid = '021-148847' ) ) AND `<table8>`.sao2 BETW...
sao2 of patient 021-148847 has been normal since 04/2105?
<table0>[captain] { <col0>[Captain_ID]:[int] <col1>[text]:[Ship_ID] <col2>[int]:[age] <col3>[text]:[Class] <col4>[text]:[Rank] } <table1>[Ship] { <col0>[Ship_ID]:[int] <col1>[text]:[Type] <col2>[text]:[Built_Year] <col3>[real]:[Class] <col4>[text]:[Flag] }
SELECT Flag, COUNT( * ) FROM `<table1>` GROUP BY Flag ORDER BY Flag
What are the different ship flags, and how many ships have each Plot them as bar chart, and could you display bar from low to high order?
<table0>[course_tags_count] { <col0>[course_id]:[int] <col1>[clear_grading]:[int] <col2>[pop_quiz]:[int] <col3>[group_projects]:[int] <col4>[inspirational]:[int] <col5>[long_lectures]:[int] <col6>[extra_credit]:[int] <col7>[few_tests]:[int] <col8>[good_feedback]:[int] <col9>[tough_tests]:[int] <col10>[heavy_papers]:[in...
SELECT DISTINCT `<table14>`.department, `<table14>`.name, `<table14>`.number FROM `<table14>` INNER JOIN student_record ON student_record.`<table14>`_id = `<table14>`.`<table14>`_id INNER JOIN area ON student_record.`<table14>`_id = area.`<table14>`_id WHERE area.area LIKE '%human computer interaction%' AND student_rec...
Do any of my courses relate to human computer interaction ?
<table0>[t_kc21] { <col0>[MED_CLINIC_ID]:[text] <col1>[OVERALL_CD_ORG]:[text] <col2>[OVERALL_CD_PERSON]:[text] <col3>[COMP_ID]:[text] <col4>[PERSON_ID]:[text] <col5>[PERSON_NM]:[text] <col6>[IDENTITY_CARD]:[text] <col7>[SOC_SRT_CARD]:[text] <col8>[PERSON_SEX]:[number] <col9>[PERSON_AGE]:[number] <col10>[IN_HOSP_DATE]:[...
SELECT HOSP_DOC_CD, HOSP_DOC_NM FROM `<table2>` WHERE `<col3>` = '56812320084'
病人98965172在医疗就诊56812320084中的医疗项目由哪些医师开的,这些医师的编号和姓名查看一下
<table0>[Exploration] { <col0>[ExplorationID]:[VARCHAR] <col1>[Location]:[VARCHAR] <col2>[StartDate]:[DATE] <col3>[EndDate]:[DATE] }
UPDATE Exploration SET EndDate = '2022-12-31' WHERE Location = 'South China Sea';
Update 'Exploration' table and set 'EndDate' to '2022-12-31' for records where 'Location' is 'South China Sea'
<table0>[table_name_54] { <col0>[player]:[VARCHAR] <col1>[to_par]:[VARCHAR] <col2>[score]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "+3" AND `<col2>` = 72 - 68 - 71 - 72 = 283
Who is the player with a +3 to par and a 72-68-71-72=283 score?
<table0>[table_57469] { <col0>[Election]:[text] <col1>[1st]:[Member] <col2>[text]:[1st] <col3>[Party]:[text] <col4>[2nd]:[Member] <col5>[text]:[2nd] <col6>[Party]:[text] <col7>[3rd]:[Member] <col8>[text]:[3rd] <col9>[Party]:[text] }
SELECT "1st Party" FROM `<table0>` WHERE "2nd Party" = 'independent'
What was the 1st Party when the 2nd Party was Independent?
<table0>[table_27914606_1] { <col0>[written_by]:[VARCHAR] <col1>[us_viewers__millions]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE us_viewers__millions_ = "5.56"
who were the writers of the episode that had 5.56 millions of north american viewers?
<table0>[visitors] { <col0>[visitor_id]:[INT] <col1>[exhibition_id]:[INT] <col2>[age]:[INT] <col3>[gender]:[VARCHAR] }
SELECT AVG( `<col2>` ) FROM `<table0>` WHERE `<col1>` = 1;
What was the average age of visitors who attended Exhibit A?
<table0>[city] { <col0>[city_code]:[varchar] <col1>[city_name]:[varchar] <col2>[state_code]:[varchar] <col3>[country_name]:[varchar] <col4>[time_zone_code]:[varchar] } <table1>[food_service] { <col0>[meal_code]:[text] <col1>[meal_number]:[int] <col2>[compartment]:[text] <col3>[meal_description]:[varchar] } <table2>[f...
SELECT DISTINCT fare.fare_id FROM `<table18>` AS AIRPORT_SERVICE_0, `<table18>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, fare_basis, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PHILADELPHIA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CI...
what 's the cost of a FIRST class fare from PHILADELPHIA to SAN FRANCISCO
<table0>[food_service] { <col0>[meal_code]:[text] <col1>[meal_number]:[int] <col2>[compartment]:[text] <col3>[meal_description]:[varchar] } <table1>[aircraft] { <col0>[aircraft_code]:[varchar] <col1>[aircraft_description]:[varchar] <col2>[manufacturer]:[varchar] <col3>[basic_type]:[varchar] <col4>[engines]:[int] <col5...
SELECT DISTINCT flight.flight_id FROM `<table12>` AS AIRPORT_SERVICE_0, `<table12>` 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' A...
show flights between BOSTON and PHILADELPHIA
<table0>[table_13187] { <col0>[Date]:[text] <col1>[Ship]:[text] <col2>[Tonnage]:[text] <col3>[Nationality]:[text] <col4>[Fate]:[text] }
SELECT "Fate" FROM `<table0>` WHERE "Nationality" = 'united kingdom' AND "Tonnage" = '1,809'
Which Fate has a Nationality of united kingdom, and a Tonnage of 1,809?
<table0>[instructor] { <col0>[instructor_id]:[int] <col1>[name]:[varchar] <col2>[uniqname]:[varchar] } <table1>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table2>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comment_text]:[var...
SELECT DISTINCT course_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM `<table11>` INNER JOIN course_offering ON `<table11>`.`<table11>`_id =...
The times that International Security , Norms and Cooperation will be offered are what ?
<table0>[INTELLIGENCE_OPERATIONS] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[operation] <col2>[VARCHAR]:[255] <col3>[city]:[VARCHAR] <col4>[255]:[country] <col5>[VARCHAR]:[255] <col6>[year]:[INT] }
SELECT operation FROM `<table0>` WHERE `<col3>` = 'CityB' AND `<col6>` = ( SELECT MAX( `<col6>` ) FROM `<table0>` WHERE `<col3>` = 'CityB' );
What are the names of the intelligence operations conducted in 'CityB' in the INTELLIGENCE_OPERATIONS table?
<table0>[table_name_14] { <col0>[label]:[VARCHAR] <col1>[region]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "japan"
What was the label in Japan?
<table0>[table_name_29] { }
SELECT SUM( 1872 ) FROM `<table0>` WHERE 1866 > 856 AND 1861 > 1906 AND 1876 > 1990
What is the sum of 1872(s), when 1866 is greater than 856, when 1861 is greater than 1906, and when 1876 is greater than 1990?
<table0>[table_name_7] { <col0>[player]:[VARCHAR] <col1>[to_par]:[VARCHAR] <col2>[country]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "+5" AND `<col2>` = "australia"
Who is the player from Australia with a to par of +5?