schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[table_name_4] { <col0>[tournament]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE 2008 = "a" AND 2010 = "1r"
Which tournament had A in 2008, and a 1r in 2010?
<table0>[tugboat] { <col0>[INT]:[name] <col1>[VARCHAR]:[year_built] <col2>[INT]:[PRIMARY] }
SELECT AVG( year_built ) FROM tugboat;
What is the average age of tugboats in the 'tugboat' table?
<table0>[cosmetics] { <col0>[product_id]:[INT] <col1>[product_name]:[TEXT] <col2>[cruelty_free]:[BOOLEAN] <col3>[organic]:[BOOLEAN] <col4>[price]:[FLOAT] }
SELECT AVG( `<col4>` ) as avg_price FROM `<table0>` WHERE `<col3>` = true;
Find the average price of organic cosmetic products.
<table0>[flight] { <col0>[flno]:[number] <col1>[origin]:[text] <col2>[destination]:[text] <col3>[distance]:[number] <col4>[departure_date]:[time] <col5>[arrival_date]:[time] <col6>[price]:[number] <col7>[aid]:[number] } <table1>[aircraft] { <col0>[aid]:[number] <col1>[name]:[text] <col2>[distance]:[number] } <table2>...
SELECT T3.name FROM `<table3>` AS T1 JOIN certificate AS T2 ON T1.eid = T2.eid JOIN aircraft AS T3 ON T3.aid = T2.aid WHERE T1.name = "John Williams"
Show names for all aircrafts of which John Williams has certificates.
<table0>[table_27615520_1] { <col0>[form_factor]:[VARCHAR] <col1>[bandwidth__gb_s]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE bandwidth__gb_s_ = "10"
What is the shape distortion for the range frequency of 10?
<table0>[table_name_81] { <col0>[year]:[INTEGER] <col1>[engine]:[VARCHAR] <col2>[chassis]:[VARCHAR] }
SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "cosworth v8" AND `<col2>` = "hesketh 308e"
What is the latest year that has an engine of cosworth v8, with a chassis of hesketh 308e?
<table0>[table_25380472_2] { <col0>[opponent]:[VARCHAR] <col1>[week]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 7
On week 7, what were the opponents?
<table0>[table_65008] { <col0>[Week]:[real] <col1>[Date]:[text] <col2>[Opponent]:[text] <col3>[Result]:[text] <col4>[Attendance]:[real] }
SELECT MAX( "Attendance" ) FROM `<table0>` WHERE "Result" = 'l 38-20' AND "Week" < '9'
What is the attendance for a week smaller than 9 with a result of L 38-20?
<table0>[mobile_subscribers] { <col0>[subscriber_id]:[INT] <col1>[home_location]:[VARCHAR] <col2>[monthly_data_usage]:[DECIMAL] } <table1>[country_averages] { <col0>[home_location]:[VARCHAR] <col1>[average_data_usage]:[DECIMAL] }
SELECT ms.subscriber_id, ms.home_location, ms.monthly_data_usage FROM `<table0>` ms INNER JOIN country_averages ca ON ms.home_location = ca.home_location WHERE ms.monthly_data_usage > ca.average_data_usage;
Which mobile subscribers have a higher data usage than the average in their country?
<table0>[table_9451] { <col0>[Tie]:[text] <col1>[Home]:[team] <col2>[text]:[Score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Date]:[text] }
SELECT "Home team" FROM `<table0>` WHERE "Date" = '18 february 1956' AND "Tie no" = '3'
What is Home Team, when Date is 18 February 1956, and when Tie No is 3?
<table0>[table_name_34] { <col0>[termination_of_mission]:[VARCHAR] <col1>[presentation_of_credentials]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "august 29, 1859"
What's the Termination of Mission listed that has a Presentation of Credentials for August 29, 1859?
<table0>[table_name_38] { <col0>[pens]:[VARCHAR] <col1>[conv]:[VARCHAR] <col2>[tries]:[VARCHAR] <col3>[player]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "1" AND `<col3>` = "matt alexander" AND `<col1>` = "4"
Which pens has 1 tries and matt alexander as a player with conv of 4?
<table0>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table1>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate...
SELECT 'site://suggested-edits/' + CAST( s.Id AS TEXT( 20 ) ) + '|' + CASE LENGTH( LTRIM( s.Comment ) ) WHEN 0 THEN 'none' ELSE s.Comment END AS "suggested_edit", s.PostId AS "post_link", s.CreationDate AS "creation_date", s.RejectionDate AS "rejection_date", CASE v.VoteTypeId WHEN 2 THEN 'Approved' WHEN 3 THEN CASE WH...
List votes on a user's rejected suggested edits. Show all the approval and rejection votes on the rejected suggested edits that were proposed by a given user.
<table0>[table_name_33] { <col0>[VARCHAR]:[pos] }
SELECT make FROM `<table0>` WHERE pos > 9
Which Make has a Pos larger than 9?
<table0>[space_debris] { <col0>[INT]:[name] <col1>[VARCHAR]:[type] <col2>[VARCHAR]:[country] <col3>[VARCHAR]:[launch_date] <col4>[DATE]:[mass] }
SELECT SUM( mass ) as total_mass FROM `<table0>` WHERE mass > 1000;
Return the total mass of space debris in the space_debris table, for debris items with a mass greater than 1000 kg
<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( `<col6>` ) FROM `<table10>` WHERE `<col1>` = 3 AND `<col6>` LIKE 'Long' AND `<col4>` LIKE 'Medium'
Among the long reviews made by user ID 3, how many of them have received a medium number of useful votes?
<table0>[table_name_22] { <col0>[year]:[INTEGER] <col1>[location]:[VARCHAR] <col2>[eruptions]:[VARCHAR] }
SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "pacific ring of fire" AND `<col2>` = "pinatubo"
How many years have a Location of pacific ring of fire, and Eruptions of pinatubo?
<table0>[table_train_147] { <col0>[int]:[pregnancy_or_lactation] <col1>[bool]:[systolic_blood_pressure_sbp] <col2>[int]:[hemoglobin_a1c_hba1c] <col3>[float]:[obesity] <col4>[bool]:[fasting_blood_glucose_fbg] <col5>[float]:[heart_rate] <col6>[int]:[body_mass_index_bmi] <col7>[float]:[underweight] <col8>[bool]:[NOUSE] }...
SELECT * FROM `<table0>` WHERE systolic_blood_pressure_sbp <= 90 OR systolic_blood_pressure_sbp > 180
systolic blood pressure ( supine ) <= 90 mmhg or >= 180 mmhg
<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>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3...
SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id WHERE `<table4>`.age < "83" AND diagnoses.short_title = "Pneumococcal pneumonia"
provide the number of patients less than 83 years of age who were diagnosed with pneumococcal pneumonia.
<table0>[PostHistoryTypes] { <col0>[number]:[text] } <table1>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <...
SELECT LAST_DATE_OF_MONTH( CreationDate ), COUNT( PostId ) FROM `<table4>` WHERE ( ReviewTaskTypeId = '##type?2##' ) GROUP BY LAST_DATE_OF_MONTH( CreationDate ) ORDER BY LAST_DATE_OF_MONTH( CreationDate ) LIMIT 100
Number of questions in a review queue per month.
<table0>[delays] { <col0>[delay_id]:[INT] <col1>[route_id]:[INT] <col2>[delay]:[FLOAT] <col3>[delay_reason]:[VARCHAR] <col4>[255]:[delay_date] <col5>[DATE]:[INSERT] }
SELECT route_id, delay_reason, COUNT( * ) as num_`<table0>`, AVG( `<col2>` ) as avg_delay FROM `<table0>` GROUP BY route_id, delay_reason;
Find the number of delays and the average delay duration for each route, partitioned by delay reason.
<table0>[table_21223773_2] { <col0>[position]:[VARCHAR] <col1>[matches_for_nqf]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "2009"
If the matches for NQF is 2009, what is the position?
<table0>[entrepreneur] { <col0>[entrepreneur_id]:[number] <col1>[people_id]:[number] <col2>[company]:[text] <col3>[money_requested]:[number] <col4>[investor]:[text] } <table1>[people] { <col0>[people_id]:[number] <col1>[name]:[text] <col2>[height]:[number] <col3>[weight]:[number] <col4>[date_of_birth]:[text] }
SELECT SUM( T1.money_requested ) FROM `<table0>` AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T2.height > 1.85
Give the total money requested by entrepreneurs who are taller than 1.85.
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]...
SELECT `<table8>`.valuenum FROM `<table8>` WHERE `<table8>`.icustay_id IN ( SELECT `<table14>`.icustay_id FROM `<table14>` WHERE `<table14>`.hadm_id IN ( SELECT `<table5>`.hadm_id FROM `<table5>` WHERE `<table5>`.subject_id = 27463 AND NOT `<table5>`.dischtime IS NULL ORDER BY `<table5>`.admittime LIMIT 1 ) ) AND `<tab...
so whats the last weight of patient 27463 on the first hospital encounter?
<table0>[table_name_12] { <col0>[VARCHAR]:[draw] }
SELECT COUNT( against ) FROM `<table0>` WHERE draw > 48
What is the total number of Against, when Draw is greater than 48?
<table0>[table_203_76] { <col0>[number]:[pos] <col1>[text]:[number] <col2>[driver]:[text] <col3>[constructor]:[text] <col4>[laps]:[number] <col5>[time]:[retired] <col6>[text]:[grid] <col7>[number]:[points] }
SELECT "driver" FROM `<table0>` WHERE "grid" = 2
which driver has his grid at 2 ?
<table0>[table_name_68] { <col0>[pba_team]:[VARCHAR] <col1>[college]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "mlqu"
Who is the PBA team with Mlqu college?
<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>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code...
SELECT `<table9>`.short_title FROM `<table9>` WHERE `<table9>`.icd9_code IN ( SELECT t3.icd9_code FROM ( SELECT t2.icd9_code, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table1>`.charttime FROM `<table1>` JOIN admissions ON `<table1>`.hadm_id = admissions.hadm_id WHERE `...
what are the three most frequently given diagnoses for patients who have been diagnosed with hx-prostatic malignancy before during the same month, in 2105?
<table0>[instructor] { <col0>[instructor_id]:[int] <col1>[name]:[varchar] <col2>[uniqname]:[varchar] } <table1>[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]...
SELECT DISTINCT course.number FROM course, program_course WHERE ( course.number = 480 OR course.number = 541 ) AND course.department = 'EECS' AND program_course.course_id = course.course_id ORDER BY program_course.workload DESC LIMIT 1
Which course is harder between 480 and 541 ?
<table0>[table_8689] { <col0>[Winner]:[text] <col1>[Country]:[text] <col2>[Winter]:[Olympics] <col3>[text]:[FIS] <col4>[Nordic]:[World] <col5>[Ski]:[Championships] <col6>[text]:[Holmenkollen] }
SELECT "Holmenkollen" FROM `<table0>` WHERE "FIS `<col4>` World `<col5>` Championships" = '1962, 1964'
When the FIS Nordic World Ski Championships was 1962, 1964 what was the Holmenkollen?
<table0>[class_of_service] { <col0>[booking_class]:[varchar] <col1>[rank]:[int] <col2>[class_description]:[text] } <table1>[flight_fare] { <col0>[flight_id]:[int] <col1>[fare_id]:[int] } <table2>[code_description] { <col0>[code]:[varchar] <col1>[description]:[text] } <table3>[month] { <col0>[month_number]:[int] <col...
SELECT DISTINCT fare.fare_id FROM `<table21>` AS AIRPORT_SERVICE_0, `<table21>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis, flight, flight_fare WHERE ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.ci...
please list fares for all the flights from ATLANTA to PHILADELPHIA on 8 the 1
<table0>[table_name_68] { <col0>[round]:[VARCHAR] <col1>[player]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "zack walz"
Name the Round which has a Player of zack walz?
<table0>[volunteers] { <col0>[volunteer_id]:[INT] <col1>[volunteer_name]:[TEXT] <col2>[volunteer_date]:[DATE] }
SELECT DATE_PART( 'month', `<col2>` ) as month, COUNT( `<col0>` ) as num_`<table0>` FROM `<table0>` WHERE `<col2>` BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY month;
How many volunteers signed up in each month of 2021?
<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>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal...
SELECT HIRE_DATE, AVG( `<col0>` ) FROM `<table5>` WHERE NOT `<col0>` IN ( SELECT `<col0>` FROM `<table4>` )
For those employees who did not have any job in the past, show me about the distribution of hire_date and the average of employee_id bin hire_date by time in a bar chart.
<table0>[table_name_88] { <col0>[name]:[VARCHAR] <col1>[term_end]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "18 july 1944"
Which Name has a Term end of 18 july 1944?
<table0>[table_204_922] { <col0>[number]:[rank] <col1>[number]:[nation] <col2>[text]:[gold] <col3>[number]:[silver] <col4>[number]:[bronze] <col5>[number]:[total] }
SELECT "nation" FROM `<table0>` ORDER BY "bronze" DESC LIMIT 1
what country scored the top number of bronze medals in taekwondo at the 2013 bolivarian games ?
<table0>[table_203_570] { <col0>[number]:[number] <col1>[title]:[text] <col2>[tpb]:[isbn] <col3>[text]:[tpb] <col4>[release]:[date] <col5>[text]:[tpb] <col6>[page]:[number] <col7>[number]:[collected] <col8>[material]:[text] }
SELECT "title" FROM `<table0>` WHERE id = ( SELECT id FROM `<table0>` WHERE "title" = 'the big ride' ) - 1
which collection was above the big ride ?
<table0>[swimmer] { <col0>[int]:[name] <col1>[text]:[Nationality] <col2>[text]:[meter_100] <col3>[real]:[meter_200] <col4>[text]:[meter_300] <col5>[text]:[meter_400] <col6>[text]:[meter_500] <col7>[text]:[meter_600] <col8>[text]:[meter_700] <col9>[text]:[Time] } <table1>[event] { <col0>[int]:[text] <col1>[Stadium_ID]:...
SELECT name, meter_100 FROM `<table0>` ORDER BY meter_100
Return a bar chart about the distribution of name and meter_100 , and list in asc by the total number.
<table0>[table_261895_1] { <col0>[type]:[VARCHAR] <col1>[nickname]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Britons"
how many categories fall under the category of britons?
<table0>[table_6173] { <col0>[Date]:[text] <col1>[Tournament]:[text] <col2>[Location]:[text] <col3>[Winner]:[text] <col4>[Score]:[text] <col5>[1st]:[prize] }
SELECT SUM( "1st prize ( $ )" ) FROM `<table0>` WHERE "Winner" = 'scott simpson ( 7 )'
Which 1st prize ($) has a Winner of scott simpson (7)?
<table0>[table_11206916_1] { <col0>[average]:[INTEGER] <col1>[stadium]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Firs Park"
The firs park stadium had the lowest average attendence of what?
<table0>[strains] { <col0>[INT]:[name] <col1>[TEXT]:[dispensary_id] <col2>[INT]:[INSERT] } <table1>[dispensaries] { <col0>[INT]:[name] <col1>[TEXT]:[state] <col2>[TEXT]:[INSERT] }
SELECT COUNT( DISTINCT s.name ) FROM `<table0>` s JOIN dispensaries d ON s.dispensary_id = d.id WHERE d.state = 'Colorado' AND d.name LIKE '%organic%';
How many unique strains are available in CO dispensaries that have 'organic' in their name?
<table0>[competition] { <col0>[Competition_ID]:[int] <col1>[Year]:[real] <col2>[Competition_type]:[text] <col3>[Country]:[text] } <table1>[competition_result] { <col0>[Competition_ID]:[int] <col1>[Club_ID_1]:[int] <col2>[Club_ID_2]:[int] <col3>[Score]:[text] } <table2>[player] { <col0>[Player_ID]:[int] <col1>[name]:[...
SELECT Competition_type, COUNT( `<col2>` ) FROM `<table0>` GROUP BY `<col2>`
Give me a bar chart for how many competition type of each competition type
<table0>[table_204_140] { <col0>[number]:[round] <col1>[number]:[number] <col2>[player]:[text] <col3>[position]:[text] <col4>[nationality]:[text] <col5>[college]:[junior] <col6>[club]:[team] <col7>[league]:[text] }
SELECT "player" FROM `<table0>` WHERE "nationality" = 'united states' AND "college/junior/club team ( `<col7>` )" = 'springfield jr. blues'
which player is from the united states and played on the springfield jr. blues ?
<table0>[table_19266557_1] { <col0>[us_viewers__millions]:[VARCHAR] <col1>[number]:[VARCHAR] }
SELECT us_viewers__millions_ FROM `<table0>` WHERE _number = 6
How many millions of viewers were there for number 6?
<table0>[table_7495] { <col0>[Unemployment]:[text] <col1>[2007]:[real] <col2>[2008]:[real] <col3>[2009]:[real] <col4>[2010]:[real] <col5>[2011]:[real] <col6>[2012]:[real] }
SELECT MAX( "2007-03" ) FROM `<table0>` WHERE "2009-03" > '10.6' AND "2012-03" = '15.4'
What is the highest 2007-03, when 2009-03 is greater than 10.6, and when 2012-03 is 15.4?
<table0>[semester] { <col0>[semester_id]:[int] } <table1>[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] <...
SELECT ( SELECT SUM( CASE WHEN DERIVED_TABLEalias0.FRIDAY = 'Y' THEN 1 ELSE 0 END ) + SUM( CASE WHEN DERIVED_TABLEalias0.MONDAY = 'Y' THEN 1 ELSE 0 END ) + SUM( CASE WHEN DERIVED_TABLEalias0.SATURDAY = 'Y' THEN 1 ELSE 0 END ) + SUM( CASE WHEN DERIVED_TABLEalias0.SUNDAY = 'Y' THEN 1 ELSE 0 END ) + SUM( CASE WHEN DERIVED...
Every week , how many lectures are offered by MEDADM 515 ?
<table0>[UPDATE] { <col0>[vehicles]:[SET] <col1>[last_maintenance]:[CURDATE] }
UPDATE vehicles SET last_maintenance = CURDATE( ) WHERE vehicle_id = 1;
Update the "last_maintenance" column for the vehicle with vehicle_id 1 to today's date.
<table0>[table_30090] { <col0>[series]:[real] <col1>[Title]:[text] <col2>[Directed]:[text] <col3>[Written]:[text] <col4>[Original]:[air] <col5>[date]:[text] <col6>[viewers]:[millions] }
SELECT "No. in series" FROM `<table0>` WHERE "Title" = 'Open Water'
What episode number of the series is 'open water'?
<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>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3...
SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN prescriptions ON `<table3>`.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "HYDROmorphone ( Dilaudid )" AND prescriptions.route = "PO"
what is the number of patients whose drug name is hydromorphone (dilaudid) and drug route is po?
<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>[prescr...
SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` WHERE `<table4>`.insurance = "Self Pay" AND `<table4>`.days_stay > "30"
what is the number of patients whose insurance is self pay and days of hospital stay is greater than 30?
<table0>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table1>[CloseAsOffTopicReasonTypes] { <col0>[numbe...
SELECT COUNT( * ) AS "Number of Questions" FROM `<table9>` AS p LEFT JOIN PostTags AS pt ON p.Id = pt.PostId LEFT JOIN Tags AS t ON pt.TagId = t.Id WHERE ViewCount > 500
Number of Questions With View Count of Over 500.
<table0>[Smart_Contracts] { <col0>[Contract_ID]:[INT] <col1>[Gas_Fees]:[DECIMAL] <col2>[Developer_Location]:[VARCHAR] }
SELECT COUNT( * ) FROM `<table0>` WHERE `<col2>` IN ( 'EU', 'India' );
What is the total number of Ethereum smart contracts executed by developers in the EU and India?
<table0>[table_203_288] { <col0>[number]:[season] <col1>[text]:[premiere] <col2>[date]:[text] <col3>[winner]:[text] <col4>[runner]:[text] <col5>[finalists]:[text] <col6>[contestants]:[order] <col7>[elimination]:[text] <col8>[number]:[contestants] <col9>[text]:[number] <col10>[concerts]:[number] }
SELECT "season" FROM `<table0>` WHERE "the winner" = 'ton' ORDER BY "premiere date" DESC LIMIT 1
what is the last season that ton won ?
<table0>[table_71499] { <col0>[Date]:[text] <col1>[Visitor]:[text] <col2>[Score]:[text] <col3>[Home]:[text] <col4>[Record]:[text] <col5>[Attendance]:[real] }
SELECT "Record" FROM `<table0>` WHERE "Attendance" > '19,658' AND "Visitor" = 'los angeles rams'
What is the record when attendance is more than 19,658 and Los Angeles Rams are the visiting team?
<table0>[table_14640] { <col0>[Year]:[text] <col1>[Men]:[singles] <col2>[text]:[Women] <col3>[singles]:[text] <col4>[Men]:[doubles] <col5>[text]:[Women] <col6>[doubles]:[text] <col7>[Mixed]:[doubles] }
SELECT "Men's singles" FROM `<table0>` WHERE "Women's singles" = 'marja ridder'
When Marja Ridder won the Women's singles who won the Men's singles?
<table0>[swimmer] { <col0>[int]:[name] <col1>[text]:[Nationality] <col2>[text]:[meter_100] <col3>[real]:[meter_200] <col4>[text]:[meter_300] <col5>[text]:[meter_400] <col6>[text]:[meter_500] <col7>[text]:[meter_600] <col8>[text]:[meter_700] <col9>[text]:[Time] } <table1>[event] { <col0>[int]:[text] <col1>[Stadium_ID]:...
SELECT Nationality, AVG( ID ) FROM `<table0>` GROUP BY Nationality ORDER BY Nationality
Show the average of id from each nationality, and sort X-axis in ascending order.
<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 procedures ON `<table4>`.hadm_id = procedures.hadm_id WHERE `<table4>`.dob_year < "1846" AND procedures.short_title = "Bone marrow biopsy"
Among patients who had bone marrow biopsy, how many of them were born before 1846?
<table0>[table_name_49] { <col0>[time]:[VARCHAR] <col1>[laps]:[VARCHAR] <col2>[bike]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 25 AND `<col2>` = "honda cbr1000rr"
What is the time of the honda cbr1000rr bike, which has less than 25 laps?
<table0>[table_name_1] { <col0>[location_attendance]:[VARCHAR] <col1>[game]:[VARCHAR] <col2>[team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 36 AND `<col2>` = "atlanta"
What was the location and attendance for the game after game 36 against Atlanta?
<table0>[oil_fields] { <col0>[field_name]:[VARCHAR] <col1>[year]:[INT] <col2>[production]:[INT] }
SELECT field_name, `<col2>` FROM ( SELECT field_name, production, ROW_NUMBER( ) OVER ( ORDER BY `<col2>` DESC ) as rn FROM ( SELECT field_name, SUM( `<col2>` ) as `<col2>` FROM `<table0>` WHERE `<col1>` = 2020 GROUP BY `<col0>` ) t ) tt WHERE rn <= 3;
Identify the top 3 producing oil fields and their respective total production in 2020.
<table0>[table_203_102] { <col0>[number]:[event] <col1>[text]:[performance] <col2>[text]:[athlete] <col3>[text]:[nation] <col4>[text]:[place] <col5>[text]:[date] }
SELECT "performance" FROM `<table0>` WHERE "event" = '4 x 100 m relay'
what is the average speed on each runner in the 4 x 100 m relay ?
<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>[prescriptions] { <c...
SELECT ( SELECT COUNT( DISTINCT t1.subject_id ) FROM ( SELECT admissions.subject_id, `<table7>`.charttime FROM `<table7>` JOIN admissions ON `<table7>`.hadm_id = admissions.hadm_id WHERE `<table7>`.icd9_code = ( SELECT `<table13>`.icd9_code FROM `<table13>` WHERE `<table13>`.short_title = 'foreign bdy ext eye nec' ) ) ...
count the number of patients who were diagnosed with foreign bdy ext eye nec and did not return to the hospital in the same month.
<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>` WHERE `<table4>`.ethnicity = "BLACK/CAPE VERDEAN" AND `<table4>`.diagnosis = "COLANGITIS"
give me the number of patients whose ethnicity is black/cape verdean and primary disease is colangitis?
<table0>[arctic_circle_fields] { <col0>[field_id]:[INT] <col1>[field_name]:[VARCHAR] <col2>[natural_gas_production]:[FLOAT] <col3>[datetime]:[DATETIME] }
SELECT SUM( `<col2>` ) FROM `<table0>` WHERE YEAR( `<col3>` ) = 2017;
Find the total production of natural gas in the Arctic Circle in 2017.
<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 COUNT( DISTINCT `<table0>`.subject_id ) FROM `<table0>` WHERE `<table0>`.expire_flag = "0" AND `<table0>`.dob_year < "2137"
give me the number of patients whose death status is 0 and year of birth is less than 2137?
<table0>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table1>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table2>[chartevents] { <col0>...
SELECT COUNT( DISTINCT t1.subject_id ) FROM ( SELECT admissions.subject_id, `<table7>`.charttime FROM `<table7>` JOIN admissions ON `<table7>`.hadm_id = admissions.hadm_id WHERE `<table7>`.icd9_code = ( SELECT `<table13>`.icd9_code FROM `<table13>` WHERE `<table13>`.short_title = 'vaccination nec' ) AND STRFTIME( '%y',...
how many patients until 2104 were prescribed methylnaltrexone within 2 months after receiving a vaccination nec?
<table0>[table_203_224] { <col0>[number]:[title] <col1>[text]:[year] <col2>[number]:[channel] <col3>[text]:[role] <col4>[text]:[notes] }
SELECT COUNT( * ) FROM `<table0>` WHERE "channel" = 'bbc one'
how many times did she appear on bbc one ?
<table0>[CreativeAIs] { <col0>[app_name]:[VARCHAR] <col1>[255]:[algorithm_name] <col2>[VARCHAR]:[255] }
SELECT app_name, algorithm_name FROM CreativeAIs;
List all creative AI applications and their algorithm names used.
<table0>[table_203_473] { <col0>[number]:[number] <col1>[date]:[text] <col2>[tournament]:[text] <col3>[winning]:[score] <col4>[text]:[margin] <col5>[nof]:[victory] <col6>[text]:[runner] }
SELECT COUNT( * ) FROM `<table0>` WHERE "date" = 4
how many victories did he have in april ?
<table0>[table_name_88] { <col0>[team]:[VARCHAR] <col1>[class]:[VARCHAR] <col2>[rank]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "500cc" AND `<col2>` = "16th"
Which team has a class of 500cc and rank of 16th?
<table0>[table_204_314] { <col0>[number]:[pos] <col1>[number]:[team] <col2>[text]:[played] <col3>[number]:[won] <col4>[number]:[draw] <col5>[number]:[lost] <col6>[number]:[goals] <col7>[number]:[goals] <col8>[number]:[goal] <col9>[difference]:[number] <col10>[points]:[number] <col11>[notes]:[text] }
SELECT MAX( "won" ) FROM `<table0>`
what is the most wins ?
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type...
SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN lab ON `<table4>`.hadm_id = lab.hadm_id WHERE `<table4>`.admission_type = "URGENT" AND lab.fluid = "Other Body Fluid"
count the number of patients whose admission type is urgent and lab test fluid is other body fluid?
<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>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3...
SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id WHERE `<table2>`.marital_status = "SINGLE" AND diagnoses.long_title = "Malignant neoplasm of middle third of esophagus"
get me the number of unmarried patients who have malignant neoplasm of middle third of esophagus diagnoses.
<table0>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table1>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table2>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <co...
SELECT DISTINCT description, `<col1>` FROM `<table4>` WHERE `<col2>` = 'STRATEGY' AND `<col3>` = 564
What does STRATEGY 564 entail ?
<table0>[table_69956] { <col0>[Year]:[real] <col1>[Men]:[singles] <col2>[text]:[Women] <col3>[singles]:[text] <col4>[Men]:[doubles] <col5>[text]:[Women] <col6>[doubles]:[text] <col7>[Mixed]:[doubles] }
SELECT MAX( "Year" ) FROM `<table0>` WHERE "Men's singles" = 'dave f. mctaggart' AND "Mixed doubles" = 'robert b. williams ethel marshall'
What year did dave f. mctaggart win the men's singles and robert b. williams ethel marshall win the mixed doubles?
<table0>[table_name_88] { <col0>[attendance]:[INTEGER] <col1>[opponent]:[VARCHAR] <col2>[week]:[VARCHAR] }
SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "new york giants" AND `<col2>` < 5
Which Attendance has an Opponent of new york giants, and a Week smaller than 5?
<table0>[suppliers] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[products]:[VARCHAR] <col3>[255]:[INSERT] }
SELECT name FROM `<table0>` WHERE `<col2>` LIKE '%Electric Vehicles%';
What are the names of all suppliers that provide materials for the production of electric vehicles?
<table0>[table_17754] { <col0>[Clinical]:[Status] <col1>[text]:[Compound] <col2>[text]:[Trademark] <col3>[text]:[Marine] <col4>[Organism]:[u03b1] <col5>[text]:[Chemical] <col6>[Class]:[text] <col7>[Molecular]:[Target] <col8>[text]:[Clinical] <col9>[Trials]:[u03b2] <col10>[text]:[Disease] <col11>[Area]:[text] }
SELECT COUNT( "Compound Name" ) FROM `<table0>` WHERE "Chemical Class" = 'Depsipeptide' AND "Clinical `<col9>` \u03b2" = '1/7'
How many compound names list a chemical class of depsipeptide and a clinical trials value of 1/7?
<table0>[CREATE] { <col0>[SCHEMA]:[workouts] } <table1>[workout_durations] { <col0>[workout_id]:[INT] <col1>[workout_name]:[VARCHAR] <col2>[duration]:[INT] <col3>[duration_unit]:[VARCHAR] <col4>[workout_date]:[DATE] }
SELECT workout_name, SUM( duration ) as total_duration FROM workouts.workout_durations WHERE workout_date >= '2022-04-01' AND workout_date <= '2022-04-30' GROUP BY workout_name ORDER BY total_duration DESC LIMIT 5;
List the top 5 most popular workouts by duration in April 2022.'
<table0>[station] { <col0>[local_authority]:[VARCHAR] <col1>[services]:[VARCHAR] }
SELECT local_authority, `<col1>` FROM `<table0>`
list the local authorities and services provided by all stations.
<table0>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[PostTypes] { <col0>[number]:[text] } <table2>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[...
SELECT Title, Id, PostTypeId FROM `<table2>` WHERE CreationDate BETWEEN '2014-07-01' AND '2014-07-31'
Limiting Posts by Date (Tutorial).
<table0>[table_name_37] { <col0>[date]:[VARCHAR] <col1>[time___et]:[VARCHAR] <col2>[game_site]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE time___et__ = "1:00 pm" AND `<col2>` = "arrowhead stadium"
What date is the 1:00 pm game at arrowhead stadium?
<table0>[Employees] { <col0>[Employee_ID]:[INTEGER] <col1>[Role_Code]:[CHAR] <col2>[Employee_Name]:[VARCHAR] <col3>[255]:[Gender_MFU] <col4>[CHAR]:[Date_of_Birth] <col5>[DATETIME]:[Other_Details] <col6>[VARCHAR]:[255] } <table1>[Ref_Calendar] { <col0>[Calendar_Date]:[DATETIME] <col1>[Day_Number]:[INTEGER] } <table2>[...
SELECT Location_Code, COUNT( * ) FROM `<table3>` GROUP BY `<col1>` ORDER BY `<col1>` DESC
Show the location codes and the number of documents in each location Visualize by bar chart, display by the X in descending.
<table0>[table_name_46] { <col0>[city]:[VARCHAR] <col1>[venue]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "mackey arena"
What city is Mackey Arena in?
<table0>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table1>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table2>[labevents] { <col0>[r...
SELECT t3.drug FROM ( SELECT t2.drug, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table10>`.charttime, admissions.hadm_id FROM `<table10>` JOIN admissions ON `<table10>`.hadm_id = admissions.hadm_id WHERE `<table10>`.icd9_code = ( SELECT `<table11>`.icd9_code FROM `<tabl...
until 2102, what were the five most frequent medications prescribed to the female patients 60 or above within the same hospital visit after they were diagnosed with hyperlipidemia nec/nos?
<table0>[Documents_to_be_Destroyed] { <col0>[Document_ID]:[INTEGER] <col1>[Destruction_Authorised_by_Employee_ID]:[INTEGER] <col2>[Destroyed_by_Employee_ID]:[INTEGER] <col3>[Planned_Destruction_Date]:[DATETIME] <col4>[Actual_Destruction_Date]:[DATETIME] <col5>[Other_Details]:[VARCHAR] } <table1>[All_Documents] { <col0...
SELECT Date_in_Location_From, COUNT( `<col2>` ) FROM `<table3>`
Show the number of documents in different starting date and bin starting date by weekday interval with a bar chart.
<table0>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] <col6>[value]:[number] } <table1>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <...
SELECT MAX( `<table5>`.valuenum ) FROM `<table5>` WHERE `<table5>`.hadm_id IN ( SELECT `<table3>`.hadm_id FROM `<table3>` WHERE `<table3>`.subject_id = 31854 ) AND `<table5>`.itemid IN ( SELECT `<table4>`.itemid FROM `<table4>` WHERE `<table4>`.label = 'calculated total co2' ) AND STRFTIME( '%y', `<table5>`.charttime )...
what is the daily maximum amount of calculated total co2 patient 31854 has in 2105?
<table0>[table_261642_3] { <col0>[frequency__hz]:[VARCHAR] <col1>[g__]:[s_km] }
SELECT frequency__hz_ FROM `<table0>` WHERE g__μs_km_ = "53.205"
what is the frequency (hz) when the g ( s/km) is 53.205?
<table0>[table_204_689] { <col0>[number]:[year] <col1>[number]:[title] <col2>[text]:[album] <col3>[text]:[number] <col4>[sides]:[text] }
SELECT COUNT( "title" ) FROM `<table0>` WHERE "album" = 'new worlds'
what is the total of titles on new worlds ?
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5...
SELECT t4.`<table7>`name FROM ( SELECT t3.`<table7>`name, DENSE_RANK( ) OVER ( ORDER BY t3.c1 DESC ) AS c2 FROM ( SELECT t2.`<table7>`name, 100 - SUM( CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME( '%j', patient.hospitaldischargetime ) - STRFTIME( '%j', t2.`<table7>`time ) > 2 * 365 THEN 1 EL...
what were the top three diagnoses that had the highest two year mortality rate?
<table0>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table1>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table2>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>...
SELECT PHONE_NUMBER, `<col9>` FROM `<table2>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table1>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY `<col4>`
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of phone_number and manager_id , and show from low to high by the x-axis.
<table0>[flight_fare] { <col0>[flight_id]:[int] <col1>[fare_id]:[int] } <table1>[date_day] { <col0>[month_number]:[int] <col1>[day_number]:[int] <col2>[year]:[int] <col3>[day_name]:[varchar] } <table2>[airport_service] { <col0>[city_code]:[varchar] <col1>[airport_code]:[varchar] <col2>[miles_distant]:[int] <col3>[dir...
SELECT DISTINCT flight.flight_id FROM `<table2>` AS AIRPORT_SERVICE_0, `<table2>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND fare.round_trip_required = 'NO' AND flight_fare.fare_id = fare.fare...
now i need a one way flight from PITTSBURGH to DENVER
<table0>[table_55511] { <col0>[Pick]:[real] <col1>[Round]:[real] <col2>[Player]:[text] <col3>[Position]:[text] <col4>[School]:[text] }
SELECT MAX( "Pick" ) FROM `<table0>` WHERE "Player" = 'parnell dickinson' AND "Round" < '7'
When parnell dickinson was the player and the rounds were under 7, what's the highest pick?
<table0>[table_16432543_3] { <col0>[location]:[VARCHAR] <col1>[enrollment]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 12400
What school location had an enrollment of 12400?
<table0>[tourists] { <col0>[INT]:[country] <col1>[TEXT]:[year] }
SELECT SUM( `<table0>` ) FROM `<table0>` WHERE country = 'Portugal' AND year IN ( 2020, 2021 );
What is the total number of international tourists visiting Portugal in 2020 and 2021?
<table0>[table_name_24] { <col0>[points]:[INTEGER] <col1>[name]:[VARCHAR] <col2>[position]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "ehc münchen ii" AND `<col2>` < 7
what is the lowest points when name is ehc m nchen ii and position is less than 7?
<table0>[table_17862135_3] { <col0>[number_of_dances]:[VARCHAR] <col1>[couple]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Warren & Kym"
How many dances did Warren & Kym have?
<table0>[table_204_463] { <col0>[number]:[year] <col1>[number]:[division] <col2>[number]:[league] <col3>[text]:[regular] <col4>[season]:[text] <col5>[playoffs]:[text] <col6>[open]:[cup] }
SELECT "year" - 2008 FROM `<table0>` WHERE "playoffs" <> 'did not qualify' AND "year" > 2008
how long after 2008 did it take for division 4 to qualify for the playoffs once again ?
<table0>[suppliers] { <col0>[supplier_id]:[INT] <col1>[supplier_name]:[VARCHAR] <col2>[255]:[country] <col3>[VARCHAR]:[255] <col4>[sourcing]:[VARCHAR] } <table1>[product_suppliers] { <col0>[product_id]:[INT] <col1>[supplier_id]:[INT] <col2>[price]:[DECIMAL] }
SELECT MIN( `<col2>` ) FROM `<table1>` INNER JOIN suppliers ON `<table1>`.supplier_id = suppliers.supplier_id WHERE suppliers.sourcing = 'Local';
What is the minimum price of products sourced from 'Local' suppliers in the 'suppliers' table?