schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[table_name_64] { <col0>[college]:[VARCHAR] <col1>[player]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "alex poythress"
What was the college for Alex Poythress?
<table0>[table_name_60] { <col0>[local_name]:[VARCHAR] <col1>[network]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "nova tv"
Which Local name has a Network of nova tv?
<table0>[table_61207] { <col0>[text]:[text] <col1>[text]:[text] <col2>[text]:[text] <col3>[noon]:[text] <col4>[text]:[text] <col5>[text]:[text] <col6>[text]:[text] <col7>[text]:[text] }
SELECT "5:00 pm" FROM `<table0>` WHERE "7:00 am" = 'cbs this morning'
What is the 5pm show where CBS This Morning is on at 7am?
<table0>[table_4648] { <col0>[text]:[City] <col1>[text]:[Metres] <col2>[real]:[Feet] <col3>[real]:[Floors] <col4>[real]:[Finalized] }
SELECT MAX( "Metres" ) FROM `<table0>` WHERE "Finalized" = '2015' AND "Floors" < '40' AND "Feet" > '509'
Which building was built in 2015, has less than 40 floors and is larger than 509 feet?
<table0>[table_69599] { <col0>[Event]:[text] <col1>[Gold]:[real] <col2>[Silver]:[real] <col3>[Bronze]:[real] <col4>[Total]:[real] <col5>[Ranking]:[text] }
SELECT "Gold" FROM `<table0>` WHERE "Silver" > '30' AND "Total" < '107'
What Gold has a Silver greater than 30 and a Total less than 107?
<table0>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table1>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[EMAIL]:[varchar] <col4>[PHONE_NUMBER]:[varchar] <col5>[HIRE_DATE]:[date] ...
SELECT LAST_NAME, `<col0>` FROM `<table1>`
Give me a bar chart for employee_id of each last name
<table0>[company] { <col0>[INT]:[name] <col1>[TEXT]:[country] <col2>[TEXT]:[rd_expenditure] <col3>[FLOAT]:[INSERT] }
SELECT SUM( rd_expenditure ) FROM `<table0>` WHERE name LIKE '%Pharmaceuticals%' AND country = 'Canada';
What is the total R&D expenditure for companies that have 'Pharmaceuticals' in their name and are located in Canada?
<table0>[table_name_3] { <col0>[home_team]:[VARCHAR] <col1>[venue]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "mcg"
Who is the home team that played at venue MCG?
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culture...
SELECT MIN( `<table3>`.cellvaluenumeric ) FROM `<table3>` WHERE `<table3>`.`<table6>`unitstayid IN ( SELECT `<table6>`.`<table6>`unitstayid FROM `<table6>` WHERE `<table6>`.`<table6>`healthsystemstayid IN ( SELECT `<table6>`.`<table6>`healthsystemstayid FROM `<table6>` WHERE `<table6>`.uniquepid = '016-9636' ) AND `<ta...
what is the daily minimum amount of output (ml)-external urinary catheter in patient 016-9636 on the current icu visit?
<table0>[table_name_62] { <col0>[driver]:[VARCHAR] <col1>[laps]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 45
Who is the driver for laps of 45
<table0>[CREATE] { <col0>[VIEW]:[annual_water_usage] <col1>[SELECT]:[region] <col2>[SUM]:[usage] <col3>[total_water_usage]:[water_usage] <col4>[INNER]:[JOIN] <col5>[regions]:[region] <col6>[region_name]:[GROUP] }
UPDATE annual_water_usage SET total_water_usage = total_water_usage * 1.05 WHERE year = 2021;
Update the 'total_water_usage' column in the 'annual_water_usage' view where the year is 2021
<table0>[diagnoses_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>[admissi...
SELECT DISTINCT t1.c1 FROM ( SELECT `<table12>`.valuenum, PERCENT_RANK( ) OVER ( ORDER BY `<table12>`.valuenum ) AS c1 FROM `<table12>` WHERE `<table12>`.itemid IN ( SELECT `<table11>`.itemid FROM `<table11>` WHERE `<table11>`.label = 'anion gap' ) AND `<table12>`.hadm_id IN ( SELECT `<table1>`.hadm_id FROM `<table1>` ...
what percentile is the value of the anion gap in 12.0 among patients of the same age as patient 5252 in their first hospital encounter?
<table0>[table_name_80] { <col0>[outgoing_manager]:[VARCHAR] <col1>[replaced_by]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "thomas von heesen"
Who was the outgoing manager that was replaced by Thomas Von Heesen?
<table0>[returns] { <col0>[INT]:[country] <col1>[TEXT]:[return_weight] <col2>[FLOAT]:[return_date] }
SELECT r.country, ( ( SUM( r.return_weight ) - ( SELECT SUM( r.return_weight ) FROM `<table0>` r WHERE r.return_date >= DATEADD( year, -2, GETDATE( ) ) AND r.return_date < DATEADD( year, -1, GETDATE( ) ) AND r.country = c.country ) ) / ( SELECT SUM( r.return_weight ) FROM `<table0>` r WHERE r.return_date >= DATEADD( ye...
Which countries have experienced an increase in returns in the last quarter compared to the same quarter of the previous year, and what is the percentage change for each country?
<table0>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table2>[labevents] { <col0>[r...
SELECT `<table9>`.charttime FROM `<table9>` WHERE `<table9>`.icustay_id IN ( SELECT `<table15>`.icustay_id FROM `<table15>` WHERE `<table15>`.hadm_id IN ( SELECT `<table11>`.hadm_id FROM `<table11>` WHERE `<table11>`.subject_id = 10211 ) AND NOT `<table15>`.outtime IS NULL ORDER BY `<table15>`.intime LIMIT 1 ) ORDER BY...
what time has patient 10211 first had an intake on the first intensive care unit visit?
<table0>[table_204_415] { <col0>[number]:[season] <col1>[text]:[tier] <col2>[number]:[division] <col3>[text]:[place] }
SELECT COUNT( * ) FROM `<table0>` WHERE "season" > '1994/95' AND "place" = 1
after the 1994/95 season , how many first place finishes did the club have ?
<table0>[landfill_capacity] { <col0>[location]:[VARCHAR] <col1>[capacity]:[INT] }
INSERT INTO landfill_capacity ( location, capacity ) VALUES ( 'Berlin', 25000 );
Insert new record into landfill_capacity table for location 'Berlin' and capacity 25000 tons
<table0>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:...
SELECT SUM( a.Reputation ) FROM ( SELECT TOP( 2415565 ) AS Reputation FROM `<table13>` ORDER BY Reputation ) AS a
no of users every year.
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[lab] {...
SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN lab ON `<table3>`.hadm_id = lab.hadm_id WHERE `<table3>`.gender = "F" AND lab.label = "MCV"
how many of the female patients had a lab test for mcv?
<table0>[table_13328239_4] { <col0>[date]:[VARCHAR] <col1>[venue]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Halton Stadium"
When was the game happening at Halton Stadium?
<table0>[ai_projects] { <col0>[sector]:[VARCHAR] <col1>[budget]:[INT] }
SELECT MIN( budget ) FROM ai_projects;
What is the minimum budget for AI projects?
<table0>[train_station] { <col0>[Train_ID]:[int] <col1>[Station_ID]:[int] } <table1>[station] { <col0>[Station_ID]:[int] <col1>[text]:[Annual_entry_exit] <col2>[real]:[Annual_interchanges] <col3>[real]:[Total_Passengers] <col4>[real]:[Location] <col5>[text]:[Main_Services] <col6>[text]:[Number_of_Platforms] } <table2...
SELECT Location, SUM( Total_Passengers ) FROM `<table1>` GROUP BY Location ORDER BY Location DESC
Visualize a bar chart showing each location's total number of passengers, and I want to sort by the bars in desc please.
<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>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table2>[procedures_...
SELECT COUNT( * ) > 0 FROM `<table10>` WHERE `<table10>`.icustay_id IN ( SELECT `<table12>`.icustay_id FROM `<table12>` WHERE `<table12>`.hadm_id IN ( SELECT `<table4>`.hadm_id FROM `<table4>` WHERE `<table4>`.subject_id = 5828 ) ) AND `<table10>`.itemid IN ( SELECT `<table16>`.itemid FROM `<table16>` WHERE `<table16>`...
have arterial bp mean's of patient 5828 been less than 72.0 on 12/28/this year?
<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>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[...
SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` WHERE `<table2>`.gender = "F" AND `<table2>`.days_stay > "23"
what is the number of patients whose gender is f and days of hospital stay is greater than 23?
<table0>[table_21355] { <col0>[Date]:[text] <col1>[Opponent]:[text] <col2>[Venue]:[text] <col3>[Result]:[text] <col4>[Attendance]:[real] <col5>[Competition]:[text] <col6>[Man]:[Match] }
SELECT COUNT( "Date" ) FROM `<table0>` WHERE "Man of the Match" = 'David Savage'
How many dates did David Savage get man of the match?
<table0>[table_16927] { <col0>[Governorate]:[text] <col1>[Russian]:[text] <col2>[Polish]:[text] <col3>[Seat]:[text] <col4>[Area]:[thousands] <col5>[real]:[Population] <col6>[thousands]:[1905] }
SELECT "Population, in thousands,( 1905 )" FROM `<table0>` WHERE "Seat" = 'Lublin'
What population (in thousands) is Lublin's seat?
<table0>[table_name_29] { <col0>[visitor]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "november 17"
who visited on november 17?
<table0>[IndigenousCommunities] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[community] <col2>[VARCHAR]:[255] <col3>[location]:[VARCHAR] <col4>[255]:[population] <col5>[INT]:[INSERT] }
SELECT location, COUNT( DISTINCT community ) as total_communities FROM `<table0>` GROUP BY location;
Calculate the total number of indigenous communities in each Arctic country.
<table0>[table_name_21] { <col0>[date]:[VARCHAR] <col1>[away_team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "south melbourne"
What day is south melbourne the away side?
<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>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:...
SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN prescriptions ON `<table2>`.hadm_id = prescriptions.hadm_id WHERE `<table2>`.gender = "M" AND prescriptions.drug = "Eplerenone"
what is the number of patients whose gender is m and drug name is eplerenone?
<table0>[Order_Items] { <col0>[item_id]:[INTEGER] <col1>[order_item_status_code]:[VARCHAR] <col2>[order_id]:[INTEGER] <col3>[product_id]:[INTEGER] <col4>[item_status_code]:[VARCHAR] <col5>[item_delivered_datetime]:[DATETIME] <col6>[item_order_quantity]:[VARCHAR] } <table1>[Mailshot_Campaigns] { <col0>[mailshot_id]:[IN...
SELECT premises_type, COUNT( premises_type ) FROM `<table3>` AS T1 JOIN Premises AS T2 ON T1.premise_id = T2.premise_id GROUP BY address_type_code, premises_type ORDER BY COUNT( premises_type ) DESC
Show the of customer addresses and group by premises type and address type code in a stacked bar chart The x-axis is premises type, and I want to sort in descending by the total number please.
<table0>[water_usage] { <col0>[INT]:[brand] <col1>[VARCHAR]:[255] <col2>[usage]:[FLOAT] }
SELECT brand, AVG( `<col2>` ) FROM `<table0>` GROUP BY brand;
What is the average water usage for each brand?
<table0>[Building] { <col0>[INT]:[name] <col1>[VARCHAR]:[city] <col2>[VARCHAR]:[country] <col3>[VARCHAR]:[sqft] <col4>[INT]:[PRIMARY] <col5>[KEY]:[INSERT] } <table1>[GreenRoof] { <col0>[INT]:[building_id] <col1>[INT]:[planted_date] <col2>[DATE]:[size] <col3>[INT]:[PRIMARY] <col4>[KEY]:[FOREIGN] <col5>[KEY]:[building_i...
SELECT b.name, ( g.size/r.size )*100 as '% of Green Roof' FROM `<table1>` g JOIN Building b ON g.building_id = b.id JOIN Roof r ON b.id = r.building_id ORDER BY '% of Green Roof' DESC LIMIT 1;
Which buildings in Japan have the highest percentage of green roofs?
<table0>[table_1057316_1] { <col0>[wheel_arrangement___whyte_notation]:[VARCHAR] <col1>[operational_owner_s]:[VARCHAR] }
SELECT COUNT( wheel_arrangement___whyte_notation__ ) FROM `<table0>` WHERE operational_owner_s_ = "Texas and New Orleans Railroad #319"
How many wheels does the train owned by Texas and New Orleans Railroad #319 have?
<table0>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[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>[valuenum]:[number] <col7>[valueuom]:[tex...
SELECT COUNT( * ) > 0 FROM `<table5>` WHERE `<table5>`.icustay_id IN ( SELECT `<table12>`.icustay_id FROM `<table12>` WHERE `<table12>`.hadm_id IN ( SELECT `<table10>`.hadm_id FROM `<table10>` WHERE `<table10>`.subject_id = 24268 ) ) AND `<table5>`.itemid IN ( SELECT `<table13>`.itemid FROM `<table13>` WHERE `<table13>...
has sc 26 pg been given to patient 24268 until 03/25/2105?
<table0>[table_25565] { <col0>[real]:[Player] <col1>[text]:[Position] <col2>[text]:[League] <col3>[real]:[Champions] <col4>[League]:[real] <col5>[Copa]:[del] <col6>[Rey]:[real] <col7>[Total]:[real] }
SELECT MAX( "Copa del Rey" ) FROM `<table0>` WHERE "Player" = 'Karim Benzema'
Name the most copa del rey for karim benzema
<table0>[tickets] { <col0>[INT]:[event] <col1>[TEXT]:[category] <col2>[TEXT]:[price] <col3>[DECIMAL]:[quantity] <col4>[INT]:[INSERT] }
SELECT category, SUM( price * quantity ) as total_revenue FROM `<table0>` GROUP BY category ORDER BY total_revenue DESC;
What is the total revenue for each cultural event category, sorted by revenue in descending order?
<table0>[PlayerMaxSessions] { <col0>[PlayerID]:[int] <col1>[MaxPlaytime]:[int] }
SELECT P.PlayerName, MAX( PMS.MaxPlaytime ) as MaxPlaytime FROM Players P JOIN PlayerMaxSessions PMS ON P.PlayerID = PMS.PlayerID;
What is the maximum playtime in a single session for each player?
<table0>[LegalClinics] { <col0>[INT]:[ClinicID] <col1>[VARCHAR]:[District] <col2>[VARCHAR]:[Hours] <col3>[INT]:[Year] <col4>[INT]:[INSERT] }
SELECT ClinicID FROM `<table0>` WHERE District = 'South Peak' AND Hours > 250;
List all the legal clinics in 'South Peak' justice district that have provided more than 250 hours of service in a year.
<table0>[table_23259077_1] { <col0>[championship]:[VARCHAR] <col1>[opponent_in_the_final]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Ken Rosewall"
In which championship did John Newcombe play against Ken Rosewall in the final match?
<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>[demogr...
SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN procedures ON `<table2>`.hadm_id = procedures.hadm_id WHERE `<table2>`.days_stay > "15" AND procedures.short_title = "Packed cell transfusion"
what is the number of patients whose days of hospital stay is greater than 15 and procedure short title is packed cell transfusion?
<table0>[table_name_84] { }
SELECT 2012 FROM `<table0>` WHERE 2013 = "2r" AND 2005 = "1r" AND 2008 = "1r"
What is the value in 2012 if it is 2R in 2013, 1R in 2005, and 1R in 2008?
<table0>[table_75749] { <col0>[Type]:[text] <col1>[Zinc]:[u2013carbon] <col2>[text]:[Alkaline] <col3>[text]:[FeS] <col4>[text]:[NiCd] <col5>[text]:[NiMH] }
SELECT "Li-FeS 2" FROM `<table0>` WHERE "Type" = 'nominal voltage'
What is Li-FeS 2, when Type is Nominal Voltage?
<table0>[table_name_42] { <col0>[method]:[VARCHAR] <col1>[event]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "flawless fighting championship 1: the beginning"
Which method's event was flawless fighting championship 1: the beginning?
<table0>[table_56605] { <col0>[Faroese]:[text] <col1>[Norwegian]:[bokm] <col2>[u00e5l]:[text] <col3>[Norwegian]:[nynorsk] <col4>[text]:[English] <col5>[text]:[Icelandic] <col6>[text]:[Danish] <col7>[text]:[Swedish] <col8>[text]:[German] <col9>[text]:[Dutch] }
SELECT "Norwegian ( nynorsk )" FROM `<table0>` WHERE "Danish" = 'farvel'
Which Norwegian (nynorsk) has a Danish of farvel?
<table0>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table1>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table2>[TagSynonyms] { <col0...
SELECT q.Score AS "q-score", a.Score AS "a-score" FROM `<table19>` AS q INNER JOIN ( SELECT DISTINCT a.ParentId, MAX( a.Score ) AS "score" FROM `<table19>` AS a WHERE a.PostTypeId = 2 GROUP BY a.ParentId ) AS a ON q.Id = a.ParentId WHERE q.PostTypeId = 1 AND q.ClosedDate IS NULL
Question score vs. highest voted Answer score.
<table0>[course] { <col0>[course_id]:[int] <col1>[name]:[varchar] <col2>[department]:[varchar] <col3>[number]:[varchar] <col4>[credits]:[varchar] <col5>[advisory_requirement]:[varchar] <col6>[enforced_requirement]:[varchar] <col7>[description]:[varchar] <col8>[num_semesters]:[int] <col9>[num_enrolled]:[int] <col10>[has...
SELECT DISTINCT instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'PHIL' AND course.number = 406 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.o...
Who is teaching PHIL 406 ?
<table0>[table_204_115] { <col0>[number]:[year] <col1>[number]:[track] <col2>[text]:[number] <col3>[number]:[team] <col4>[text]:[car] <col5>[text]:[round] <col6>[result]:[text] }
SELECT COUNT( * ) FROM `<table0>` WHERE "round result" < 11
how many times was the round result higher than 11th ?
<table0>[table_43611] { <col0>[Game]:[real] <col1>[Date]:[text] <col2>[Opponent]:[text] <col3>[Score]:[text] <col4>[Location]:[text] <col5>[Record]:[text] }
SELECT "Date" FROM `<table0>` WHERE "Opponent" = 'portland trail blazers'
What date was the opponent the Portland Trail Blazers?
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text]...
SELECT `<table1>`.language FROM `<table1>` WHERE `<table1>`.name = "Kelly Gallardo"
what is language of subject name kelly gallardo?
<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>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:...
SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` WHERE `<table4>`.ethnicity = "BLACK/HAITIAN" AND `<table4>`.diagnosis = "RASH"
provide the number of patients whose ethnicity is black/haitian and primary disease is rash?
<table0>[table_name_62] { <col0>[date]:[VARCHAR] <col1>[attendance]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "31,220"
What is the date where the attendance was 31,220?
<table0>[compartment_class] { <col0>[compartment]:[varchar] <col1>[class_type]:[varchar] } <table1>[time_interval] { <col0>[period]:[text] <col1>[begin_time]:[int] <col2>[end_time]:[int] } <table2>[class_of_service] { <col0>[booking_class]:[varchar] <col1>[rank]:[int] <col2>[class_description]:[text] } <table3>[city...
SELECT DISTINCT flight.flight_id FROM `<table20>` AS AIRPORT_SERVICE_0, `<table20>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, fare, flight, flight_fare WHERE ( ( ( ( ( ( flight.arrival_time < 41 OR flight.time_elapsed >= 60 ) AND flight.departure_time > flight.arrival_time ) AND date_day.day...
please list the cheapest flights from DALLAS to BALTIMORE arriving on 5 7
<table0>[gwyjzb] { <col0>[CLINIC_ID]:[text] <col1>[CLINIC_TYPE]:[text] <col2>[COMP_ID]:[text] <col3>[DATA_ID]:[text] <col4>[DIFF_PLACE_FLG]:[number] <col5>[FERTILITY_STS]:[number] <col6>[FLX_MED_ORG_ID]:[text] <col7>[HOSP_LEV]:[number] <col8>[HOSP_STS]:[number] <col9>[IDENTITY_CARD]:[text] <col10>[INPT_AREA_BED]:[text]...
SELECT * FROM `<table0>` WHERE `<table0>`.MED_SER_ORG_NO = '6389409' AND `<table0>`.IN_HOSP_DATE BETWEEN '2004-09-26' AND '2012-04-01' UNION SELECT * FROM f`<table0>` WHERE f`<table0>`.MED_SER_ORG_NO = '6389409' AND f`<table0>`.IN_HOSP_DATE BETWEEN '2004-09-26' AND '2012-04-01' EXCEPT SELECT * FROM `<table0>` WHERE `<t...
这所医院编码是6389409所有非异地结算的医疗就诊记录在2004-09-26到2012-04-01内有哪些个?
<table0>[table_name_91] { <col0>[gold]:[VARCHAR] <col1>[silver]:[VARCHAR] <col2>[nation]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "5" AND `<col2>` = "belgium"
What is Gold, when Silver is 5, and when Nation is Belgium?
<table0>[students] { <col0>[student_id]:[INT] <col1>[school_id]:[INT] <col2>[mental_health_score]:[INT] }
SELECT school_id, AVG( `<col2>` ) as avg_mental_health_score FROM `<table0>` GROUP BY school_id;
What is the average mental health score of students per school?
<table0>[ingredients] { <col0>[ingredient_id]:[INT] <col1>[ingredient_name]:[TEXT] <col2>[sourcing_frequency]:[INT] }
SELECT AVG( cost ) FROM ( SELECT * FROM ( SELECT ingredient_name, sourcing_frequency, ROW_NUMBER( ) OVER ( ORDER BY `<col2>` DESC ) AS rn FROM `<table0>` ) sub WHERE rn <= 5 ) sub2 JOIN `<table0>` ON sub2.ingredient_name = `<table0>`.ingredient_name;
What is the average cost of the top 5 most frequently sourced ingredients?
<table0>[table_name_37] { <col0>[to_par]:[INTEGER] <col1>[place]:[VARCHAR] <col2>[country]:[VARCHAR] }
SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "t8" AND `<col2>` = "west germany"
What is the highest to par with a place of t8 and West Germany as the country?
<table0>[table_name_89] { <col0>[draws]:[INTEGER] <col1>[goals_against]:[VARCHAR] <col2>[wins]:[VARCHAR] }
SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` > 56 AND `<col2>` > 14
Name the most draws when goals against is more than 56 and wins is more than 14
<table0>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[ReviewTaskStateId] <col4>[number]:[PostId] <col5>[number]:[SuggestedEditId] <col6>[number]:[CompletedByReviewTaskId] } <table1>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNo...
SELECT t.TagName, COUNT( * ) AS PostCount FROM `<table2>` AS p LEFT JOIN `<table2>` AS q ON p.ParentId = q.Id LEFT JOIN ( PostTags AS pt INNER JOIN Tags AS t ON pt.TagId = t.Id ) ON pt.PostId = p.Id OR pt.PostId = q.Id WHERE p.OwnerUserId = '##UserId##' GROUP BY t.TagName ORDER BY PostCount DESC, t.TagName
User's Tags by Post Count.
<table0>[production] { <col0>[country]:[VARCHAR] <col1>[255]:[INT] <col2>[year]:[INT] }
SELECT SUM( amount ) as total_`<table0>` FROM `<table0>` WHERE `<col0>` = 'Myanmar' AND `<col2>` BETWEEN 2018 AND 2020;
How many tons of REEs were produced by Myanmar between 2018 and 2020?
<table0>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comment_text]:[varchar] } <table1>[instructor] { <col0>[instructor_id]:[int] <col1>[name]:[varchar] <col2>[uniqname]:[varchar] } <table2>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <...
SELECT DISTINCT instructor.name FROM `<table4>` INNER JOIN `<table4>`_offering ON `<table4>`.`<table4>`_id = `<table4>`_offering.`<table4>`_id INNER JOIN offering_instructor ON offering_instructor.offering_id = `<table4>`_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instr...
Who has taught CHEMBIO 995 most recently ?
<table0>[Invoice_Line_Items] { <col0>[order_item_id]:[INTEGER] <col1>[invoice_number]:[INTEGER] <col2>[product_id]:[INTEGER] <col3>[product_title]:[VARCHAR] <col4>[product_quantity]:[VARCHAR] <col5>[product_price]:[DECIMAL] <col6>[derived_product_cost]:[DECIMAL] <col7>[derived_vat_payable]:[DECIMAL] <col8>[derived_tota...
SELECT transaction_type, SUM( `<col5>` ) FROM `<table2>` GROUP BY `<col3>`
Visualize a bar chart for what are total transaction amounts for each transaction type?
<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 MAX( `<table6>`.`<table6>`result ) FROM `<table6>` WHERE `<table6>`.`<table7>`unitstayid IN ( SELECT `<table7>`.`<table7>`unitstayid FROM `<table7>` WHERE `<table7>`.`<table7>`healthsystemstayid IN ( SELECT `<table7>`.`<table7>`healthsystemstayid FROM `<table7>` WHERE `<table7>`.uniquepid = '012-31116' AND NOT `...
what is the maximum value of bun in patient 012-31116's body during their first hospital encounter?
<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 lab ON `<table1>`.hadm_id = lab.hadm_id WHERE `<table1>`.dob_year < "2170" AND lab.label = "Other Cells"
How many patients born before the year 2170 had a lab test named other cells?
<table0>[device] { <col0>[Device_ID]:[int] <col1>[Device]:[text] <col2>[Carrier]:[text] <col3>[Package_Version]:[text] <col4>[Applications]:[text] <col5>[Software_Platform]:[text] } <table1>[shop] { <col0>[Shop_ID]:[int] <col1>[Shop_Name]:[text] <col2>[Location]:[text] <col3>[Open_Date]:[text] <col4>[Open_Year]:[int] ...
SELECT Location, COUNT( `<col2>` ) FROM `<table1>` GROUP BY `<col2>` ORDER BY COUNT( `<col2>` )
Return a bar chart showing how many shops in each location, could you rank how many location in ascending order please?
<table0>[table_train_64] { <col0>[int]:[hiv_infection] <col1>[bool]:[receiving_parenteral_nutrition] <col2>[bool]:[hypertriglyceridemia] <col3>[bool]:[enteral_feeding] <col4>[bool]:[body_mass_index_bmi] <col5>[float]:[diarrhea] <col6>[bool]:[NOUSE] }
SELECT * FROM `<table0>` WHERE hiv_infection = 1
infection by the human immunodeficiency virus
<table0>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table1>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table3>[Posts] { <col0>[number]:[PostTypeId] <col1...
SELECT Id FROM `<table5>` WHERE Reputation > 50000
select * from users where reputation > 5000.
<table0>[Customers] { <col0>[CustomerID]:[integer] <col1>[Customer]:[Names] } <table1>[Products] { <col0>[ProductID]:[integer] <col1>[Product]:[text] } <table2>[Regions] { <col0>[StateCode]:[text] <col1>[State]:[text] <col2>[Region]:[text] } <table3>[Sales] { <col0>[Team]:[SalesTeamID] } <table4>[Store] { <col0>[Lo...
SELECT T3.`Product Name`, T1.`Customer Names` FROM `<table0>` AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products AS T3 ON T3.ProductID = T2._ProductID WHERE T2.OrderDate = '10/21/18' AND T2.DeliveryDate = '11/21/19'
Lists the name of the product and customer who placed an order on 10/21/18 and it was delivered on 11/21/19.
<table0>[table_train_103] { <col0>[int]:[systolic_blood_pressure_sbp] <col1>[int]:[epilepsy] <col2>[bool]:[diastolic_blood_pressure_dbp] <col3>[int]:[heart_rate] <col4>[int]:[seizure_disorder] <col5>[bool]:[age] <col6>[float]:[NOUSE] }
SELECT * FROM `<table0>` WHERE systolic_blood_pressure_sbp >= 200 OR diastolic_blood_pressure_dbp >= 120
blood pressure > 200 / 120 mm hg
<table0>[table_name_49] { <col0>[engine_configuration]:[VARCHAR] <col1>[notes_0_100km_h]:[VARCHAR] <col2>[engine_type]:[VARCHAR] }
SELECT engine_configuration_ & _notes_0_100km_h FROM `<table0>` WHERE `<col2>` = "b5252 fs"
What is the engine configuration & notes 0-100km/h with an engine type with b5252 fs?
<table0>[table_name_25] { <col0>[round]:[INTEGER] <col1>[college]:[VARCHAR] <col2>[pick]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "washington state" AND `<col2>` < 48
What is the lowest Round, when College is 'Washington State', and when Pick is less than 48?
<table0>[table_204_683] { <col0>[number]:[number] <col1>[constituency]:[text] <col2>[winner]:[candidate] <col3>[text]:[party] <col4>[text]:[votes] <col5>[number]:[margin] }
SELECT ( SELECT "votes" FROM `<table0>` WHERE "no." = 1 ) - ( SELECT "votes" FROM `<table0>` WHERE "no." = 2 )
what was the difference in votes for the first and second elections ?
<table0>[table_train_241] { <col0>[int]:[blood_sugars] <col1>[int]:[c_peptide_level] <col2>[float]:[hemoglobin_a1c_hba1c] <col3>[float]:[glucometer] <col4>[bool]:[creatinine_clearance_cl] <col5>[float]:[symptoms_hypoglycemic_episodes] <col6>[bool]:[hypoglycemia] <col7>[bool]:[hba1c] <col8>[float]:[diabetes] <col9>[bool...
SELECT * FROM `<table0>` WHERE diabetes = 1 OR hemoglobin_a1c_hba1c > 8
poor diabetes control ( hba1c > 8 % or > 2 visits / yr to hospital for treatment of ketoacidosis ) despite intensive insulin therapy
<table0>[table_17088] { <col0>[Player]:[text] <col1>[Position]:[text] <col2>[School]:[text] <col3>[Hometown]:[text] <col4>[College]:[text] }
SELECT "Player" FROM `<table0>` WHERE "Hometown" = 'Roebuck, South Carolina'
What player's hometown is Roebuck, South Carolina?
<table0>[table_32587] { <col0>[Round]:[real] <col1>[Overall]:[real] <col2>[Player]:[text] <col3>[Position]:[text] <col4>[School]:[Club] <col5>[Team]:[text] }
SELECT COUNT( "Round" ) FROM `<table0>` WHERE "Position" = 'linebacker' AND "Player" = 'blane smith'
How many rounds did Blane Smith play linebacker?
<table0>[table_39250] { <col0>[Rank]:[real] <col1>[Town]:[text] <col2>[Population]:[real] <col3>[Year]:[real] <col4>[Borough]:[text] <col5>[Definition]:[text] }
SELECT MAX( "Year" ) FROM `<table0>` WHERE "Population" > '13,012' AND "Borough" = 'richmondshire'
Which Year is the highest one that has a Population larger than 13,012, and a Borough of richmondshire?
<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>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY...
SELECT HIRE_DATE, SUM( `<col10>` ) FROM `<table6>` WHERE `<col5>` < '2002-06-21'
For those employees who was hired before 2002-06-21, draw a bar chart about the distribution of hire_date and the sum of department_id bin hire_date by time.
<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 diagnoses ON `<table0>`.hadm_id = diagnoses.hadm_id WHERE `<table0>`.insurance = "Medicaid" AND diagnoses.icd9_code = "1532"
calculate the number of patients with icd9 code 1532 on medicaid insurance
<table0>[player_details] { <col0>[player_id]:[INT] <col1>[name]:[VARCHAR] <col2>[email]:[VARCHAR] }
UPDATE player_details SET email = 'new_email@example.com' WHERE name LIKE 'A%';
Update the email of users in 'player_details' table whose names start with 'A'
<table0>[regulatory_frameworks] { <col0>[framework_id]:[INT] <col1>[PRIMARY]:[KEY] <col2>[name]:[VARCHAR] <col3>[255]:[description] <col4>[TEXT]:[country] <col5>[VARCHAR]:[255] <col6>[enforcement_date]:[DATE] }
INSERT INTO regulatory_frameworks ( framework_id, name, description, country, enforcement_date ) VALUES ( 1, 'MiCA', 'Markets in Crypto-Assets regulation', 'European Union', '2024-01-01' );
Add a new regulatory framework to the 'regulatory_frameworks' table
<table0>[table_name_31] { <col0>[year]:[VARCHAR] <col1>[winner__female]:[VARCHAR] <col2>[talent__male]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE winner__female_ = "kim gevaert" AND talent__male_ = "xavier de baerdemaeker"
What year had Kim Gevaert as the female winner and Xavier de Baerdemaeker as the male talent?
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_...
SELECT MAX( `<table3>`.age ) FROM `<table3>` WHERE `<table3>`.expire_flag = "0" AND `<table3>`.discharge_location = "LONG TERM CARE HOSPITAL"
what is maximum age of patients whose death status is 0 and discharge location is long term care hospital?
<table0>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } <table1>[labevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[itemid]:[number] <col4>[chartt...
SELECT `<table10>`.charttime FROM `<table10>` WHERE `<table10>`.icustay_id IN ( SELECT `<table9>`.icustay_id FROM `<table9>` WHERE `<table9>`.hadm_id IN ( SELECT `<table15>`.hadm_id FROM `<table15>` WHERE `<table15>`.subject_id = 21163 ) AND NOT `<table9>`.outtime IS NULL ORDER BY `<table9>`.intime DESC LIMIT 1 ) AND `...
when did patient 21163 have the maximum heart rate the last time on the last icu visit?
<table0>[month] { <col0>[month_number]:[int] <col1>[month_name]:[text] } <table1>[airport_service] { <col0>[city_code]:[varchar] <col1>[airport_code]:[varchar] <col2>[miles_distant]:[int] <col3>[direction]:[varchar] <col4>[minutes_distant]:[int] } <table2>[aircraft] { <col0>[aircraft_code]:[varchar] <col1>[aircraft_d...
SELECT DISTINCT flight.flight_id FROM `<table1>` AS AIRPORT_SERVICE_0, `<table1>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE ( CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name...
i'd like to find the cheapest flight from BOSTON to SAN FRANCISCO
<table0>[table_name_53] { <col0>[unit]:[VARCHAR] <col1>[location]:[VARCHAR] <col2>[authors]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "china" AND `<col2>` = "zhou zhang"
What unit is located in China and has Zhou Zhang as an author?
<table0>[table_16494599_10] { <col0>[player]:[VARCHAR] <col1>[school_club_team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Stanford"
Who are the players that have attended Stanford?
<table0>[table_26010857_13] { <col0>[general_classification]:[VARCHAR] <col1>[stage]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 3
Who leads the general classification in stage 3?
<table0>[diagnoses_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>[admissi...
SELECT `<table1>`.age FROM `<table1>` WHERE `<table1>`.subject_id = 5828 AND `<table1>`.dischtime IS NULL
how old is patient 5828 in the current hospital encounter?
<table0>[table_52360] { <col0>[Year]:[real] <col1>[Result]:[text] <col2>[Award]:[text] <col3>[Film]:[series] <col4>[text]:[Character] }
SELECT AVG( "Year" ) FROM `<table0>` WHERE "Result" = 'won' AND "Award" = 'inside soap awards'
What year did was the Inside Soap Awards won?
<table0>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table1>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text...
SELECT MAX( t1.c1 ) FROM ( SELECT SUM( `<table2>`.`<table2>` ) AS c1 FROM `<table2>` WHERE `<table2>`.`<table7>`healthsystemstayid IN ( SELECT `<table7>`.`<table7>`healthsystemstayid FROM `<table7>` WHERE `<table7>`.`<table7>`unitstayid IN ( SELECT `<table8>`.`<table7>`unitstayid FROM `<table8>` WHERE `<table8>`.`<tabl...
what is the maximum cost of the hospital which involves respiratory acidosis since 1 year ago?
<table0>[table_29519] { <col0>[series]:[real] <col1>[season]:[real] <col2>[Title]:[text] <col3>[Directed]:[text] <col4>[Written]:[text] <col5>[Original]:[air] <col6>[date]:[text] <col7>[viewers]:[millions] }
SELECT "No. in series" FROM `<table0>` WHERE "Title" = 'Shock Waves'
List the series number with the espide called 'shock waves'.
<table0>[table_35392] { <col0>[Round]:[real] <col1>[Pick]:[real] <col2>[Player]:[text] <col3>[Position]:[text] <col4>[School]:[Club] <col5>[Team]:[text] }
SELECT AVG( "Pick" ) FROM `<table0>` WHERE "School/Club Team" = 'alabama' AND "Round" < '9'
What's the Pick average that has a School/Club Team of Alabama, with a Round that's smaller than 9?
<table0>[table_name_63] { <col0>[date]:[VARCHAR] <col1>[crowd]:[INTEGER] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 23 OFFSET 000
When was there a crowd larger than 23,000?
<table0>[urban_agriculture_orgs_seoul] { <col0>[INT]:[org_name] <col1>[VARCHAR]:[city] <col2>[VARCHAR]:[funding] <col3>[DECIMAL]:[INSERT] }
SELECT org_name, SUM( funding ) FROM `<table0>` WHERE city = 'SEO' GROUP BY org_name;
List the names of urban agriculture organizations in Seoul and their total funding
<table0>[table_name_12] { <col0>[track]:[INTEGER] <col1>[catalogue]:[VARCHAR] <col2>[time]:[VARCHAR] }
SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "epa 4054" AND `<col2>` = "2:05"
What is the sum of every track with a catalogue of EPA 4054 with a 2:05 length?
<table0>[rural_infrastructure] { <col0>[INT]:[project_name] <col1>[TEXT]:[budget] <col2>[INT]:[category] <col3>[TEXT]:[completion_date] <col4>[DATE]:[INSERT] }
SELECT category, YEAR( completion_date ) AS completion_year, AVG( budget ) FROM `<table0>` GROUP BY category, YEAR( completion_date );
What is the average budget for rural infrastructure projects, categorized by type, for each year?
<table0>[table_name_1] { <col0>[location]:[VARCHAR] <col1>[time]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1:59:12"
What location had 1:59:12 in time?
<table0>[Countries] { <col0>[INT]:[name] <col1>[VARCHAR]:[continent] } <table1>[SmartCityProjects] { <col0>[INT]:[name] <col1>[VARCHAR]:[country] <col2>[VARCHAR]:[projectType] <col3>[VARCHAR]:[INSERT] }
SELECT C.continent, COUNT( SCP.country ) as num_projects FROM `<table1>` SCP JOIN Countries C ON SCP.country = C.name GROUP BY C.continent;
Identify the number of smart city projects in the 'SmartCityProjects' table for each country, grouped by continent in the 'Countries' table.
<table0>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[labevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[itemid]:[number] <col4>[charttime]:[time] <col5>[valuenum...
SELECT COUNT( * ) > 0 FROM `<table2>` WHERE `<table2>`.hadm_id IN ( SELECT `<table12>`.hadm_id FROM `<table12>` WHERE `<table12>`.subject_id = 60347 AND NOT `<table12>`.dischtime IS NULL ORDER BY `<table12>`.admittime LIMIT 1 ) AND `<table2>`.drug = 'ipratropium bromide neb'
was the ipratropium bromide neb prescribed to patient 60347 on the first hospital visit?