schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[singer] { <col0>[Citizenship]:[VARCHAR] <col1>[Net_Worth_Millions]:[INTEGER] }
SELECT Citizenship, MAX( `<col1>` ) FROM `<table0>` GROUP BY `<col0>`
Show different citizenships and the maximum net worth of singers of each citizenship.
<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 COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN diagnoses ON `<table1>`.hadm_id = diagnoses.hadm_id WHERE `<table1>`.ethnicity = "WHITE - RUSSIAN" AND diagnoses.long_title = "Drug withdrawal"
How many white/russian patients had drug withdrawal?
<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>[PendingFlags] { <co...
SELECT * FROM `<table0>` WHERE Id = ( SELECT MAX( Id ) FROM `<table0>` )
Get sum of bounty amount by post_id and user Id and give the second highest bounty amount from group.
<table0>[Suppliers] { <col0>[SupplierID]:[INT] <col1>[SupplierName]:[TEXT] <col2>[Country]:[TEXT] } <table1>[Products] { <col0>[ProductID]:[INT] <col1>[ProductName]:[TEXT] <col2>[Price]:[DECIMAL] <col3>[FairTrade]:[BOOLEAN] <col4>[SupplierID]:[INT] <col5>[INSERT]:[Suppliers] <col6>[SupplierID]:[SupplierName] <col7>[Co...
SELECT COUNT( * ) FROM `<table1>` WHERE `<col3>` = true AND `<col4>` = 5;
How many fair trade products does Supplier E offer?
<table0>[Trends_By_Age] { <col0>[trend_id]:[INT] <col1>[visitor_age]:[INT] <col2>[trend_name]:[VARCHAR] }
SELECT `<col2>` FROM `<table0>` WHERE `<col1>` >= 60 AND `<col2>` IN ( SELECT MAX( `<col2>` ) FROM `<table0>` WHERE `<col1>` >= 60 );
What is the top digital museum trend for visitors aged 60 and older?
<table0>[table_10240125_2] { <col0>[total_goals]:[INTEGER] }
SELECT MAX( `<col0>` ) FROM `<table0>`
Whatis the number of total goals maximum?
<table0>[airlines] { <col0>[country]:[VARCHAR] <col1>[active]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 'Y' GROUP BY `<col0>` ORDER BY COUNT( * ) DESC LIMIT 1
Which countries has the most number of airlines whose active status is 'Y'?
<table0>[EmissionsData] { <col0>[Country]:[VARCHAR] <col1>[Year]:[INT] <col2>[CO2Emission]:[DECIMAL] <col3>[Population]:[INT] }
SELECT Country, ( AVG( CO2Emission/Population ) - LAG( AVG( CO2Emission/Population ) ) OVER ( PARTITION BY `<col0>` ORDER BY `<col1>` ) ) * 100.0 / LAG( AVG( CO2Emission/Population ) ) OVER ( PARTITION BY `<col0>` ORDER BY `<col1>` ) as PercentageChange FROM `<table0>` GROUP BY Country, Year;
Determine the percentage change in average CO2 emission per capita for each country between 2019 and 2020.
<table0>[table_39339] { <col0>[Rank]:[real] <col1>[Country]:[Territory] <col2>[text]:[Miss] <col3>[World]:[real] <col4>[1st]:[Runner] <col5>[real]:[2nd] <col6>[Runner]:[real] <col7>[3rd]:[Runner] <col8>[real]:[4th] <col9>[Runner]:[real] <col10>[5th]:[Runner] <col11>[real]:[6th] <col12>[Runner]:[real] <col13>[Semifinali...
SELECT SUM( "6th Runner-up" ) FROM `<table0>` WHERE "2nd Runner-up" > '4' AND "Country/Territory" = 'israel' AND "4th Runner-up" < '0'
2nd Runner-up larger than 4, and a Country/Territory of israel, and a 4th Runner-up smaller than 0 has which sum of 6th Runner-up?
<table0>[tracks] { <col0>[INT]:[title] <col1>[VARCHAR]:[255] <col2>[genre]:[VARCHAR] <col3>[255]:[platform] <col4>[VARCHAR]:[255] <col5>[sales]:[INT] }
SELECT SUM( `<col5>` ) FROM `<table0>` WHERE `<col2>` = 'Jazz' AND platform = 'iTunes' AND YEAR( id ) = 2022 AND QUARTER( id ) = 3;
What is the total number of jazz tracks sold on iTunes in Q3 2022?
<table0>[employees] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[department] <col3>[VARCHAR]:[salary] <col4>[DECIMAL]:[INSERT] }
SELECT MAX( salary ) AS max_salary FROM `<table0>` WHERE department = 'sales';
What is the maximum salary of employees in the sales department in the employees table?
<table0>[table_20967430_2] { <col0>[INTEGER]:[original_air_date] }
SELECT MIN( ep ) FROM `<table0>` WHERE original_air_date = "November 29, 1985"
Name the least episode for november 29, 1985
<table0>[table_name_9] { <col0>[percentage]:[VARCHAR] <col1>[draw]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 6
Which Percentage has a Draw of 6?
<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 `<table3>`.subject_id ) FROM `<table3>` INNER JOIN procedures ON `<table3>`.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Colonoscopy"
give the number of patients who had colonscopy.
<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>` WHERE `<table4>`.age < "72"
provide the number of patients whose age is less than 72?
<table0>[table_55158] { <col0>[Player]:[text] <col1>[Rec]:[real] <col2>[Yards]:[real] <col3>[Avg]:[real] <col4>[real]:[Long] }
SELECT COUNT( "Long" ) FROM `<table0>` WHERE "Rec." > '27' AND "Avg." < '10.8' AND "TD's" > '6'
What is the toal rec with more than 27 and averages less than 10.8 and TDs more than 6?
<table0>[table_16770037_3] { <col0>[tries_against]:[INTEGER] <col1>[team]:[VARCHAR] <col2>[Bridgend]:[VARCHAR] }
SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = `<col2>`
What are the tries against when they played against Bridgend?
<table0>[Residents_Services] { <col0>[resident_id]:[INTEGER] <col1>[service_id]:[INTEGER] <col2>[date_moved_in]:[DATETIME] <col3>[property_id]:[INTEGER] <col4>[date_requested]:[DATETIME] <col5>[date_provided]:[DATETIME] <col6>[other_details]:[VARCHAR] } <table1>[Timed_Status_of_Things] { <col0>[thing_id]:[INTEGER] <co...
SELECT customer_details, COUNT( `<col1>` ) FROM `<table10>` GROUP BY `<col1>` ORDER BY `<col1>` DESC
Bar graph to show the number of customer details from different customer details, and list in desc by the names.
<table0>[table_name_39] { <col0>[round]:[INTEGER] <col1>[overall]:[VARCHAR] <col2>[pick__number]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 247 AND `<col2>` < 41
What is the lowest Round with Overall of 247 and pick less than 41?
<table0>[wine] { <col0>[INTEGER]:[Grape] <col1>[TEXT]:[Winery] <col2>[TEXT]:[Appelation] <col3>[TEXT]:[State] <col4>[TEXT]:[TEXT] <col5>[Year]:[INTEGER] <col6>[Price]:[INTEGER] <col7>[Score]:[INTEGER] <col8>[Cases]:[INTEGER] <col9>[Drink]:[TEXT] } <table1>[appellations] { <col0>[INTEGER]:[Appelation] <col1>[TEXT]:[Cou...
SELECT Year, MAX( `<col7>` ) FROM `<table0>` GROUP BY `<col5>` ORDER BY `<col5>` DESC
What are the maximum score of wines in each year?, and list by the Year in descending please.
<table0>[station] { <col0>[integer]:[name] <col1>[text]:[lat] <col2>[real]:[long] <col3>[real]:[dock_count] <col4>[integer]:[city] <col5>[text]:[installation_date] } <table1>[status] { <col0>[station_id]:[integer] <col1>[bikes_available]:[integer] <col2>[docks_available]:[integer] <col3>[time]:[text] } <table2>[trip]...
SELECT MIN( T1.duration ) , MIN( T1.duration ) - AVG( T1.duration ), T2.min_temperature_f FROM `<table2>` AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T1.start_date = '1/1/2014 0:00' AND T1.end_date = '12/31/2014 11:59' AND T1.start_station_name = '2nd at Folsom' AND T1.end_station_name = '5th at H...
In 2014, what is the shortest duration of trips by subscribers which started at 2nd at Folsom and ended in the 5th at Howard stations, and by how much shorter than the average? Give me the minimum temperature, maximum gust speed and weather event on that trip.
<table0>[table_2231241_1] { <col0>[seat_no_6]:[VARCHAR] <col1>[seat_no_1]:[VARCHAR] <col2>[seat_no_5]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Jacques Lachapelle" AND `<col2>` = "Donald S. Dutton"
Who was seat no 6 when seat no 1 and seat no 5 were jacques lachapelle and donald s. dutton
<table0>[table_name_43] { <col0>[attendance]:[VARCHAR] <col1>[tie_no]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 9
Which attendance has 9 as the tie no.?
<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 COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` WHERE `<table4>`.ethnicity = "ASIAN" AND `<table4>`.admityear < "2111"
How many of the Asian patients were admitted before the year 2111?
<table0>[aircraft] { <col0>[Aircraft_ID]:[int] <col1>[Aircraft]:[varchar] <col2>[Description]:[varchar] <col3>[Max_Gross_Weight]:[varchar] <col4>[Total_disk_area]:[varchar] <col5>[Max_disk_Loading]:[varchar] } <table1>[pilot] { <col0>[Pilot_Id]:[int] <col1>[varchar]:[Age] } <table2>[match] { <col0>[Round]:[real] <col...
SELECT Description, COUNT( `<col2>` ) FROM `<table0>` GROUP BY `<col2>` ORDER BY COUNT( `<col2>` ) DESC
What are the number of the descriptions for the aircrafts?, and rank by the Y-axis in desc please.
<table0>[users_table] { <col0>[user_id]:[INT] <col1>[posts_count]:[INT] }
SELECT AVG( posts_count ) FROM users_table;
What is the average number of posts per user in the "users_table"?
<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>[PostNotices] { <col0>[number]...
SELECT ( Body ) FROM `<table24>` WHERE Id = '##POSTID##'
POST ID TO POST DATA.
<table0>[medicine_enzyme_interaction] { <col0>[enzyme_id]:[int] <col1>[medicine_id]:[int] <col2>[interaction_type]:[text] } <table1>[enzyme] { <col0>[int]:[name] <col1>[text]:[Location] <col2>[text]:[Product] <col3>[text]:[Chromosome] <col4>[text]:[OMIM] <col5>[int]:[Porphyria] } <table2>[medicine] { <col0>[int]:[nam...
SELECT Trade_Name, id FROM `<table2>` AS T1 JOIN `<table2>`_enzyme_interaction AS T2 ON T2.`<table2>`_id = T1.id ORDER BY Trade_Name
What is the id and trade name of the medicines can interact with at least 3 enzymes, rank by the Trade_Name in asc please.
<table0>[ground_service] { <col0>[city_code]:[text] <col1>[airport_code]:[text] <col2>[transport_type]:[text] <col3>[ground_fare]:[int] } <table1>[code_description] { <col0>[code]:[varchar] <col1>[description]:[text] } <table2>[food_service] { <col0>[meal_code]:[text] <col1>[meal_number]:[int] <col2>[compartment]:[te...
SELECT DISTINCT flight.flight_id FROM `<table20>` AS AIRPORT_SERVICE_0, `<table20>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ( ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND flight.departure_time > 1200 AND flight.to_airport = AIRPORT_SERVICE_1.airp...
is there a flight from DENVER to SAN FRANCISCO on CO leaving after 1200 o'clock in the afternoon
<table0>[table_69650] { <col0>[Date]:[text] <col1>[Venue]:[text] <col2>[Score]:[text] <col3>[Result]:[text] <col4>[Competition]:[text] }
SELECT "Competition" FROM `<table0>` WHERE "Date" = '13 december 2012'
Name the competition for 13 december 2012
<table0>[Suppliers] { <col0>[SupplierID]:[INT] <col1>[SupplierName]:[VARCHAR] <col2>[Country]:[VARCHAR] <col3>[Certification]:[VARCHAR] <col4>[Material]:[VARCHAR] <col5>[Quantity]:[INT] }
UPDATE Suppliers SET Quantity = AVG( Quantity ) OVER ( PARTITION BY Country ) WHERE 1 = 1;
Update the quantity of sustainable material used per supplier, based on the average quantity used by suppliers from the same country?
<table0>[domain] { <col0>[int]:[name] } <table1>[publication] { <col0>[abstract]:[varchar] <col1>[cid]:[int] <col2>[citation_num]:[int] <col3>[jid]:[int] <col4>[pid]:[int] <col5>[reference_num]:[int] <col6>[title]:[varchar] <col7>[year]:[int] } <table2>[keyword] { } <table3>[conference] { <col0>[cid]:[int] <col1>[ho...
SELECT SUM( publication.citation_num ) FROM conference, publication WHERE conference.name = 'VLDB' AND publication.cid = conference.cid AND publication.year = 2005
return me the total citations of papers in the VLDB conference in 2005 .
<table0>[table_49115] { <col0>[Date]:[text] <col1>[Visitor]:[text] <col2>[Score]:[text] <col3>[Home]:[text] <col4>[Decision]:[text] <col5>[Attendance]:[real] <col6>[Record]:[text] <col7>[Points]:[real] }
SELECT "Decision" FROM `<table0>` WHERE "Record" = '29–18–6'
Which Decision has a Record of 29 18 6?
<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 prescriptions ON `<table4>`.hadm_id = prescriptions.hadm_id WHERE `<table4>`.dob_year < "1846" AND prescriptions.formulary_drug_cd = "CEFE1I"
what is the number of patients whose year of birth is less than 1846 and drug code is cefe1i?
<table0>[Residents_Services] { <col0>[resident_id]:[INTEGER] <col1>[service_id]:[INTEGER] <col2>[date_moved_in]:[DATETIME] <col3>[property_id]:[INTEGER] <col4>[date_requested]:[DATETIME] <col5>[date_provided]:[DATETIME] <col6>[other_details]:[VARCHAR] } <table1>[Properties] { <col0>[property_id]:[INTEGER] <col1>[prope...
SELECT other_details, `<col0>` FROM `<table5>` ORDER BY `<col0>` DESC
Bar chart x axis other details y axis resident_id, display y-axis in descending order.
<table0>[movie] { <col0>[movie_id]:[int] <col1>[Title]:[text] <col2>[Year]:[int] <col3>[Director]:[text] <col4>[Budget_million]:[real] <col5>[Gross_worldwide]:[int] } <table1>[book_club] { <col0>[book_club_id]:[int] <col1>[Year]:[int] <col2>[Author_or_Editor]:[text] <col3>[Book_Title]:[text] <col4>[Publisher]:[text] <...
SELECT Category, COUNT( * ) FROM `<table1>` GROUP BY `<col5>` ORDER BY `<col5>` DESC
Give me a histogram for how many books fall into each category?, list X-axis in desc order please.
<table0>[ad_impressions] { <col0>[INT]:[user_id] <col1>[INT]:[platform] <col2>[VARCHAR]:[impressions] <col3>[INT]:[INSERT] } <table1>[users] { <col0>[INT]:[region] <col1>[VARCHAR]:[INSERT] }
SELECT users.region, SUM( CASE WHEN platform = 'Facebook' THEN impressions ELSE 0 END ) as Facebook_impressions, SUM( CASE WHEN platform = 'Instagram' THEN impressions ELSE 0 END ) as Instagram_impressions, SUM( CASE WHEN platform = 'Twitter' THEN impressions ELSE 0 END ) as Twitter_impressions FROM `<table0>` JOIN use...
What is the total number of ad impressions for users in Southeast Asia, broken down by platform?
<table0>[IndianMines] { <col0>[Company]:[VARCHAR] <col1>[Quantity]:[INT] }
SELECT SUM( `<col1>` ) FROM `<table0>`
What is the total quantity of minerals mined by companies in India?
<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 T3.title FROM `<table12>` AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name = 'Universal Pictures' ORDER BY T3.release_date DESC LIMIT 1
What is the title of the latest released movie produced by production company "Universal Pictures"?
<table0>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[admittime]:[time] <col4>[dischtime]:[time] <col5>[admiss...
SELECT SUM( `<table10>`.amount ) FROM `<table10>` WHERE `<table10>`.icustay_id IN ( SELECT `<table6>`.icustay_id FROM `<table6>` WHERE `<table6>`.hadm_id IN ( SELECT `<table1>`.hadm_id FROM `<table1>` WHERE `<table1>`.subject_id = 20441 ) ) AND `<table10>`.itemid IN ( SELECT `<table13>`.itemid FROM `<table13>` WHERE `<...
tell me how many doses of tpn d15.0 patient 20441 had consumed on 02/25/this year.
<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>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm...
SELECT `<table15>`.long_title FROM `<table15>` WHERE `<table15>`.short_title = 'tox eff org lead compnd' UNION SELECT `<table6>`.long_title FROM `<table6>` WHERE `<table6>`.short_title = 'tox eff org lead compnd'
tox eff org lead compnd what does it stand for?
<table0>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] <col5>[ethnicity]:[text] <col6>[hospitalid]:[number] <col7>[wardid]:[number] <col8>[admissionheight]:[number] <col9>[admissionweight]:[number] <col10>[disch...
SELECT AVG( t1.c1 ) FROM ( SELECT COUNT( DISTINCT `<table9>`.patientunitstayid ) AS c1 FROM `<table9>` WHERE `<table9>`.`<table9>`name = 'traumatic injury to major vessels - r femoral artery' AND DATETIME( `<table9>`.`<table9>`time ) >= DATETIME( CURRENT_TIME( ), '-2 year' ) GROUP BY STRFTIME( '%y', `<table9>`.`<table9...
what is the average yearly number of patients with traumatic injury to major vessels - r femoral artery diagnosed since 2 years ago?
<table0>[t_kc21_t_kc24] { <col0>[MED_CLINIC_ID]:[text] <col1>[MED_SAFE_PAY_ID]:[number] } <table1>[t_kc24] { <col0>[ACCOUNT_DASH_DATE]:[time] <col1>[ACCOUNT_DASH_FLG]:[number] <col2>[CASH_PAY]:[number] <col3>[CIVIL_SUBSIDY]:[number] <col4>[CKC102]:[number] <col5>[CLINIC_ID]:[text] <col6>[CLINIC_SLT_DATE]:[time] <col7>...
SELECT `<table3>`.MED_ORG_DEPT_CD, AVG( t_kc24.OVE_PAY ) FROM `<table3>` JOIN t_kc24 JOIN `<table3>`_t_kc24 ON `<table3>`.MED_CLINIC_ID = `<table3>`_t_kc24.MED_CLINIC_ID AND `<table3>`_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID WHERE `<table3>`.MED_SER_ORG_NO = '4856304' GROUP BY `<table3>`.MED_ORG_DEPT_CD
在医院4856304的不同科室编码下,列出所有医疗就诊记录的统筹基金支出与医疗费总额平均是多大比值?
<table0>[cultural_events] { <col0>[event_id]:[INT] <col1>[event_name]:[VARCHAR] <col2>[start_date]:[DATE] <col3>[end_date]:[DATE] <col4>[location]:[VARCHAR] <col5>[tickets_sold]:[INT] }
ALTER TABLE cultural_events ADD event_website VARCHAR( 50 );
Alter the "cultural_events" table by adding a new column named "event_website" with data type VARCHAR(50).
<table0>[sales] { <col0>[garment]:[VARCHAR] <col1>[category]:[VARCHAR] <col2>[quantity]:[INT] <col3>[sale_date]:[DATE] }
SELECT garment, category, sale_date, ( quantity - LAG( quantity ) OVER ( PARTITION BY category, garment ORDER BY sale_date ) ) * 100.0 / LAG( quantity ) OVER ( PARTITION BY category, garment ORDER BY sale_date ) as yoy_growth FROM sales;
Calculate the year-over-year growth in sales for each garment, partitioned by category and ordered by date.
<table0>[FlightSafety] { <col0>[INT]:[aircraft_id] <col1>[INT]:[manufacturer] <col2>[VARCHAR]:[255] <col3>[flight_hours]:[INT] }
SELECT AVG( `<col3>` ) FROM `<table0>` WHERE manufacturer = 'Airbus' AND `<col3>` > 15000;
What is the average number of flight hours for aircrafts manufactured by Airbus that have more than 15000 flight hours?
<table0>[Shipments] { <col0>[INT]:[source] <col1>[VARCHAR]:[destination] <col2>[VARCHAR]:[weight] <col3>[FLOAT]:[ship_date] <col4>[DATE]:[INSERT] }
SELECT COUNT( * ) FROM `<table0>` WHERE ( source = 'Saudi Arabia' OR source = 'UAE' OR source = 'Iran' ) AND ( destination = 'USA' OR destination = 'Canada' ) AND ship_date BETWEEN '2022-09-01' AND '2022-09-30';
What was the count of shipments from the Middle East to North America in September 2022?
<table0>[table_name_74] { <col0>[played]:[VARCHAR] <col1>[points_against]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "271"
For which play was the points 271?
<table0>[articles] { <col0>[INT]:[title] <col1>[VARCHAR]:[255] <col2>[topic]:[VARCHAR] <col3>[255]:[publication_date] <col4>[DATE]:[INSERT] }
SELECT topic, COUNT( * ) FROM `<table0>` WHERE YEAR( publication_date ) = 2022 GROUP BY topic;
What is the distribution of articles by topic published in the media domain in 2022?
<table0>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[admittime]:[time] <col4>[dischtime]:[time] <col5>[admission_type]:[text] <col6>[admission_location]:[text] <col7>[discharge_location]:[text] <col8>[insurance]:[text] <col9>[language]:[text] <col10>[marital_status]...
SELECT AVG( `<table2>`.valuenum ) FROM `<table2>` WHERE `<table2>`.icustay_id IN ( SELECT `<table16>`.icustay_id FROM `<table16>` WHERE `<table16>`.hadm_id IN ( SELECT `<table0>`.hadm_id FROM `<table0>` WHERE `<table0>`.subject_id = 17237 ) ) AND `<table2>`.itemid IN ( SELECT `<table12>`.itemid FROM `<table12>` WHERE `...
what is the yearly average of the weight of patient 17237?
<table0>[course_offering] { <col0>[offering_id]:[int] <col1>[course_id]:[int] <col2>[semester]:[int] <col3>[section_number]:[int] <col4>[start_time]:[time] <col5>[end_time]:[time] <col6>[monday]:[varchar] <col7>[tuesday]:[varchar] <col8>[wednesday]:[varchar] <col9>[thursday]:[varchar] <col10>[friday]:[varchar] <col11>[...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Marta Kondratyuk%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_i...
What are all the courses Prof. Marta Kondratyuk teaches ?
<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 q.Id AS "post_link", q.AcceptedAnswerId FROM `<table15>` AS q WHERE NOT q.AcceptedAnswerId IS NULL AND NOT EXISTS( SELECT a.Id FROM `<table15>` AS a WHERE a.Id = q.AcceptedAnswerId )
Questions with an accepted answer but without an accepted answer.
<table0>[table_name_6] { <col0>[super_g]:[INTEGER] <col1>[downhill]:[VARCHAR] <col2>[overall]:[VARCHAR] }
SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "11" AND `<col2>` < 16
What is the highest Super G that had an 11 Downhill and an overall less than 16?
<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>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[t...
SELECT `<table4>`.short_title FROM `<table4>` WHERE `<table4>`.icd9_code IN ( SELECT t1.icd9_code FROM ( SELECT `<table13>`.icd9_code, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table13>` WHERE `<table13>`.hadm_id IN ( SELECT `<table11>`.hadm_id FROM `<table11>` WHERE `<table11>`.age BETWEEN 50 AND 59...
what were the top four most frequent diagnoses for the patients with age 50s in 2101.
<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>` INNER JOIN prescriptions ON `<table0>`.hadm_id = prescriptions.hadm_id WHERE `<table0>`.days_stay > "3" AND prescriptions.drug = "Morphine Sulfate SR"
how many patients taking morphine sulfate sr medication have been hospitalized for more than 3 days?
<table0>[table_name_62] { <col0>[score]:[VARCHAR] <col1>[venue]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "vasil levski national stadium, sofia"
What score does Vasil Levski National Stadium, Sofia earn?
<table0>[table_name_77] { <col0>[wins]:[VARCHAR] <col1>[club]:[VARCHAR] <col2>[flags]:[VARCHAR] <col3>[draws]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col2>` > 6 AND `<col3>` > 10 AND `<col1>` = "south warrnambool"
How many wins did South Warrnambool have that had more than 6 flags and a draw greater than 10?
<table0>[Donors] { <col0>[INT]:[donor_name] <col1>[TEXT]:[donation_date] <col2>[DATE]:[INSERT] }
SELECT DATEPART( quarter, donation_date ) as quarter, COUNT( DISTINCT donor_name ) as num_donors FROM `<table0>` GROUP BY quarter;
How many donors made donations in each quarter of the year?
<table0>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] <col5>[ethnicity]:[text] <col6>[hospitalid]:[number] <col7>[wardid]:[number] <col8>[admissionheight]:[number] <col9>[admissionweight]:[number] <col10>[disch...
SELECT COUNT( * ) FROM `<table6>` WHERE `<table6>`.`<table0>`unitstayid IN ( SELECT `<table0>`.`<table0>`unitstayid FROM `<table0>` WHERE `<table0>`.`<table0>`healthsystemstayid IN ( SELECT `<table0>`.`<table0>`healthsystemstayid FROM `<table0>` WHERE `<table0>`.uniquepid = '002-62783' ) ) AND `<table6>`.`<table6>`name...
how many times do patient 002-62783 get a magnesium test until 2103?
<table0>[forest_inventory] { <col0>[tree_id]:[INT] <col1>[diameter_class]:[VARCHAR] } <table1>[dangerous_diameter_classes] { <col0>[diameter_class]:[VARCHAR] }
SELECT COUNT( * ) FROM `<table0>` WHERE `<col1>` IN ( SELECT `<col1>` FROM `<table1>` );
What is the total number of trees in the forest_inventory table that have a diameter class that is present in the dangerous_diameter_classes table?
<table0>[table_204_130] { <col0>[number]:[number] <col1>[date]:[text] <col2>[venue]:[text] <col3>[opponent]:[text] <col4>[score]:[text] <col5>[result]:[text] <col6>[competition]:[text] }
SELECT "date" FROM `<table0>` ORDER BY "date" DESC LIMIT 1
what is the last date ?
<table0>[table_name_35] { <col0>[tournament]:[VARCHAR] }
SELECT 1993 FROM `<table0>` WHERE `<col0>` = "cincinnati"
What is 1993, when Tournament is 'Cincinnati'?
<table0>[table_24565004_19] { <col0>[goals]:[INTEGER] <col1>[period]:[VARCHAR] }
SELECT MAX( goals¹ ) FROM `<table0>` WHERE `<col1>` = "1972 – 1975, 1976 – 1982"
Name the most goals for 1972 1975, 1976 1982
<table0>[carbon_sequestration] { <col0>[INT]:[year] <col1>[INT]:[FLOAT] }
SELECT SUM( amount ) FROM `<table0>` WHERE year = 2021;
What is the total carbon sequestration for 2021?
<table0>[aircraft] { <col0>[aircraft_code]:[varchar] <col1>[aircraft_description]:[varchar] <col2>[manufacturer]:[varchar] <col3>[basic_type]:[varchar] <col4>[engines]:[int] <col5>[propulsion]:[varchar] <col6>[wide_body]:[varchar] <col7>[wing_span]:[int] <col8>[length]:[int] <col9>[weight]:[int] <col10>[capacity]:[int]...
SELECT DISTINCT `<table0>`.`<table0>`_code FROM `<table0>`, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, equipment_sequence, flight WHERE `<table0>`.capacity = ( SELECT MIN( AIRCRAFTalias1.capacity ) FROM `<table0>` AS AIRCRAFTalias1, airport_service AS AIR...
what is the smallest aircraft available to fly on from PITTSBURGH to BALTIMORE
<table0>[staff_department_assignments] { <col0>[staff_id]:[number] <col1>[department_id]:[number] <col2>[date_assigned_from]:[time] <col3>[job_title_code]:[text] <col4>[date_assigned_to]:[time] } <table1>[staff] { <col0>[staff_id]:[number] <col1>[staff_gender]:[text] <col2>[staff_name]:[text] } <table2>[department_st...
SELECT `<col2>` FROM `<table5>` WHERE `<col1>` = 'Hardware' ORDER BY `<col3>` DESC LIMIT 1
What is the name of the hardware product with the greatest price?
<table0>[table_name_9] { <col0>[cubic_inches__exact]:[VARCHAR] <col1>[metric_value]:[VARCHAR] }
SELECT cubic_inches__exact_ FROM `<table0>` WHERE `<col1>` = "104.955 l"
What are the exact Cubic inches of the Metric value of 104.955 L?
<table0>[farmers] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[region]:[VARCHAR] <col3>[255]:[training_year] <col4>[INT]:[training_topic] <col5>[VARCHAR]:[255] }
DELETE FROM `<table0>` WHERE training_topic = 'Soil Conservation' AND `<col2>` = 'Yangtze River Delta' AND training_year = 2022;
Delete the record for the 'Soil Conservation' training in the 'Yangtze River Delta' region in 2022.
<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 COUNT( * ) > 0 FROM `<table9>` WHERE `<table9>`.`<table1>`unitstayid IN ( SELECT `<table1>`.`<table1>`unitstayid FROM `<table1>` WHERE `<table1>`.`<table1>`healthsystemstayid IN ( SELECT `<table1>`.`<table1>`healthsystemstayid FROM `<table1>` WHERE `<table1>`.uniquepid = '025-28600' ) ) AND `<table9>`.culturesit...
since 09/2104, has there been any organism found in patient 025-28600's last sputum, tracheal specimen microbiology test?
<table0>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table1>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[EMAIL]:[varchar] <col4>[PHONE_NUMBER]:[varchar] <col...
SELECT JOB_ID, COUNT( `<col6>` ) FROM `<table1>` WHERE `<col7>` BETWEEN 8000 AND 12000 AND `<col8>` <> "null" OR `<col10>` <> 40 GROUP BY `<col6>`
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, visualize a bar chart about the distribution of job_id and the amount of job_id , and group by attribute job_id.
<table0>[Assessment_Notes] { <col0>[notes_id]:[INTEGER] <col1>[student_id]:[INTEGER] <col2>[teacher_id]:[INTEGER] <col3>[date_of_notes]:[DATETIME] <col4>[text_of_notes]:[VARCHAR] <col5>[255]:[other_details] <col6>[VARCHAR]:[255] } <table1>[Ref_Detention_Type] { <col0>[detention_type_code]:[VARCHAR] <col1>[detention_ty...
SELECT date_of_notes, COUNT( `<col3>` ) FROM `<table0>` ORDER BY `<col3>`
What are the dates of the assessment notes, and count them by a line chart, I want to show in ascending by the X-axis.
<table0>[impact] { <col0>[INT]:[mining_operation] <col1>[TEXT]:[year] <col2>[INT]:[score] <col3>[FLOAT]:[INSERT] }
SELECT MIN( score ) FROM `<table0>` WHERE year = 2005 AND mining_operation LIKE '%Mining%';
What is the minimum environmental impact score for mining operations in Year 2005?
<table0>[EXISTS] { <col0>[tourists]:[INT] <col1>[PRIMARY]:[KEY] <col2>[name]:[TEXT] <col3>[country]:[TEXT] <col4>[daily_spending]:[FLOAT] <col5>[visit_date]:[DATE] <col6>[INSERT]:[tourists] <col7>[name]:[country] <col8>[daily_spending]:[visit_date] <col9>[VALUES]:[John] <col10>[Doe]:[USA] <col11>[1200]:[2020] <col12>[J...
SELECT COUNT( * ) FROM tourists WHERE country = 'Japan' AND EXTRACT( YEAR FROM visit_date ) = 2020 AND daily_spending > 1000;
How many international tourists visited Japan in 2020 and spent more than $1000 per day on average?
<table0>[table_1373768_1] { <col0>[trim]:[VARCHAR] <col1>[fuel_mileage__latest_epa_mpg___us]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE fuel_mileage__latest_epa_mpg___us__ = "22 city, 30 hwy, 25 comb"
what's the trim with fuel mileage (latest epa mpg - us ) being 22 city, 30 hwy, 25 comb
<table0>[microbiologyevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[charttime]:[time] <col4>[spec_type_desc]:[text] <col5>[org_name]:[text] } <table1>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[eve...
SELECT COUNT( * ) FROM `<table15>` WHERE `<table15>`.icd9_code = ( SELECT `<table14>`.icd9_code FROM `<table14>` WHERE `<table14>`.short_title = 'other tracheal operation' ) AND `<table15>`.hadm_id IN ( SELECT `<table2>`.hadm_id FROM `<table2>` WHERE `<table2>`.subject_id = 8016 ) AND STRFTIME( '%y', `<table15>`.chartt...
how many times patient 8016 since 2101 undergoes other tracheal operation?
<table0>[table_33223] { <col0>[Home]:[team] <col1>[text]:[Home] <col2>[team]:[score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Away]:[team] <col6>[score]:[text] <col7>[Venue]:[text] <col8>[Crowd]:[real] <col9>[Date]:[text] }
SELECT "Away team" FROM `<table0>` WHERE "Home `<col2>` score" = '13.22 ( 100 )'
Who is the away side, when the home side scores 13.22 (100)?
<table0>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } <table1>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comment_text]:[varchar] } <table2>[gsi] { <col0>[course_offering_id]:[int] <col1>[...
SELECT DISTINCT course.department, course.name, course.number, `<table13>`.workload, `<table13>`.workload FROM course, `<table13>` WHERE `<table13>`.category LIKE '%Core%' AND `<table13>`.course_id = course.course_id AND `<table13>`.workload = ( SELECT MIN( PROGRAM_COURSEalias1.workload ) FROM `<table13>` AS PROGRAM_CO...
What is the most straightforward class I can take to satisfy the Core ?
<table0>[table_27755784_10] { <col0>[score]:[VARCHAR] <col1>[team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "@ Dallas"
What is the score when the team is @ dallas?
<table0>[table_204_163] { <col0>[number]:[airline] <col1>[text]:[icao] <col2>[text]:[iata] <col3>[text]:[callsign] <col4>[text]:[commenced] <col5>[noperations]:[number] }
SELECT "airline" FROM `<table0>` WHERE "commenced\noperations" = 2005
what was the name of the only airline that commenced operations in 2005 ?
<table0>[table_26478] { <col0>[World]:[record] <col1>[text]:[Jarmila] <col2>[Kratochv]:[u00edlov] <col3>[u00e1]:[TCH] <col4>[text]:[text] <col5>[Munich]:[West] <col6>[Germany]:[text] <col7>[July]:[1983] }
SELECT "World record" FROM `<table0>` WHERE "1:53.28" = '1:54.01'
If 1:53.28 is 1:54.01, what is the world record?
<table0>[obesity] { <col0>[country]:[VARCHAR] <col1>[255]:[region] <col2>[VARCHAR]:[255] <col3>[year]:[INT] <col4>[rate]:[DECIMAL] }
SELECT AVG( `<col4>` ) FROM `<table0>` WHERE region = 'East Africa' AND `<col3>` = 2020;
What is the obesity rate among children in East Africa in 2020?
<table0>[table_41662] { <col0>[years]:[text] <col1>[2400]:[kWh] <col2>[real]:[2200] <col3>[kWh]:[real] <col4>[2000]:[kWh] <col5>[real]:[1800] <col6>[kWh]:[real] <col7>[1600]:[kWh] <col8>[real]:[1400] <col9>[kWh]:[real] <col10>[1200]:[kWh] <col11>[real]:[1000] <col12>[kWh]:[real] <col13>[800]:[kWh] }
SELECT MAX( "2000 kWh/kW p y" ) FROM `<table0>` WHERE "2400 kWh/kW p y" < '12.5' AND "1600 kWh/kW p y" = '3.8' AND "1800 kWh/kW p y" < '3.3'
What is the 2000 kwh p y with a 2400 kwh/kw p y less than 12.5, a 3.8 1600 kwh/kw p y, and a 1800 kwh/kw p y less than 3.3?
<table0>[mountain] { <col0>[mountain_id]:[number] <col1>[name]:[text] <col2>[height]:[number] <col3>[prominence]:[number] <col4>[range]:[text] <col5>[country]:[text] } <table1>[climber] { <col0>[climber_id]:[number] <col1>[name]:[text] <col2>[country]:[text] <col3>[time]:[text] <col4>[points]:[number] <col5>[mountain_...
SELECT `<col1>` FROM `<table1>` WHERE `<col2>` <> "Switzerland"
List the names of climbers whose country is not Switzerland.
<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 24 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table7>`.`<table7>`time ) ) FROM `<table7>` WHERE `<table7>`.`<table4>`unitstayid IN ( SELECT `<table4>`.`<table4>`unitstayid FROM `<table4>` WHERE `<table4>`.`<table4>`healthsystemstayid IN ( SELECT `<table4>`.`<table4>`healthsystemstayid FROM `<table...
how many hours have passed since the last time that patient 005-4471 has had an i.v. intake on the current intensive care unit visit?
<table0>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[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>[ch...
SELECT `<table7>`.charttime FROM `<table7>` WHERE `<table7>`.icd9_code = ( SELECT `<table0>`.icd9_code FROM `<table0>` WHERE `<table0>`.short_title = 'parent infus nutrit sub' ) AND `<table7>`.hadm_id IN ( SELECT `<table4>`.hadm_id FROM `<table4>` WHERE `<table4>`.subject_id = 7073 ) AND DATETIME( `<table7>`.charttime,...
when did the last time patient 7073 had a parent infus nutrit sub performed during the previous year?
<table0>[table_name_66] { <col0>[result]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "may 30"
What was the Result on May 30?
<table0>[table_16769] { <col0>[Race]:[text] <col1>[Circuit]:[text] <col2>[Date]:[text] <col3>[Winning]:[driver] <col4>[text]:[Constructor] <col5>[text]:[Report] }
SELECT "Date" FROM `<table0>` WHERE "Race Name" = 'V Madgwick Cup'
When does V Madgwick Cup take place?
<table0>[table_name_43] { <col0>[venue]:[VARCHAR] <col1>[away_team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "hawthorn"
Where was the Hawthorn game played?
<table0>[requirement] { <col0>[requirement_id]:[int] } <table1>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comment_text]:[varchar] } <table2>[student_record] { <col0>[student_id]:[int] <col1>[course_id]:[int] <col2>[semester]:[int] <col3>[grade]:[varchar] <co...
SELECT DISTINCT `<table14>`.department, `<table14>`.name, `<table14>`.number FROM `<table14>` INNER JOIN `<table14>`_offering ON `<table14>`.`<table14>`_id = `<table14>`_offering.`<table14>`_id INNER JOIN offering_instructor ON offering_instructor.offering_id = `<table14>`_offering.offering_id INNER JOIN instructor ON ...
Which of the upper level courses are taught by Rounds ?
<table0>[Student] { <col0>[StuID]:[INTEGER] <col1>[LName]:[VARCHAR] <col2>[Fname]:[VARCHAR] <col3>[Age]:[INTEGER] <col4>[Sex]:[VARCHAR] <col5>[Major]:[INTEGER] <col6>[Advisor]:[INTEGER] <col7>[city_code]:[VARCHAR] } <table1>[Allergy_Type] { <col0>[Allergy]:[VARCHAR] <col1>[AllergyType]:[VARCHAR] } <table2>[Has_Allerg...
SELECT AllergyType, COUNT( `<col1>` ) FROM `<table1>` GROUP BY `<col1>` ORDER BY `<col1>` DESC
Create a bar chart showing how many allergytype across allergytype, and could you rank by the bars from high to low?
<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>` INNER JOIN procedures ON `<table0>`.hadm_id = procedures.hadm_id WHERE `<table0>`.marital_status = "WIDOWED" AND procedures.short_title = "Transplant cadaver donor"
count the number of patients whose marital status is widowed and procedure short title is transplant cadaver donor?
<table0>[Allergy_Type] { <col0>[Allergy]:[VARCHAR] <col1>[AllergyType]:[VARCHAR] } <table1>[Has_Allergy] { <col0>[StuID]:[INTEGER] <col1>[Allergy]:[VARCHAR] } <table2>[Student] { <col0>[StuID]:[INTEGER] <col1>[LName]:[VARCHAR] <col2>[Fname]:[VARCHAR] <col3>[Age]:[INTEGER] <col4>[Sex]:[VARCHAR] <col5>[Major]:[INTEGER]...
SELECT Sex, AVG( `<col3>` ) FROM `<table2>` GROUP BY `<col4>` ORDER BY `<col4>` DESC
Visualize a bar chart for what are the average ages for male and female students?, could you rank from high to low by the names?
<table0>[EsportsEvents] { <col0>[Event]:[VARCHAR] <col1>[100]:[Game] <col2>[VARCHAR]:[100] <col3>[PrizePool]:[INT] }
SELECT AVG( `<col3>` ) FROM `<table0>` WHERE Game = 'CS:GO';
What is the average prize pool for 'CS:GO' esports events?
<table0>[table_19304764_2] { <col0>[recognised_seats]:[INTEGER] }
SELECT MIN( `<col0>` ) FROM `<table0>`
Name the least recognised seats
<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>`.discharge_location FROM `<table0>` WHERE `<table0>`.subject_id = "76508"
what is discharge location of subject id 76508?
<table0>[climber] { <col0>[Climber_ID]:[int] <col1>[text]:[Country] <col2>[text]:[Time] <col3>[text]:[Points] <col4>[real]:[Mountain_ID] } <table1>[mountain] { <col0>[Mountain_ID]:[int] <col1>[text]:[Height] <col2>[real]:[Prominence] <col3>[real]:[Range] <col4>[text]:[Country] }
SELECT T2.Name, COUNT( T2.Name ) FROM `<table0>` AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID GROUP BY T2.Name ORDER BY T2.Name
What is the number of climbers for each mountain? Show me a bar chart, list by the x-axis in ascending.
<table0>[Skills_Required_To_Fix] { <col0>[part_fault_id]:[VARCHAR] <col1>[skill_id]:[VARCHAR] } <table1>[Part_Faults] { <col0>[fault_short_name]:[VARCHAR] <col1>[part_fault_id]:[VARCHAR] } <table2>[Skills] { <col0>[skill_description]:[VARCHAR] <col1>[skill_id]:[VARCHAR] }
SELECT T1.fault_short_name, T3.skill_description FROM `<table1>` AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.part_fault_id = T2.part_fault_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id
For all the faults of different parts, what are all the decriptions of the skills required to fix them? List the name of the faults and the skill description.
<table0>[table_name_47] { <col0>[muzzle_device]:[VARCHAR] <col1>[barrel_twist]:[VARCHAR] <col2>[stock]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1:7" AND `<col2>` = "4th generation"
What is the muzzle device with a 1:7 barrel twist and a stock 4th generation?
<table0>[table_name_17] { <col0>[single]:[VARCHAR] <col1>[artist]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "cap d"
What single was written by the artist cap D?
<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 COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN procedures ON `<table1>`.hadm_id = procedures.hadm_id WHERE `<table1>`.gender = "M" AND procedures.icd9_code = "5110"
what is the number of patients whose gender is m and procedure icd9 code is 5110?