schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[digital_assets] { <col0>[asset_id]:[INT] <col1>[PRIMARY]:[KEY] <col2>[asset_name]:[TEXT] <col3>[total_supply]:[INT] }
SELECT SUM( transactions ) FROM transaction_data WHERE asset_name = 'Bitcoin';
What is the total number of transactions for the digital asset 'Bitcoin'?
<table0>[table_204_976] { <col0>[number]:[pos] <col1>[text]:[driver] <col2>[text]:[entrant] <col3>[text]:[constructor] <col4>[text]:[time] <col5>[retired]:[text] <col6>[grid]:[number] }
SELECT "driver" FROM `<table0>` WHERE "driver" IN ( 'tony maggs', 'jo siffert' ) ORDER BY "pos" LIMIT 1
who came in earlier , tony maggs or jo siffert ?
<table0>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table1>[CloseAsOffTopicReasonTypes] { <col0>[numbe...
WITH questions_by_week AS ( SELECT CAST( DATEADD( week, DATEDIFF( week, GETDATE( ), CreationDate ), GETDATE( ) ) AS DATE ) AS Week, COUNT( * ) AS post_count FROM `<table12>` AS p WHERE PostTypeId = 1 AND CreationDate >= @FirstQuestion GROUP BY DATEDIFF( week, GETDATE( ), CreationDate ) ) SELECT p.Week, CAST( post_count...
Questions per day by week.
<table0>[SpaceLaunches] { <col0>[INT]:[VARCHAR] <col1>[Provider]:[VARCHAR] <col2>[Delay]:[INT] }
SELECT Provider, SUM( `<col2>` ) * 60 AS Total_Delay_Minutes FROM `<table0>` GROUP BY Provider;
What is the total delay in minutes for each space launch provider?
<table0>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoticeTypeId] <col2>[number]:[CreationDate] <col3>[time]:[DeletionDate] <col4>[time]:[ExpiryDate] <col5>[time]:[Body] <col6>[text]:[OwnerUserId] <col7>[number]:[DeletionUserId] } <table1>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:...
SELECT Id AS "post_link", Score FROM `<table19>` WHERE NOT DeletionDate IS NULL ORDER BY Score LIMIT 100
Questions (not deleted) with lowest scores.
<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 SUM( `<table8>`.amount ) FROM `<table8>` WHERE `<table8>`.icustay_id IN ( SELECT `<table15>`.icustay_id FROM `<table15>` WHERE `<table15>`.hadm_id IN ( SELECT `<table13>`.hadm_id FROM `<table13>` WHERE `<table13>`.subject_id = 27591 ) ) AND DATETIME( `<table8>`.charttime ) <= DATETIME( CURRENT_TIME( ), '-1567 da...
what is the totality of patient 27591's input until 1567 days ago?
<table0>[table_name_51] { <col0>[decision]:[VARCHAR] <col1>[home]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "anaheim"
Who was the Decision at Anaheim's home game?
<table0>[instructor] { <col0>[instructor_id]:[int] <col1>[name]:[varchar] <col2>[uniqname]:[varchar] } <table1>[program] { <col0>[program_id]:[int] <col1>[name]:[varchar] <col2>[college]:[varchar] <col3>[introduction]:[varchar] } <table2>[jobs] { <col0>[job_id]:[int] <col1>[job_title]:[varchar] <col2>[description]:[v...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Macalester Bell%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.o...
Which courses next year are taught by Prof. Macalester Bell ?
<table0>[table_train_164] { <col0>[int]:[hemoglobin_a1c_hba1c] <col1>[float]:[diabetic] <col2>[string]:[fasting_plasma_glucose] <col3>[int]:[age] <col4>[float]:[NOUSE] }
SELECT * FROM `<table0>` WHERE fasting_plasma_glucose <= 125
baseline fasting plasma glucose <= 125 mg / dl
<table0>[ProgramDonations] { <col0>[DonationID]:[INT] <col1>[ProgramName]:[VARCHAR] <col2>[DonationAmount]:[DECIMAL] <col3>[DonationDate]:[DATE] }
SELECT ProgramName, SUM( `<col2>` ) AS TotalDonations, AVG( `<col2>` ) AS AvgDonation FROM `<table0>` GROUP BY ProgramName;
What is the total donation amount for each program in the 'ProgramDonations' table, and the average donation amount for each program?
<table0>[table_11447995_2] { <col0>[ben_tahir]:[VARCHAR] <col1>[bello]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "51"
What is Ben-Tahir when Bello is 51?
<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 lab ON `<table4>`.hadm_id = lab.hadm_id WHERE `<table4>`.age < "58" AND lab.label = "D-Dimer"
what is the number of patients whose age is less than 58 and lab test name is d-dimer?
<table0>[table_25730123_2] { <col0>[player]:[VARCHAR] <col1>[extra_points]:[VARCHAR] <col2>[points]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 1.0 AND `<col2>` = 20
Name the player/s when there were 20 points with less than 1.0 extra point .
<table0>[table_12265] { <col0>[Draft]:[real] <col1>[Round]:[text] <col2>[Pick]:[real] <col3>[Player]:[text] <col4>[Nationality]:[text] }
SELECT "Round" FROM `<table0>` WHERE "Draft" < '1983' AND "Pick" < '132' AND "Player" = 'brad winton'
What is the round of player brad winton with a draft before 1983 and a pick less than 132?
<table0>[Volunteers] { <col0>[VolunteerID]:[INT] <col1>[VolunteerName]:[TEXT] <col2>[Country]:[TEXT] <col3>[JoinDate]:[DATE] }
SELECT COUNT( * ) FROM `<table0>` WHERE `<col2>` IN ( 'Asia', 'Africa' ) AND `<col3>` >= '2019-01-01';
How many volunteers from Asia and Africa have joined our programs since 2019?
<table0>[job_applications] { <col0>[INT]:[applicant_id] <col1>[INT]:[applicant_nationality] <col2>[VARCHAR]:[position] <col3>[VARCHAR]:[application_date] <col4>[DATE]:[INSERT] }
DELETE FROM `<table0>` WHERE applicant_nationality = 'Brazilian' AND position = 'Data Scientist';
Delete all job applications from candidates with the nationality 'Brazilian' and who applied for the 'Data Scientist' position
<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 Headquarter, AVG( Revenue ) FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY Headquarter
For those records from the products and each product's manufacturer, a bar chart shows the distribution of headquarter and the average of revenue , and group by attribute headquarter, list in asc by the x-axis.
<table0>[table_name_46] { <col0>[replaced_by]:[VARCHAR] <col1>[team]:[VARCHAR] <col2>[date_of_vacancy]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "brussels" AND `<col2>` = "22 december 2007"
Who was the replacement for the Brussels team with a date of vacancy of 22 December 2007?
<table0>[table_204_574] { <col0>[number]:[year] <col1>[number]:[title] <col2>[text]:[peak] <col3>[chart]:[positions] <col4>[nswe]:[number] <col5>[peak]:[chart] <col6>[positions]:[nswi] <col7>[number]:[peak] <col8>[chart]:[positions] <col9>[nuk]:[number] <col10>[album]:[text] }
SELECT "year" FROM `<table0>` WHERE NOT "peak `<col3>` positions\nswe" IS NULL
what is the only year a title made the peak chart position ?
<table0>[Regions] { <col0>[RegionName]:[VARCHAR] <col1>[HealthcareCenterName]:[VARCHAR] <col2>[HealthcareCenterCapacity]:[INT] }
SELECT HealthcareCenterName, `<col2>` FROM `<table0>` WHERE `<col0>` = 'Region4';
List all healthcare centers and their capacities in 'Region4'
<table0>[t_kc21] { <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 `<table0>`.IN_DIAG_DIS_CD, `<table0>`.IN_DIAG_DIS_NM FROM `<table0>` WHERE `<table0>`.PERSON_NM = '彭丽泽' AND `<table0>`.IN_HOSP_DATE BETWEEN '2002-05-05' AND '2011-10-16' GROUP BY `<table0>`.IN_DIAG_DIS_CD ORDER BY COUNT( * ) DESC LIMIT 1
彭丽泽这个病患在02年5月5日到11年10月16日之中主要看的病有哪些?
<table0>[table_name_59] { <col0>[place]:[VARCHAR] <col1>[score]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 68 - 70 - 69 = 207
In what place did the golfer that scored 68-70-69=207 finish?
<table0>[members] { <col0>[member_id]:[INT] <col1>[gender]:[VARCHAR] } <table1>[workouts] { <col0>[workout_id]:[INT] <col1>[member_id]:[INT] <col2>[date]:[DATE] <col3>[INSERT]:[members] <col4>[VALUES]:[Female] <col5>[Male]:[Female] }
SELECT COUNT( * ) FROM `<table1>` JOIN members ON `<table1>`.member_id = members.member_id WHERE members.gender = 'Male';
What is the total number of workouts performed by male members?
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>...
SELECT COUNT( DISTINCT `<table0>`.subject_id ) FROM `<table0>` WHERE `<table0>`.gender = "F" AND `<table0>`.diagnosis = "CONGESTIVE HEART FAILURE"
give me the number of female patients primarily suffering from congestive heart failure.
<table0>[cases] { <col0>[case_id]:[INT] <col1>[state]:[VARCHAR] <col2>[billing_amount]:[DECIMAL] }
SELECT AVG( `<col2>` ) as avg_billing FROM `<table0>` WHERE `<col1>` = 'California';
What is the average billing amount for cases in 'California'?
<table0>[table_50481] { <col0>[Year]:[real] <col1>[Competition]:[text] <col2>[Venue]:[text] <col3>[Position]:[text] <col4>[Notes]:[text] }
SELECT "Venue" FROM `<table0>` WHERE "Notes" = 'team' AND "Year" < '2010'
What is the venue of the team race that was before 2010?
<table0>[restriction] { <col0>[restriction_code]:[text] <col1>[advance_purchase]:[int] <col2>[stopovers]:[text] <col3>[saturday_stay_required]:[text] <col4>[minimum_stay]:[int] <col5>[maximum_stay]:[int] <col6>[application]:[text] <col7>[no_discounts]:[text] } <table1>[flight_stop] { <col0>[flight_id]:[int] <col1>[sto...
SELECT DISTINCT flight.flight_id FROM fare, flight, flight_fare WHERE ( ( ( flight.departure_time < 800 AND flight.flight_`<table5>` IN ( SELECT DAYSalias0.`<table5>`_code FROM `<table5>` AS DAYSalias0 WHERE DAYSalias0.day_name IN ( SELECT DATE_DAYalias0.day_name FROM `<table24>` AS DATE_DAYalias0 WHERE DATE_DAYalias0....
i need flight and fare information departing from OAKLAND to SALT LAKE CITY on thursday before 800
<table0>[Department] { <col0>[DepartmentID]:[INTEGER] <col1>[VARCHAR]:[Head] } <table1>[Block] { <col0>[BlockFloor]:[INTEGER] <col1>[BlockCode]:[INTEGER] } <table2>[Room] { <col0>[RoomNumber]:[INTEGER] <col1>[RoomType]:[VARCHAR] <col2>[BlockFloor]:[INTEGER] <col3>[BlockCode]:[INTEGER] <col4>[Unavailable]:[BOOLEAN] }...
SELECT Name, COUNT( * ) FROM `<table3>` AS T1 JOIN Prescribes AS T2 ON T1.Code = T2.`<table3>` GROUP BY T1.Brand ORDER BY COUNT( * ) DESC
How many medications are prescribed for each brand Visualize by bar chart, list Y in descending order.
<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>[prescr...
SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN procedures ON `<table4>`.hadm_id = procedures.hadm_id WHERE `<table4>`.admission_type = "EMERGENCY" AND procedures.icd9_code = "9672"
provide the number of patients whose admission type is emergency and procedure icd9 code is 9672?
<table0>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table1>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]...
SELECT `<table1>`.charttime FROM `<table1>` WHERE `<table1>`.icd9_code = ( SELECT `<table10>`.icd9_code FROM `<table10>` WHERE `<table10>`.short_title = 'mv collision nos-driver' ) AND `<table1>`.hadm_id IN ( SELECT `<table13>`.hadm_id FROM `<table13>` WHERE `<table13>`.subject_id = 44625 AND NOT `<table13>`.dischtime ...
when was the last time that patient 44625 was diagnosed with a mv collision nos-driver during the first hospital visit?
<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>[patients] { <col0>[ro...
SELECT MAX( t1.c1 ) FROM ( SELECT SUM( `<table13>`.`<table13>` ) AS c1 FROM `<table13>` WHERE `<table13>`.hadm_id IN ( SELECT `<table1>`.hadm_id FROM `<table1>` WHERE `<table1>`.icd9_code = ( SELECT `<table15>`.icd9_code FROM `<table15>` WHERE `<table15>`.short_title = 'reopen thoracotomy site' ) ) AND DATETIME( `<tabl...
what is the maximum hospital cost for a procedure that involves reopen thoracotomy site in a year before?
<table0>[table_20577] { <col0>[Date]:[text] <col1>[Text]:[text] <col2>[Simplified]:[characters] <col3>[text]:[Traditional] <col4>[characters]:[text] <col5>[Pinyin]:[text] <col6>[Wade]:[Giles] <col7>[text]:[Literal] <col8>[meaning]:[text] }
SELECT COUNT( "Pinyin" ) FROM `<table0>` WHERE "Wade-Giles" = 'hsin-yüan-i-ma'
Name the total number of pinyin for hsin-y an-i-ma
<table0>[table_name_21] { <col0>[record]:[VARCHAR] <col1>[opponent]:[VARCHAR] <col2>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "expos" AND `<col2>` = "august 10"
On August 10, what was the record against the Expos?
<table0>[rare_earth_supply_chain] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[year] <col2>[INT]:[country] <col3>[VARCHAR]:[255] <col4>[element]:[VARCHAR] <col5>[255]:[supplier_name] <col6>[VARCHAR]:[255] <col7>[transparency_score]:[INT] }
WITH removed_record AS ( DELETE FROM `<table0>` WHERE year = 2021 AND country = 'Australia' AND `<col4>` = 'Terbium' ) SELECT * FROM `<table0>` WHERE year = 2021 AND country = 'Australia' AND `<col4>` = 'Terbium';
Delete the 'rare_earth_supply_chain' record for Australia's terbium supply chain
<table0>[table_name_52] { <col0>[round]:[INTEGER] <col1>[record]:[VARCHAR] }
SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "1-1"
What is the average number of rounds that Lance Gibson fought when his record was 1-1?
<table0>[table_name_95] { <col0>[venue]:[VARCHAR] <col1>[city]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "durham"
What venue is in the city of Durham?
<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>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[n...
SELECT COUNT( * ) > 0 FROM `<table8>` WHERE `<table8>`.hadm_id IN ( SELECT `<table11>`.hadm_id FROM `<table11>` WHERE `<table11>`.subject_id = 14990 ) AND `<table8>`.spec_type_desc = 'mrsa screen' AND STRFTIME( '%y-%m', `<table8>`.charttime ) <= '2104-10'
was there a result of a microbiological test in patient 14990's mrsa screen until 10/2104?
<table0>[table_203_344] { <col0>[number]:[number] <col1>[date]:[text] <col2>[opponent]:[text] <col3>[score]:[text] <col4>[win]:[text] <col5>[loss]:[text] <col6>[save]:[text] <col7>[attendance]:[number] <col8>[record]:[text] <col9>[info]:[text] }
SELECT COUNT( * ) FROM `<table0>` WHERE "opponent" = 'braves'
how many times were the braves listed as the opponents ?
<table0>[table_name_84] { <col0>[home__2nd_leg]:[VARCHAR] }
SELECT 2 AS nd_leg FROM `<table0>` WHERE home__2nd_leg_ = "atlético tucumán"
What was the 2nd leg score when atl tico tucum n played at home?
<table0>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table1>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col...
SELECT Post.Id AS "post_link", Type.Name AS "type", Post.Score AS "score", Post.CreationDate AS "creationdate", COALESCE( Post.Tags, Parent.Tags ) AS "tags" FROM `<table9>` AS Post LEFT JOIN PostTypes AS Type ON Type.Id = Post.PostTypeId LEFT JOIN `<table9>` AS Parent ON Parent.Id = Post.ParentId WHERE Post.OwnerDispla...
All posts by user.
<table0>[table_name_26] { <col0>[name]:[VARCHAR] <col1>[date]:[VARCHAR] <col2>[ownership]:[VARCHAR] <col3>[condition]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "private" AND `<col3>` = "occupied" AND `<col1>` = "16th century"
What is the Name of the private Castle of the 16th century which is occupied?
<table0>[table_51744] { <col0>[Home]:[team] <col1>[text]:[Home] <col2>[team]:[score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Away]:[team] <col6>[score]:[text] <col7>[Venue]:[text] <col8>[Crowd]:[real] <col9>[Date]:[text] }
SELECT "Away `<col2>` score" FROM `<table0>` WHERE "Home team" = 'st kilda'
How much did the away team score that played St Kilda?
<table0>[AgriculturalInnovations] { <col0>[INT]:[country] <col1>[VARCHAR]:[project] <col2>[VARCHAR]:[start_date] <col3>[DATE]:[INSERT] }
SELECT project FROM `<table0>` WHERE country = 'Uganda' AND start_date >= '2019-01-01';
List the agricultural innovation projects in Uganda that started in 2019 or later.
<table0>[table_203_834] { <col0>[number]:[rank] <col1>[number]:[census] <col2>[subdivision]:[text] <col3>[province]:[text] <col4>[type]:[text] <col5>[land]:[area] <col6>[km2]:[2011] <col7>[number]:[population] <col8>[2011]:[number] <col9>[population]:[2006] <col10>[number]:[population] <col11>[2001]:[number] <col12>[po...
SELECT "census subdivision" FROM `<table0>` ORDER BY "change in % 2006-2011" DESC LIMIT 1
between 2006-2011 , which subdivision had the largest change in population ? -lrb- % -rrb-
<table0>[table_204_807] { <col0>[number]:[date] <col1>[text]:[winner] <col2>[text]:[runner] <col3>[text]:[result] <col4>[text]:[site] <col5>[text]:[attendance] }
SELECT "winner" FROM `<table0>` ORDER BY "date" LIMIT 1
who was the first team to be champion of the tournament ?
<table0>[table_45459] { <col0>[Tournament]:[text] <col1>[1999]:[text] <col2>[2000]:[text] <col3>[2001]:[text] <col4>[2002]:[text] <col5>[2003]:[text] <col6>[2004]:[text] <col7>[2005]:[text] <col8>[2006]:[text] <col9>[2007]:[text] <col10>[2008]:[text] <col11>[2009]:[text] <col12>[2010]:[text] <col13>[Career]:[text] }
SELECT "Career" FROM `<table0>` WHERE "2007" = '3r' AND "1999" = '1r'
What is the career for 2007 3r, and 1999 1r?
<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>` WHERE `<table3>`.marital_status = "MARRIED" AND `<table3>`.ethnicity = "ASIAN"
give me the number of patients whose marital status is married and ethnicity is asian
<table0>[table_name_5] { }
SELECT 2012 FROM `<table0>` WHERE 2011 = "1r"
Name the 2012 for 2011 being 1r
<table0>[railway_manage] { <col0>[Railway_ID]:[int] <col1>[Manager_ID]:[int] <col2>[From_Year]:[text] } <table1>[railway] { <col0>[Railway_ID]:[int] <col1>[Railway]:[text] <col2>[Builder]:[text] <col3>[Built]:[text] <col4>[Wheels]:[text] <col5>[Location]:[text] <col6>[ObjectNumber]:[text] } <table2>[manager] { <col0>...
SELECT Working_year_starts, COUNT( Working_year_starts ) FROM `<table2>` ORDER BY Level DESC
A line chart for showing the number of the working years of managers in descending order of their level.
<table0>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table1>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table2>[regions] { <col0>[REGION_ID]:[deci...
SELECT HIRE_DATE, `<col7>` FROM `<table5>` WHERE `<col5>` < '2002-06-21'
For those employees who was hired before 2002-06-21, a line chart shows the change of salary over hire_date
<table0>[table_204_334] { <col0>[number]:[opposition] <col1>[text]:[matches] <col2>[number]:[won] <col3>[number]:[drawn] <col4>[number]:[lost] <col5>[number]:[number] <col6>[number]:[win] }
SELECT "opposition" FROM `<table0>` WHERE "opposition" <> 'delhi wizards' AND "win%" = ( SELECT "win%" FROM `<table0>` WHERE "opposition" = 'delhi wizards' )
which team has the same percentage as the delhi wizards ?
<table0>[table_24876] { <col0>[series]:[real] <col1>[season]:[real] <col2>[Title]:[text] <col3>[Directed]:[text] <col4>[Written]:[text] <col5>[Original]:[air] <col6>[date]:[text] <col7>[Production]:[code] }
SELECT "No. in series" FROM `<table0>` WHERE "Title" = 'Breaking Up Is Easy to Do ( Part 1 )'
what is the number of the episode in series that is called 'breaking up is easy to do (part 1)'?
<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 COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN prescriptions ON `<table3>`.hadm_id = prescriptions.hadm_id WHERE `<table3>`.dob_year < "1821" AND prescriptions.formulary_drug_cd = "THIAM100I"
give me the number of patients whose year of birth is less than 1821 and drug code is thiam100i?
<table0>[table_21671] { <col0>[Season]:[Tamil] <col1>[text]:[English] <col2>[Transliteration]:[text] <col3>[English]:[Translation] <col4>[text]:[Season] <col5>[Sanskrit]:[text] <col6>[Season]:[English] <col7>[text]:[Tamil] <col8>[Months]:[text] <col9>[Gregorian]:[Months] }
SELECT COUNT( "Season in Tamil" ) FROM `<table0>` WHERE "Season in Sanskrit" = 'Grishma'
How many seasons in Tamil occur when the season in Sanskrit is Grishma?
<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 procedures ON `<table1>`.hadm_id = procedures.hadm_id WHERE `<table1>`.expire_flag = "0" AND procedures.long_title = "Percutaneous aspiration of gallbladder"
give me the number of patients who had percutaneous aspiration of gallbladder and are still alive.
<table0>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table1>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table2>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm...
SELECT COUNT( DISTINCT t1.subject_id ) FROM ( SELECT admissions.subject_id, `<table4>`.charttime FROM `<table4>` JOIN admissions ON `<table4>`.hadm_id = admissions.hadm_id WHERE `<table4>`.icd9_code = ( SELECT `<table7>`.icd9_code FROM `<table7>` WHERE `<table7>`.short_title = 'atrial fibrillation' ) AND STRFTIME( '%y'...
since 2103 how many patients were diagnosed with atrial fibrillation within 2 months after the diagnosis of need prphyl vc vrl hepat?
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type...
SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id WHERE `<table2>`.dob_year < "2109" AND diagnoses.short_title = "Mitral/aortic val insuff"
how many patients are born before 2109 and diagnosed with mitral/aortic val insuff?
<table0>[table_name_18] { <col0>[road_number]:[VARCHAR] <col1>[year]:[INTEGER] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 1922
How many road numbers are before 1922?
<table0>[vessel_activity] { <col0>[INT]:[vessel_name] <col1>[VARCHAR]:[flag_state] <col2>[VARCHAR]:[activity_date] <col3>[DATE]:[INSERT] }
SELECT COUNT( DISTINCT vessel_name ) FROM `<table0>` WHERE flag_state = 'Panama' AND activity_date BETWEEN DATE_SUB( CURRENT_DATE, INTERVAL 1 MONTH ) AND CURRENT_DATE;
How many vessels with flag_state 'Panama' were active in the last month?
<table0>[Courses] { <col0>[course_id]:[INTEGER] <col1>[author_id]:[INTEGER] <col2>[subject_id]:[INTEGER] <col3>[course_name]:[VARCHAR] <col4>[120]:[course_description] <col5>[VARCHAR]:[255] } <table1>[Subjects] { <col0>[subject_id]:[INTEGER] <col1>[subject_name]:[VARCHAR] } <table2>[Student_Course_Enrolment] { <col0>...
SELECT date_of_completion, COUNT( `<col4>` ) FROM `<table2>` AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail" GROUP BY `<col4>` ORDER BY `<col4>`
A bar chart for what are the number of the completion dates of all the tests that have result 'Fail'?, could you order from low to high by the names?
<table0>[table_name_10] { <col0>[country]:[VARCHAR] <col1>[music]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "nino oliviero"
What country is the film that has music of nino oliviero?
<table0>[table_name_3] { <col0>[date]:[VARCHAR] <col1>[week]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 5
What is the Date of Week 5?
<table0>[Rooms] { <col0>[RoomId]:[TEXT] <col1>[roomName]:[TEXT] <col2>[beds]:[INTEGER] <col3>[bedType]:[TEXT] <col4>[maxOccupancy]:[INTEGER] <col5>[basePrice]:[INTEGER] <col6>[decor]:[TEXT] } <table1>[Reservations] { <col0>[Code]:[INTEGER] <col1>[Room]:[TEXT] <col2>[CheckIn]:[TEXT] <col3>[CheckOut]:[TEXT] <col4>[Rate]...
SELECT bedType, AVG( `<col5>` ) FROM `<table0>` GROUP BY `<col3>`
What is the average base price of different bed type? List bed type and average base price. Plot them as bar chart.
<table0>[performance] { <col0>[songid]:[number] <col1>[bandmate]:[number] <col2>[stageposition]:[text] } <table1>[songs] { <col0>[songid]:[number] <col1>[title]:[text] } <table2>[albums] { <col0>[aid]:[number] <col1>[title]:[text] <col2>[year]:[number] <col3>[label]:[text] <col4>[type]:[text] } <table3>[instruments]...
SELECT COUNT( * ) FROM `<table0>` AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid WHERE T3.title = "Flash"
Hom many musicians performed in the song 'Flash'?
<table0>[representative] { <col0>[State]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` GROUP BY `<col0>` HAVING COUNT( * ) >= 2
What states have at least two representatives?
<table0>[Ref_document_types] { <col0>[document_type_code]:[VARCHAR] <col1>[document_type_name]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Paper"
What is the document type code for document type 'Paper'?
<table0>[table_train_186] { <col0>[int]:[language] <col1>[string]:[diabetic] <col2>[string]:[regular_alcohol_intake] <col3>[int]:[allergy_to_drug] <col4>[bool]:[alcohol_abuse] <col5>[bool]:[age] <col6>[float]:[NOUSE] }
SELECT * FROM `<table0>` WHERE diabetic = 'i'
diagnosis of type i diabetes
<table0>[table_29997112_3] { <col0>[description]:[VARCHAR] <col1>[meaning]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Decimal Digit 2"
How many different descriptions are there for the flag that means decimal digit 2?
<table0>[table_name_32] { <col0>[round]:[INTEGER] <col1>[time]:[VARCHAR] <col2>[event]:[VARCHAR] }
SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "5:00" AND `<col2>` = "ufc 78"
At the UFC 78, what is the average round when the time is 5:00?
<table0>[procedures] { <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>[la...
SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.diagnosis = "LEFT FEMUR FRACTURE" AND `<table3>`.dob_year < "2071"
give me the number of patients whose primary disease is left femur fracture and year of birth is less than 2071?
<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>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]...
SELECT `<table16>`.short_title FROM `<table16>` WHERE `<table16>`.icd9_code IN ( SELECT t3.icd9_code FROM ( SELECT t2.icd9_code, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table6>`.charttime FROM `<table6>` JOIN admissions ON `<table6>`.hadm_id = admissions.hadm_id WHER...
what are the four most commonly given diagnoses for patients who were previously diagnosed with intermed coronary synd within 2 months, since 6 years ago?
<table0>[subways] { <col0>[INT]:[line] <col1>[VARCHAR]:[fare] <col2>[DECIMAL]:[INSERT] }
SELECT AVG( fare ) FROM subways;
What is the average fare for a trip on the New York subway?
<table0>[table_name_61] { }
SELECT 2004 FROM `<table0>` WHERE 2012 = "21"
Tell me the 2004 for 2012 of 21
<table0>[university] { <col0>[School_ID]:[int] <col1>[School]:[text] <col2>[Location]:[text] <col3>[Founded]:[real] <col4>[Affiliation]:[text] <col5>[Enrollment]:[real] <col6>[Nickname]:[text] <col7>[Primary_conference]:[text] } <table1>[basketball_match] { <col0>[Team_ID]:[int] <col1>[School_ID]:[int] <col2>[Team_Nam...
SELECT ACC_Regular_Season, `<col0>` FROM `<table1>` ORDER BY `<col3>`
Show me team_id by acc regular season in a histogram, and sort by the bar in asc.
<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 diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON `<table3>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "BMI less than 19,adult" AND prescriptions.drug_type = "ADDITIVE"
how many of the adult patients with bmi less than 19 received additive therapy?
<table0>[table_14986292_1] { <col0>[area__km]:[VARCHAR] <col1>[population_density_2010___km]:[VARCHAR] }
SELECT COUNT( area__km²_ ) FROM `<table0>` WHERE population_density_2010___km²_ = 514
Name the number of area where population density 2010 for 514
<table0>[login_attempts] { <col0>[INT]:[ip_address] <col1>[VARCHAR]:[login_status] <col2>[VARCHAR]:[INSERT] }
SELECT ip_address FROM `<table0>` WHERE login_status = 'suspicious' INTERSECT SELECT ip_address FROM `<table0>` WHERE login_status = 'successful';
What are the unique IP addresses that have been associated with both suspicious and successful login attempts?
<table0>[table_1368649_9] { <col0>[grand_final_dual_television_commentator]:[VARCHAR] <col1>[year_s]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE year_s_ = 1961
How many grand final dual television commentators were there in 1961?
<table0>[table_18268930_1] { <col0>[population_served]:[INTEGER] }
SELECT MIN( `<col0>` ) FROM `<table0>`
What's the minimal number of population served?
<table0>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table2>[ReviewTasks] { <col0...
SELECT p.CreationDate, p.Id AS "post_link", p.Score, COUNT( b.UserId ) AS "users" FROM `<table24>` AS p, Badges AS b, Votes AS v WHERE b.Name = '##tag##' AND v.VoteTypeId = 5 AND v.PostId = p.Id AND v.UserId = b.UserId AND p.Tags LIKE '%##tag##%' AND p.AnswerCount = 0 AND p.ClosedDate IS NULL GROUP BY p.Id, p.Score, p....
Questions with a tag favorited by users with matching tag badge.
<table0>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table1>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>...
SELECT STRFTIME( '%j', `<table3>`.hospitaldischargetime ) - STRFTIME( '%j', `<table3>`.hospitaladmittime ) FROM `<table3>` WHERE `<table3>`.uniquepid = '015-8398' AND NOT `<table3>`.hospitaladmittime IS NULL ORDER BY `<table3>`.hospitaladmittime DESC LIMIT 1
calculate the length of stay of the last hospital stay of patient 015-8398.
<table0>[marine_species] { <col0>[species_name]:[TEXT] <col1>[conservation_status]:[TEXT] <col2>[region]:[TEXT] } <table1>[endangered_species] { <col0>[species_name]:[TEXT] <col1>[region]:[TEXT] <col2>[SELECT]:[species_name] <col3>[region]:[marine_species] <col4>[conservation_status]:[Endangered] }
`<col2>` region, COUNT( * ) FROM `<table1>` GROUP BY `<col1>` HAVING COUNT( * ) > 30;
Identify regions with more than 30 marine endangered species.
<table0>[table_name_8] { <col0>[bronze]:[VARCHAR] <col1>[gold]:[INTEGER] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` > 9
How many bronze medals for the nation with over 9 golds?
<table0>[table_name_19] { <col0>[metric_value]:[VARCHAR] <col1>[russian]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "че́тверть"
What is the Metric value of Russian че́тверть?
<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>`.gender = "F" AND lab.label = "Base Excess"
how many female patients are tested in lab for base excess?
<table0>[table_name_19] { <col0>[studio_host]:[VARCHAR] <col1>[play_by_play]:[VARCHAR] <col2>[studio_analysts]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "paul sunderland" AND `<col2>` = "jack haley"
Who is the studio host for the game that has Paul Sunderland as play by play commentator and Jack Haley as the Studio Analyst?
<table0>[table_204_568] { <col0>[number]:[pennant] <col1>[text]:[name] <col2>[text]:[hull] <col3>[builder]:[text] <col4>[ordered]:[text] <col5>[laid]:[text] <col6>[launched]:[text] <col7>[accepted]:[service] <col8>[text]:[commissioned] <col9>[text]:[est] <col10>[building]:[cost] <col11>[text]:[fate] }
SELECT "name" FROM `<table0>` WHERE id = ( SELECT id FROM `<table0>` WHERE "name" = 'ardent' ) + 1
what is the name of the ship listed after ardent ?
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug...
SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` WHERE `<table4>`.ethnicity = "BLACK/CAPE VERDEAN" AND `<table4>`.age < "30"
how many people of black/cape verdean ethnicity are below the age 30?
<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 `<table5>`.`<table5>`result FROM `<table5>` WHERE `<table5>`.`<table1>`unitstayid IN ( SELECT `<table1>`.`<table1>`unitstayid FROM `<table1>` WHERE `<table1>`.`<table1>`healthsystemstayid IN ( SELECT `<table1>`.`<table1>`healthsystemstayid FROM `<table1>` WHERE `<table1>`.uniquepid = '006-65715' ) ) AND `<table5...
in 01/last year what was the first value of a rdw lab test of patient 006-65715?
<table0>[table_name_13] { <col0>[date]:[VARCHAR] <col1>[away_team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "geelong"
When was the away team geelong?
<table0>[awards_players] { <col0>[playerID]:[text] <col1>[award]:[text] <col2>[year]:[integer] <col3>[lgID]:[text] <col4>[note]:[text] <col5>[pos]:[text] } <table1>[coaches] { <col0>[coachID]:[text] <col1>[year]:[integer] <col2>[tmID]:[text] <col3>[lgID]:[text] <col4>[stint]:[integer] <col5>[won]:[integer] <col6>[lost...
SELECT COUNT( DISTINCT T4.name ) FROM ( SELECT T1.name, SUM( T2.points ) FROM `<table5>` AS T1 INNER JOIN players_`<table5>` AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year INNER JOIN awards_players AS T3 ON T2.playerID = T3.playerID WHERE T3.award = 'Most Valuable Player' GROUP BY T1.name HAVING SUM( T2.points ) >= 3...
How many teams have played more than 3800 points and have player with "Most Valuable Player" award?
<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>`.ethnicity = "WHITE - RUSSIAN" AND `<table1>`.dod_year <= "2168.0"
count the number of patients whose ethnicity is white - russian and year of death is less than or equal to 2168?
<table0>[student] { <col0>[student_id]:[int] <col1>[lastname]:[varchar] <col2>[firstname]:[varchar] <col3>[program_id]:[int] <col4>[declare_major]:[varchar] <col5>[total_credit]:[int] <col6>[total_gpa]:[float] <col7>[entered_as]:[varchar] <col8>[admit_term]:[int] <col9>[predicted_graduation_semester]:[int] <col10>[degr...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Peter Nagourney%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.o...
Do you have a list of Dr. Peter Nagourney 's classes for next semester ?
<table0>[garment_suppliers] { <col0>[supplier_id]:[INT] <col1>[country]:[VARCHAR] <col2>[255]:[lead_time] <col3>[FLOAT]:[INSERT] }
SELECT country, AVG( lead_time ) FROM `<table0>` GROUP BY country;
What is the average lead time for each country of garment suppliers?
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4...
SELECT SUM( `<table5>`.`<table5>` ) FROM `<table5>` WHERE `<table5>`.`<table1>`healthsystemstayid IN ( SELECT `<table1>`.`<table1>`healthsystemstayid FROM `<table1>` WHERE `<table1>`.uniquepid = '006-216991' ) AND DATETIME( `<table5>`.chargetime ) <= DATETIME( CURRENT_TIME( ), '-4 year' )
how much does patient 006-216991 pay for their hospital stay until 4 years ago?
<table0>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[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_rx]:[text] <col7>[dose_unit_rx]:[text]...
SELECT ( SELECT SUM( `<table11>`.amount ) FROM `<table11>` WHERE `<table11>`.icustay_id IN ( SELECT `<table5>`.icustay_id FROM `<table5>` WHERE `<table5>`.hadm_id IN ( SELECT `<table8>`.hadm_id FROM `<table8>` WHERE `<table8>`.subject_id = 4401 ) ) AND DATETIME( `<table11>`.charttime, 'start of month' ) = DATETIME( CUR...
give me the difference between the total amount of input and the total output of patient 4401 on this month/30.
<table0>[grapes] { <col0>[INTEGER]:[Grape] <col1>[TEXT]:[Color] } <table1>[appellations] { <col0>[INTEGER]:[Appelation] <col1>[TEXT]:[County] <col2>[TEXT]:[State] <col3>[TEXT]:[Area] <col4>[TEXT]:[isAVA] } <table2>[wine] { <col0>[INTEGER]:[Grape] <col1>[TEXT]:[Winery] <col2>[TEXT]:[Appelation] <col3>[TEXT]:[State] <c...
SELECT County, COUNT( County ) FROM `<table1>` GROUP BY County
List the number of counties of all appellations in a bar chart.
<table0>[table_11303] { <col0>[Player]:[text] <col1>[Position]:[text] <col2>[Tries]:[real] <col3>[Goals]:[real] <col4>[Points]:[real] }
SELECT AVG( "Tries" ) FROM `<table0>` WHERE "Player" = 'nathan mcavoy'
What is the average number of Tries for Nathan McAvoy?
<table0>[table_name_3] { <col0>[rank]:[VARCHAR] <col1>[goals]:[VARCHAR] <col2>[matches]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 100 AND `<col2>` < 300
What is the total number of Rank with 100 goals, and less than 300 matches?
<table0>[table_49213] { <col0>[Game]:[real] <col1>[Date]:[text] <col2>[Team]:[text] <col3>[Score]:[text] <col4>[High]:[points] <col5>[text]:[High] <col6>[rebounds]:[text] <col7>[High]:[assists] <col8>[text]:[Location] <col9>[Attendance]:[text] <col10>[Record]:[text] }
SELECT "Date" FROM `<table0>` WHERE "High rebounds" = 'yao ming ( 10 )'
What is Date, when High Rebounds is 'Yao Ming (10)'?