schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[table_25429986_1] { <col0>[horse]:[VARCHAR] <col1>[position]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "6th"
what horse is in the 6th position?
<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 > "11" AND prescriptions.route = "PO/NG"
provide the number of patients whose drug route is po/ng and stayed in the hospital for more than11 days.
<table0>[table_28611413_2] { <col0>[title]:[VARCHAR] <col1>[written_by]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Frank Military"
What is the title of the episode written by Frank Military?
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[lab...
SELECT `<table3>`.age, `<table3>`.language FROM `<table3>` WHERE `<table3>`.subject_id = "93033"
what is age and language of subject id 93033?
<table0>[green_buildings] { <col0>[building_id]:[INT] <col1>[building_name]:[VARCHAR] <col2>[255]:[city] <col3>[VARCHAR]:[255] <col4>[state]:[VARCHAR] <col5>[255]:[INSERT] }
SELECT COUNT( * ) FROM `<table0>` WHERE `<col4>` = 'NY';
How many green buildings are there in the state of New York?
<table0>[table_name_50] { <col0>[arizona]:[VARCHAR] <col1>[utah]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "eisenhower"
What's the value for arizona when utah is eisenhower?
<table0>[table_name_1] { <col0>[winner]:[VARCHAR] <col1>[score]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "7–6( 4 ), 6–4"
Who wins with a score 7 6(4), 6 4
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col...
SELECT `<table3>`.drugname 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 = '021-79544' AND `<table6>`.hospitald...
what was the name of the drug that patient 021-79544 had been allergic to during their current hospital encounter?
<table0>[workouts] { <col0>[workout_id]:[INT] <col1>[member_id]:[INT] <col2>[duration]:[INT] <col3>[date]:[DATE] } <table1>[members] { <col0>[member_id]:[INT] <col1>[tier]:[VARCHAR] }
DELETE FROM `<table0>` WHERE `<table0>`.duration > 120 AND `<table0>`.date >= DATEADD( month, -1, GETDATE( ) ) AND EXISTS ( SELECT 1 FROM `<table1>` WHERE `<table1>`.member_id = `<table0>`.member_id AND `<table1>`.tier = 'Basic' );
Delete workouts that have a duration longer than 2 hours for members with a Basic membership tier in the last month.
<table0>[contract_negotiations] { <col0>[INT]:[country] <col1>[VARCHAR]:[negotiation_date] <col2>[DATE]:[INSERT] }
SELECT COUNT( * ) FROM `<table0>` WHERE country = 'Russia' AND negotiation_date BETWEEN '2018-04-01' AND '2018-06-30';
What was the total number of contract negotiations with Russian companies in Q2 2018?
<table0>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivilegedUserGuidance] <col5>[text]:[MarkdownConcensusDescription] <col6>[text]:[CreationDate] <col7>[time]:[CreationModer...
SELECT * FROM `<table4>` WHERE Id < 500000 AND DATEDIFF( day, LastAccessDate, GETDATE( ) ) > ( 365 * 1 )
Number of inactive users over 5 years old. Enter Query Description
<table0>[animal_population] { <col0>[INT]:[animal_name] <col1>[VARCHAR]:[population] } <table1>[critical_habitats] { <col0>[INT]:[habitat_name] <col1>[VARCHAR]:[animal_name] <col2>[VARCHAR]:[INSERT] <col3>[animal_population]:[VALUES] <col4>[Elephant]:[1000] }
SELECT DISTINCT ap.animal_name FROM `<table0>` ap LEFT JOIN critical_habitats ch ON ap.animal_name = ch.animal_name WHERE ch.animal_name IS NULL;
What are the names of animals in 'animal_population' table that do not have a corresponding record in 'critical_habitats' table?
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text]...
SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN prescriptions ON `<table1>`.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Nitroglycerin SL"
how many of the patients were treated with nitroglycerin sl?
<table0>[CountryRegion] { <col0>[CountryRegionCode]:[text] <col1>[text]:[ModifiedDate] } <table1>[Culture] { <col0>[CultureID]:[text] <col1>[text]:[ModifiedDate] } <table2>[Currency] { <col0>[CurrencyCode]:[text] <col1>[text]:[ModifiedDate] } <table3>[CountryRegionCurrency] { <col0>[CountryRegionCode]:[text] <col1>[...
SELECT T1.ProductID FROM `<table47>` AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID ORDER BY T1.ListPrice - T2.StandardCost DESC LIMIT 1
What is the product with the most profit?
<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 `<table0>`.hospitaladmittime FROM `<table0>` WHERE `<table0>`.uniquepid = '007-6825' AND `<table0>`.hospitaladmitsource = 'other hospital' AND STRFTIME( '%y', `<table0>`.hospitaladmittime ) >= '2104' ORDER BY `<table0>`.hospitaladmittime LIMIT 1
when did patient 007-6825 since 2104 get admitted for the first time to the hospital via other hospital?
<table0>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[eventtype]:[text] <col5>[careunit]:[text] <col6>[wardid]:[number] <col7>[intime]:[time] <col8>[outtime]:[time] } <table1>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[nu...
SELECT COUNT( * ) FROM `<table9>` WHERE `<table9>`.icustay_id IN ( SELECT `<table14>`.icustay_id FROM `<table14>` WHERE `<table14>`.hadm_id IN ( SELECT `<table12>`.hadm_id FROM `<table12>` WHERE `<table12>`.subject_id = 16066 AND NOT `<table12>`.dischtime IS NULL ORDER BY `<table12>`.admittime DESC LIMIT 1 ) ) AND `<ta...
how many times did patient 16066 produced a peg golytely output on their last hospital encounter?
<table0>[attendance] { <col0>[member_id]:[INT] <col1>[class_type]:[VARCHAR] <col2>[attendance_date]:[DATE] }
SELECT a.member_id FROM `<table0>` a WHERE a.class_type IN ( 'Yoga', 'Pilates' ) GROUP BY a.member_id HAVING COUNT( DISTINCT a.class_type ) = 2;
Which members have attended both a yoga and a Pilates class?
<table0>[table_name_90] { <col0>[max_power_at_rpm]:[VARCHAR] <col1>[displacement]:[VARCHAR] <col2>[engine_name]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1968cc" AND `<col2>` = "2.0 tdi"
What is the maximum power at rpm for the engine named 2.0 TDI that has a 1968cc displacement?
<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 `<table4>`.subject_id ) FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id WHERE `<table4>`.admission_type = "EMERGENCY" AND diagnoses.long_title = "Personal history of antineoplastic chemotherapy"
how many patients whose admission type is emergency and diagnoses long title is personal history of antineoplastic chemotherapy?
<table0>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] } <table1>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] }
SELECT Founder, AVG( `<col2>` ) FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder DESC
For those records from the products and each product's manufacturer, return a bar chart about the distribution of founder and the average of price , and group by attribute founder, sort from high to low by the X-axis please.
<table0>[table_27914606_1] { <col0>[written_by]:[VARCHAR] <col1>[us_viewers__millions]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE us_viewers__millions_ = "5.56"
who were the writers of the episode that had 5.56 millions of north american viewers?
<table0>[Customers] { <col0>[customer_id]:[INTEGER] <col1>[customer_type_code]:[VARCHAR] <col2>[address_line_1]:[VARCHAR] <col3>[address_line_2]:[VARCHAR] <col4>[town_city]:[VARCHAR] <col5>[state]:[VARCHAR] <col6>[email_address]:[VARCHAR] <col7>[255]:[phone_number] } <table1>[Complaints] { <col0>[complaint_id]:[INTEGE...
SELECT product_category_code, AVG( product_price ) FROM `<table3>` GROUP BY `<col2>` ORDER BY `<col2>`
Return the average price of products that have each category code, and sort in ascending by the names.
<table0>[table_28365816_2] { <col0>[conference]:[VARCHAR] <col1>[regular_season_winner]:[VARCHAR] }
SELECT COUNT( `<col0>` ) AS Tournament FROM `<table0>` WHERE `<col1>` = "Texas Western"
How many entries for conference tournament are listed when Texas Western is the regular season winner?
<table0>[table_62952] { <col0>[Team]:[text] <col1>[Tries]:[real] <col2>[Tries]:[real] <col3>[Try]:[diff] <col4>[text]:[Points] <col5>[real]:[Points] <col6>[real]:[Points] <col7>[diff]:[text] }
SELECT MAX( "Tries for" ) FROM `<table0>` WHERE "Points against" < '124' AND "Points for" < '241' AND "Tries against" < '11'
Which Tries for has Points against smaller than 124, and Points for smaller than 241, and Tries against smaller than 11?
<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 MAX( `<table0>`.age ) FROM `<table0>` WHERE `<table0>`.expire_flag = "0" AND `<table0>`.discharge_location = "REHAB/DISTINCT PART HOSP"
what is the maximum age of patients whose death status is and discharge location is rehab/distinct part hosp.
<table0>[table_26429543_1] { <col0>[production_code]:[VARCHAR] <col1>[us_viewers__millions]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE us_viewers__millions_ = "4.69"
How many different production codes are there for the episode with 4.69 million US viewers?
<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 prescriptions ON `<table3>`.hadm_id = prescriptions.hadm_id WHERE `<table3>`.gender = "M" AND prescriptions.drug = "Protamine Sulfate"
how many male patients use the drug named protamine sulfate?
<table0>[table_39752] { <col0>[Office]:[text] <col1>[Democratic]:[ticket] <col2>[text]:[Republican] <col3>[ticket]:[text] <col4>[Socialist]:[ticket] <col5>[text]:[Workers] <col6>[ticket]:[text] }
SELECT "Democratic ticket" FROM `<table0>` WHERE "Workers ticket" = 'james p. cannon'
What is the name on the Democratic ticket when the Workers ticket is james p. cannon?
<table0>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table1>[student_record] { <col0>[student_id]:[int] <col1>[course_id]:[int] <col2>[semester]:[int] <col3>[grade]:[varchar] <col4>[varchar]:[transfer_source] <col5>[varchar]:[earn_credit] <col6>[varchar]:[repeat_term] <col7>[varchar]:[test_id] ...
SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE course.department LIKE '%TURKISH%' AND program_course.category LIKE 'PreMajor' AND program_course.course_id = course.course_id
What are the classes required to declare a major in TURKISH ?
<table0>[table_30802] { <col0>[Year]:[text] <col1>[Position]:[real] <col2>[Games]:[played] <col3>[real]:[Won] <col4>[real]:[Tied] <col5>[real]:[Lost] <col6>[real]:[Goals] <col7>[Scored]:[real] <col8>[Goals]:[real] <col9>[Points]:[real] <col10>[Postseason]:[place] }
SELECT "Goals Against" FROM `<table0>` WHERE "Goals Scored" = '30'
What is the goals against listed when the goals scored is 30?
<table0>[people] { <col0>[People_ID]:[int] <col1>[text]:[Height] <col2>[real]:[Weight] <col3>[real]:[Birth_Date] <col4>[text]:[Birth_Place] } <table1>[body_builder] { <col0>[Body_Builder_ID]:[int] <col1>[People_ID]:[int] <col2>[Snatch]:[real] <col3>[Clean_Jerk]:[real] <col4>[Total]:[real] }
SELECT People_ID, `<col2>` FROM `<table1>`
Return a scatter chart about the correlation between People_ID and Snatch .
<table0>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>[time]:[UserDisplayName] <col5>[text]:[UserId] <col6>[number]:[ContentLicense] } <table1>[VoteTypes] { <col0>[number]:[text] } <table2>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Descriptio...
SELECT DATEADD( dd, 0, DATEDIFF( dd, 0, GETDATE( ) ) )
select dateadd(dd, datediff(dd, 0, getdate()), 0).
<table0>[CustomerSpendingMX] { <col0>[CustomerID]:[INT] <col1>[Country]:[TEXT] <col2>[AvgSpending]:[DECIMAL] } <table1>[CustomerSpendingAR] { <col0>[CustomerID]:[INT] <col1>[Country]:[TEXT] <col2>[AvgSpending]:[DECIMAL] }
SELECT AVG( CSMX.AvgSpending ) - AVG( CSA.AvgSpending ) FROM `<table0>` CSMX, CustomerSpendingAR CSA WHERE CSMX.Country = 'Mexico' AND CSA.Country = 'Argentina';
What is the difference in average customer spending between customers in Mexico and Argentina?
<table0>[Accounts] { <col0>[Account_ID]:[INTEGER] <col1>[Statement_ID]:[INTEGER] <col2>[Account_Details]:[VARCHAR] } <table1>[Projects] { <col0>[Project_ID]:[INTEGER] <col1>[Project_Details]:[VARCHAR] } <table2>[Ref_Budget_Codes] { <col0>[Budget_Type_Code]:[CHAR] <col1>[Budget_Type_Description]:[VARCHAR] } <table3>[...
SELECT T1.Project_Details, T1.Project_ID FROM `<table1>` AS T1 JOIN Documents AS T2 ON T1.Project_ID = T2.Project_ID ORDER BY T1.Project_Details DESC
A bar chart about what is the project id and detail for the project with at least two documents?, and show by the X in descending please.
<table0>[departments] { <col0>[department_id]:[number] <col1>[department_name]:[text] <col2>[manager_id]:[number] <col3>[location_id]:[number] } <table1>[jobs] { <col0>[job_id]:[text] <col1>[job_title]:[text] <col2>[min_salary]:[number] <col3>[max_salary]:[number] } <table2>[job_history] { <col0>[employee_id]:[number...
SELECT T1.employee_id, T4.country_name FROM `<table6>` AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id
What are all the employee ids and the names of the countries in which they work?
<table0>[all_prevalences] { <col0>[ITEM]:[text] <col1>[POPULATION]:[TYPE] <col2>[text]:[OCCURRENCES] <col3>[integer]:[POPULATION] <col4>[COUNT]:[integer] <col5>[PREVALENCE]:[RATE] <col6>[real]:[PREVALENCE] <col7>[PERCENTAGE]:[real] } <table1>[patients] { <col0>[patient]:[text] <col1>[birthdate]:[date] <col2>[deathdate...
SELECT T2.ssn FROM `<table8>` AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Systolic Blood Pressure' ORDER BY T1.VALUE DESC LIMIT 1
Provide the social security number of the patient with the highest systolic blood pressure.
<table0>[table_name_49] { <col0>[copa_conmebol_1996]:[VARCHAR] <col1>[recopa_sudamericana_1996]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "champions"
What is the copa conmebol 1996 result of the team with a recopa sudamericana 1996 result of champions?
<table0>[table_name_85] { <col0>[team]:[VARCHAR] <col1>[points]:[VARCHAR] <col2>[f_laps]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "71" AND `<col2>` = "4"
Which team has 71 Points and F/Laps of 4?
<table0>[staff] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[255] <col3>[role]:[VARCHAR] <col4>[255]:[email] <col5>[TEXT]:[phone] <col6>[TEXT]:[INSERT] }
SELECT * FROM `<table0>` WHERE `<col3>` = 'Mental Health Coordinator';
What is the contact information of the staff member responsible for mental health services?
<table0>[table_52728] { <col0>[Rank]:[real] <col1>[Nation]:[text] <col2>[Gold]:[real] <col3>[Silver]:[real] <col4>[Bronze]:[real] <col5>[Total]:[real] }
SELECT SUM( "Total" ) FROM `<table0>` WHERE "Gold" < '0'
Which Total has a Gold smaller than 0?
<table0>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[startdate]:[time] <col4>[enddate]:[time] <col5>[drug]:[text] <col6>[dose_val_rx]:[text] <col7>[dose_unit_rx]:[text] <col8>[route]:[text] } <table1>[labevents] { <col0>[row_id]:[number] <col1>[subject_id]:[numb...
SELECT `<table16>`.label FROM `<table16>` WHERE `<table16>`.itemid IN ( SELECT t1.itemid FROM ( SELECT `<table13>`.itemid, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table13>` WHERE DATETIME( `<table13>`.charttime ) <= DATETIME( CURRENT_TIME( ), '-2 year' ) GROUP BY `<table13>`.itemid ) AS t1 WHERE t1...
give me the top four most common output events until 2 years ago.
<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 JOB_ID, SUM( `<col9>` ) FROM `<table0>` WHERE NOT `<col0>` IN ( SELECT `<col0>` FROM `<table5>` ) GROUP BY `<col6>` ORDER BY `<col6>`
For those employees who did not have any job in the past, draw a bar chart about the distribution of job_id and the sum of manager_id , and group by attribute job_id, sort by the x axis in asc.
<table0>[table_61155] { <col0>[Year]:[real] <col1>[Competition]:[text] <col2>[Venue]:[text] <col3>[Position]:[text] <col4>[Notes]:[text] }
SELECT SUM( "Year" ) FROM `<table0>` WHERE "Competition" = 'european championships' AND "Notes" = '66.81 m'
Which Year has a Competition of european championships, and Notes of 66.81 m?
<table0>[table_name_10] { <col0>[loss]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "august 21"
who lost on august 21?
<table0>[table_name_73] { <col0>[score]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "april 12"
What was the score for the April 12 game?
<table0>[table_15088557_1] { <col0>[stage]:[INTEGER] <col1>[winner]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Sergei Smetanine"
What is the minimum stage where Sergei Smetanine won?
<table0>[table_49439] { <col0>[Borough]:[text] <col1>[1970]:[real] <col2>[1980]:[real] <col3>[1990]:[real] <col4>[2000]:[real] <col5>[2006]:[real] }
SELECT MIN( "1980" ) FROM `<table0>` WHERE "Borough" = 'brooklyn'
What was the percentage in 1980 in Brooklyn?
<table0>[table_203_494] { <col0>[number]:[party] <col1>[text]:[votes] <col2>[number]:[number] <col3>[swing]:[number] <col4>[seats]:[number] <col5>[change]:[number] }
SELECT "seats" FROM `<table0>` WHERE "party" = 'independent'
how many seats does the independent party hold ?
<table0>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table2>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDa...
SELECT * FROM `<table0>`
Show all review task states.
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[...
SELECT `<table1>`.age, `<table1>`.days_stay FROM `<table1>` WHERE `<table1>`.name = "Michelle Medina"
tell me the age and days for which patient michelle medina was hospitalized.
<table0>[AsianArtMuseum] { <col0>[INT]:[type] <col1>[VARCHAR]:[artist] <col2>[VARCHAR]:[INSERT] }
SELECT artist FROM ( SELECT artist, COUNT( DISTINCT type ) as type_count FROM `<table0>` GROUP BY artist ) AS subquery WHERE type_count > 1;
Find artists who have created more than one type of artwork in the Asian Art Museum.
<table0>[cycling] { <col0>[cyclist]:[VARCHAR] <col1>[stage]:[INT] <col2>[speed]:[FLOAT] }
SELECT stage, AVG( `<col2>` ) AS avg_speed FROM `<table0>` WHERE `<col1>` >= 1 AND `<col1>` <= ( SELECT COUNT( DISTINCT `<col1>` ) FROM `<table0>` GROUP BY `<col0>` ORDER BY COUNT( DISTINCT `<col1>` ) DESC LIMIT 1 ) GROUP BY `<col1>`
What is the average speed of cyclists in each stage of the last 3 tours?
<table0>[table_name_46] { <col0>[university_of_dublin]:[VARCHAR] <col1>[cultural_and_educational_panel]:[VARCHAR] <col2>[industrial_and_commercial_panel]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 5 AND `<col2>` < 9
What is the number for the University of Dublin with their Cultural and Educational Panel of 5, and an Industrial and Commercial Panel with less than 9?
<table0>[concerts] { <col0>[INT]:[artist_id] <col1>[INT]:[city] <col2>[VARCHAR]:[country] <col3>[VARCHAR]:[revenue] <col4>[FLOAT]:[INSERT] }
SELECT country, AVG( revenue ) as avg_revenue FROM `<table0>` GROUP BY country;
What is the average revenue per concert by country?
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] ...
SELECT COUNT( DISTINCT t1.uniquepid ) FROM ( SELECT patient.uniquepid, `<table7>`.`<table7>`time, patient.patienthealthsystemstayid FROM `<table7>` JOIN patient ON `<table7>`.patientunitstayid = patient.patientunitstayid WHERE `<table7>`.`<table7>`name = 'pleural effusion' AND STRFTIME( '%y', `<table7>`.`<table7>`time ...
count the number of patients who were diagnosed with pleural effusion during the same hospital visit after tia until 2104.
<table0>[table_50844] { <col0>[Tie]:[text] <col1>[Home]:[team] <col2>[text]:[Score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Date]:[text] }
SELECT "Date" FROM `<table0>` WHERE "Away team" = 'aston villa'
What is the date when Aston Villa is the away team?
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heartrate]:[...
SELECT t2.drugname FROM ( SELECT `<table7>`.uniquepid, `<table4>`.`<table4>`time FROM `<table4>` JOIN `<table7>` ON `<table4>`.`<table7>`unitstayid = `<table7>`.`<table7>`unitstayid WHERE `<table7>`.`<table7>`healthsystemstayid IN ( SELECT `<table7>`.`<table7>`healthsystemstayid FROM `<table7>` WHERE `<table7>`.uniquep...
what was the name of the drug prescribed to patient 009-12985 in the same day after having received a vasodilating agent - iv - labetalol until 63 months ago?
<table0>[table_28898948_3] { <col0>[reason]:[VARCHAR] <col1>[winner]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Arthur Collins"
When arthur collins is the winner what is the reason?
<table0>[ads] { <col0>[INT]:[user_id] <col1>[INT]:[category] <col2>[VARCHAR]:[255] <col3>[revenue]:[FLOAT] <col4>[country]:[VARCHAR] <col5>[255]:[date] <col6>[DATE]:[INSERT] }
SELECT SUM( `<col3>` ) FROM `<table0>` WHERE `<col4>` = 'USA' AND category = 'sports' AND date BETWEEN '2021-04-01' AND '2021-06-30';
What was the revenue generated from users in the United States for the "sports" category in Q2 of 2021?
<table0>[table_name_20] { <col0>[taper__in_ft]:[INTEGER] <col1>[size]:[VARCHAR] }
SELECT MAX( taper__in_ft_ ) FROM `<table0>` WHERE `<col1>` = 8
What is the highest Taper (in/ft), when Size is 8?
<table0>[table_64975] { <col0>[Governor]:[text] <col1>[Took]:[office] <col2>[text]:[Left] <col3>[office]:[text] <col4>[Party]:[text] <col5>[Lieutenant]:[Governor] <col6>[text]:[Terms] }
SELECT "Governor" FROM `<table0>` WHERE "Lieutenant Governor" = 'william henry ashley'
Which governor had William Henry Ashley as lieutenant governor?
<table0>[table_dev_16] { <col0>[int]:[white_blood_cell_count_wbc] <col1>[int]:[autoimmune_disease] <col2>[bool]:[creatinine_clearance_cl] <col3>[float]:[platelet_count] <col4>[float]:[collagen_vascular_disease] <col5>[bool]:[hypertension] <col6>[bool]:[systemic_corticosteroids] <col7>[bool]:[NOUSE] }
SELECT * FROM `<table0>` WHERE autoimmune_disease = 1 OR collagen_vascular_disease = 1 OR systemic_corticosteroids = 1
prior diagnosis of systemic autoimmune or collagen vascular disease requiring previous or current treatment with systemic corticosteroids
<table0>[investors] { <col0>[investor_id]:[INT] <col1>[investor_name]:[VARCHAR] <col2>[investor_type]:[VARCHAR] } <table1>[investments] { <col0>[investment_id]:[INT] <col1>[investor_id]:[INT] <col2>[sector_id]:[INT] }
SELECT COUNT( * ) FROM `<table1>` i INNER JOIN investors j ON i.investor_id = j.investor_id WHERE j.investor_type = 'private' AND i.sector_id IN ( SELECT `<col2>` FROM sectors WHERE sector_name = 'renewable energy' );
How many 'private' investors have made investments in the 'renewable energy' sector?
<table0>[table_name_84] { <col0>[top_speed__km_h]:[INTEGER] <col1>[model]:[VARCHAR] }
SELECT SUM( top_speed__km_h_ ) FROM `<table0>` WHERE `<col1>` = "1.8 20v t"
What is the top speed of the model 1.8 20v t?
<table0>[hospital_beds] { <col0>[hospital_id]:[INT] <col1>[name]:[VARCHAR] <col2>[location]:[VARCHAR] <col3>[num_of_beds]:[INT] }
SELECT location, COUNT( * ) FROM `<table0>` WHERE `<col3>` < 20 AND `<col2>` = 'New Mexico' GROUP BY location;
What is the total number of hospital beds in rural areas of New Mexico, with less than 20 beds per hospital?
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[it...
SELECT COUNT( * ) > 0 FROM `<table6>` WHERE `<table6>`.hadm_id IN ( SELECT `<table9>`.hadm_id FROM `<table9>` WHERE `<table9>`.subject_id = 7073 ) AND STRFTIME( '%y', `<table6>`.charttime ) <= '2104'
did patient 7073 undergo any procedures until 2104?
<table0>[results] { <col0>[resultId]:[INTEGER] <col1>[raceId]:[INTEGER] <col2>[driverId]:[INTEGER] <col3>[constructorId]:[INTEGER] <col4>[number]:[INTEGER] <col5>[grid]:[INTEGER] <col6>[position]:[TEXT] <col7>[positionText]:[TEXT] <col8>[positionOrder]:[INTEGER] <col9>[points]:[REAL] <col10>[laps]:[TEXT] <col11>[time]:...
SELECT name, COUNT( `<col2>` ) FROM `<table7>` AS T1 JOIN constructorStandings AS T2 ON T1.constructorId = T2.constructorId WHERE T1.nationality = "Japanese" AND T2.points > 5 GROUP BY `<col2>` ORDER BY COUNT( `<col2>` ) DESC
Find the number of the names of Japanese constructors that have once earned more than 5 points?, and rank in desc by the Y-axis.
<table0>[ProductionBatches] { <col0>[BatchID]:[INT] <col1>[ChemicalID]:[INT] <col2>[ProductionDate]:[DATE] <col3>[BatchSize]:[INT] }
SELECT ChemicalID, MAX( `<col2>` ) FROM `<table0>` GROUP BY ChemicalID;
List the chemical names and production dates for the largest production batch for each chemical.
<table0>[policy] { <col0>[policy_id]:[INT] <col1>[policy_type]:[VARCHAR] <col2>[effective_date]:[DATE] }
INSERT INTO policy ( policy_id, policy_type, effective_date ) VALUES ( 3, 'Health', '2022-01-01' );
Insert a new policy with policy ID 3, policy type 'Health', and effective date '2022-01-01'
<table0>[table_train_130] { <col0>[int]:[gender] <col1>[string]:[systolic_blood_pressure_sbp] <col2>[int]:[right_bundle_branch_block] <col3>[bool]:[space_occupying_cerebral_lesion] <col4>[bool]:[huntington_disease] <col5>[bool]:[psychiatric_disease] <col6>[bool]:[mental_illness] <col7>[bool]:[treatment_regimen] <col8>[...
SELECT * FROM `<table0>` WHERE mental_illness = 1 OR psychotic_disorder = 1 OR bipolar_disorder = 1 OR `<col21>` = 1
major mental illness including psychotic disorders, bipolar disorder, or major depressive episode that is not in remission for less than 12 months
<table0>[table_name_64] { <col0>[engine]:[VARCHAR] <col1>[chassis]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "lotus 16"
What model engine has a lotus 16 chassis?
<table0>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[eventtype]:[text] <col5>[careunit]:[text] <col6>[wardid]:[number] <col7>[intime]:[time] <col8>[outtime]:[time] } <table1>[microbiologyevents] { <col0>[row_id]:[number] <col1>[subject_id...
SELECT COUNT( * ) FROM `<table7>` WHERE `<table7>`.icd9_code = ( SELECT `<table8>`.icd9_code FROM `<table8>` WHERE `<table8>`.short_title = 'endo rem bronch devc/sub' ) AND DATETIME( `<table7>`.charttime ) >= DATETIME( CURRENT_TIME( ), '-3 year' )
tell me the total number of endo rem bronch devc/sub procedures ordered since 3 years ago?
<table0>[table_56949] { <col0>[Place]:[real] <col1>[Player]:[text] <col2>[Yards]:[text] <col3>[real]:[Long] }
SELECT SUM( "Long" ) FROM `<table0>` WHERE "Yards" = '16' AND "TD's" < '1'
What is the long of the player with 16 yards and less than 1 TD?
<table0>[sales_in_weather] { <col0>[date]:[date] <col1>[store_nbr]:[integer] <col2>[item_nbr]:[integer] <col3>[units]:[integer] } <table1>[weather] { <col0>[station_nbr]:[integer] <col1>[date]:[date] <col2>[tmax]:[integer] <col3>[tmin]:[integer] <col4>[tavg]:[integer] <col5>[depart]:[integer] <col6>[dewpoint]:[integer...
SELECT COUNT( DISTINCT `date` ) FROM `<table1>` WHERE `<col13>` > 5
How many days did the show fell more than 5 inches?
<table0>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[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] <col6>[JOB_ID]:[va...
SELECT HIRE_DATE, `<col8>` FROM `<table1>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table6>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY `<col5>` DESC
For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the change of commission_pct over hire_date in a line chart, show HIRE_DATE in desc order.
<table0>[table_60581] { <col0>[Year]:[Ceremony] <col1>[text]:[Original] <col2>[title]:[text] <col3>[Film]:[title] <col4>[nomination]:[text] <col5>[Director]:[text] <col6>[Result]:[text] }
SELECT "Year ( Ceremony )" FROM `<table0>` WHERE "Original title" = 'el tinte de la fama'
What year has a original title of 'el tinte de la fama'?
<table0>[table_191323_2] { <col0>[mission_no]:[VARCHAR] <col1>[alt_name]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1962-F01"
Which mission number has alternate name 1962-f01
<table0>[customer_addresses] { <col0>[address_id]:[VARCHAR] <col1>[customer_id]:[VARCHAR] } <table1>[addresses] { <col0>[address_details]:[VARCHAR] <col1>[address_id]:[VARCHAR] }
SELECT T1.address_details FROM `<table1>` AS T1 JOIN customer_`<table1>` AS T2 ON T1.address_id = T2.address_id WHERE T2.customer_id = 10
Return the address of customer 10.
<table0>[Apartment_Buildings] { <col0>[building_id]:[INTEGER] <col1>[building_short_name]:[CHAR] <col2>[building_full_name]:[VARCHAR] <col3>[building_description]:[VARCHAR] <col4>[255]:[building_address] <col5>[VARCHAR]:[255] <col6>[building_manager]:[VARCHAR] <col7>[building_phone]:[VARCHAR] } <table1>[Guests] { <col...
SELECT booking_start_date, COUNT( `<col4>` ) FROM `<table3>` AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id
Show the number of apartment bookings for each year and bin booking start date by year interval in a bar chart.
<table0>[instructor] { <col0>[name]:[VARCHAR] <col1>[salary]:[INTEGER] <col2>[dept_name]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > ( SELECT MAX( `<col1>` ) FROM `<table0>` WHERE `<col2>` = 'Biology' )
Find the names of all instructors whose salary is greater than the salary of all instructors in the Biology department.
<table0>[table_name_12] { <col0>[date]:[VARCHAR] <col1>[set_1]:[VARCHAR] <col2>[set_3]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "25–23" AND `<col2>` = "25–14"
What date was the set 1 25–23, and a Set 3 of 25–14?
<table0>[table_12715053_1] { <col0>[trademark]:[VARCHAR] <col1>[molecular_target]:[VARCHAR] <col2>[clinical_status]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Minor Groove of DNA" AND `<col2>` = "Phase I"
How many trademarks list a molecular target of minor groove of dna and a clinical status value of phase i?
<table0>[vaccinations] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[patient_id] <col2>[INT]:[vaccine] <col3>[VARCHAR]:[255] <col4>[date]:[DATE] }
SELECT AVG( `<table0>`_per_day ) FROM ( SELECT COUNT( * ) / ( DATEDIFF( '2021-01-15', `<col4>` ) ) AS `<table0>`_per_day FROM `<table0>` WHERE `<col4>` < '2021-01-15' ) AS subquery;
What is the average number of vaccinations administered per day, before January 15, 2021?
<table0>[table_name_71] { }
SELECT SUM( 2007 ) FROM `<table0>` WHERE 2006 = 0.2 AND 2010 < 0.1
How many 2007s have 0.2 as a 2006, with a 2010 less than 0.1?
<table0>[table_39853] { <col0>[Matches]:[real] <col1>[Wins]:[real] <col2>[Losses]:[real] <col3>[Result]:[real] <col4>[Success]:[Rate] }
SELECT AVG( "Losses" ) FROM `<table0>` WHERE "Wins" > '46'
When the team had more than 46 wins, what were the average losses?
<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 ACC_Road, AVG( `<col0>` ) FROM `<table0>` GROUP BY `<col6>` ORDER BY AVG( `<col0>` ) DESC
Draw a bar chart about the distribution of ACC_Road and the average of Team_ID , and group by attribute ACC_Road, and I want to sort in desc by the Y-axis.
<table0>[table_name_56] { <col0>[build_date]:[VARCHAR] <col1>[prr_class]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "brs24"
What is the build date of the model with PRR Class brs24?
<table0>[table_train_84] { <col0>[int]:[gender] <col1>[string]:[mini_mental_state_examination_mmse] <col2>[int]:[modified_hachinski_ischemia_scale] <col3>[int]:[post_menopausal] <col4>[bool]:[allergy_to_rifaximin] <col5>[bool]:[surgically_sterilized] <col6>[bool]:[body_mass_index_bmi] <col7>[float]:[age] <col8>[float]:...
SELECT * FROM `<table0>` WHERE allergy_to_rifaximin = 1
allergy to rifaximin
<table0>[table_11667521_17] { <col0>[stage__winner]:[VARCHAR] <col1>[general_classification]:[VARCHAR] }
SELECT stage__winner_ FROM `<table0>` WHERE `<col1>` = "Alexander Vinokourov"
IN WHAT STAGE DID ALEXANDER VINOKOUROV WON THE GENERAL CLASSIFICATION?
<table0>[table_name_30] { <col0>[premiere]:[VARCHAR] <col1>[rank]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "#7"
When was the premiere of the show that had a rank of #7?
<table0>[Catalog_Structure] { <col0>[catalog_level_number]:[INTEGER] <col1>[catalog_id]:[INTEGER] <col2>[catalog_level_name]:[VARCHAR] } <table1>[Catalog_Contents] { <col0>[catalog_entry_id]:[INTEGER] <col1>[catalog_level_number]:[INTEGER] <col2>[parent_entry_id]:[INTEGER] <col3>[previous_entry_id]:[INTEGER] <col4>[ne...
SELECT catalog_entry_name, COUNT( `<col5>` ) FROM `<table1>` AS t1 JOIN `<table1>`_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = "8" GROUP BY `<col5>` ORDER BY `<col5>` DESC
What are the names of catalog entries with level number 8, and count them by a bar chart, and order by the X in descending.
<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>[labevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[itemid]:[number] <col4>[...
SELECT `<table1>`.valuenum FROM `<table1>` WHERE `<table1>`.hadm_id IN ( SELECT `<table7>`.hadm_id FROM `<table7>` WHERE `<table7>`.subject_id = 21468 ) AND `<table1>`.itemid IN ( SELECT `<table3>`.itemid FROM `<table3>` WHERE `<table3>`.label = 'calculated total co2' ) AND DATETIME( `<table1>`.charttime, 'start of yea...
whats the first value of calculated total co2 in 03/this year for patient 21468?
<table0>[festival_detail] { <col0>[Festival_Name]:[VARCHAR] <col1>[LOCATION]:[VARCHAR] }
SELECT Festival_Name, `<col1>` FROM `<table0>`
What are the names and locations of festivals?
<table0>[trips] { <col0>[INT]:[vehicle_type] <col1>[VARCHAR]:[speed] <col2>[FLOAT]:[date] <col3>[DATE]:[INSERT] }
SELECT DATE( date ) as trip_date, AVG( speed ) as avg_speed FROM `<table0>` WHERE vehicle_type LIKE 'Electric%' AND date BETWEEN DATE_SUB( CURDATE( ), INTERVAL 7 DAY ) AND CURDATE( ) GROUP BY trip_date ORDER BY trip_date;
What is the average speed of electric vehicles per day for the last 7 days in the 'trips' table?
<table0>[location] { <col0>[restaurant_id]:[int] <col1>[house_number]:[int] <col2>[street_name]:[varchar] <col3>[city_name]:[varchar] } <table1>[restaurant] { <col0>[int]:[name] <col1>[varchar]:[food_type] <col2>[varchar]:[city_name] <col3>[varchar]:[rating] } <table2>[geographic] { <col0>[city_name]:[varchar] <col1>...
SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'san francisco' AND location.street_name = 'buchanan' AND restaurant.food_type = 'arabic' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5
where is a good restaurant on buchanan in san francisco for arabic food ?
<table0>[sales_data] { <col0>[state]:[VARCHAR] <col1>[year]:[INT] <col2>[vehicle_type]:[VARCHAR] <col3>[sales]:[INT] }
SELECT SUM( `<col3>` ) FROM `<table0>` WHERE `<col2>` = 'hybrid' AND `<col0>` = 'California' AND `<col1>` BETWEEN 2020 AND 2022;
How many hybrid vehicles were sold in 'California' from '2020' to '2022' in the 'sales_data' table?
<table0>[shared_ebikes] { <col0>[bike_id]:[INT] <col1>[trip_start_time]:[TIMESTAMP] <col2>[trip_end_time]:[TIMESTAMP] <col3>[trip_distance]:[FLOAT] <col4>[city]:[VARCHAR] }
SELECT MAX( `<col3>` ) as max_distance FROM `<table0>` WHERE `<col4>` = 'Paris';
What is the maximum trip distance for shared electric bikes in Paris?
<table0>[table_75333] { <col0>[Game]:[text] <col1>[Date]:[text] <col2>[Home]:[Team] <col3>[text]:[Result] <col4>[text]:[Road] <col5>[Team]:[text] }
SELECT "Date" FROM `<table0>` WHERE "Game" = 'game 2'
On what date was game 2 played?
<table0>[table_27882867_9] { <col0>[location_attendance]:[VARCHAR] <col1>[team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Milwaukee"
Where was the location and attendance when they played milwaukee?
<table0>[table_39045] { <col0>[Model]:[text] <col1>[Processors]:[Supported] <col2>[text]:[FSB] <col3>[Frequency]:[MHz] <col4>[text]:[Memory] <col5>[text]:[PCI] <col6>[Express]:[text] <col7>[SATA]:[text] <col8>[PATA]:[text] <col9>[Sound]:[text] }
SELECT "Processors Supported" FROM `<table0>` WHERE "Memory" = 'ddr2' AND "Model" = 'nforce 550'
What are the processors supported by a ddr2 memory and the nforce 550 model?