schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table1>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table2>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2...
SELECT HIRE_DATE, SUM( `<col0>` ) FROM `<table6>` WHERE `<col1>` LIKE '%D%' OR `<col1>` LIKE '%S%'
For all employees who have the letters D or S in their first name, find hire_date and the sum of employee_id bin hire_date by time, and visualize them by a bar chart.
<table0>[manager] { <col0>[Manager_ID]:[int] <col1>[text]:[Country] <col2>[text]:[Working_year_starts] <col3>[text]:[Age] <col4>[int]:[Level] } <table1>[train] { <col0>[Train_ID]:[int] <col1>[Train_Num]:[text] <col2>[text]:[text] <col3>[Arrival]:[text] <col4>[Railway_ID]:[int] } <table2>[railway_manage] { <col0>[Rail...
SELECT Country, COUNT( Country ) FROM `<table0>` WHERE Age > 50 OR Age < 46 GROUP BY Country ORDER BY COUNT( Country ) DESC
Show the countries that have managers of age above 50 or below 46, and count them by a bar chart, could you rank the number of country from high to low order please?
<table0>[table_53825] { <col0>[Date]:[text] <col1>[Tournament]:[text] <col2>[Winning]:[score] <col3>[text]:[Margin] <col4>[victory]:[text] <col5>[Runner]:[text] }
SELECT "Winning score" FROM `<table0>` WHERE "Margin of victory" = '5 strokes' AND "Date" = '6 sep 2009'
What was the Winning score when the Margin of victory is 5 strokes and the Date was 6 Sep 2009?
<table0>[table_name_37] { <col0>[result]:[VARCHAR] <col1>[week]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 4
What was the result of the game on week 4?
<table0>[table_65055] { <col0>[Rank]:[text] <col1>[Nation]:[text] <col2>[Gold]:[real] <col3>[Silver]:[real] <col4>[Bronze]:[real] <col5>[Total]:[real] }
SELECT SUM( "Silver" ) FROM `<table0>` WHERE "Total" = '11'
How many silvers are there with a total of 11?
<table0>[building_permits] { <col0>[permit_number]:[TEXT] <col1>[contractor]:[TEXT] }
WITH cte AS ( UPDATE building_permits SET contractor = 'New Contractor' WHERE permit_number = '2021-001' ) SELECT * FROM cte;
Update the name of the contractor for permit number 2021-001 to 'New Contractor'
<table0>[table_203_6] { <col0>[number]:[number] <col1>[date]:[text] <col2>[venue]:[text] <col3>[opponent]:[text] <col4>[score]:[text] <col5>[result]:[text] <col6>[competition]:[text] }
SELECT "score" FROM `<table0>` WHERE "date" = '16 november 2005' AND "opponent" = 'spain'
how many goals were scored against spain on november 2005 ?
<table0>[table_name_29] { <col0>[d_42]:[VARCHAR] <col1>[d_44]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "d 44"
Name the D 42 which has a D 44 of d 44
<table0>[dishes] { <col0>[INT]:[name] <col1>[TEXT]:[vegan] <col2>[BOOLEAN]:[calories] <col3>[INT]:[INSERT] }
SELECT AVG( calories ) FROM `<table0>` WHERE vegan = TRUE;
Find the average calorie count for all vegetarian dishes
<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] { <col0>[aircraft_code_sequence]:[text] <...
SELECT DISTINCT `<table22>`_code FROM `<table22>` WHERE `<table22>`_code = 'ORD'
what is ORD
<table0>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table1>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table2>[CloseAsOffTopicReasonTypes] { ...
SELECT Users.Id AS "user_link", COUNT( Answers.Id ) AS Answers FROM `<table27>` JOIN Post`<table27>` ON Post`<table27>`.TagId = `<table27>`.Id JOIN Posts ON Posts.Id = Post`<table27>`.PostId JOIN Posts AS Answers ON Answers.ParentId = Posts.Id JOIN Users ON Users.Id = Answers.OwnerUserId WHERE `<table27>`.TagName = '##...
Top Answerers for a Given Tag. The Stats of a Tag only gives the Top-20 answerers. This query can list more of them and give other info as well.
<table0>[production] { <col0>[INT]:[material] <col1>[VARCHAR]:[weight] <col2>[INT]:[country] <col3>[VARCHAR]:[date] <col4>[DATE]:[INSERT] }
SELECT SUM( weight ) FROM `<table0>` WHERE material = 'recycled polyester' AND country = 'US' AND date >= DATE_SUB( CURRENT_DATE, INTERVAL 6 MONTH );
What is the total weight of recycled polyester used in garment production in the US in the last 6 months?
<table0>[Addresses] { <col0>[address_id]:[VARCHAR] <col1>[zip_postcode]:[VARCHAR] } <table1>[Teachers] { <col0>[email_address]:[VARCHAR] <col1>[address_id]:[VARCHAR] }
SELECT T2.email_address FROM `<table0>` AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T1.zip_postcode = "918"
What are the email addresses of teachers whose address has zip code "918"?
<table0>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table1>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heart...
SELECT `<table6>`.`<table6>`time FROM `<table6>` WHERE `<table6>`.`<table5>`unitstayid IN ( SELECT `<table5>`.`<table5>`unitstayid FROM `<table5>` WHERE `<table5>`.`<table5>`healthsystemstayid IN ( SELECT `<table5>`.`<table5>`healthsystemstayid FROM `<table5>` WHERE `<table5>`.uniquepid = '010-40802' AND NOT `<table5>`...
when did patient 010-40802 last receive a diagnosis of failure to wean on their last hospital encounter?
<table0>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table1>[student] { <col0>[student_id]:[int] <col1>[lastname]:[varchar] <col2>[firstname]:[varchar] <col3>[program_id]:[int] <col4>[declare_major]:[varchar] <col5>[total_credi...
SELECT DISTINCT course.department, course.name, course.number FROM course, program, program_course WHERE course.department LIKE '%CSP%' AND program_course.category LIKE '%PreMajor%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.program_id = program_course.program_id
Which CSP classes are PreMajor ?
<table0>[table_204_130] { <col0>[number]:[number] <col1>[date]:[text] <col2>[venue]:[text] <col3>[opponent]:[text] <col4>[score]:[text] <col5>[result]:[text] <col6>[competition]:[text] }
SELECT COUNT( * ) FROM `<table0>` WHERE "competition" = '2013 asian indoor-martial arts games'
how many took place at 2013 asian indoor martial arts games competition ?
<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 COUNT( DISTINCT t1.uniquepid ) FROM ( SELECT patient.uniquepid, `<table1>`.`<table1>`time, patient.patienthealthsystemstayid FROM `<table1>` JOIN patient ON `<table1>`.patientunitstayid = patient.patientunitstayid WHERE `<table1>`.`<table1>`name = 'antihypertensives' AND DATETIME( `<table1>`.`<table1>`time, 'sta...
count the number of patients diagnosed with hyperlipidemia within the same hospital visit after receiving antihypertensives the last year.
<table0>[Vessel] { <col0>[INT]:[TEXT] <col1>[AverageSpeed]:[DECIMAL] }
SELECT Name FROM ( SELECT Name, AverageSpeed, PERCENT_RANK( ) OVER ( ORDER BY `<col1>` DESC ) AS PercentRank FROM `<table0>` ) AS Ranked`<table0>`s WHERE PercentRank >= 0.5;
Find the vessels with an average speed above the median average speed in the Vessel table.
<table0>[eu_ets] { <col0>[year]:[INTEGER] <col1>[price]:[DECIMAL] } <table1>[california_cap] { <col0>[year]:[INTEGER] <col1>[price]:[DECIMAL] }
SELECT eu_ets.year, eu_ets.price - california_cap.price FROM eu_ets, california_cap WHERE eu_ets.year = california_cap.year;
What is the difference in carbon prices between the European Union Emissions Trading System and the California Cap-and-Trade Program?
<table0>[table_name_59] { <col0>[VARCHAR]:[venue] <col1>[VARCHAR]:[date] }
SELECT COUNT( against ) FROM `<table0>` WHERE venue = "h" AND date = "26 february 1949"
What is the total number of Against that were played in the H Venue on 26 february 1949?
<table0>[table_67307] { <col0>[Year]:[real] <col1>[Team]:[text] <col2>[Chassis]:[text] <col3>[Engine]:[text] <col4>[Rank]:[text] <col5>[Points]:[real] }
SELECT "Points" FROM `<table0>` WHERE "Engine" = 'chevrolet 265c'
Name the points for Engine of chevrolet 265c
<table0>[characters] { <col0>[movie_title]:[text] <col1>[release_date]:[text] <col2>[hero]:[text] <col3>[villian]:[text] <col4>[song]:[text] } <table1>[director] { <col0>[name]:[text] } <table2>[movies_total_gross] { <col0>[movie_title]:[text] <col1>[release_date]:[text] <col2>[genre]:[text] <col3>[MPAA_rating]:[text...
SELECT COUNT( * ) FROM `<table1>` AS T1 INNER JOIN movies_total_gross AS T2 ON T1.name = T2.movie_title WHERE T1.`<table1>` = 'Ron Clements' AND T2.MPAA_rating = 'PG' AND T2.genre = 'Adventure'
How many PG adventure movies did Ron Clements direct?
<table0>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoticeTypeId] <col2>[number]:[CreationDate] <col3>[time]:[DeletionDate] <col4>[time]:[ExpiryDate] <col5>[time]:[Body] <col6>[text]:[OwnerUserId] <col7>[number]:[DeletionUs...
SELECT * FROM `<table25>`
How many pending flags are there?.
<table0>[labevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[itemid]:[number] <col4>[charttime]:[time] <col5>[valuenum]:[number] <col6>[valueuom]:[text] } <table1>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <tab...
SELECT COUNT( * ) > 0 FROM `<table14>` WHERE `<table14>`.hadm_id IN ( SELECT `<table6>`.hadm_id FROM `<table6>` WHERE `<table6>`.subject_id = 60763 )
had patient 60763 undergone any procedure?
<table0>[Student] { <col0>[StuID]:[INTEGER] <col1>[LName]:[VARCHAR] <col2>[Fname]:[VARCHAR] <col3>[Age]:[INTEGER] <col4>[Sex]:[VARCHAR] <col5>[Major]:[INTEGER] <col6>[Advisor]:[INTEGER] <col7>[city_code]:[VARCHAR] } <table1>[Allergy_Type] { <col0>[Allergy]:[VARCHAR] <col1>[AllergyType]:[VARCHAR] } <table2>[Has_Allerg...
SELECT T1.Allergy, COUNT( T1.Allergy ) FROM `<table1>` AS T1 JOIN Has_Allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = "Lisa" GROUP BY T1.Allergy
What is the number of each allergie that the student with first name Lisa has? Draw a bar chart.
<table0>[table_name_53] { }
SELECT 2001 FROM `<table0>` WHERE 2004 = "a" AND 2003 = "a" AND 2012 = "3r"
I want to know the 2001 that has a 2004 of a and 2003 of a with 2012 of 3r
<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 WHERE course_offering.`<table14>` < ( SELECT SEMESTERalias0.`<table14>`_id FROM `<table14>` AS SEMESTERalias0 WHERE SEMESTERalias0.`<table14>` = 'WN' AND SEMESTERalias0.year = 2016 ) AND course.co...
Dr. Christopher Love taught which classes in the past ?
<table0>[infrastructure_projects] { <col0>[INT]:[project_name] <col1>[VARCHAR]:[location] <col2>[VARCHAR]:[completion_year] <col3>[INT]:[INSERT] }
SELECT completion_year, COUNT( * ) as num_projects FROM `<table0>` WHERE completion_year IN ( 2021, 2022 ) GROUP BY completion_year;
How many infrastructure projects were completed in 2021 and 2022?
<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 All_Home, AVG( `<col0>` ) FROM `<table1>` GROUP BY `<col9>` ORDER BY `<col9>`
Find All_Home and the average of Team_ID , and group by attribute All_Home, and visualize them by a bar chart, could you sort by the X in asc?
<table0>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table1>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[EMAIL]:[varchar] <col4>[PHONE_NUMBER]:[v...
SELECT JOB_ID, AVG( `<col10>` ) FROM `<table1>` WHERE NOT `<col0>` IN ( SELECT `<col0>` FROM `<table0>` ) GROUP BY `<col6>` ORDER BY `<col6>` DESC
For those employees who did not have any job in the past, return a bar chart about the distribution of job_id and the average of department_id , and group by attribute job_id, sort by the names in descending please.
<table0>[policyholders] { <col0>[INT]:[name] <col1>[TEXT]:[dob] <col2>[DATE]:[gender] <col3>[TEXT]:[state] <col4>[TEXT]:[INSERT] }
SELECT state, AVG( YEAR( CURRENT_DATE ) - YEAR( dob ) ) as avg_age FROM `<table0>` GROUP BY state;
Calculate the average age of policyholders from each state
<table0>[table_22878] { <col0>[Outcome]:[text] <col1>[Year]:[real] <col2>[Championship]:[text] <col3>[Surface]:[text] <col4>[Partner]:[text] <col5>[Opponents]:[final] <col6>[text]:[Score] <col7>[final]:[text] }
SELECT "Year" FROM `<table0>` WHERE "Opponents in the final" = 'Helena Suková Todd Woodbridge'
when were helena sukov todd woodbridge the opponents in the final
<table0>[department] { <col0>[dept_name]:[VARCHAR] <col1>[building]:[VARCHAR] <col2>[budget]:[INTEGER] }
SELECT dept_name, `<col1>` FROM `<table0>` WHERE `<col2>` > ( SELECT AVG( `<col2>` ) FROM `<table0>` )
What is the name and building of the departments whose budget is more than the average budget?
<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>` WHERE `<table4>`.admission_location = "PHYS REFERRAL/NORMAL DELI" AND `<table4>`.dod_year <= "2148.0"
give me the number of patients whose admission location is phys referral/normal deli and year of death is less than or equal to 2148?
<table0>[director] { <col0>[int]:[gender] <col1>[text]:[name] <col2>[text]:[nationality] <col3>[text]:[birth_city] <col4>[text]:[birth_year] } <table1>[tags] { <col0>[int]:[msid] <col1>[int]:[kid] } <table2>[producer] { <col0>[pid]:[int] <col1>[gender]:[text] <col2>[name]:[text] <col3>[nationality]:[text] <col4>[birt...
SELECT actor.name FROM actor, cast, movie WHERE cast.aid = actor.aid AND cast.role = 'Captain Miller' AND movie.mid = cast.msid AND movie.title = 'Saving Private Ryan'
Find the actor who played ' Captain Miller ' in the movie ' Saving Private Ryan
<table0>[table_15824796_3] { <col0>[title]:[VARCHAR] <col1>[original_air_date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "December 12, 1953"
What is the title of the episode that aired on december 12, 1953?
<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 MIN( `<table14>`.valuenum ) FROM `<table14>` WHERE `<table14>`.hadm_id IN ( SELECT `<table8>`.hadm_id FROM `<table8>` WHERE `<table8>`.subject_id = 7400 ) AND `<table14>`.itemid IN ( SELECT `<table3>`.itemid FROM `<table3>` WHERE `<table3>`.label = 'sodium' ) AND STRFTIME( '%y', `<table14>`.charttime ) = '2104' ...
what is the monthly minimum sodium value for patient 7400 in 2104?
<table0>[county] { <col0>[County_Id]:[int] <col1>[County_name]:[text] <col2>[Population]:[real] <col3>[Zip_code]:[text] } <table1>[election] { <col0>[Election_ID]:[int] <col1>[Counties_Represented]:[text] <col2>[District]:[int] <col3>[Delegate]:[text] <col4>[Party]:[int] <col5>[First_Elected]:[real] <col6>[Committee]:...
SELECT Governor, COUNT( Governor ) FROM `<table1>` AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 GROUP BY Governor ORDER BY COUNT( Governor )
A bar chart for finding the number of the parties associated with the delegates from district 1 Who served as governors of the parties?, display in ascending by the total number.
<table0>[document_sections_images] { <col0>[section_id]:[number] <col1>[image_id]:[number] } <table1>[users] { <col0>[user_id]:[number] <col1>[role_code]:[text] <col2>[user_name]:[text] <col3>[user_login]:[text] <col4>[password]:[text] } <table2>[documents] { <col0>[document_code]:[text] <col1>[document_structure_cod...
SELECT document_name, `<col3>` FROM `<table2>` ORDER BY `<col4>`
Find the name and access counts of all documents, in alphabetic order of the document name.
<table0>[table_58309] { <col0>[Driver]:[text] <col1>[Constructor]:[text] <col2>[Laps]:[real] <col3>[Time]:[Retired] <col4>[text]:[Grid] }
SELECT "Time/Retired" FROM `<table0>` WHERE "Grid" = '9'
What is the time/retired for grid 9?
<table0>[table_name_5] { <col0>[home]:[VARCHAR] <col1>[record]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "16–17–6"
Which Home has a Record of 16–17–6?
<table0>[table_41687] { <col0>[Club]:[text] <col1>[Played]:[text] <col2>[Drawn]:[text] <col3>[Lost]:[text] <col4>[Points]:[text] <col5>[Points]:[text] <col6>[Tries]:[text] <col7>[Tries]:[text] <col8>[Try]:[Bonus] <col9>[text]:[Losing] <col10>[Bonus]:[text] <col11>[Points]:[text] }
SELECT "Drawn" FROM `<table0>` WHERE "Try Bonus" = '9' AND "Lost" = '4'
When the try bonus is 9 and the lost 4, what is the drawn?
<table0>[table_name_1] { <col0>[away_team]:[VARCHAR] <col1>[venue]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "junction oval"
Who is the away side at junction oval?
<table0>[campaigns] { <col0>[campaign_id]:[INT] <col1>[start_date]:[DATE] <col2>[end_date]:[DATE] <col3>[focus]:[VARCHAR] }
SELECT * FROM `<table0>` WHERE `<col3>` = 'mindfulness-based interventions' AND `<col1>` <= '2022-04-01' AND `<col2>` >= '2022-04-01';
List all campaigns that targeted mindfulness-based interventions in the last 3 months.
<table0>[table_203_228] { <col0>[number]:[number] <col1>[title]:[text] <col2>[songwriters]:[text] <col3>[producer]:[text] <col4>[performer]:[text] }
SELECT COUNT( DISTINCT "songwriters" ) FROM `<table0>` WHERE "songwriters" <> 'o. credle'
total number of performers other than o.credle :
<table0>[table_name_26] { <col0>[runs]:[VARCHAR] <col1>[rank]:[VARCHAR] <col2>[venue]:[VARCHAR] <col3>[season]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "bellerive oval , hobart" AND `<col3>` = "2004/05" AND `<col1>` = "5"
Name the Runs has a Venue of bellerive oval , hobart, and a Season of 2004/05, and a Rank of 5?
<table0>[table_name_37] { <col0>[country]:[VARCHAR] <col1>[to_par]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "+11"
What is Country, when To Par is "+11"?
<table0>[table_train_38] { <col0>[int]:[left_ventricular_ejection_fraction_lvef] <col1>[int]:[child_pugh_class] <col2>[string]:[systolic_blood_pressure_sbp] <col3>[int]:[heart_disease] <col4>[bool]:[acute_hepatitis] <col5>[bool]:[liver_disease] <col6>[bool]:[heart_rate] <col7>[int]:[NOUSE] }
SELECT * FROM `<table0>` WHERE heart_rate < 50
heart rate less than 50 beats / min
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>...
SELECT COUNT( DISTINCT `<table0>`.subject_id ) FROM `<table0>` INNER JOIN diagnoses ON `<table0>`.hadm_id = diagnoses.hadm_id INNER JOIN lab ON `<table0>`.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Prsnl hst colonic polyps" AND lab.fluid = "Blood"
Which patients with a blood lab test have diagnoses of personal history of colonic polyps?
<table0>[wind_projects] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[project_name] <col2>[VARCHAR]:[255] <col3>[location]:[VARCHAR] <col4>[255]:[capacity_mw] <col5>[FLOAT]:[completion_date] }
SELECT * FROM `<table0>` WHERE `<col3>` = 'europe';
List all wind projects in 'europe'
<table0>[table_29626583_3] { <col0>[position]:[VARCHAR] <col1>[mls_team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "New York Red Bulls"
What position did the team new york red bulls pick?
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[demogr...
SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id INNER JOIN lab ON `<table2>`.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Ac infect polyneuritis" AND lab.flag = "delta"
get the number of patients who are diagnosed with ac infect polyneuritis and lab test abnormal status is delta.
<table0>[healthcare_facilities] { <col0>[INT]:[name] <col1>[VARCHAR]:[100] <col2>[location]:[VARCHAR] <col3>[has_pharmacy]:[BOOLEAN] }
SELECT ( COUNT( * ) * 100.0 / ( SELECT COUNT( * ) FROM `<table0>` WHERE `<table0>`.location LIKE '%rural%' ) ) AS percentage FROM `<table0>` WHERE `<table0>`.location LIKE '%Texas' AND `<table0>`.has_pharmacy = TRUE;
What is the percentage of healthcare facilities in rural areas of Texas that have a pharmacy on-site?
<table0>[customer] { <col0>[cust_ID]:[varchar] <col1>[cust_name]:[varchar] <col2>[acc_type]:[char] <col3>[acc_bal]:[int] <col4>[no_of_loans]:[int] <col5>[credit_score]:[int] <col6>[branch_ID]:[int] <col7>[state]:[varchar] } <table1>[bank] { <col0>[branch_ID]:[int] <col1>[bname]:[varchar] <col2>[no_of_customers]:[int] ...
SELECT cust_name, `<col3>` FROM `<table0>` WHERE `<col1>` LIKE '%a%'
Visualize a bar chart for what are the names and account balances of customers with the letter 'a' in their names?
<table0>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table1>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comme...
SELECT p.Id AS "post_link", p.Title FROM `<table19>` AS p LEFT JOIN PostTags AS pt ON p.Id = pt.PostId LEFT JOIN Tags AS t ON pt.TagId = t.Id LEFT JOIN PostTags AS pt2 ON p.Id = pt2.PostId LEFT JOIN Tags AS t2 ON pt2.TagId = t2.Id WHERE PostTypeId = 1 AND t.TagName = 'raw' AND t2.TagName = '##tag:string##' ORDER BY Vie...
Questions with a specific tag.
<table0>[labevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[itemid]:[number] <col4>[charttime]:[time] <col5>[valuenum]:[number] <col6>[valueuom]:[text] } <table1>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_ti...
SELECT t1.drug FROM ( SELECT `<table6>`.drug, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table6>` WHERE DATETIME( `<table6>`.startdate ) <= DATETIME( CURRENT_TIME( ), '-4 year' ) GROUP BY `<table6>`.drug ) AS t1 WHERE t1.c1 <= 4
what are the top four of the most commonly prescribed drugs until 4 years ago?
<table0>[table_name_21] { <col0>[away_team]:[VARCHAR] <col1>[home_team]:[VARCHAR] }
SELECT `<col0>` AS score FROM `<table0>` WHERE `<col1>` = "hawthorn"
What is the score of the away team who played home team Hawthorn?
<table0>[table_name_56] { <col0>[years]:[VARCHAR] <col1>[points]:[VARCHAR] <col2>[goals]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "78" AND `<col2>` = "22"
What years did the player play when he scored 78 points and 22 goals?
<table0>[Addresses] { <col0>[City_Town]:[VARCHAR] <col1>[Address_ID]:[VARCHAR] } <table1>[Stores] { <col0>[Address_ID]:[VARCHAR] <col1>[Store_Name]:[VARCHAR] }
SELECT T1.City_Town FROM `<table0>` AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Store_Name = "FJA Filming"
Which city is the address of the store named 'FJA Filming' located in?
<table0>[table_203_664] { <col0>[number]:[club] <col1>[text]:[town] <col2>[text]:[founded] <col3>[number]:[nickname] <col4>[text]:[colours] <col5>[text]:[home] <col6>[ground]:[text] <col7>[titles]:[number] <col8>[website]:[text] }
SELECT COUNT( "club" ) FROM `<table0>` WHERE "town" = 'morwell'
how many teams are from morwell ?
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>...
SELECT `<table0>`.culturetakentime FROM `<table0>` WHERE `<table0>`.`<table3>`unitstayid IN ( SELECT `<table3>`.`<table3>`unitstayid FROM `<table3>` WHERE `<table3>`.`<table3>`healthsystemstayid IN ( SELECT `<table3>`.`<table3>`healthsystemstayid FROM `<table3>` WHERE `<table3>`.uniquepid = '031-22988' ) ) AND DATETIME...
when was the first microbiology test of patient 031-22988, until 16 months ago?
<table0>[table_203_165] { <col0>[number]:[rank] <col1>[number]:[nation] <col2>[text]:[gold] <col3>[number]:[silver] <col4>[number]:[bronze] <col5>[number]:[total] }
SELECT SUM( "gold" ) FROM `<table0>`
how many total gold medal have been given ?
<table0>[table_43510] { <col0>[Tie]:[text] <col1>[Home]:[team] <col2>[text]:[Score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Attendance]:[text] }
SELECT "Score" FROM `<table0>` WHERE "Home team" = 'bolton wanderers'
What is the final score of the game home team Bolton Wanderers played?
<table0>[pets] { <col0>[weight]:[VARCHAR] <col1>[pet_age]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` ORDER BY `<col1>` LIMIT 1
Find the weight of the youngest dog.
<table0>[table_12715053_1] { <col0>[molecular_target]:[VARCHAR] <col1>[compound_name]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Hemiasterlin ( E7974 )"
What is the molecular target listed under the compounded name of hemiasterlin (e7974)
<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>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[eve...
SELECT `<table3>`.short_title FROM `<table3>` WHERE `<table3>`.icd9_code IN ( SELECT t1.icd9_code FROM ( SELECT `<table7>`.icd9_code, COUNT( `<table7>`.charttime ) AS c1 FROM `<table7>` WHERE `<table7>`.hadm_id IN ( SELECT `<table13>`.hadm_id FROM `<table13>` WHERE `<table13>`.subject_id = 25523 ) AND STRFTIME( '%y-%m'...
what was the name of the procedure that in 06/2104 patient 25523 has received two times?
<table0>[table_14875671_1] { <col0>[opponent]:[VARCHAR] <col1>[week]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 4
Who was the opponent in week 4?
<table0>[table_name_55] { <col0>[population__2008]:[INTEGER] <col1>[korean]:[VARCHAR] }
SELECT SUM( population__2008_ ) FROM `<table0>` WHERE `<col1>` = "함흥"
What is the 2008 population in (Ham Hyung)?
<table0>[location] { <col0>[LocationID]:[integer] <col1>[Country]:[text] <col2>[State]:[text] <col3>[StateCode]:[text] <col4>[City]:[text] } <table1>[user] { <col0>[UserID]:[text] <col1>[Gender]:[text] } <table2>[twitter] { <col0>[TweetID]:[text] <col1>[Weekday]:[text] <col2>[Hour]:[integer] <col3>[Day]:[integer] <co...
SELECT T2.City FROM `<table2>` AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID ORDER BY T1.RetweetCount DESC LIMIT 1
From which city was the tweet with the most number of retweets posted?
<table0>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[EMAIL]:[varchar] <col4>[PHONE_NUMBER]:[varchar] <col5>[HIRE_DATE]:[date] <col6>[JOB_ID]:[varchar] <col7>[SALARY]:[decimal] <col8>[COMMISSION_PCT]:[decimal] <col9>[MANAGER_ID]:[decimal] <col10>[DEPARTMENT_...
SELECT HIRE_DATE, SUM( `<col10>` ) FROM `<table0>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table2>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY SUM( `<col10>` ) DESC
For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a bar chart about the distribution of hire_date and the sum of department_id bin hire_date by time, and rank from high to low by the y-axis please.
<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>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[eve...
SELECT MIN( t1.c1 ) FROM ( SELECT SUM( `<table1>`.`<table1>` ) AS c1 FROM `<table1>` WHERE `<table1>`.hadm_id IN ( SELECT `<table11>`.hadm_id FROM `<table11>` WHERE `<table11>`.icd9_code = ( SELECT `<table14>`.icd9_code FROM `<table14>` WHERE `<table14>`.short_title = 'cholangiogram nec' ) ) AND DATETIME( `<table1>`.ch...
what is the hospitals minimum cost that involves a procedure called a cholangiogram nec until 2 years ago?
<table0>[table_name_97] { <col0>[name]:[VARCHAR] <col1>[qual_2]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1:43.374"
What name has a qual 2 of 1:43.374?
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>...
SELECT COUNT( DISTINCT `<table2>`.uniquepid ) FROM `<table2>` WHERE DATETIME( `<table2>`.hospitaladmittime, 'start of year' ) = DATETIME( CURRENT_TIME( ), 'start of year', '-1 year' )
count the patients who were admitted to the hospital in a year before.
<table0>[patients] { <col0>[patient_id]:[INT] <col1>[age]:[INT] <col2>[gender]:[VARCHAR] <col3>[state]:[VARCHAR] <col4>[disease]:[VARCHAR] }
SELECT COUNT( * ) FROM `<table0>` WHERE `<col3>` = 'New York' AND ( `<col4>` = 'HIV' OR `<col4>` = 'Hepatitis C' )
What is the total number of patients who have been diagnosed with HIV and hepatitis C in the state of New York?
<table0>[table_name_97] { <col0>[position]:[VARCHAR] <col1>[player]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "max redfield"
What position did Max Redfield play?
<table0>[marine_species] { <col0>[species_id]:[INT] <col1>[name]:[VARCHAR] <col2>[ocean]:[VARCHAR] }
SELECT COUNT( * ) FROM `<table0>` WHERE `<col2>` IN ( 'Northern Atlantic', 'Southern Ocean' );
What is the total number of marine species in the Northern Atlantic and Southern Ocean?
<table0>[albums] { <col0>[aid]:[number] <col1>[title]:[text] <col2>[year]:[number] <col3>[label]:[text] <col4>[type]:[text] } <table1>[instruments] { <col0>[songid]:[number] <col1>[bandmateid]:[number] <col2>[instrument]:[text] } <table2>[tracklists] { <col0>[albumid]:[number] <col1>[position]:[number] <col2>[songid]...
SELECT `<col2>` FROM `<table3>` AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop"
What are the types of vocals used in the song 'Le Pop'?
<table0>[genres] { <col0>[INT]:[genre] }
UPDATE genres SET genre = 'New Genre' WHERE id = 2;
Update the genre of the genre with id 2 to 'New Genre' in the 'genres' table
<table0>[table_204_489] { <col0>[number]:[rank] <col1>[number]:[name] <col2>[text]:[height] <col3>[text]:[floors] <col4>[number]:[year] <col5>[number]:[notes] }
SELECT COUNT( "name" ) FROM `<table0>` WHERE "year" > 1975
how many of these buildings were built after 1975
<table0>[table_201_13] { <col0>[number]:[city] <col1>[text]:[county] <col2>[ies]:[text] <col3>[population]:[2000] <col4>[census]:[number] <col5>[population]:[2010] <col6>[census]:[number] <col7>[class]:[text] <col8>[incorporation]:[ndate] }
SELECT "city" FROM `<table0>` ORDER BY "incorporation\ndate" LIMIT 1
what was the first city to be incorporated into wisconsin ?
<table0>[LuxuryElectricVehicles] { <col0>[INT]:[VARCHAR] <col1>[model]:[VARCHAR] <col2>[price]:[DECIMAL] }
SELECT AVG( price ) FROM luxuryelectricvehicles.LuxuryElectricVehicles;
What is the average price of luxury electric vehicles in the luxuryelectricvehicles schema?
<table0>[DEPARTMENT] { <col0>[DEPT_CODE]:[varchar] <col1>[DEPT_NAME]:[varchar] <col2>[SCHOOL_CODE]:[varchar] <col3>[EMP_NUM]:[int] <col4>[DEPT_ADDRESS]:[varchar] <col5>[DEPT_EXTENSION]:[varchar] } <table1>[EMPLOYEE] { <col0>[EMP_NUM]:[int] <col1>[EMP_LNAME]:[varchar] <col2>[EMP_FNAME]:[varchar] <col3>[EMP_INITIAL]:[va...
SELECT DEPT_CODE, SUM( `<col5>` ) FROM `<table6>` GROUP BY `<col9>`
I want to know the proportion of how many hours do the students spend studying for each dept code.
<table0>[UnionMembers] { <col0>[INT]:[union_name] <col1>[VARCHAR]:[country] <col2>[VARCHAR]:[member_count] <col3>[INT]:[INSERT] }
SELECT MAX( member_count ) as max_members FROM `<table0>` WHERE country = 'France';
What is the maximum number of members in a union in France?
<table0>[table_55019] { <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 "Venue" FROM `<table0>` WHERE "Home `<col2>` score" = '17.19 ( 121 )'
At what Venue was the Home team score 17.19 (121)?
<table0>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table1>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[t...
SELECT COUNT( * ) > 0 FROM `<table9>` WHERE `<table9>`.`<table2>`unitstayid IN ( SELECT `<table2>`.`<table2>`unitstayid FROM `<table2>` WHERE `<table2>`.`<table2>`healthsystemstayid IN ( SELECT `<table2>`.`<table2>`healthsystemstayid FROM `<table2>` WHERE `<table2>`.uniquepid = '004-65662' ) ) AND STRFTIME( '%y', `<tab...
has patient 004-65662 gone through any lab test since 2103?
<table0>[textile_suppliers] { <col0>[INT]:[supplier_name] <col1>[VARCHAR]:[total_delivered] } <table1>[sustainable_textile_products] { <col0>[INT]:[product_id] <col1>[INT]:[supplier_id] <col2>[INT]:[INSERT] <col3>[textile_suppliers]:[supplier_name] <col4>[total_delivered]:[VALUES] <col5>[GreenWeave]:[5000] <col6>[EcoT...
SELECT supplier_name, SUM( total_delivered ) FROM `<table0>` JOIN sustainable_textile_products ON `<table0>`.id = sustainable_textile_products.supplier_id GROUP BY supplier_name ORDER BY SUM( total_delivered ) DESC;
Which sustainable textile suppliers have delivered the most materials to our retail business?
<table0>[military_expenditure] { <col0>[country]:[VARCHAR] <col1>[year]:[INT] <col2>[expenditure]:[FLOAT] }
SELECT country, `<col2>` FROM `<table0>` WHERE `<col1>` = 2020;
List all countries and their respective military innovation expenditures for the year 2020
<table0>[airport_aircraft] { <col0>[int]:[Airport_ID] <col1>[int]:[Aircraft_ID] } <table1>[match] { <col0>[Round]:[real] <col1>[Location]:[text] <col2>[Country]:[text] <col3>[Date]:[text] <col4>[Fastest_Qualifying]:[text] <col5>[Winning_Pilot]:[text] <col6>[Winning_Aircraft]:[text] } <table2>[aircraft] { <col0>[Aircr...
SELECT Aircraft, COUNT( * ) FROM `<table2>` AS T1 JOIN match AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY `<col1>`
For each aircraft that has won an award, what is its name and how many time has it won Plot them as bar chart, I want to rank from low to high by the X.
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>...
SELECT COUNT( DISTINCT `<table0>`.subject_id ) FROM `<table0>` INNER JOIN diagnoses ON `<table0>`.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON `<table0>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Mal neo descend colon" AND prescriptions.drug_type = "MAIN"
what is the number of patients on main drug type prescription who are diagnosed with malignant neoplasm of descending colon?
<table0>[flight_leg] { <col0>[flight_id]:[int] <col1>[leg_number]:[int] <col2>[leg_flight]:[int] } <table1>[date_day] { <col0>[month_number]:[int] <col1>[day_number]:[int] <col2>[year]:[int] <col3>[day_name]:[varchar] } <table2>[airport_service] { <col0>[city_code]:[varchar] <col1>[airport_code]:[varchar] <col2>[mile...
SELECT DISTINCT flight.flight_id FROM `<table2>` AS AIRPORT_SERVICE_0, `<table2>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ( CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' A...
shortest flight from BOSTON to PHILADELPHIA
<table0>[daily_water_usage] { <col0>[INT]:[city] <col1>[VARCHAR]:[255] <col2>[usage_liters]:[INT] <col3>[date]:[DATE] }
SELECT MAX( `<col2>` ) FROM `<table0>` WHERE city = 'Melbourne' AND `<col3>` BETWEEN '2020-01-01' AND '2020-12-31';
What is the maximum water consumption (in liters) in a single day for the city of Melbourne, Australia in 2020?
<table0>[table_204_115] { <col0>[number]:[year] <col1>[number]:[track] <col2>[text]:[number] <col3>[number]:[team] <col4>[text]:[car] <col5>[text]:[round] <col6>[result]:[text] }
SELECT "number" FROM `<table0>` WHERE "year" = 2012 AND "track" = 'hamilton street circuit'
what was the number of the car greg murphy competed with in the 2012 hamilton street circuit ?
<table0>[table_name_24] { <col0>[name]:[VARCHAR] <col1>[novelty]:[VARCHAR] <col2>[location]:[VARCHAR] <col3>[status]:[VARCHAR] <col4>[authors]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col3>` = "valid" AND `<col4>` = "maisch" AND `<col2>` = "tanzania" AND `<col1>` = "gen et sp nov"
What is Name, when Status is Valid, when Authors is Maisch, when Location is Tanzania, and when Novelty is Gen Et Sp Nov?
<table0>[table_17732] { <col0>[Program]:[text] <col1>[Degree]:[text] <col2>[Focus]:[text] <col3>[Teaching]:[language] <col4>[text]:[Duration] <col5>[years]:[text] <col6>[time]:[time] <col7>[text]:[ECTS] <col8>[Credit]:[Points] }
SELECT "Program" FROM `<table0>` WHERE "Duration ( `<col5>` )" = '1.5' AND "Teaching language" = 'German/English'
WHat is the program where duration (years) is 1.5 and teaching language is german/english?
<table0>[Financial_transactions] { <col0>[invoice_number]:[VARCHAR] }
SELECT invoice_number, COUNT( * ) FROM `<table0>` GROUP BY `<col0>`
Show the invoice number and the number of transactions for each invoice.
<table0>[table_name_26] { <col0>[player]:[VARCHAR] <col1>[original_team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "los angeles kings"
What player originally played for the Los Angeles Kings?
<table0>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>[number]:[PostId] <col2>[number]:[RevisionGUID] <col3>[CreationDate]:[time] <col4>[UserId]:[number] <col5>[UserDisplayName]:[text] <col6>[Comment]:[text] <col7>[Text]:[text] <col8>[ContentLicense]:[text] } <table1>[PostTags] { <col0>[PostId]:[number] <co...
SELECT Id AS "comment_link", Score, CreationDate, PostId AS "post_link" FROM `<table10>` WHERE UserId = '##UserID##' AND UPPER( Text ) LIKE '%' + @pattern + '%' ORDER BY CreationDate DESC
Search Comments for String by User.
<table0>[athlete_wellbeing] { <col0>[athlete_id]:[INT] <col1>[name]:[VARCHAR] <col2>[age]:[INT] <col3>[sport]:[VARCHAR] }
SELECT s.sport, AVG( a.age ) as avg_age FROM `<table0>` a JOIN sports_teams s ON a.team_id = s.team_id GROUP BY s.sport;
What is the average age of athletes in the athlete_wellbeing table for each sport?
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table2>[medicati...
SELECT `<table2>`.drugname FROM `<table2>` WHERE `<table2>`.`<table5>`unitstayid IN ( SELECT `<table5>`.`<table5>`unitstayid FROM `<table5>` WHERE `<table5>`.uniquepid = '006-80884' ) AND DATETIME( `<table2>`.drugstarttime, 'start of day' ) = DATETIME( CURRENT_TIME( ), 'start of day', '-0 day' ) EXCEPT SELECT `<table2>...
what were the drugs added to patient 006-80884 today versus yesterday?
<table0>[shipments] { <col0>[order_id]:[VARCHAR] <col1>[shipment_tracking_number]:[VARCHAR] } <table1>[orders] { <col0>[date_order_placed]:[VARCHAR] <col1>[order_id]:[VARCHAR] }
SELECT T1.date_order_placed FROM `<table1>` AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.shipment_tracking_number = 3452
When was the order placed whose shipment tracking number is 3452? Give me the date.