schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[Ref_Detention_Type] { <col0>[detention_type_code]:[VARCHAR] <col1>[detention_type_description]:[VARCHAR] } <table1>[Detention] { <col0>[detention_id]:[INTEGER] <col1>[detention_type_code]:[VARCHAR] <col2>[teacher_id]:[INTEGER] <col3>[datetime_detention_start]:[DATETIME] <col4>[datetime_detention_end]:[DATETIM...
SELECT date_of_notes, COUNT( `<col3>` ) FROM `<table5>` ORDER BY COUNT( `<col3>` ) DESC
A bar chart for what are the number of the dates of the assessment notes?, could you sort by the total number from high to low?
<table0>[table_15887683_10] { <col0>[ppv]:[VARCHAR] <col1>[television_service]:[VARCHAR] <col2>[package_option]:[VARCHAR] <col3>[dar]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "Sky Famiglia" AND `<col3>` = "16:9" AND `<col1>` = "MTV Dance"
Name the ppv for sky famiglia and dar 16:9 for mtv dance
<table0>[Employees] { <col0>[employee_name]:[VARCHAR] <col1>[employee_id]:[VARCHAR] } <table1>[Documents_to_be_destroyed] { <col0>[Destruction_Authorised_by_Employee_ID]:[VARCHAR] <col1>[Destroyed_by_Employee_ID]:[VARCHAR] }
SELECT T2.employee_name, T3.employee_name FROM `<table1>` AS T1 JOIN Employees AS T2 ON T1.Destruction_Authorised_by_Employee_ID = T2.employee_id JOIN Employees AS T3 ON T1.Destroyed_by_Employee_ID = T3.employee_id
What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents?
<table0>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table1>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:...
SELECT Id AS "post_link" FROM `<table14>` ORDER BY CreationDate DESC LIMIT 10
SELECT TOP 10 Id AS [Post Link] FROM Posts ORDER BY CreationDate DESC.
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[...
SELECT `<table1>`.age, `<table1>`.gender FROM `<table1>` WHERE `<table1>`.name = "Marilyn Norvell"
What is the age and gender of Martin Norvell?
<table0>[Attributes] { <col0>[attribute_id]:[integer] <col1>[attribute_name]:[text] } <table1>[Categories] { <col0>[category_id]:[integer] <col1>[category_name]:[text] } <table2>[Compliments] { <col0>[compliment_id]:[integer] <col1>[compliment_type]:[text] } <table3>[Days] { <col0>[day_id]:[integer] <col1>[day_of_we...
SELECT COUNT( `<col0>` ) FROM `<table13>` WHERE `<col3>` LIKE 'AZ' AND `<col1>` LIKE 'True' AND `<col5>` LIKE 'low'
What is the total number of active businesses in AZ with a low review count?
<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>`.ethnicity = "HISPANIC OR LATINO" AND lab.label = "CD34"
provide the number of patients whose ethnicity is hispanic or latino and lab test name is cd34?
<table0>[table_204_541] { <col0>[number]:[name] <col1>[text]:[area] <col2>[text]:[height] <col3>[text]:[floors] <col4>[number]:[year] }
SELECT COUNT( "name" ) FROM `<table0>` WHERE "year" < 2010
how many of the 7 tallest buildings in kanpur , india were built before 2010 ?
<table0>[table_16376436_1] { <col0>[pick__number]:[INTEGER] <col1>[player]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Garry Lewis"
What is the pick number for the player Garry Lewis?
<table0>[table_16570] { <col0>[Character]:[text] <col1>[Portrayed]:[text] <col2>[appearance]:[text] <col3>[appearance]:[text] <col4>[Duration]:[text] <col5>[Episodes]:[text] }
SELECT "Portrayed by" FROM `<table0>` WHERE "First appearance" = 'Zoo York'
Which actors first appeared in 'Zoo York'?
<table0>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } <table1>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table2>[course_offering] { <col0>[offering_id]:[...
SELECT DISTINCT description, `<col1>` FROM `<table8>` WHERE `<col2>` = 'ANATOMY' AND `<col3>` = 541
Tell me about ANATOMY 541 .
<table0>[table_name_99] { <col0>[record]:[VARCHAR] <col1>[method]:[VARCHAR] <col2>[opponent]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "ko" AND `<col2>` = "rich guerin"
What is Record, when Method is KO, and when Opponent is Rich Guerin?
<table0>[Categories] { <col0>[CategoryID]:[integer] <col1>[CategoryName]:[text] <col2>[Description]:[text] } <table1>[Customers] { <col0>[CustomerID]:[integer] <col1>[CustomerName]:[text] <col2>[ContactName]:[text] <col3>[Address]:[text] <col4>[City]:[text] <col5>[PostalCode]:[text] <col6>[Country]:[text] } <table2>[...
SELECT CAST( COUNT( CASE WHEN T1.Title = 'Sales Representative' THEN 1 ELSE NULL END ) AS REAL ) * 100 / COUNT( T2.OrderID ) FROM `<table2>` AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID
What proportion of orders are taken by the Sales Representative?
<table0>[airline] { <col0>[airline_code]:[varchar] <col1>[airline_name]:[text] <col2>[note]:[text] } <table1>[city] { <col0>[city_code]:[varchar] <col1>[city_name]:[varchar] <col2>[state_code]:[varchar] <col3>[country_name]:[varchar] <col4>[time_zone_code]:[varchar] } <table2>[food_service] { <col0>[meal_code]:[text]...
SELECT DISTINCT flight.flight_id FROM `<table7>` AS AIRPORT_SERVICE_0, `<table7>` 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 = 'PHILADELPHIA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHING...
could you please give me information concerning AA a flight from WASHINGTON to PHILADELPHIA the earliest one in the morning as possible
<table0>[clients] { <col0>[client_id]:[INT] <col1>[name]:[VARCHAR] <col2>[age]:[INT] <col3>[city]:[VARCHAR] }
SELECT city, COUNT( * ) FROM `<table0>` GROUP BY city;
What is the number of clients living in each city?
<table0>[table_13695] { <col0>[Season]:[text] <col1>[Teams]:[real] <col2>[Minor]:[Ladder] <col3>[Position]:[text] <col4>[Finals]:[Qualification] <col5>[text]:[Final] <col6>[Ladder]:[Position] <col7>[text]:[ACL] <col8>[Qualification]:[text] <col9>[ACL]:[Placing] }
SELECT "Final `<col6>` Position" FROM `<table0>` WHERE "Finals Qualification" = 'dnq' AND "Teams" < '10'
What's the ladder position when team is less than 10 and the Finals qualifications were DNQ?
<table0>[table_204_941] { <col0>[number]:[number] <col1>[date]:[text] <col2>[visitor]:[text] <col3>[score]:[text] <col4>[home]:[text] <col5>[record]:[text] }
SELECT "date" FROM `<table0>` ORDER BY "date" DESC LIMIT 1
if a relative attended his/her first san antonio spurs game at the end of 1976 which date would they be referring to ?
<table0>[university] { <col0>[School_ID]:[int] <col1>[School]:[text] <col2>[Location]:[text] <col3>[Founded]:[real] <col4>[Affiliation]:[text] <col5>[Enrollment]:[real] <col6>[Nickname]:[text] <col7>[Primary_conference]:[text] } <table1>[basketball_match] { <col0>[Team_ID]:[int] <col1>[School_ID]:[int] <col2>[Team_Nam...
SELECT All_Home, `<col0>` FROM `<table1>` GROUP BY ACC_Road, `<col9>` ORDER BY `<col9>`
Find All_Home and Team_ID , and group by attribute ACC_Road, and visualize them by a bar chart, rank in asc by the names please.
<table0>[fare] { <col0>[fare_id]:[int] <col1>[from_airport]:[varchar] <col2>[to_airport]:[varchar] <col3>[fare_basis_code]:[text] <col4>[fare_airline]:[text] <col5>[restriction_code]:[text] <col6>[one_direction_cost]:[int] <col7>[round_trip_cost]:[int] <col8>[round_trip_required]:[varchar] } <table1>[days] { <col0>[da...
SELECT DISTINCT flight.flight_id FROM `<table9>` AS AIRPORT_SERVICE_0, `<table9>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'TACOMA' AND date_day.day_number = 10 AND date_day.month_number = 6 AND date_day.ye...
are there any flights on 6 10 from BURBANK to TACOMA
<table0>[table_204_633] { <col0>[number]:[launch] <col1>[date]:[text] <col2>[operator]:[text] <col3>[name]:[text] <col4>[sample]:[origin] <col5>[text]:[samples] <col6>[returned]:[text] <col7>[recovery]:[date] <col8>[text]:[mission] <col9>[result]:[text] }
SELECT COUNT( "name" ) FROM `<table0>` WHERE "mission result" = 'success'
what was the average amount of missions that were successful ?
<table0>[EsportsEvents] { <col0>[EventID]:[INT] <col1>[PRIMARY]:[KEY] <col2>[EventName]:[VARCHAR] <col3>[100]:[GameName] <col4>[VARCHAR]:[100] <col5>[Location]:[VARCHAR] <col6>[100]:[INSERT] }
INSERT INTO EsportsEvents ( EventID, EventName, GameName, Location ) VALUES ( 2, 'Cybernetic Showdown', 'Cybernetic Showdown', 'Shanghai' );
Add a new esports event for the game 'Cybernetic Showdown' in Shanghai.
<table0>[table_name_84] { }
SELECT 2006 FROM `<table0>` WHERE 2004 = "2r" AND 2005 = "2r"
What is the 2006 that has a 2r in 2004, and a 2r in 2005?
<table0>[indigenous_food_systems] { <col0>[system_id]:[INT] <col1>[system_name]:[TEXT] <col2>[area]:[FLOAT] }
SELECT MIN( `<col2>` ) FROM `<table0>` WHERE `<col1>` = 'Bison Ranching';
What is the minimum area (in hectares) required for an indigenous food system to operate sustainably?
<table0>[machines] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[255] <col3>[type]:[VARCHAR] <col4>[255]:[status] <col5>[VARCHAR]:[255] }
ALTER TABLE machines ADD last_maintenance_date DATE;
Alter the 'machines' table to add a column 'last_maintenance_date'
<table0>[table_name_60] { <col0>[round]:[INTEGER] <col1>[college_junior_club_team__league]:[VARCHAR] }
SELECT MAX( `<col0>` ) FROM `<table0>` WHERE college_junior_club_team__league_ = "minnesota junior stars ( mjhl )"
What is the highest round for the Minnesota Junior Stars (Mjhl)?
<table0>[RareEarthElements_Production] { <col0>[Year]:[INT] <col1>[Element]:[VARCHAR] <col2>[Quantity]:[INT] }
SELECT Element, `<col2>` FROM `<table0>` WHERE `<col0>` = 2016;
List the production quantities for all Rare earth elements in 2016.
<table0>[basketball_match] { <col0>[Team_ID]:[int] <col1>[School_ID]:[int] <col2>[Team_Name]:[text] <col3>[ACC_Regular_Season]:[text] <col4>[ACC_Percent]:[text] <col5>[ACC_Home]:[text] <col6>[ACC_Road]:[text] <col7>[All_Games]:[text] <col8>[All_Games_Percent]:[int] <col9>[All_Home]:[text] <col10>[All_Road]:[text] <col1...
SELECT All_Home, AVG( `<col1>` ) FROM `<table0>` GROUP BY `<col9>` ORDER BY AVG( `<col1>` ) DESC
Give me the comparison about the average of School_ID over the All_Home , and group by attribute All_Home by a bar chart, and sort total number in descending order.
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col...
SELECT ( SELECT COUNT( DISTINCT t1.uniquepid ) FROM ( SELECT patient.uniquepid, `<table0>`.`<table0>`time FROM `<table0>` JOIN patient ON `<table0>`.patientunitstayid = patient.patientunitstayid WHERE `<table0>`.`<table0>`name = 'hepatic dysfunction' AND STRFTIME( '%y', `<table0>`.`<table0>`time ) <= '2104' ) AS t1 ) -...
how many patients have been diagnosed with hepatic dysfunction and have not returned to the hospital until 2104 during the same month?
<table0>[table_203_247] { <col0>[number]:[district] <col1>[text]:[counties] <col2>[represented]:[text] <col3>[delegate]:[text] <col4>[party]:[text] <col5>[elected]:[number] <col6>[committee]:[text] }
SELECT COUNT( "delegate" ) FROM `<table0>` WHERE "party" = 'democratic' AND "counties represented" = 'frederick'
how many delegates are under the democratic party who represented the frederick county ?
<table0>[Claims] { <col0>[ClaimID]:[INT] <col1>[PolicyID]:[INT] <col2>[ClaimAmount]:[DECIMAL] <col3>[ClaimDate]:[DATE] }
SELECT PolicyType, Region, EXTRACT( YEAR FROM `<col3>` ) AS Year, AVG( `<col2>` ) AS AvgClaimAmount FROM `<table0>` c JOIN Policies p ON c.PolicyID = p.PolicyID GROUP BY PolicyType, Region, Year;
What is the average claim amount by policy type, region, and year?
<table0>[stadium] { <col0>[int]:[name] <col1>[text]:[Capacity] <col2>[int]:[City] <col3>[text]:[Country] <col4>[text]:[Opening_year] } <table1>[event] { <col0>[int]:[text] <col1>[Stadium_ID]:[int] <col2>[Year]:[text] } <table2>[record] { <col0>[int]:[Result] <col1>[text]:[Swimmer_ID] <col2>[int]:[Event_ID] } <table3...
SELECT T4.Name, COUNT( T4.Name ) FROM `<table3>` AS t1 JOIN record AS t2 ON t1.ID = t2.Swimmer_ID JOIN event AS t3 ON t2.Event_ID = t3.ID JOIN stadium AS t4 ON t4.ID = t3.Stadium_ID WHERE t1.Nationality = 'Australia' GROUP BY T4.Name
Find the names of stadiums that some Australian swimmers have been to, and count them by a bar chart
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>...
SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` WHERE `<table1>`.discharge_location = "SHORT TERM HOSPITAL" AND `<table1>`.dob_year < "1837"
Among patients discharged on short term hospital, calculate the total number of those born before 1837
<table0>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <col7>[number]:[ApprovedByUserId] <col8>[number]:[ApprovalDate] } <table1>[PostHistoryTypes] {...
SELECT DISTINCT p1.Id, p1.Title FROM `<table15>` AS p1, `<table15>` AS p2 WHERE p2.ParentId = p1.Id AND p1.Tags LIKE '%<java>%' OR p1.Tags LIKE '%<ja>%' AND p2.Body LIKE '%<code>%' AND p2.Score < 0 ORDER BY p1.Id
Get Java questions with specific topics.
<table0>[clinical_trials] { <col0>[INT]:[drug_id] <col1>[INT]:[drug_category] <col2>[VARCHAR]:[255] <col3>[duration]:[INT] }
SELECT AVG( `<table0>`.duration ) FROM `<table0>` WHERE `<table0>`.drug_category = 'Oncology';
What is the average duration of clinical trials for oncology drugs?
<table0>[diagnoses] { <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 COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.religion = "CATHOLIC" AND `<table3>`.dob_year < "1846"
provide the number of patients whose religion is catholic and year of birth is less than 1846?
<table0>[Accounts] { <col0>[account_id]:[INTEGER] <col1>[customer_id]:[INTEGER] <col2>[account_name]:[VARCHAR] <col3>[other_account_details]:[VARCHAR] } <table1>[Customers] { <col0>[customer_id]:[INTEGER] <col1>[customer_first_name]:[VARCHAR] <col2>[customer_last_name]:[VARCHAR] <col3>[customer_address]:[VARCHAR] <col...
SELECT customer_last_name, COUNT( `<col2>` ) FROM `<table1>` GROUP BY `<col2>`
How many customers for different customer last name? Draw a bar chart.
<table0>[financial_institutions] { <col0>[institution_id]:[INT] <col1>[institution_name]:[TEXT] <col2>[country]:[TEXT] } <table1>[loans] { <col0>[loan_id]:[INT] <col1>[institution_id]:[INT] <col2>[FLOAT]:[loan_type] <col3>[TEXT]:[INSERT] }
SELECT SUM( amount ) FROM `<table1>` WHERE loan_type = 'socially responsible' AND country = 'United States';
What is the total amount of socially responsible loans issued by financial institutions in the United States?
<table0>[table_17174] { <col0>[real]:[Episode] <col1>[text]:[Air] <col2>[Date]:[text] <col3>[Timeslot]:[text] <col4>[Rating]:[text] <col5>[Share]:[real] <col6>[text]:[Viewers] <col7>[text]:[Weekly] <col8>[Rank]:[text] }
SELECT "Viewers" FROM `<table0>` WHERE "Episode" = 'Woman Marries Heart'
What is the viewers for the episode 'woman marries heart'?
<table0>[contractor_sales] { <col0>[contractor]:[VARCHAR] <col1>[equipment_type]:[VARCHAR] <col2>[sale_year]:[INT] <col3>[quantity]:[INT] }
SELECT contractor, SUM( `<col3>` ) as total_sales FROM `<table0>` WHERE `<col2>` = 2021 GROUP BY `<col0>` ORDER BY total_sales DESC;
What are the names of the defense contractors and their associated military equipment sales in descending order, for sales made in 2021?
<table0>[table_name_29] { <col0>[opponent]:[VARCHAR] <col1>[game]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 5
Who was the opponent for game 5?
<table0>[table_name_60] { <col0>[win__percentage]:[VARCHAR] }
SELECT 2012 FROM `<table0>` WHERE `<col0>` = "67%"
What is 2012 that has a winning % of 67%?
<table0>[Institution] { <col0>[Institution_id]:[text] } <table1>[protein] { <col0>[common_name]:[text] <col1>[protein_name]:[text] <col2>[divergence_from_human_lineage]:[real] <col3>[accession_number]:[text] <col4>[sequence_length]:[real] } <table2>[building] { <col0>[building_id]:[text] <col1>[text]:[Street_address]...
SELECT Type, SUM( Enrollment ) FROM `<table0>` GROUP BY Type ORDER BY Type DESC
Please compare the total enrollment for each type using a bar chart, list in desc by the X-axis.
<table0>[domain_publication] { <col0>[int]:[pid] } <table1>[conference] { <col0>[cid]:[int] <col1>[homepage]:[varchar] <col2>[name]:[varchar] } <table2>[domain_journal] { <col0>[int]:[jid] } <table3>[domain] { <col0>[int]:[name] } <table4>[keyword] { } <table5>[domain_keyword] { <col0>[int]:[kid] } <table6>[organ...
SELECT COUNT( DISTINCT ( author.name ) ) FROM author, journal, publication, writes WHERE journal.name = 'PVLDB' AND publication.jid = journal.jid AND writes.aid = author.aid AND writes.pid = publication.pid
return me the number of authors who have papers in PVLDB .
<table0>[table_name_12] { <col0>[week]:[VARCHAR] <col1>[result]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "bye"
What is the number of weeks where the result was listed at bye?
<table0>[Customer_Orders] { <col0>[order_id]:[INTEGER] <col1>[customer_id]:[INTEGER] <col2>[order_date]:[DATETIME] <col3>[order_status_code]:[VARCHAR] } <table1>[Order_Items] { <col0>[order_item_id]:[INTEGER] <col1>[order_id]:[INTEGER] <col2>[product_id]:[INTEGER] <col3>[order_quantity]:[VARCHAR] } <table2>[Addresses...
SELECT T2.customer_name, COUNT( T2.customer_name ) FROM `<table6>` AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id JOIN Addresses AS T3 ON T1.address_id = T3.address_id GROUP BY T2.customer_name
Show the number of addrens history for each customer in a bar chart.
<table0>[country] { <col0>[country_id]:[integer] <col1>[country_iso_code]:[text] <col2>[country_name]:[text] } <table1>[department] { <col0>[department_id]:[integer] <col1>[department_name]:[text] } <table2>[gender] { <col0>[gender_id]:[integer] } <table3>[genre] { <col0>[genre_id]:[integer] <col1>[genre_name]:[text...
SELECT `<col1>` FROM `<table7>` ORDER BY `<col5>` DESC LIMIT 1
Provide the title of the movie that is most-liked by a large number of people.
<table0>[military_equipment] { <col0>[equipment_id]:[INT] <col1>[PRIMARY]:[KEY] <col2>[equipment_type]:[VARCHAR] <col3>[country]:[VARCHAR] <col4>[in_service]:[BOOLEAN] }
INSERT INTO military_equipment ( equipment_id, equipment_type, country, in_service ) VALUES ( 789, 'tanks', 'Russia', true );
Add a new record to the 'military_equipment' table for each of the following: equipment_id 789, equipment_type 'tanks', country 'Russia', in_service true
<table0>[Web_client_accelerator] { <col0>[int]:[name] <col1>[text]:[Operating_system] <col2>[text]:[Client] <col3>[text]:[Connection] } <table1>[accelerator_compatible_browser] { <col0>[accelerator_id]:[int] <col1>[browser_id]:[int] <col2>[compatible_since_year]:[int] } <table2>[browser] { <col0>[int]:[name] <col1>[t...
SELECT Operating_system, COUNT( * ) FROM `<table0>` GROUP BY Operating_system ORDER BY COUNT( * )
Draw a bar chart of operating system versus the total number, order in asc by the Y.
<table0>[mentions] { <col0>[mention_id]:[INT] <col1>[user_id]:[INT] <col2>[country]:[VARCHAR] <col3>[platform]:[VARCHAR] <col4>[mention_text]:[VARCHAR] <col5>[100]:[mention_date] <col6>[DATE]:[INSERT] }
SELECT m.country, COUNT( DISTINCT m.user_id ) as num_users FROM `<table0>` m WHERE m.mention_text IN ( 'climate change', '#climatechange' ) AND m.mention_date >= DATEADD( year, -1, GETDATE( ) ) GROUP BY m.country;
Show the number of users who have mentioned 'climate change' or '#climatechange' on any social media platform in the past year, broken down by country.
<table0>[table_36] { <col0>[Calls]:[text] <col1>[Frequency]:[text] <col2>[Branding]:[text] <col3>[Format]:[text] <col4>[Market]:[Rank] <col5>[text]:[Timeslot] <col6>[text]:[Group] <col7>[owner]:[text] }
SELECT "Branding" FROM `<table0>` WHERE "Group owner" = 'Qantam of Cape Cod, LLC'
What is the Branding for Group Owner Qantam of Cape Cod, LLC?
<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 `<table7>`.hospitaladmittime FROM `<table7>` WHERE `<table7>`.uniquepid = '030-72509' AND STRFTIME( '%y', `<table7>`.hospitaladmittime ) <= '2104' ORDER BY `<table7>`.hospitaladmittime DESC LIMIT 1
until 2104, when did patient 030-72509 last visit the hospital?
<table0>[table_27882867_4] { <col0>[record]:[VARCHAR] <col1>[location_attendance]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Oakland-Alameda County Coliseum Arena 15,025"
Name the record for oakland-alameda county coliseum arena 15,025
<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>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[te...
SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN prescriptions ON `<table2>`.hadm_id = prescriptions.hadm_id WHERE `<table2>`.age < "72" AND prescriptions.formulary_drug_cd = "MIDAZBASE"
how many patients less than 72 years of age have midazbase drug code?
<table0>[department] { <col0>[Department_ID]:[int] <col1>[text]:[Creation] <col2>[text]:[Ranking] <col3>[int]:[Budget_in_Billions] <col4>[real]:[Num_Employees] } <table1>[head] { <col0>[head_ID]:[int] <col1>[name]:[text] <col2>[born_state]:[text] <col3>[age]:[real] } <table2>[management] { <col0>[department_ID]:[int]...
SELECT Name, AVG( Num_Employees ) FROM `<table0>` AS T1 JOIN management AS T2 ON T1.`<table0>`_ID = T2.`<table0>`_ID WHERE T2.temporary_acting = 'Yes' GROUP BY Name ORDER BY AVG( Num_Employees )
Show the name and number of employees for the departments managed by heads whose temporary acting value is 'Yes' by a bar chart, order by the y-axis in asc.
<table0>[table_2523809_1] { <col0>[branding]:[VARCHAR] <col1>[callsign]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "KRCA-TV"
List the branding for krca-tv.
<table0>[products] { <col0>[product_id]:[INT] <col1>[product_name]:[VARCHAR] <col2>[255]:[category_id] <col3>[INT]:[price] }
UPDATE products SET price = price * 0.5 WHERE category_id = 3;
Update the 'price' column for all records in the 'products' table with a 'category_id' of 3 to 50% off the original price
<table0>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } <table1>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID...
SELECT HIRE_DATE, AVG( `<col7>` ) FROM `<table2>` WHERE `<col7>` BETWEEN 8000 AND 12000 AND `<col8>` <> "null" OR `<col10>` <> 40 ORDER BY AVG( `<col7>` ) 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 average of salary over the hire_date bin hire_date by weekday, list by the mean salary in desc.
<table0>[Customer_Events] { <col0>[date_moved_in]:[VARCHAR] <col1>[customer_id]:[VARCHAR] } <table1>[Customers] { <col0>[customer_id]:[VARCHAR] <col1>[customer_details]:[VARCHAR] }
SELECT T2.date_moved_in, T1.customer_id, T1.customer_details FROM `<table1>` AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id
What is each customer's move in date, and the corresponding customer id and details?
<table0>[table_name_15] { <col0>[proto_germanic_origin]:[VARCHAR] <col1>[sound__allophone]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE sound__allophone_ = "[[[|k]]]"
What is the Proto-Germanic origin associated with an allophone of [[[|k]]]?
<table0>[labevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[itemid]:[number] <col4>[charttime]:[time] <col5>[valuenum]:[number] <col6>[valueuom]:[text] } <table1>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <tab...
SELECT t3.drug FROM ( SELECT t2.drug, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table4>`.charttime FROM `<table4>` JOIN admissions ON `<table4>`.hadm_id = admissions.hadm_id WHERE `<table4>`.icd9_code = ( SELECT `<table16>`.icd9_code FROM `<table16>` WHERE `<table16>`....
what are the five most frequently prescribed drugs that were prescribed to patients of the 40s within 2 months after they had been diagnosed with portal hypertension since 2103?
<table0>[Artists] { <col0>[ArtistID]:[INT] <col1>[ArtistName]:[VARCHAR] } <table1>[Exhibitions] { <col0>[ExhibitionID]:[INT] <col1>[ExhibitionName]:[VARCHAR] } <table2>[Artwork] { <col0>[ArtworkID]:[INT] <col1>[ArtistID]:[INT] <col2>[ArtworkName]:[VARCHAR] <col3>[Price]:[FLOAT] }
SELECT `<table0>`.ArtistName, AVG( Artwork.Price ) FROM `<table0>` INNER JOIN Artwork ON `<table0>`.ArtistID = Artwork.ArtistID INNER JOIN Exhibitions ON Artwork.ExhibitionID = Exhibitions.ExhibitionID WHERE Exhibitions.ExhibitionName = 'Impressionist Exhibition' GROUP BY `<table0>`.ArtistName;
Which artists had their works exhibited in the 'Impressionist Exhibition' and what was the average price of their artworks?
<table0>[table_name_3] { <col0>[proto_germanic]:[VARCHAR] <col1>[old_english]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "/d/"
What's the Proto-Germanic when the Old English is /d/?
<table0>[candidate] { <col0>[Candidate_ID]:[int] <col1>[People_ID]:[int] <col2>[Poll_Source]:[text] <col3>[Date]:[text] <col4>[Support_rate]:[real] <col5>[Consider_rate]:[real] <col6>[Oppose_rate]:[real] <col7>[Unsure_rate]:[real] } <table1>[people] { <col0>[People_ID]:[int] <col1>[Sex]:[text] <col2>[text]:[Date_of_Bi...
SELECT Date_of_Birth, Height FROM `<table1>` ORDER BY Height DESC
Return a bar chart about the distribution of Date_of_Birth and Height , and order Y-axis from high to low order.
<table0>[table_1140083_2] { <col0>[rnd]:[VARCHAR] <col1>[pole_position]:[VARCHAR] <col2>[fastest_lap]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "James Hunt" AND `<col2>` = "John Watson"
How many rounds were won with James Hunt as pole position and John Watson as fastest lap?
<table0>[days] { <col0>[days_code]:[varchar] <col1>[day_name]:[varchar] } <table1>[ground_service] { <col0>[city_code]:[text] <col1>[airport_code]:[text] <col2>[transport_type]:[text] <col3>[ground_fare]:[int] } <table2>[dual_carrier] { <col0>[main_airline]:[varchar] <col1>[low_flight_number]:[int] <col2>[high_flight...
SELECT DISTINCT flight.flight_id FROM `<table3>` AS AIRPORT_SERVICE_0, `<table3>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND date_day.day_number = 12 AND date_day.month_number = 8 AND date_day.ye...
what flights are available between BALTIMORE and BOSTON on 8 12
<table0>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table1>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[t...
SELECT t3.drugname FROM ( SELECT t2.drugname, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT patient.uniquepid, `<table1>`.`<table1>`time, patient.patienthealthsystemstayid FROM `<table1>` JOIN patient ON `<table1>`.patientunitstayid = patient.patientunitstayid WHERE `<table1>`.`<table1>`name = 'di...
what were the five most frequent drugs prescribed to patients with an age 50s after they had been diagnosed with diabetes mellitus since 6 years ago in the same hospital visit?
<table0>[table_20217811_1] { <col0>[green]:[VARCHAR] <col1>[electorate]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Otaki"
Name the green for otaki
<table0>[people] { <col0>[name]:[VARCHAR] <col1>[height]:[INTEGER] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < ( SELECT AVG( `<col1>` ) FROM `<table0>` )
find the name of people whose height is lower than the average.
<table0>[borough] { <col0>[INT]:[name] <col1>[TEXT]:[INSERT] } <table1>[emergency_calls] { <col0>[INT]:[borough_id] <col1>[INT]:[call_time] }
SELECT b.name, COUNT( ec.id ) FROM `<table0>` b LEFT JOIN emergency_calls ec ON b.id = ec.`<table0>`_id GROUP BY b.id;
What is the total number of emergency calls in each borough?
<table0>[table_18186] { <col0>[District]:[text] <col1>[Incumbent]:[text] <col2>[Party]:[text] <col3>[elected]:[text] <col4>[Result]:[text] <col5>[Candidates]:[text] }
SELECT "Result" FROM `<table0>` WHERE "First elected" = '1948 , 1964'
what's the result for first elected in 1948 , 1964
<table0>[table_61153] { <col0>[text]:[text] <col1>[text]:[text] <col2>[text]:[noon] <col3>[text]:[text] <col4>[text]:[text] <col5>[text]:[text] <col6>[text]:[text] <col7>[text]:[text] }
SELECT "1:30 pm" FROM `<table0>` WHERE "3:30 pm" = 'young hercules'
What is 1:30 pm, when 3:30 pm is 'Young Hercules'?
<table0>[table_name_29] { <col0>[goals]:[VARCHAR] <col1>[games]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "47"
How many goals were there in game 47?
<table0>[debate] { <col0>[Debate_ID]:[int] <col1>[Date]:[text] <col2>[Venue]:[text] <col3>[Num_of_Audience]:[int] } <table1>[people] { <col0>[People_ID]:[int] <col1>[District]:[text] <col2>[text]:[Party] <col3>[text]:[Age] } <table2>[debate_people] { <col0>[Debate_ID]:[int] <col1>[Affirmative]:[int] <col2>[Negative]:...
SELECT Party, COUNT( * ) FROM `<table1>` GROUP BY Party
Bar graph to show the total number from different party
<table0>[table_train_32] { <col0>[int]:[pregnancy_or_lactation] <col1>[bool]:[renal_disease] <col2>[bool]:[hemachromatosis] <col3>[bool]:[glucose_6_phosphate_dehydrogenase_deficiency_g6pd] <col4>[int]:[prisoners] <col5>[bool]:[NOUSE] }
SELECT * FROM `<table0>` WHERE pregnancy_or_lactation = 1 OR prisoners = 1
member of a protected population ( pregnant, prisoner )
<table0>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table1>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuid...
SELECT a.Id AS "post_link", a.Body, a.CreationDate FROM `<table27>` AS q INNER JOIN `<table27>` AS a ON a.Id = q.AcceptedAnswerId WHERE LENGTH( a.Body ) > 200 AND LENGTH( a.Body ) < 300 AND q.ClosedDate IS NULL AND ( LOWER( a.Body ) LIKE '%typo%' OR LOWER( a.Body ) LIKE '%spelled wrong%' OR LOWER( a.Body ) LIKE '%spell...
Questions possibly solved by correcting typos.
<table0>[table_58640] { <col0>[twee]:[text] <col1>[dree]:[text] <col2>[vea]:[text] <col3>[fiew]:[text] <col4>[sas]:[text] <col5>[u00e4wen]:[text] <col6>[acht]:[text] <col7>[u00e4ajen]:[text] }
SELECT "5 fiew" FROM `<table0>` WHERE "7 s\u00e4wen" = '7th säwenda'
What is 5 fiew if 7 s wen is 7th s wenda?
<table0>[articles] { <col0>[INT]:[title] <col1>[TEXT]:[language] <col2>[TEXT]:[word_count] <col3>[INT]:[INSERT] }
SELECT SUM( word_count ) FROM `<table0>` WHERE language = 'Spanish';
What is the total number of words in all articles written in Spanish?
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[la...
SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id INNER JOIN lab ON `<table4>`.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Crbl art ocl NOS w infrc" AND lab.flag = "abnormal"
find the number of patients whose diagnoses short title is crbl art ocl nos w infrc and lab test result is abnormal.
<table0>[table_name_43] { <col0>[cardwell]:[VARCHAR] <col1>[source]:[VARCHAR] <col2>[knight]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "insider advantage" AND `<col2>` = "1%"
What cardwell has an insider advantage and a knight of 1%
<table0>[Users] { <col0>[number]:[Reputation] <col1>[number]:[CreationDate] <col2>[time]:[DisplayName] <col3>[text]:[LastAccessDate] <col4>[time]:[WebsiteUrl] <col5>[text]:[Location] <col6>[text]:[AboutMe] <col7>[text]:[Views] <col8>[number]:[UpVotes] <col9>[number]:[DownVotes] <col10>[number]:[ProfileImageUrl] <col11>...
SELECT a1.ParentId AS "post_link", a1.CreationDate FROM `<table9>` AS a1 INNER JOIN `<table9>` AS a2 ON a1.ParentId = a2.ParentId WHERE a1.OwnerUserId = '##UserId1:int##' AND a2.OwnerUserId = '##UserId2:int##'
Questions answered by two specific users.
<table0>[Fields] { <col0>[FieldID]:[varchar] <col1>[FieldName]:[varchar] <col2>[AvgTemperature]:[float] <col3>[WaterShortageIssue]:[bool] }
SELECT `<col1>` FROM `<table0>` WHERE `<col3>` = true AND `<col2>` > ( SELECT `<col2>` FROM `<table0>` WHERE `<col1>` = 'Field C' );
Which fields have experienced water shortage issues and have a higher average temperature than field C?
<table0>[temperature_data] { <col0>[crop_type]:[VARCHAR] <col1>[measurement_date]:[DATE] <col2>[temperature]:[DECIMAL] }
SELECT MAX( `<col2>` ) FROM `<table0>` WHERE `<col0>` = 'soybeans' AND `<col1>` >= NOW( ) - INTERVAL '7 days';
Determine the maximum temperature for soybeans in the last week
<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>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] ...
SELECT DISTINCT course.department, course.name, course.number, `<table14>`.workload, `<table14>`.workload FROM course, `<table14>` WHERE `<table14>`.category LIKE '%MDE%' AND `<table14>`.course_id = course.course_id AND `<table14>`.workload = ( SELECT MIN( PROGRAM_COURSEalias1.workload ) FROM `<table14>` AS PROGRAM_COU...
To satisfy the MDE requirement , which classes are the least demanding ?
<table0>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heartrate]:[number] <col5>[respiration]:[number] <col6>[systemicsystolic]:[number] <col7>[systemicdiastolic]:[number] <col8>[systemicmean]:[number] <col9>[observationti...
SELECT COUNT( DISTINCT `<table6>`.uniquepid ) FROM `<table6>` WHERE STRFTIME( '%y', `<table6>`.hospitaladmittime ) >= '2101'
count the number of patients that are admitted to the hospital since 2101.
<table0>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table1>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labres...
SELECT `<table1>`.`<table1>`resulttime FROM `<table1>` WHERE `<table1>`.`<table9>`unitstayid IN ( SELECT `<table9>`.`<table9>`unitstayid FROM `<table9>` WHERE `<table9>`.`<table9>`healthsystemstayid IN ( SELECT `<table9>`.`<table9>`healthsystemstayid FROM `<table9>` WHERE `<table9>`.uniquepid = '032-18678' AND NOT `<ta...
when has patient 032-18678 received the first lab test in the last hospital visit?
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[lab...
SELECT `<table0>`.short_title FROM `<table0>` WHERE `<table0>`.icd9_code = "04104"
what is diagnoses short title of diagnoses icd9 code 04104?
<table0>[table_name_12] { <col0>[round]:[VARCHAR] <col1>[club]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "spartak moscow"
What round did the spartak moscow club play?
<table0>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[itemid]:[number] <col5>[charttime]:[time] <col6>[valuenum]:[number] <col7>[valueuom]:[text] } <table1>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id...
SELECT COUNT( * ) > 0 FROM `<table7>` WHERE `<table7>`.hadm_id IN ( SELECT `<table1>`.hadm_id FROM `<table1>` WHERE `<table1>`.subject_id = 60136 ) AND `<table7>`.spec_type_desc = 'pleural fluid' AND NOT `<table7>`.org_name IS NULL AND DATETIME( `<table7>`.charttime, 'start of month' ) = DATETIME( CURRENT_TIME( ), 'sta...
has any organism was found in the first pleural fluid microbiology test of patient 60136 in this month?
<table0>[table_name_39] { <col0>[tujunga]:[VARCHAR] <col1>[pasadena]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "134,941"
What is the figure for Tujunga when Pasadena is 134,941?
<table0>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] } <table1>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] }
SELECT T2.Name, T2.Revenue FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Revenue
For those records from the products and each product's manufacturer, give me the comparison about the average of revenue over the name , and group by attribute name, and order total number from low to high order.
<table0>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[EMAIL]:[varchar] <col4>[PHONE_NUMBER]:[varchar] <col5>[HIRE_DATE]:[date] <col6>[JOB_ID]:[varchar] <col7>[SALARY]:[decimal] <col8>[COMMISSION_PCT]:[decimal] <col9>[MANAGER_ID]:[decimal] <col10>[DEPARTMENT_...
SELECT HIRE_DATE, `<col8>` FROM `<table0>` WHERE `<col1>` LIKE '%D%' OR `<col1>` LIKE '%S%'
For all employees who have the letters D or S in their first name, a line chart shows the trend of commission_pct over hire_date .
<table0>[missions] { <col0>[name]:[TEXT] <col1>[agency]:[TEXT] <col2>[launch_date]:[TEXT] }
SELECT COUNT( * ) FROM `<table0>` WHERE `<col1>` = 'NASA';
What is the total number of space missions by NASA?
<table0>[table_28365816_2] { <col0>[conference]:[VARCHAR] <col1>[regular_season_winner]:[VARCHAR] }
SELECT COUNT( `<col0>` ) AS Tournament FROM `<table0>` WHERE `<col1>` = "Texas Western"
How many entries for conference tournament are listed when Texas Western is the regular season winner?
<table0>[ground_service] { <col0>[city_code]:[text] <col1>[airport_code]:[text] <col2>[transport_type]:[text] <col3>[ground_fare]:[int] } <table1>[flight_fare] { <col0>[flight_id]:[int] <col1>[fare_id]:[int] } <table2>[aircraft] { <col0>[aircraft_code]:[varchar] <col1>[aircraft_description]:[varchar] <col2>[manufactu...
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'DENVER' AND ground_service.city_code = city.city_code
what is the ground transportation available in DENVER
<table0>[table_204_646] { <col0>[number]:[location] <col1>[text]:[region] <col2>[text]:[coordinates] <col3>[links]:[map] <col4>[photo]:[sources] <col5>[text]:[population] <col6>[number]:[elevation] }
SELECT COUNT( "region" ) FROM `<table0>`
what is the total number of regions ?
<table0>[defendants] { <col0>[INT]:[name] <col1>[VARCHAR]:[case_id] } <table1>[cases] { <col0>[INT]:[case_number] <col1>[VARCHAR]:[case_type] <col2>[VARCHAR]:[court_id] <col3>[INT]:[INSERT] }
INSERT INTO defendants ( id, name, case_id ) VALUES ( 1, 'John Smith', 1 );
Insert a new record in the "defendants" table with the name "John Smith" for the case with id 1
<table0>[CREATE] { <col0>[SCHEMA]:[exists] } <table1>[exists] { <col0>[biosensors]:[readings] <col1>[INT]:[PRIMARY] <col2>[KEY]:[sensor_id] <col3>[INT]:[sensor_type] <col4>[VARCHAR]:[reading] <col5>[DECIMAL]:[read_date] <col6>[DATE]:[INSERT] <col7>[biosensors]:[readings] <col8>[sensor_id]:[sensor_type] <col9>[reading]...
SELECT sensor_type, MAX( reading ) AS max_reading, read_date FROM biosensors.readings WINDOW W AS ( PARTITION BY sensor_type, read_date ORDER BY reading ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) GROUP BY sensor_type, W.read_date ORDER BY read_date;
What is the maximum biosensor reading per sensor type and per day, ordered by day?
<table0>[table_1685] { <col0>[Episode]:[text] <col1>[broadcast]:[text] <col2>[Graemes]:[guest] <col3>[text]:[Jeremys] <col4>[guest]:[text] <col5>[Votes]:[text] }
SELECT "Jeremys guest" FROM `<table0>` WHERE "Episode" = '1x01'
what is the name of the jeremy guest for the episode 1x01
<table0>[table_name_68] { <col0>[points]:[INTEGER] <col1>[year]:[INTEGER] }
SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 1955
What is the average Points for a year before 1955?
<table0>[AwardsMisc] { <col0>[name]:[text] <col1>[text]:[award] <col2>[text]:[year] <col3>[integer]:[lgID] <col4>[text]:[note] } <table1>[HOF] { <col0>[year]:[integer] <col1>[hofID]:[text] <col2>[name]:[text] <col3>[category]:[text] } <table2>[Teams] { <col0>[year]:[integer] <col1>[lgID]:[text] <col2>[tmID]:[text] <c...
SELECT OctL, `<col2>` FROM `<table16>` WHERE `<col0>` = '2006' ORDER BY `<col13>` DESC LIMIT 1
In 2006, what is the overall number of october defeats for the team with the most October defeats? Indicate the team ID.