schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[neighborhood] { <col0>[int]:[business_id] <col1>[varchar]:[neighborhood_name] } <table1>[category] { <col0>[int]:[business_id] <col1>[varchar]:[category_name] } <table2>[business] { <col0>[bid]:[int] <col1>[business_id]:[varchar] <col2>[name]:[varchar] <col3>[full_address]:[varchar] <col4>[city]:[varchar] <c...
SELECT tip.text FROM business, tip WHERE business.name = 'Cafe Zinho' AND business.state = 'Pennsylvania' AND tip.business_id = business.business_id AND tip.year = 2010
List all tips for ' Cafe Zinho ' in Pennsylvania in 2010 .
<table0>[table_59016] { <col0>[Date]:[text] <col1>[Venue]:[text] <col2>[Score]:[text] <col3>[Result]:[text] <col4>[Competition]:[text] }
SELECT "Result" FROM `<table0>` WHERE "Venue" = 'dreisamstadion, freiburg'
What is the result at Dreisamstadion, Freiburg?
<table0>[table_46281] { <col0>[Club]:[text] <col1>[Champions]:[real] <col2>[Runners]:[real] <col3>[3rd]:[Place] <col4>[real]:[4th] <col5>[Place]:[real] }
SELECT MAX( "3rd-Place" ) FROM `<table0>` WHERE "Club" = 'home united fc' AND "4th-Place" < '1'
What is the highest 3rd-Place, when Club is 'Home United FC', and when 4th-Place is less than 1?
<table0>[table_5308] { <col0>[Round]:[real] <col1>[Pick]:[real] <col2>[Overall]:[real] <col3>[text]:[Position] <col4>[text]:[College] }
SELECT "College" FROM `<table0>` WHERE "Pick #" > '25' AND "Round" = '7' AND "Name" = 'chris white'
Which College has a Pick # larger than 25, and a Round of 7, and a Name of chris white?
<table0>[threat_intelligence] { <col0>[threat_id]:[INT] <col1>[threat_level]:[VARCHAR] <col2>[report_date]:[DATE] }
INSERT INTO threat_intelligence ( threat_id, threat_level, report_date ) VALUES ( 111, 'Medium', '2022-01-01' );
Add a new threat to the threat_intelligence table for a threat with a threat_id of 111, a threat_level of 'Medium', and a report_date of '2022-01-01'
<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 COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN lab ON `<table3>`.hadm_id = lab.hadm_id WHERE `<table3>`.marital_status = "DIVORCED" AND lab.label = "Free Calcium"
What is the number of divorced patients who had a free calcium lab test done?
<table0>[table_dev_25] { <col0>[int]:[gender] <col1>[string]:[pregnancy_or_lactation] <col2>[bool]:[systolic_blood_pressure_sbp] <col3>[int]:[hemoglobin_a1c_hba1c] <col4>[float]:[diastolic_blood_pressure_dbp] <col5>[int]:[alcohol_abuse] <col6>[bool]:[hypertension] <col7>[bool]:[NOUSE] }
SELECT * FROM `<table0>` WHERE gender = 'female' AND pregnancy_or_lactation = 0
female of non _ childbearing potential.
<table0>[table_19744915_3] { <col0>[order]:[VARCHAR] <col1>[public_vote]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "18.155%"
what is the order when public vote was 18.155%
<table0>[table_27455867_1] { <col0>[callback_audition_date]:[VARCHAR] <col1>[callback_venue]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Hilton Riverside Hotel"
When were the callback auditions at Hilton Riverside Hotel held?
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>...
SELECT COUNT( DISTINCT `<table0>`.subject_id ) FROM `<table0>` INNER JOIN procedures ON `<table0>`.hadm_id = procedures.hadm_id WHERE `<table0>`.marital_status = "MARRIED" AND procedures.icd9_code = "4611"
count the number of patients whose marital status is married and procedure icd9 code is 4611?
<table0>[emergencies] { <col0>[emergency_id]:[INT] <col1>[emergency_type]:[VARCHAR] <col2>[responded_date]:[DATE] <col3>[response_time]:[INT] }
SELECT emergency_type, responded_date, COUNT( * ) emergency_count FROM `<table0>` GROUP BY emergency_type, responded_date;
What is the number of emergencies responded to per day for each emergency type?
<table0>[energy_storage] { <col0>[region]:[VARCHAR] <col1>[capacity]:[INT] } <table1>[renewable_energy] { <col0>[region]:[VARCHAR] <col1>[source]:[VARCHAR] }
SELECT AVG( e.capacity ) FROM `<table0>` e JOIN renewable_energy r ON e.region = r.region;
What is the average energy storage capacity in regions with renewable energy sources?
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <...
SELECT ( SELECT `<table4>`.admissionweight FROM `<table4>` WHERE `<table4>`.`<table4>`healthsystemstayid IN ( SELECT `<table4>`.`<table4>`healthsystemstayid FROM `<table4>` WHERE `<table4>`.uniquepid = '006-161415' AND NOT `<table4>`.hospitaldischargetime IS NULL ORDER BY `<table4>`.hospitaladmittime LIMIT 1 ) AND NOT ...
how many changes in patient 006-161415's weight last measured on the first hospital visit compared to the value second to last measured on the first hospital visit?
<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>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[num...
SELECT `<table2>`.short_title FROM `<table2>` WHERE `<table2>`.icd9_code IN ( SELECT t1.icd9_code FROM ( SELECT `<table5>`.icd9_code, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table5>` GROUP BY `<table5>`.icd9_code ) AS t1 WHERE t1.c1 <= 4 )
what are the top four most common procedures?
<table0>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[first_careunit]:[text] <col5>[last_careunit]:[text] <c...
SELECT ( SELECT `<table16>`.valuenum FROM `<table16>` WHERE `<table16>`.hadm_id IN ( SELECT `<table9>`.hadm_id FROM `<table9>` WHERE `<table9>`.subject_id = 14458 AND NOT `<table9>`.dischtime IS NULL ORDER BY `<table9>`.admittime DESC LIMIT 1 ) AND `<table16>`.itemid IN ( SELECT `<table4>`.itemid FROM `<table4>` WHERE ...
is urea nitrogen of patient 14458 second measured on the last hospital visit greater than the first value measured on the last hospital visit?
<table0>[table_name_34] { <col0>[visitor]:[VARCHAR] <col1>[home]:[VARCHAR] <col2>[score]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "chicago" AND `<col2>` = "3 – 2"
What is the Visitor with a Home with chicago, and a Score of 3 2?
<table0>[table_name_63] { <col0>[date]:[VARCHAR] <col1>[venue]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "alamodome, san antonio, united states"
What date has alamodome, san antonio, united states as the venue?
<table0>[waste_generation] { <col0>[business_type]:[VARCHAR] <col1>[location]:[VARCHAR] <col2>[waste_quantity]:[INT] }
SELECT business_type, SUM( `<col2>` ) FROM `<table0>` WHERE `<col1>` = 'New York' GROUP BY business_type;
What is the total waste generation by business type in New York?
<table0>[activity] { <col0>[actid]:[number] <col1>[activity_name]:[text] } <table1>[faculty_participates_in] { <col0>[facid]:[number] <col1>[actid]:[number] } <table2>[faculty] { <col0>[facid]:[number] <col1>[lname]:[text] <col2>[fname]:[text] <col3>[rank]:[text] <col4>[sex]:[text] <col5>[phone]:[number] <col6>[room]...
SELECT T1.stuid FROM `<table3>` AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Canoeing' INTERSECT SELECT T1.stuid FROM `<table3>` AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Kayaking'
Which students participate in both Canoeing and Kayaking as their activities? Tell me their student ids.
<table0>[table_204_861] { <col0>[number]:[tie] <col1>[number]:[home] <col2>[team]:[text] <col3>[score]:[text] <col4>[away]:[team] <col5>[text]:[date] }
SELECT ABS( "score" - "score" ) FROM `<table0>` WHERE "date" = '18 february 1976'
what was the goal difference in the game on february 18th ?
<table0>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } <table1>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[E...
SELECT JOB_ID, COUNT( `<col6>` ) FROM `<table1>` WHERE `<col5>` < '2002-06-21' GROUP BY `<col6>` ORDER BY COUNT( `<col6>` )
For those employees who was hired before 2002-06-21, give me the comparison about the amount of job_id over the job_id , and group by attribute job_id, and order by the total number in ascending.
<table0>[table_32833] { <col0>[Outcome]:[text] <col1>[Date]:[text] <col2>[Tournament]:[text] <col3>[Surface]:[text] <col4>[Partner]:[text] <col5>[Opponent]:[text] <col6>[Score]:[text] }
SELECT "Outcome" FROM `<table0>` WHERE "Tournament" = 'buenos aires'
What was the outcome of the Tournament in Buenos Aires?
<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 AVG( `<table4>`.days_stay ) FROM `<table4>` WHERE `<table4>`.diagnosis = "S/P FALL"
what is average days of hospital stay of patients whose primary disease is s/p fall?
<table0>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table1>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table2>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] ...
SELECT num.TagName AS Tag, ROW_NUMBER( ) OVER ( ORDER BY rate.Rate DESC ) AS OctRank, ROW_NUMBER( ) OVER ( ORDER BY num.Num DESC ) AS TotalRank, rate.Rate AS QuestionsInOct, num.Num AS QuestionsTotal FROM ( SELECT COUNT( PostId ) AS Rate, TagName FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id ...
Most popular StackOverflow tags in May 2016.
<table0>[table_name_59] { <col0>[release_date]:[VARCHAR] <col1>[time]:[VARCHAR] <col2>[track]:[VARCHAR] <col3>[recorded]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col2>` > 4 AND `<col3>` = "1/12/57" AND `<col1>` = "2:31"
When was the release date of a track greater than 4, 1/12/57 recorded, and a length of 2:31?
<table0>[defense_projects] { <col0>[contractor]:[VARCHAR] <col1>[255]:[project] <col2>[VARCHAR]:[255] <col3>[start_date]:[DATE] <col4>[end_date]:[DATE] }
SELECT COUNT( project ) FROM `<table0>` dp1 WHERE YEAR( dp1.start_date ) <= YEAR( dp1.end_date ) AND NOT EXISTS ( SELECT 1 FROM `<table0>` dp2 WHERE dp2.contractor = dp1.contractor AND dp2.project != dp1.project AND YEAR( dp2.start_date ) < YEAR( dp1.end_date ) AND YEAR( dp2.end_date ) > YEAR( dp1.start_date ) );
What is the maximum number of defense projects that Boeing has been involved in simultaneously in any given year?
<table0>[table_203_237] { <col0>[number]:[number] <col1>[text]:[nat] <col2>[text]:[name] <col3>[text]:[age] <col4>[number]:[moving] <col5>[text]:[type] <col6>[text]:[transfer] <col7>[nwindow]:[text] <col8>[ends]:[number] <col9>[transfer]:[nfee] }
SELECT COUNT( "name" ) FROM `<table0>` WHERE "age" = 21 OR "age" = 33
how many players are age 21 or 33 ?
<table0>[table_22754310_1] { <col0>[party]:[VARCHAR] <col1>[runner_up_a]:[VARCHAR] }
SELECT `<col0>` AS a FROM `<table0>` WHERE `<col1>` = "M. S. K. Sathiyendran"
Name the party a for m. s. k. sathiyendran runner up
<table0>[City] { <col0>[CityName]:[VARCHAR] <col1>[Country]:[VARCHAR] <col2>[Population]:[INT] <col3>[Continent]:[VARCHAR] }
SELECT `<table0>`Name, `<col2>` FROM `<table0>` WHERE `<col3>` = 'Africa' ORDER BY `<col2>` DESC LIMIT 1;
Which is the most populated city in Africa?
<table0>[consumers] { <col0>[consumer_id]:[INT] <col1>[consumer_name]:[TEXT] } <table1>[purchases] { <col0>[purchase_id]:[INT] <col1>[consumer_id]:[INT] <col2>[supplier_id]:[INT] <col3>[product_id]:[INT] <col4>[quantity]:[INT] } <table2>[suppliers] { <col0>[supplier_id]:[INT] <col1>[supplier_name]:[TEXT] <col2>[labor...
SELECT `<table0>`.consumer_name, COUNT( DISTINCT purchases.product_id ) FROM `<table0>` JOIN purchases ON `<table0>`.consumer_id = purchases.consumer_id JOIN suppliers ON purchases.supplier_id = suppliers.supplier_id WHERE suppliers.labor_practice = 'Unethical' GROUP BY `<table0>`.consumer_id;
Find the number of products that each consumer bought from unethical suppliers?
<table0>[sales] { <col0>[sale_id]:[INT] <col1>[platform]:[VARCHAR] <col2>[revenue]:[DECIMAL] }
SELECT platform, SUM( `<col2>` ) as total_revenue FROM `<table0>` GROUP BY platform;
What is the total revenue generated by each platform in the 'sales' table?
<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 T1.Name, T1.Price FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name ORDER BY T1.Name DESC
For those records from the products and each product's manufacturer, find name and price , and group by attribute founder, and visualize them by a bar chart, and rank by the Name in desc.
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]...
SELECT SUM( CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME( '%j', patients.dod ) - STRFTIME( '%j', t2.charttime ) > 4 * 365 THEN 1 ELSE 0 END ) * 100 / COUNT( * ) FROM ( SELECT t1.subject_id, t1.charttime FROM ( SELECT admissions.subject_id, `<table0>`.charttime FROM `<table0>` JOIN admissions ON `<table0>`.hadm_i...
for patients diagnosed with mv-oth veh coll-driver, tell me the four year survival probability.
<table0>[table_name_5] { <col0>[method]:[VARCHAR] <col1>[time]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "0:51"
what is the method when the time is 0:51?
<table0>[vehicles] { <col0>[INT]:[vehicle_type] <col1>[VARCHAR]:[255] <col2>[model_year]:[INT] <col3>[last_maintenance_date]:[DATE] <col4>[next_maintenance_date]:[DATE] }
SELECT vehicle_type, TIMESTAMPDIFF( MONTH, last_maintenance_date, `<col4>` ) as months_until_next_maintenance FROM `<table0>` WHERE vehicle_type = 'Tram';
How many months until the next maintenance for vehicle type 'Tram'?
<table0>[table_31172] { <col0>[Year]:[real] <col1>[Tournaments]:[played] <col2>[real]:[Cuts] <col3>[real]:[Wins] <col4>[real]:[2nd] <col5>[real]:[3rd] <col6>[real]:[10s] <col7>[real]:[Best] <col8>[finish]:[text] <col9>[Earnings]:[u20ac] <col10>[text]:[Money] <col11>[list]:[rank] <col12>[text]:[Scoring] <col13>[average]...
SELECT MIN( "Year" ) FROM `<table0>` WHERE "Earnings ( \u20ac )" = '4,050 1'
In what year were Reid's earnings 4,050 1?
<table0>[Customers] { <col0>[customer_id]:[INTEGER] <col1>[payment_method_code]:[VARCHAR] <col2>[customer_code]:[VARCHAR] <col3>[customer_name]:[VARCHAR] <col4>[customer_address]:[VARCHAR] <col5>[255]:[customer_phone] <col6>[VARCHAR]:[customer_email] } <table1>[Departments] { <col0>[department_id]:[INTEGER] <col1>[dep...
SELECT product_type_code, AVG( `<col3>` ) FROM `<table3>` GROUP BY `<col1>` ORDER BY AVG( `<col3>` ) DESC
What is the average price for each type of product Visualize by bar chart, and display in descending by the the average of product price.
<table0>[table_24195232_1] { <col0>[location]:[VARCHAR] <col1>[team_name]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Patriots"
What was the location for the team name of patriots?
<table0>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[first_careunit]:[text] <col5>[last_careunit]:[text] <col6>[first_wardid]:[number] <col7>[last_wardid]:[number] <col8>[intime]:[time] <col9>[outtime]:[time] } <table1>[d_items] { <col0>[r...
SELECT COUNT( * ) FROM `<table2>` WHERE `<table2>`.icustay_id IN ( SELECT `<table0>`.icustay_id FROM `<table0>` WHERE `<table0>`.hadm_id IN ( SELECT `<table16>`.hadm_id FROM `<table16>` WHERE `<table16>`.subject_id = 17944 ) ) AND `<table2>`.itemid IN ( SELECT `<table1>`.itemid FROM `<table1>` WHERE `<table1>`.label = ...
how many times in 05/this year has patient 17944 received tpn?
<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>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } ...
SELECT `<table5>`.startdate FROM `<table5>` WHERE `<table5>`.hadm_id IN ( SELECT `<table4>`.hadm_id FROM `<table4>` WHERE `<table4>`.subject_id = 5142 ) AND `<table5>`.route = 'po' AND DATETIME( `<table5>`.startdate, 'start of month' ) = DATETIME( CURRENT_TIME( ), 'start of month', '-1 month' ) ORDER BY `<table5>`.star...
when did patient 5142 receive a prescription for the last time in the previous month, via po route?
<table0>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[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...
SELECT `<table4>`.charttime FROM `<table4>` WHERE `<table4>`.icustay_id IN ( SELECT `<table7>`.icustay_id FROM `<table7>` WHERE `<table7>`.hadm_id IN ( SELECT `<table13>`.hadm_id FROM `<table13>` WHERE `<table13>`.subject_id = 12775 ) ) AND `<table4>`.itemid IN ( SELECT `<table14>`.itemid FROM `<table14>` WHERE `<table...
when was the first time patient 12775 took tpn d12.5, today?
<table0>[happy_hour] { <col0>[HH_ID]:[int] <col1>[Shop_ID]:[int] <col2>[Month]:[text] <col3>[Num_of_shaff_in_charge]:[int] } <table1>[shop] { <col0>[Shop_ID]:[int] <col1>[Address]:[text] <col2>[Num_of_staff]:[text] <col3>[Score]:[real] <col4>[Open_Year]:[text] } <table2>[happy_hour_member] { <col0>[HH_ID]:[int] <col1...
SELECT Address, `<col2>` FROM `<table1>` WHERE NOT `<col0>` IN ( SELECT `<col0>` FROM `<table0>` ) ORDER BY `<col2>`
Find the address and staff number of the shops that do not have any happy hour Visualize by bar chart, order y-axis from low to high order.
<table0>[table_19785] { <col0>[English]:[gloss] <col1>[text]:[Santee] <col2>[Sisseton]:[text] <col3>[Yankton]:[Yanktonai] <col4>[text]:[Northern] <col5>[Lakota]:[text] <col6>[Southern]:[Lakota] }
SELECT COUNT( "Santee-Sisseton" ) FROM `<table0>` WHERE "Yankton-Yanktonai" = 'híŋhaŋna'
Name the santee sisseton for h ha na
<table0>[table_32358] { <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 "Home `<col2>` score" FROM `<table0>` WHERE "Venue" = 'brunswick street oval'
Which home team has the Brunswick Street Oval venue?
<table0>[table_name_1] { <col0>[weekly_rank___number]:[VARCHAR] }
SELECT 18 AS _49__rating_share_ FROM `<table0>` WHERE weekly_rank___number_ = "30"
Name the 18-49 rating for weekly rank of 30
<table0>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table1>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvalue...
SELECT AVG( t1.c1 ) FROM ( SELECT SUM( `<table3>`.`<table3>` ) AS c1 FROM `<table3>` WHERE `<table3>`.`<table6>`healthsystemstayid IN ( SELECT `<table6>`.`<table6>`healthsystemstayid FROM `<table6>` WHERE `<table6>`.`<table6>`unitstayid IN ( SELECT `<table9>`.`<table6>`unitstayid FROM `<table9>` WHERE `<table9>`.`<tabl...
tell me the average cost of a hospital which involves phenytoin?
<table0>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[itemid]:[number] <col5>[charttime]:[time] <col6>[valuenum]:[number] <col7>[valueuom]:[text] } <table1>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[had...
SELECT SUM( `<table1>`.amount ) FROM `<table1>` WHERE `<table1>`.icustay_id IN ( SELECT `<table9>`.icustay_id FROM `<table9>` WHERE `<table9>`.hadm_id IN ( SELECT `<table6>`.hadm_id FROM `<table6>` WHERE `<table6>`.subject_id = 19096 ) ) AND DATETIME( `<table1>`.charttime, 'start of year' ) = DATETIME( CURRENT_TIME( ),...
what is the total amount of input that patient 19096 on 07/06/this year has received?
<table0>[table_53928] { <col0>[text]:[text] <col1>[text]:[text] }
SELECT "8:00" FROM `<table0>` WHERE "8:30" = 'the bachelorette'
What is on at 8:00 when at 8:30 it is the bachelorette?
<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>` WHERE `<table2>`.ethnicity = "WHITE"
which patients are of white ethnic background?
<table0>[table_10819266_8] { <col0>[season]:[VARCHAR] }
SELECT `<col0>` AS finale FROM `<table0>` WHERE `<col0>` = 4
What is the season finale for season 4?
<table0>[nursing_homes] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[TEXT]:[state] <col3>[TEXT]:[total_beds] }
DROP TABLE nursing_homes;
Remove the "nursing_homes" table
<table0>[table_name_59] { <col0>[report]:[VARCHAR] <col1>[away_team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "new zealand breakers"
What was the away team for the New Zealand breakers?
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3...
SELECT `<table2>`.admittime, diagnoses.short_title FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id WHERE `<table2>`.subject_id = "2560"
tell me the time of admission and short title of diagnosis for the patient with patient id 2560.
<table0>[department_stores] { <col0>[dept_store_id]:[number] <col1>[dept_store_chain_id]:[number] <col2>[store_name]:[text] <col3>[store_address]:[text] <col4>[store_phone]:[text] <col5>[store_email]:[text] } <table1>[addresses] { <col0>[address_id]:[number] <col1>[address_details]:[text] } <table2>[customers] { <col...
SELECT order_id, `<col1>` FROM `<table13>` WHERE `<col2>` = "Cancelled" ORDER BY `<col3>`
What are the order ids and customer ids for orders that have been Cancelled, sorted by their order dates?
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>...
SELECT `<table0>`.admission_type FROM `<table0>` WHERE `<table0>`.subject_id = "29961"
what is admission type of subject id 29961?
<table0>[table_70574] { <col0>[Riding]:[text] <col1>[Candidate]:[text] <col2>[Gender]:[text] <col3>[Residence]:[text] <col4>[Occupation]:[text] <col5>[Votes]:[real] <col6>[Rank]:[text] }
SELECT MIN( "Votes" ) FROM `<table0>` WHERE "Candidate's Name" = 'trevor ennis'
What is the lowest number of Votes, when the Candidate's Name is Trevor Ennis?
<table0>[table_10812403_4] { <col0>[position]:[VARCHAR] <col1>[pick__number]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 30
How many people were pick #30?
<table0>[table_47338] { <col0>[Date]:[text] <col1>[Home]:[text] <col2>[Score]:[text] <col3>[Away]:[text] <col4>[Attendance]:[real] }
SELECT "Score" FROM `<table0>` WHERE "Attendance" = '2248'
What is the score of the match with an attendance of 2248?
<table0>[MuseumEvents] { <col0>[EventID]:[int] <col1>[EventName]:[varchar] <col2>[100]:[EventDate] <col3>[date]:[MuseumName] <col4>[varchar]:[100] }
SELECT COUNT( * ) FROM `<table0>` WHERE MuseumName = 'National Museum of African American History and Culture' AND YEAR( EventDate ) = 2021;
How many events were hosted by the National Museum of African American History and Culture in 2021?
<table0>[table_204_408] { <col0>[number]:[nation] <col1>[text]:[1986] <col2>[text]:[1989] <col3>[text]:[1991] <col4>[text]:[1997] <col5>[text]:[1999] <col6>[text]:[2000] <col7>[text]:[2003] <col8>[text]:[2005] <col9>[text]:[2007] <col10>[text]:[2009] <col11>[text]:[2011] <col12>[text]:[years] }
SELECT "nation" FROM `<table0>` WHERE "nation" IN ( 'greenland', 'mexico' ) ORDER BY "2000" LIMIT 1
which nation finished higher in 2000 , greenland or mexico ?
<table0>[cultural_events] { <col0>[event_id]:[INT] <col1>[country]:[VARCHAR] <col2>[continent]:[VARCHAR] <col3>[year]:[INT] <col4>[events_count]:[INT] }
SELECT continent, MAX( `<col4>` ) FROM `<table0>` WHERE `<col3>` = 2020 GROUP BY `<col2>` HAVING MAX( `<col4>` ) = ( SELECT MAX( `<col4>` ) FROM `<table0>` WHERE `<col3>` = 2020 );
Which continent had the most cultural events in 2020?
<table0>[table_42458] { <col0>[Game]:[real] <col1>[Date]:[text] <col2>[Opponent]:[text] <col3>[Result]:[text] <col4>[Oilers]:[points] <col5>[real]:[Opponents] <col6>[real]:[Oilers] <col7>[downs]:[real] <col8>[Record]:[text] <col9>[Attendance]:[real] }
SELECT SUM( "Game" ) FROM `<table0>` WHERE "Opponent" = 'at kansas city chiefs' AND "Attendance" < '40,213'
Which Game has an Opponent of at kansas city chiefs, and an Attendance smaller than 40,213?
<table0>[table_name_60] { <col0>[place]:[VARCHAR] <col1>[country]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "zimbabwe"
In what place did the golfer representing Zimbabwe finish?
<table0>[table_name_7] { <col0>[away_team]:[VARCHAR] <col1>[home_team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "carlton"
What was the away team when the home team was Carlton?
<table0>[table_name_88] { <col0>[venue]:[VARCHAR] <col1>[home_team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "south melbourne"
Which venue has a Home team of south melbourne?
<table0>[personfriend] { <col0>[name]:[text] <col1>[friend]:[text] <col2>[year]:[number] } <table1>[person] { <col0>[name]:[text] <col1>[age]:[number] <col2>[city]:[text] <col3>[gender]:[text] <col4>[job]:[text] }
SELECT AVG( `<col1>` ), `<col4>` FROM `<table1>` WHERE `<col3>` = 'male' GROUP BY `<col4>`
What is the average age for a male in each job?
<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 CAST( SUM( CASE WHEN T1.Gender = 'F' THEN 1 ELSE 0 END ) AS REAL ) * 100 / COUNT( T1.BusinessEntityID ) FROM `<table7>` AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.EmailPromotion = 1
Among the employees who wish to receive e-mail promotion from AdventureWorks, how many percent of them are female?
<table0>[Allergy_Type] { <col0>[Allergy]:[VARCHAR] <col1>[AllergyType]:[VARCHAR] } <table1>[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] } <table2>[Has_Allerg...
SELECT LName, AVG( `<col3>` ) FROM `<table1>` WHERE `<col4>` = 'F' GROUP BY `<col1>`
Show the average age for all female students and group them by last name with a bar chart.
<table0>[artists] { <col0>[INT]:[name] <col1>[VARCHAR]:[gender] <col2>[VARCHAR]:[genre] <col3>[VARCHAR]:[revenue] <col4>[FLOAT]:[INSERT] } <table1>[sales] { <col0>[artist_id]:[INT] <col1>[year]:[INT] <col2>[revenue]:[FLOAT] }
SELECT SUM( `<table1>`.revenue ) FROM `<table1>` JOIN artists ON `<table1>`.artist_id = artists.id WHERE artists.gender = 'Non-binary' AND artists.genre = 'Electronic' AND `<table1>`.year BETWEEN ( YEAR( CURDATE( ) ) - 2 ) AND YEAR( CURDATE( ) );
What is the total revenue generated by non-binary Electronic musicians in the last 2 years?
<table0>[table_name_69] { <col0>[country]:[VARCHAR] <col1>[score]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 66 - 73 - 69 = 208
What country has a score of 66-73-69=208?
<table0>[table_name_39] { <col0>[points]:[INTEGER] <col1>[club]:[VARCHAR] <col2>[goals_conceded]:[VARCHAR] }
SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "nevėžis-2 kėdainiai" AND `<col2>` > 35
What is the sum of the points of club nevėžis-2 kėdainiai, which has more than 35 goals conceded?
<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 Affiliation, SUM( `<col5>` ) FROM `<table1>` GROUP BY `<col4>` ORDER BY `<col4>`
Find the total student enrollment for different affiliation type schools Plot them as bar chart, could you rank in asc by the bar please?
<table0>[table_73726] { <col0>[Stage]:[real] <col1>[Winner]:[text] <col2>[General]:[Classification] <col3>[text]:[Youth] <col4>[Classification]:[text] <col5>[Mountains]:[Classification] <col6>[text]:[Sprint] <col7>[Classification]:[text] <col8>[Courageous]:[text] <col9>[Team]:[Classification] }
SELECT "Mountains Classification" FROM `<table0>` WHERE "Most Courageous" = 'Yaroslav Popovych'
When Yaroslav Popovych won most corageous, who won the mountains classification?
<table0>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table1>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate...
SELECT PATINDEX( '%//stackoverflow.com/%', Text ), RIGHT( Text, LENGTH( Text ) - PATINDEX( '%//stackoverflow.com/%', Text ) + 1 ), CASE WHEN NULLIF( STR_POSITION( RIGHT( Text, LENGTH( Text ) - PATINDEX( '%//stackoverflow.com/%', Text ) + 1 ), ' ' ), 0 ) < NULLIF( STR_POSITION( RIGHT( Text, LENGTH( Text ) - PATINDEX( '%...
Stack Overflow Links shared in a specific user's Comments.
<table0>[airport_service] { <col0>[city_code]:[varchar] <col1>[airport_code]:[varchar] <col2>[miles_distant]:[int] <col3>[direction]:[varchar] <col4>[minutes_distant]:[int] } <table1>[flight_stop] { <col0>[flight_id]:[int] <col1>[stop_number]:[int] <col2>[stop_days]:[text] <col3>[stop_airport]:[text] <col4>[arrival_ti...
SELECT DISTINCT flight.flight_id FROM `<table0>` AS AIRPORT_SERVICE_0, `<table0>` 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 = 'ATLANTA' AND flight.departure_time = ( SELECT MIN( FLIGHTalias1.departure_time ) FROM `<table0>`...
find me the earliest flight from BOSTON to ATLANTA and the latest return to BOSTON on the same day
<table0>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } <table1>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table2>[countries] { <col0>[COUNTRY...
SELECT JOB_ID, SUM( `<col7>` ) FROM `<table3>` WHERE `<col5>` < '2002-06-21' GROUP BY `<col6>` ORDER BY SUM( `<col7>` )
For those employees who was hired before 2002-06-21, return a bar chart about the distribution of job_id and the sum of salary , and group by attribute job_id, and I want to display y axis from low to high order please.
<table0>[workplaces] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[industry]:[VARCHAR] <col3>[255]:[union_status] <col4>[VARCHAR]:[255] <col5>[num_employees]:[INT] }
SELECT industry, union_status, AVG( `<col5>` ) as 'Average Employees' FROM `<table0>` GROUP BY industry, union_status;
What is the average number of employees per workplace, categorized by industry and union status?
<table0>[table_9519] { <col0>[text]:[Nationality] <col1>[text]:[Position] <col2>[text]:[Date] <col3>[text]:[Date] <col4>[text]:[Appearances] <col5>[real]:[Goals] <col6>[real]:[Club] <col7>[source]:[text] }
SELECT "Date to [H ]" FROM `<table0>` WHERE "Position [F ]" = 'defender' AND "Goals" < '3' AND "Appearances" > '113' AND "Date from [G ]" = '1997'
What is Date to [H], when Position [F] is 'Defender', when Goals is less than 3, when Appearances is greater than 113, and when Date From [G] is '1997'?
<table0>[SuggestedEdits] { <col0>[number]:[PostId] <col1>[number]:[CreationDate] <col2>[time]:[ApprovalDate] <col3>[time]:[RejectionDate] <col4>[time]:[OwnerUserId] <col5>[number]:[Comment] <col6>[text]:[Text] <col7>[text]:[Title] <col8>[text]:[Tags] <col9>[text]:[RevisionGUID] } <table1>[VoteTypes] { <col0>[number]:[...
SELECT Id AS "post_link", Tags, CreationDate FROM `<table2>` WHERE PostTypeId = 1 AND Tags = '<css><html>' ORDER BY CreationDate DESC LIMIT 100
All questions tagged HTML and CSS (and nothing else).
<table0>[procedures] { <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>`.diagnosis = "HYPERGLYCEMIA" AND `<table1>`.dob_year < "2167"
provide the number of patients whose primary disease is hyperglycemia and year of birth is less than 2167?
<table0>[table_67297] { <col0>[text]:[Country] <col1>[text]:[Status] <col2>[text]:[Moving] <col3>[text]:[Transfer] <col4>[window]:[text] <col5>[Transfer]:[fee] }
SELECT "Transfer window" FROM `<table0>` WHERE "Transfer fee" = 'free' AND "Moving to" = 'norwich city'
What is the Transfer window, when the Transfer fee is 'free', and when the item 'Moving to' is Norwich City?
<table0>[table_name_28] { <col0>[streak_start]:[VARCHAR] <col1>[teams]:[VARCHAR] <col2>[total]:[VARCHAR] <col3>[rank]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col2>` < 79 AND `<col3>` = "22t" AND `<col1>` = "tampa bay"
What streak start has a total less than 79, 22t as the rank, and tampa bay as the teams?
<table0>[inventory] { <col0>[INT]:[material] <col1>[VARCHAR]:[255] <col2>[quantity]:[INT] } <table1>[products] { <col0>[INT]:[material] <col1>[VARCHAR]:[255] <col2>[quantity]:[INT] } <table2>[production] { <col0>[INT]:[country] <col1>[VARCHAR]:[255] <col2>[material]:[VARCHAR] <col3>[255]:[usage] <col4>[INT]:[INSERT] ...
SELECT i.material FROM `<table0>` i INNER JOIN products p ON i.material = p.material WHERE i.quantity >= `<col9>` AND NOT EXISTS ( SELECT * FROM `<table2>` WHERE `<table2>`.material = i.material AND `<table2>`.country = 'China' );
Which materials in the 'inventory' table have a quantity of at least 100 and are used in the production of at least one product in the 'products' table, but are not produced in 'China'?
<table0>[table_54491] { <col0>[Date]:[text] <col1>[Opponent]:[text] <col2>[Score]:[text] <col3>[Loss]:[text] <col4>[Attendance]:[text] <col5>[Record]:[text] }
SELECT "Record" FROM `<table0>` WHERE "Attendance" = '4,516'
When the Attendance was 4,516, what was the Record?
<table0>[table_name_52] { <col0>[result]:[VARCHAR] <col1>[year]:[VARCHAR] <col2>[category]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 2013 AND `<col2>` = "presenter talent show"
What was the result in a year before 2013 that the nomination category was Presenter Talent Show?
<table0>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } <table1>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table2>[employees] { <col0>[EMPLOYE...
SELECT JOB_ID, `<col0>` FROM `<table2>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table6>` WHERE `<col9>` BETWEEN 100 AND 200 )
For those employees who do not work in departments with managers that have ids between 100 and 200, find job_id and employee_id , and visualize them by a bar chart.
<table0>[table_name_96] { <col0>[silver]:[VARCHAR] <col1>[nation]:[VARCHAR] <col2>[total]:[VARCHAR] <col3>[gold]:[VARCHAR] <col4>[bronze]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col3>` > 0 AND `<col4>` < 23 AND `<col2>` > 22 AND `<col1>` = "saint kitts and nevis"
What's the total number of Silver that has Gold that's larger than 0, Bronze that's smaller than 23, a Total that's larger than 22, and has the Nation of Saint Kitts and Nevis?
<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 COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON `<table4>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "V433" AND prescriptions.drug_type = "MAIN"
give me the number of patients whose diagnoses icd9 code is v433 and drug type is main?
<table0>[clinics] { <col0>[INT]:[name] <col1>[TEXT]:[location] <col2>[TEXT]:[INSERT] }
SELECT COUNT( DISTINCT location ) FROM clinics;
Find the total number of clinics in urban and rural areas, excluding any duplicates.
<table0>[finrev_fed_key_17] { <col0>[state_code]:[number] <col1>[state]:[text] <col2>[records]:[text] } <table1>[ndecoreexcel_math_grade8] { <col0>[year]:[number] <col1>[state]:[text] <col2>[all_students]:[text] <col3>[average_scale_score]:[number] } <table2>[finrev_fed_17] { <col0>[state_code]:[number] <col1>[idcens...
SELECT T2.state FROM `<table0>` AS T2 JOIN finrev_fed_17 AS T1 ON T1.state_code = T2.state_code GROUP BY T2.state ORDER BY SUM( t_fed_rev ) DESC LIMIT 1
Which state get the highest revenue?
<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 COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id WHERE `<table4>`.gender = "F" AND diagnoses.long_title = "Suicidal ideation"
how many patients whose gender is f and diagnoses long title is suicidal ideation?
<table0>[table_261895_1] { <col0>[founded]:[INTEGER] <col1>[nickname]:[VARCHAR] }
SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Belles"
under belles, which is the most possible created?
<table0>[table_name_21] { <col0>[investing_dragon_s]:[VARCHAR] <col1>[company_or_product_name]:[VARCHAR] }
SELECT investing_dragon_s_ FROM `<table0>` WHERE `<col1>` = "tiny box"
Who is the company Investing Dragons, or tiny box?
<table0>[language_preservation] { <col0>[INT]:[name] <col1>[TEXT]:[location] <col2>[TEXT]:[address] <col3>[TEXT]:[INSERT] }
SELECT address FROM `<table0>` WHERE name = 'Swahili Language Program';
What is the address information for the Swahili Language Program?
<table0>[table_1220125_4] { <col0>[name]:[VARCHAR] <col1>[launched]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "30 September 1943"
What is the name for 30 september 1943?
<table0>[public_services] { <col0>[service_type]:[VARCHAR] }
SELECT DISTINCT service_type FROM public_services;
List the unique types of public services offered in 'public_services' table.
<table0>[table_24826] { <col0>[Institution]:[text] <col1>[Location]:[text] <col2>[Enrollment]:[text] <col3>[Athletic]:[nickname] <col4>[text]:[School] <col5>[Colors]:[text] <col6>[Founded]:[real] }
SELECT COUNT( "Location" ) FROM `<table0>` WHERE "Athletic nickname" = 'Blue Crusaders'
How many locations are there for the athletic nickname is blue crusaders?
<table0>[table_17118657_7] { <col0>[high_points]:[VARCHAR] <col1>[location_attendance]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "UIC Pavilion 6,304"
How many players received high points where location/attendance was UIC Pavilion 6,304 respectively?
<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 `<table3>`.subject_id ) FROM `<table3>` INNER JOIN diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id INNER JOIN lab ON `<table3>`.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Abn react-cardiac cath" AND lab.flag = "delta"
provide the number of patients whose diagnoses short title is abn react-cardiac cath and lab test abnormal status is delta?
<table0>[table_20903658_1] { <col0>[medium]:[VARCHAR] <col1>[title_subject]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "George Harold Baker"
What medium was used for the sculpture of George Harold Baker?