schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] } <table1>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] }
SELECT Code, `<col3>` FROM `<table0>` WHERE `<col2>` BETWEEN 60 AND 120 GROUP BY Name
For those products with a price between 60 and 120, show me about the correlation between code and manufacturer , and group by attribute name in a scatter chart.
<table0>[table_name_15] { <col0>[record]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "may 21"
What was the record on May 21?
<table0>[table_name_1] { <col0>[city_area_km_2]:[VARCHAR] <col1>[headquartered_city]:[VARCHAR] <col2>[serial_no]:[VARCHAR] }
SELECT COUNT( city_area_km_2__ ) FROM `<table0>` WHERE `<col1>` = "vehari city" AND `<col2>` > 36
What was the total city area for vehari city with a serial number bigger than 36?
<table0>[table_13934] { <col0>[Date]:[text] <col1>[Type]:[text] <col2>[Time]:[greatest] <col3>[text]:[Saros] <col4>[real]:[Member] <col5>[real]:[Gamma] <col6>[real]:[Magnitude] }
SELECT "Date" FROM `<table0>` WHERE "Saros" > '124' AND "Type" = 'total' AND "Magnitude" > '1.0535' AND "Time ( greatest )" = '20:55:28'
what is the date when saros is more than 124, the type is total, the magnitude is more than 1.0535 and the time (greatest) is 20:55:28?
<table0>[table_75024] { <col0>[Date]:[text] <col1>[Opponent]:[text] <col2>[Score]:[text] <col3>[Loss]:[text] <col4>[Attendance]:[text] <col5>[Record]:[text] }
SELECT "Record" FROM `<table0>` WHERE "Attendance" = '30,335'
Attendance of 30,335 had what record?
<table0>[county] { <col0>[County_Id]:[int] <col1>[County_name]:[text] <col2>[Population]:[real] <col3>[Zip_code]:[text] } <table1>[party] { <col0>[Party_ID]:[int] <col1>[Year]:[real] <col2>[Party]:[text] <col3>[Governor]:[text] <col4>[Lieutenant_Governor]:[text] <col5>[Comptroller]:[text] <col6>[Attorney_General]:[tex...
SELECT County_name, `<col2>` FROM `<table0>`
Compute the total population across county name as a pie chart.
<table0>[TRANSACTIONS] { <col0>[investor_id]:[VARCHAR] <col1>[share_count]:[INTEGER] } <table1>[INVESTORS] { <col0>[Investor_details]:[VARCHAR] <col1>[investor_id]:[VARCHAR] }
SELECT T1.Investor_details FROM `<table1>` AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.share_count > 100
Show details of all investors if they make any transaction with share count greater than 100.
<table0>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table2>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table3>[P...
SELECT a.OwnerUserId AS "user_link", COUNT( * ) AS "count", v.CreationDate AS "date" FROM `<table1>` AS v, Posts AS q, Posts AS a WHERE v.VoteTypeId = 1 AND v.PostId = a.Id AND q.AcceptedAnswerId = a.Id AND q.OwnerUserId != a.OwnerUserId GROUP BY v.CreationDate, a.OwnerUserId ORDER BY COUNT( * ) DESC, v.CreationDate LI...
Top accepted answers per day.
<table0>[t_kc21] { <col0>[MED_CLINIC_ID]:[text] <col1>[OVERALL_CD_ORG]:[text] <col2>[OVERALL_CD_PERSON]:[text] <col3>[COMP_ID]:[text] <col4>[PERSON_ID]:[text] <col5>[PERSON_NM]:[text] <col6>[IDENTITY_CARD]:[text] <col7>[SOC_SRT_CARD]:[text] <col8>[PERSON_SEX]:[number] <col9>[PERSON_AGE]:[number] <col10>[IN_HOSP_DATE]:[...
SELECT `<table0>`.MED_ORG_DEPT_CD, `<table0>`.IN_DIAG_DIS_NM, MAX( t_kc24.CIVIL_SUBSIDY / t_kc24.MED_AMOUT ) FROM `<table0>` JOIN t_kc24 ON `<table0>`.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE `<table0>`.MED_SER_ORG_NO = '1120246' GROUP BY `<table0>`.MED_ORG_DEPT_CD, `<table0>`.IN_DIAG_DIS_NM ORDER BY MAX( t_kc24.CIVI...
依照科室的不同编码以及入院诊断疾病编码的区别算算医院1120246所有的记录里有民政补助的部分与总的医疗费用之比的最大值并把算出的数值由高到低来排列
<table0>[table_name_74] { <col0>[nation]:[VARCHAR] <col1>[rank]:[VARCHAR] <col2>[gold]:[VARCHAR] <col3>[total]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col2>` > 0 AND `<col3>` > 4 AND `<col1>` = "6"
Which Nation has a Gold larger than 0, and a Total larger than 4, and a Rank of 6?
<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 `<table3>`.subject_id ) FROM `<table3>` INNER JOIN diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id WHERE `<table3>`.days_stay > "13" AND diagnoses.short_title = "Severe sepsis"
how many patients were diagnosed with severe sepsis and stayed in the hospital for more than 13 days?
<table0>[CustomerShipments] { <col0>[INT]:[customer_name] <col1>[VARCHAR]:[shipment_date] <col2>[DATE]:[INSERT] }
SELECT customer_name, MAX( shipment_date ) FROM CustomerShipments;
Find the customer with the most recent shipment date.
<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>`.admission_type = "EMERGENCY" AND `<table0>`.days_stay > "2"
calculate the number of patients admitted to emergency who stayed at hospital for more than 2 days.
<table0>[table_15926] { <col0>[Regional]:[County] <col1>[Municipality]:[RCM] <col2>[text]:[Population] <col3>[Canada]:[2011] <col4>[Census]:[real] <col5>[Land]:[Area] <col6>[text]:[Density] <col7>[pop]:[km2] <col8>[text]:[Seat] <col9>[RCM]:[text] }
SELECT "Land Area" FROM `<table0>` WHERE "Seat of RCM" = 'Granby'
what's the land area with seat of rcm being granby
<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>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[...
SELECT `<table3>`.charttime FROM `<table3>` WHERE `<table3>`.icd9_code = ( SELECT `<table16>`.icd9_code FROM `<table16>` WHERE `<table16>`.short_title = 'open reduc-int fix femur' ) AND `<table3>`.hadm_id IN ( SELECT `<table14>`.hadm_id FROM `<table14>` WHERE `<table14>`.subject_id = 3403 ) AND DATETIME( `<table3>`.cha...
when patient 3403 first received the open reduc-int fix femur this year?
<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 procedures ON `<table4>`.hadm_id = procedures.hadm_id WHERE `<table4>`.age < "54" AND procedures.icd9_code = "3142"
provide the number of patients whose age is less than 54 and procedure icd9 code is 3142?
<table0>[species] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[habitat]:[VARCHAR] <col3>[255]:[depth] <col4>[FLOAT]:[INSERT] }
SELECT AVG( depth ) FROM `<table0>` WHERE `<col2>` = 'Kelp Forest';
What is the average depth of kelp forest habitats?
<table0>[table_203_828] { <col0>[number]:[date] <col1>[text]:[opponent] <col2>[text]:[rank] <col3>[text]:[site] <col4>[text]:[result] <col5>[text]:[attendance] }
SELECT "site" FROM `<table0>` ORDER BY "date" LIMIT 1
where was the site of the first game ?
<table0>[table_name_13] { <col0>[crowd]:[INTEGER] <col1>[home_team]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "carlton"
If the Home team is carlton, what's the lowest Crowd found?
<table0>[table_78914] { <col0>[Round]:[real] <col1>[Player]:[text] <col2>[Position]:[text] <col3>[Nationality]:[text] <col4>[College]:[junior] <col5>[club]:[team] <col6>[league]:[text] }
SELECT "Player" FROM `<table0>` WHERE "Position" = 'defence' AND "Round" < '5' AND "Nationality" = 'united states'
Which player from the United States plays defence and was chosen before round 5?
<table0>[environmental_impact_stats] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[year] <col2>[INT]:[CO2_emission] <col3>[INT]:[water_consumption] <col4>[INT]:[waste_generation] }
INSERT INTO environmental_impact_stats ( id, year, CO2_emission, water_consumption, waste_generation ) VALUES ( 6, 2021, 1500, 30000, 2500 );
Add new environmental impact statistics to the environmental_impact_stats table for 2021: CO2_emission = 1500, water_consumption = 30000, waste_generation = 2500
<table0>[workers] { <col0>[INT]:[name] <col1>[VARCHAR]:[industry] <col2>[VARCHAR]:[salary] <col3>[FLOAT]:[state] <col4>[VARCHAR]:[INSERT] }
SELECT state, MIN( salary ) FROM `<table0>` WHERE industry = 'oil' GROUP BY state;
What is the minimum salary of workers in the 'oil' industry in each state in the USA?
<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 * FROM `<table8>` WHERE `<table8>`.ParentId = 234075 ORDER BY `<table8>`.Score DESC
Answers for Post 234075 What is your best programmer joke?. how long before I get tag badges?
<table0>[table_name_11] { <col0>[college_junior_club_team__league]:[VARCHAR] <col1>[round]:[VARCHAR] <col2>[nationality]:[VARCHAR] }
SELECT college_junior_club_team__league_ FROM `<table0>` WHERE `<col1>` = 9 AND `<col2>` = "canada"
What college or club did the round 9 draft pick from Canada come from?
<table0>[table_203_424] { <col0>[number]:[year] <col1>[number]:[starts] <col2>[number]:[wins] <col3>[number]:[number] <col4>[number]:[poles] <col5>[number]:[avg] <col6>[start]:[number] <col7>[avg]:[finish] <col8>[number]:[winnings] <col9>[text]:[position] <col10>[text]:[team] }
SELECT MIN( "year" ) FROM `<table0>` WHERE "top 5" > 0
what is the first year steve grissom had a top 5 finish in the nation wide series ?
<table0>[InfrastructureResilienceTX] { <col0>[State]:[TEXT] <col1>[ProjectType]:[TEXT] <col2>[ResilienceRating]:[INTEGER] }
SELECT ProjectType, AVG( `<col2>` ) as AvgResilience FROM `<table0>` WHERE `<col0>` = 'Texas' GROUP BY ProjectType;
What was the average resilience rating for infrastructure projects in Texas, broken down by project type?
<table0>[flight_fare] { <col0>[flight_id]:[int] <col1>[fare_id]:[int] } <table1>[food_service] { <col0>[meal_code]:[text] <col1>[meal_number]:[int] <col2>[compartment]:[text] <col3>[meal_description]:[varchar] } <table2>[month] { <col0>[month_number]:[int] <col1>[month_name]:[text] } <table3>[days] { <col0>[days_cod...
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_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'WASHINGTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' A...
show me the afternoon flights from WASHINGTON to BOSTON
<table0>[table_name_61] { <col0>[in_malayalam]:[VARCHAR] <col1>[saka_era]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "kartika–agrahayana"
WHAT IS THE IN MALAYALAM WITH kartika agrahayana?
<table0>[flight] { <col0>[aircraft_code_sequence]:[text] <col1>[airline_code]:[varchar] } <table1>[dual_carrier] { <col0>[main_airline]:[varchar] <col1>[low_flight_number]:[int] <col2>[high_flight_number]:[int] <col3>[dual_airline]:[varchar] <col4>[service_name]:[text] } <table2>[month] { <col0>[month_number]:[int] <...
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'DALLAS' AND ground_service.city_code = city.city_code
show me ground transportation in DALLAS please
<table0>[table_name_38] { <col0>[country]:[VARCHAR] <col1>[total]:[VARCHAR] <col2>[solar]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 136.1 AND `<col2>` = 0.02
What country has a less than 136.1 total and a 0.02 solar?
<table0>[community_health_workers] { <col0>[INT]:[name] <col1>[VARCHAR]:[language] <col2>[VARCHAR]:[INSERT] } <table1>[clients] { <col0>[INT]:[name] <col1>[VARCHAR]:[language] <col2>[VARCHAR]:[INSERT] }
SELECT chw.name AS worker_name, cl.name AS client_name, chw.language FROM `<table0>` chw, clients cl WHERE chw.language = cl.language;
Identify the community health workers who speak the same language as their clients, if any.
<table0>[table_name_27] { <col0>[result]:[VARCHAR] <col1>[opponent]:[VARCHAR] <col2>[venue]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "clyde" AND `<col2>` = "h"
What is the result of the match with clyde as the opponent in the h venue?
<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, `<col0>` FROM `<table0>` GROUP BY ACC_Road, `<col9>`
Return a bar chart about the distribution of All_Home and Team_ID , and group by attribute ACC_Road.
<table0>[Player] { <col0>[pID]:[numeric] <col1>[pName]:[varchar] <col2>[yCard]:[varchar] } <table1>[College] { <col0>[cName]:[varchar] <col1>[state]:[varchar] <col2>[enr]:[numeric] } <table2>[Tryout] { <col0>[pID]:[numeric] <col1>[cName]:[varchar] <col2>[pPos]:[varchar] <col3>[decision]:[varchar] }
SELECT pPos, MIN( T2.HS ) FROM `<table2>` AS T1 JOIN Player AS T2 ON T1.pID = T2.pID GROUP BY `<col2>` ORDER BY MIN( T2.HS ) DESC
A bar chart about what is minimum hours of the students playing in different position?, order from high to low by the Y.
<table0>[trip] { <col0>[INTEGER]:[duration] <col1>[INTEGER]:[start_date] <col2>[TEXT]:[start_station_name] <col3>[TEXT]:[start_station_id] <col4>[INTEGER]:[end_date] <col5>[TEXT]:[end_station_name] <col6>[TEXT]:[end_station_id] <col7>[INTEGER]:[bike_id] <col8>[INTEGER]:[subscription_type] <col9>[TEXT]:[zip_code] } <ta...
SELECT date, COUNT( `<col0>` ) FROM `<table2>` WHERE `<col1>` > 85
Give me the number of the dates when the max temperature was higher than 85.
<table0>[table_name_42] { <col0>[duration]:[VARCHAR] <col1>[actor]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "pietro genuardi"
What is the duration that has pietro genuardi as the actor?
<table0>[table_57247] { <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 AVG( "Crowd" ) FROM `<table0>` WHERE "Home `<col2>` score" = '11.14 ( 80 )'
What was the average amount of spectators when the home team scored 11.14 (80)?
<table0>[table_67296] { <col0>[text]:[Country] <col1>[text]:[Status] <col2>[text]:[Moving] <col3>[text]:[Transfer] <col4>[window]:[text] <col5>[Transfer]:[fee] }
SELECT "Name" FROM `<table0>` WHERE "Transfer fee" = 'loan'
What is the Name, when the Transfer fee is 'loan'?
<table0>[table_name_54] { <col0>[name]:[VARCHAR] <col1>[year]:[VARCHAR] <col2>[high_school]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "junior" AND `<col2>` = "wheatley"
What is the Name with a Year of junior, and a High School with wheatley?
<table0>[posts] { <col0>[INT]:[user_id] <col1>[INT]:[content] <col2>[TEXT]:[post_date] <col3>[DATE]:[INSERT] }
DELETE FROM `<table0>` WHERE content LIKE '%Facebook%' AND post_date < '2022-07-01';
Delete all posts with the word 'Facebook' in the content made before 2022-07-01
<table0>[hotels] { <col0>[hotel_id]:[INT] <col1>[hotel_name]:[TEXT] <col2>[country]:[TEXT] } <table1>[energy_consumption] { <col0>[hotel_id]:[INT] <col1>[consumption]:[FLOAT] }
SELECT AVG( `<col1>` ) FROM `<table1>` INNER JOIN hotels ON `<table1>`.hotel_id = hotels.hotel_id WHERE hotels.country = 'France';
What is the average energy consumption per hotel in France?
<table0>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[itemid]:[number] <col5>[charttime]:[time] <col6>[va...
SELECT ( SELECT COUNT( DISTINCT t1.subject_id ) FROM ( SELECT admissions.subject_id, `<table5>`.charttime FROM `<table5>` JOIN admissions ON `<table5>`.hadm_id = admissions.hadm_id WHERE `<table5>`.icd9_code = ( SELECT `<table0>`.icd9_code FROM `<table0>` WHERE `<table0>`.short_title = 'hx-rectal & anal malign' ) AND S...
since 2104 count the number of patients who were diagnosed with hx-rectal & anal malign and did not come back to the hospital within 2 months.
<table0>[table_44930] { <col0>[Outcome]:[text] <col1>[Date]:[real] <col2>[Championship]:[text] <col3>[Surface]:[text] <col4>[Opponent]:[final] <col5>[text]:[Score] <col6>[final]:[text] }
SELECT "Score in the final" FROM `<table0>` WHERE "Date" = '1981'
What is Score in The Final, when Date is '1981'?
<table0>[public_schools] { <col0>[INT]:[name] <col1>[TEXT]:[location] <col2>[TEXT]:[num_students] <col3>[INT]:[avg_teacher_age] <col4>[FLOAT]:[INSERT] }
DELETE FROM `<table0>` WHERE location = 'CA' AND num_students > 800;
Delete all records of schools with more than 800 students in California.
<table0>[Exhibitions] { <col0>[INT]:[city] <col1>[VARCHAR]:[visitors] } <table1>[Visitors] { <col0>[INT]:[exhibition_id] <col1>[INT]:[age] <col2>[INT]:[INSERT] <col3>[Exhibitions]:[city] <col4>[visitors]:[VALUES] <col5>[Paris]:[3000] <col6>[London]:[4000] <col7>[New]:[York] <col8>[5000]:[INSERT] }
SELECT e.city, AVG( v.age ) AS avg_age FROM `<table0>` e JOIN Visitors v ON e.id = v.exhibition_id GROUP BY e.city;
Identify the average age of visitors for each city.
<table0>[table_name_24] { <col0>[to_par]:[INTEGER] <col1>[total]:[INTEGER] }
SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 290
When the total was smaller than 290, what was the highest To par?
<table0>[orders] { <col0>[dish]:[VARCHAR] <col1>[255]:[customer_id] <col2>[INT]:[order_date] } <table1>[customer] { <col0>[customer_id]:[INT] <col1>[age]:[INT] <col2>[gender]:[VARCHAR] <col3>[location]:[VARCHAR] <col4>[INSERT]:[orders] <col5>[dish]:[customer_id] <col6>[order_date]:[VALUES] <col7>[Pizza]:[2021] <col8>[...
SELECT c.age, c.gender, c.location, o.dish, COUNT( o.customer_id ) AS order_count FROM `<table0>` o JOIN customer c ON o.customer_id = c.customer_id WHERE o.order_date >= DATE_SUB( CURRENT_DATE( ), INTERVAL 7 DAY ) GROUP BY o.dish, c.age, c.gender, c.location;
How many times has each dish been ordered in the past week, broken down by customer demographics?
<table0>[table_name_10] { <col0>[assists]:[INTEGER] <col1>[scorer]:[VARCHAR] <col2>[rank]:[VARCHAR] <col3>[goals]:[VARCHAR] }
SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col2>` > 6 AND `<col3>` = 10 AND `<col1>` = "robert ukrop"
What is the average amount of assists with a rank higher than 6 and goals 10 and the scorer is Robert Ukrop
<table0>[table_name_2] { <col0>[type]:[VARCHAR] <col1>[nat]:[VARCHAR] <col2>[name]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "ger" AND `<col2>` = "marcell jansen"
Marcell Jansen of the nation GER has what for the type?
<table0>[users] { <col0>[user_id]:[INT] <col1>[user_country]:[VARCHAR] <col2>[post_date]:[DATE] }
SELECT AVG( post_count ) FROM ( SELECT user_country, COUNT( `<col2>` ) AS post_count FROM `<table0>` WHERE `<col1>` = 'United States' AND `<col2>` BETWEEN '2022-01-01' AND '2022-01-31' GROUP BY `<col1>` ) AS subquery;
What is the average number of posts per day for users from the United States, for the month of January 2022?
<table0>[table_name_14] { <col0>[result]:[VARCHAR] <col1>[record]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "5–4"
Which Result has a Record of 5–4?
<table0>[customers] { <col0>[INT]:[name] <col1>[VARCHAR]:[region] <col2>[VARCHAR]:[account_balance] <col3>[DECIMAL]:[INSERT] }
SELECT * FROM `<table0>` WHERE region = 'Americas' AND account_balance > 40000.00;
Who are the customers with a high account balance in the 'Americas' region?
<table0>[Product_Characteristics] { <col0>[product_id]:[INTEGER] <col1>[characteristic_id]:[INTEGER] <col2>[product_characteristic_value]:[VARCHAR] } <table1>[Characteristics] { <col0>[characteristic_id]:[INTEGER] <col1>[characteristic_type_code]:[VARCHAR] <col2>[characteristic_data_type]:[VARCHAR] <col3>[characterist...
SELECT product_category_description, COUNT( `<col1>` ) FROM `<table3>` AS T1 JOIN Products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%' GROUP BY `<col1>` ORDER BY COUNT( `<col1>` ) DESC
Find the category descriptions of the products whose descriptions include letter 't', and count them by a bar chart, display Y from high to low order.
<table0>[model_fairness] { <col0>[model_id]:[INT] <col1>[fairness_score]:[DECIMAL] }
SELECT model_id, `<col1>` FROM `<table0>` WHERE `<col1>` >= 0.7;
Show the names and fairness scores of models, excluding any models with a fairness score less than 0.7.
<table0>[table_name_15] { <col0>[score]:[VARCHAR] <col1>[player]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "fred couples"
What was Fred Couples' score?
<table0>[coaches] { <col0>[coach_id]:[INT] <col1>[coach_name]:[VARCHAR] <col2>[255]:[INSERT] } <table1>[matches] { <col0>[coach_id]:[INT] <col1>[wins]:[INT] <col2>[season]:[VARCHAR] }
SELECT coaches.coach_name, SUM( `<col1>` ) as total_wins FROM `<table1>` JOIN coaches ON `<table1>`.coach_id = coaches.coach_id WHERE `<table1>`.season = '2018' GROUP BY coaches.coach_name;
Show the total number of wins for each coach in the 2018 tennis season
<table0>[web_client_accelerator] { <col0>[name]:[VARCHAR] } <table1>[accelerator_compatible_browser] { <col0>[accelerator_id]:[VARCHAR] <col1>[browser_id]:[VARCHAR] } <table2>[browser] { <col0>[VARCHAR]:[market_share] }
SELECT DISTINCT T1.name FROM `<table0>` AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T3.market_share > 15
What distinct accelerator names are compatible with the browswers that have market share higher than 15?
<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>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[...
SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` WHERE `<table1>`.language = "ENGL" AND `<table1>`.dob_year < "2069"
count the number of patients whose language is engl and year of birth is less than 2069?
<table0>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[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>[t...
WITH qs AS ( SELECT COUNT( p.Id ) AS "NumQuestion", u.Id, u.DisplayName, u.Reputation FROM `<table22>` AS p JOIN Users AS u ON p.OwnerUserId = u.Id WHERE p.PostTypeId = 1 AND u.Reputation > 10 GROUP BY u.Id, u.Reputation, u.DisplayName, p.PostTypeId ), ans AS ( SELECT COUNT( p.Id ) AS "NumAnswer", u.Id FROM `<table22>`...
Post and Answer counts per user with reputation.
<table0>[table_13306] { <col0>[Period]:[text] <col1>[Internet]:[Explorer] <col2>[text]:[Firefox] <col3>[text]:[Safari] <col4>[text]:[Opera] <col5>[text]:[Netscape] <col6>[text]:[Mozilla] }
SELECT "Opera" FROM `<table0>` WHERE "Internet Explorer" = '63.67%'
What percentage of users were using Opera during the period in which 63.67% were using Internet Explorer?
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4...
SELECT COUNT( * ) > 0 FROM `<table2>` WHERE `<table2>`.`<table1>`unitstayid IN ( SELECT `<table1>`.`<table1>`unitstayid FROM `<table1>` WHERE `<table1>`.`<table1>`healthsystemstayid IN ( SELECT `<table1>`.`<table1>`healthsystemstayid FROM `<table1>` WHERE `<table1>`.uniquepid = '005-12192' ) ) AND `<table2>`.cellpath L...
did patient 005-12192 have ffp given until 959 days ago?
<table0>[table_name_58] { <col0>[d_45]:[VARCHAR] <col1>[d_42]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "r 22"
I want the D 45 and D 42 of r 22
<table0>[table_29127804_3] { <col0>[tournament]:[VARCHAR] <col1>[outcome]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Runner-up"
what is the name of the tournament where outcome is runner-up
<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>` WHERE `<table1>`.admission_type = "URGENT" AND `<table1>`.ethnicity = "BLACK/HAITIAN"
count the number of patients whose admission type is urgent and ethnicity is black/haitian?
<table0>[table_name_38] { <col0>[opponent]:[VARCHAR] <col1>[competition]:[VARCHAR] <col2>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "friendly" AND `<col2>` = "15-08-2012"
Which opponent is friendly and played on 15-08-2012?
<table0>[table_17323529_8] { <col0>[record]:[VARCHAR] <col1>[team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Boston"
What is the record against Boston?
<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 ACC_Road, AVG( `<col1>` ) FROM `<table1>` GROUP BY `<col6>` ORDER BY `<col6>`
Visualize a bar chart about the distribution of ACC_Road and the average of School_ID , and group by attribute ACC_Road, could you order in ascending by the names?
<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, `<col9>` FROM `<table0>` WHERE `<col1>` LIKE '%D%' OR `<col1>` LIKE '%S%' ORDER BY `<col5>`
For all employees who have the letters D or S in their first name, show me about the change of manager_id over hire_date in a line chart, sort by the X-axis in ascending.
<table0>[table_10891] { <col0>[Rank]:[real] <col1>[Nation]:[text] <col2>[Gold]:[real] <col3>[Silver]:[real] <col4>[Bronze]:[real] <col5>[Total]:[real] }
SELECT COUNT( "Silver" ) FROM `<table0>` WHERE "Gold" = '3' AND "Rank" > '1'
How many silver medals are there with 3 gold medals at a rank above 1?
<table0>[table_70189] { <col0>[Year]:[text] <col1>[Venue]:[text] <col2>[Winners]:[text] <col3>[Runner]:[text] <col4>[3rd]:[place] }
SELECT "Runner-up" FROM `<table0>` WHERE "Year" = '2004'
Who was the runner-up in 2004?
<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 prescriptions.icustay_id FROM `<table3>` INNER JOIN prescriptions ON `<table3>`.hadm_id = prescriptions.hadm_id WHERE `<table3>`.name = "Colton Andrade"
what is icu stay id of subject name colton andrade?
<table0>[table_name_43] { <col0>[total]:[INTEGER] <col1>[name]:[VARCHAR] <col2>[premier_league]:[VARCHAR] }
SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "kenwyne jones" AND `<col2>` > 10
What is the average total of kenwyne jones, who has more than 10 premier leagues?
<table0>[consumer_preferences] { <col0>[INT]:[consumer_id] <col1>[INT]:[product] <col2>[VARCHAR]:[preference] <col3>[INT]:[cruelty_free] <col4>[BOOLEAN]:[INSERT] }
SELECT AVG( preference ) as average_preference FROM `<table0>` WHERE cruelty_free = true;
What is the average preference score for cruelty-free products?
<table0>[table_name_50] { <col0>[title]:[VARCHAR] <col1>[weeks_on_chart__uk]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE weeks_on_chart__uk_ = 23
Which single was on the Charts for 23 weeks ?
<table0>[table_name_87] { <col0>[matches]:[INTEGER] <col1>[s_rate]:[VARCHAR] <col2>[balls]:[VARCHAR] <col3>[average]:[VARCHAR] }
SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col2>` < 224 AND `<col3>` > 38.25 AND `<col1>` > 139.09
How many Matches have Balls smaller than 224, and an Average larger than 38.25, and an S/Rate larger than 139.09?
<table0>[Player] { <col0>[PlayerID]:[int] <col1>[PlayerName]:[varchar] <col2>[TeamID]:[int] } <table1>[Assists] { <col0>[AssistID]:[int] <col1>[PlayerID]:[int] }
SELECT PlayerID, TeamID, SUM( `<table1>` ) OVER ( PARTITION BY TeamID ORDER BY SUM( `<table1>` ) DESC ) AS Total_`<table1>` FROM `<table1>` a JOIN Player p ON a.PlayerID = p.PlayerID ORDER BY Total_`<table1>` DESC;
What is the total number of assists by a player, partitioned by their team, in descending order?
<table0>[table_7194] { <col0>[Res]:[text] <col1>[Record]:[text] <col2>[Opponent]:[text] <col3>[Method]:[text] <col4>[Event]:[text] <col5>[Location]:[text] }
SELECT "Location" FROM `<table0>` WHERE "Opponent" = 'arras paul arras'
Where was the location for Arras Paul Arras?
<table0>[table_name_10] { <col0>[l2_cache]:[VARCHAR] <col1>[idle_power]:[VARCHAR] <col2>[model_number]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "100mw" AND `<col2>` = "nano u3400"
What is the L2 Cache for Model Number nano u3400 with an Idle Power of 100mw?
<table0>[customers] { <col0>[customer_details]:[VARCHAR] <col1>[customer_id]:[VARCHAR] } <table1>[policies] { <col0>[customer_id]:[VARCHAR] <col1>[policy_type_code]:[VARCHAR] }
SELECT DISTINCT t2.customer_details FROM `<table1>` AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = "Deputy" OR t1.policy_type_code = "Uniform"
Find the names of customers who either have an deputy policy or uniformed policy.
<table0>[table_204_55] { <col0>[number]:[date] <col1>[text]:[time] <col2>[text]:[opponent] <col3>[text]:[rank] <col4>[text]:[site] <col5>[text]:[text] <col6>[result]:[text] <col7>[attendance]:[number] }
SELECT "date" FROM `<table0>` WHERE "date" > ( SELECT "date" FROM `<table0>` WHERE "date" = 'october 1, 2005' ) ORDER BY "date" LIMIT 1
what date is after october 1st ?
<table0>[table_7124] { <col0>[Track]:[real] <col1>[Recorded]:[text] <col2>[Catalogue]:[text] <col3>[Release]:[date] <col4>[text]:[Chart] <col5>[peak]:[text] <col6>[Song]:[title] <col7>[text]:[Writer] <col8>[text]:[Time] }
SELECT "Chart peak" FROM `<table0>` WHERE "Recorded" = '2/19/69'
Which Chart peak was Recorded on 2/19/69?
<table0>[autonomous_vehicles] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[manufacturer] <col2>[VARCHAR]:[255] <col3>[model]:[VARCHAR] <col4>[255]:[year] <col5>[INT]:[type] <col6>[VARCHAR]:[255] }
ALTER TABLE autonomous_vehicles ADD COLUMN price FLOAT;
Alter the 'autonomous_vehicles' table to add a new column 'price'
<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>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[...
SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` WHERE `<table1>`.diagnosis = "S/P FALL" AND `<table1>`.dod_year <= "2133.0"
Find the number of patients with the primary disease s/p fall who died on or before 2133.
<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>[Faculty_Participates_in] { <col0>[FacID]:[INTEGER] <col1>[actid]:[INTEGER] } <table2>[Partici...
SELECT Rank, COUNT( `<col3>` ) FROM `<table4>` GROUP BY `<col3>`
Show how many rank from each rank
<table0>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table1>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmentt...
SELECT `<table7>`.celllabel FROM `<table7>` WHERE `<table7>`.`<table3>`unitstayid IN ( SELECT `<table3>`.`<table3>`unitstayid FROM `<table3>` WHERE `<table3>`.`<table3>`healthsystemstayid IN ( SELECT `<table3>`.`<table3>`healthsystemstayid FROM `<table3>` WHERE `<table3>`.uniquepid = '017-41154' ) ) AND `<table7>`.cell...
what was the name of the output the first time patient 017-41154 had on 06/24/last year?
<table0>[table_64678] { <col0>[World]:[record] <col1>[text]:[Snatch] <col2>[text]:[Akakios] <col3>[Kakiasvilis]:[GRE] <col4>[text]:[188] <col5>[text]:[Athens] <col6>[Greece]:[text] }
SELECT "World record" FROM `<table0>` WHERE "188kg" = '187kg'
What world record has the 188kg as 187kg?
<table0>[table_68562] { <col0>[Round]:[real] <col1>[Pick]:[real] <col2>[Overall]:[real] <col3>[text]:[Position] <col4>[text]:[College] }
SELECT AVG( "Round" ) FROM `<table0>` WHERE "Overall" = '62'
Overall of 62 is what average round?
<table0>[FeedbackRating] { <col0>[state]:[VARCHAR] <col1>[year]:[INT] <col2>[rating]:[INT] }
SELECT ( COUNT( * ) * 100.0 / ( SELECT COUNT( * ) FROM `<table0>` WHERE `<col0>` = 'Arizona' AND `<col1>` = 2022 ) ) AS pct_rating FROM `<table0>` WHERE `<col0>` = 'Arizona' AND `<col1>` = 2022 AND `<col2>` >= 4;
Find the percentage of citizen feedback records with a rating of 4 or 5 for public services in Arizona state in 2022.
<table0>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:...
SELECT STRFTIME( '%j', `<table1>`.unitdischargetime ) - STRFTIME( '%j', `<table1>`.unitadmittime ) FROM `<table1>` WHERE `<table1>`.`<table1>`healthsystemstayid IN ( SELECT `<table1>`.`<table1>`healthsystemstayid FROM `<table1>` WHERE `<table1>`.uniquepid = '030-40641' ) AND NOT `<table1>`.unitadmittime IS NULL ORDER B...
how long was patient 030-40641's last stay at the icu?
<table0>[table_13566548_1] { <col0>[autonomous_community]:[VARCHAR] <col1>[total_renewable_generation]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 1375
How many communities had a total renewable generation of 1375?
<table0>[Members] { <col0>[MemberID]:[INT] <col1>[Community]:[VARCHAR] <col2>[Region]:[VARCHAR] } <table1>[Classes] { <col0>[ClassID]:[INT] <col1>[ClassType]:[VARCHAR] <col2>[Duration]:[INT] <col3>[MemberID]:[INT] }
SELECT MAX( Classes.Duration ) FROM `<table0>` INNER JOIN Classes ON `<table0>`.MemberID = Classes.MemberID WHERE `<table0>`.Community IN ( 'Latinx', 'African American', 'Native American' ) AND `<table0>`.Region = 'West' AND Classes.ClassType = 'Outdoor Cycling' AND Classes.ClassDate >= DATE_SUB( CURRENT_DATE, INTERVAL...
What is the maximum duration of outdoor cycling classes taken by members from underrepresented communities in the last month?
<table0>[table_17410] { <col0>[Jurisdiction]:[text] <col1>[Prohibition]:[real] <col2>[Percent]:[text] <col3>[Prohibition]:[real] <col4>[Percent]:[text] }
SELECT MAX( "For Prohibition" ) FROM `<table0>`
Name the max for prohibition.
<table0>[paperdataset] { <col0>[paperid]:[int] <col1>[datasetid]:[int] } <table1>[venue] { <col0>[venueid]:[int] <col1>[venuename]:[varchar] } <table2>[paperfield] { <col0>[fieldid]:[int] <col1>[paperid]:[int] } <table3>[dataset] { <col0>[datasetid]:[int] <col1>[datasetname]:[varchar] } <table4>[journal] { <col0>[j...
SELECT DISTINCT COUNT( paper.paperid ), writes.authorid FROM keyphrase, paper, paperkeyphrase, writes WHERE keyphrase.keyphrasename = 'semantic parsing' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.paperid = paper.paperid GROUP BY writes.authorid ORDER BY ...
who wrote the most papers on semantic parsing ?
<table0>[table_name_35] { <col0>[melbourne]:[VARCHAR] <col1>[perth]:[VARCHAR] <col2>[auckland]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "yes" AND `<col2>` = "yes"
Which Melbourne has a Perth of yes, and an Auckland of yes?
<table0>[project] { <col0>[INT]:[city] <col1>[VARCHAR]:[sustainable_urbanism] }
SELECT COUNT( * ) FROM `<table0>` WHERE city = 'Los Angeles' AND sustainable_urbanism = TRUE;
What is the total number of sustainable urbanism projects in the city of Los Angeles?
<table0>[table_name_21] { <col0>[years]:[VARCHAR] <col1>[soap_opera]:[VARCHAR] <col2>[actor]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "glenroe" AND `<col2>` = "mick lally"
what is the years when the soap opera is glenroe and the actor is mick lally?
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[te...
SELECT t1.`<table0>`name FROM ( SELECT `<table0>`.`<table0>`name, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table0>` WHERE `<table0>`.`<table7>`unitstayid IN ( SELECT `<table7>`.`<table7>`unitstayid FROM `<table7>` WHERE `<table7>`.age BETWEEN 20 AND 29 ) AND DATETIME( `<table0>`.`<table0>`resulttime...
what were the five most frequently taken lab tests this year for patients with age 20s?
<table0>[geopolitical_risk] { <col0>[INT]:[region] <col1>[VARCHAR]:[year] <col2>[INT]:[score] <col3>[INT]:[INSERT] }
SELECT score FROM `<table0>` WHERE region = 'Region Y' AND year = 2020;
What is the geopolitical risk assessment score for region Y in 2020?
<table0>[recycling_rates] { <col0>[city]:[VARCHAR] <col1>[year]:[INT] <col2>[material]:[VARCHAR] <col3>[rate]:[FLOAT] }
SELECT material, AVG( `<col3>` ) as avg_rate FROM `<table0>` WHERE `<col0>` = 'Tokyo' AND `<col1>` = 2019 AND `<col2>` = 'Plastic' GROUP BY material;
What is the recycling rate for plastic in Tokyo in 2019?
<table0>[flight_leg] { <col0>[flight_id]:[int] <col1>[leg_number]:[int] <col2>[leg_flight]:[int] } <table1>[date_day] { <col0>[month_number]:[int] <col1>[day_number]:[int] <col2>[year]:[int] <col3>[day_name]:[varchar] } <table2>[food_service] { <col0>[meal_code]:[text] <col1>[meal_number]:[int] <col2>[compartment]:[t...
SELECT DISTINCT flight.flight_id FROM `<table22>` AS AIRPORT_SERVICE_0, `<table22>` 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 > 815 AND flight.to_airport = AIRPORT_SERVICE_1.airpo...
i'd like a flight on UA from DALLAS to SAN FRANCISCO that leaves after 815