schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[table_20430] { <col0>[Episode]:[Number] <col1>[real]:[Air] <col2>[Date]:[text] <col3>[Guest]:[Host] <col4>[text]:[Musical] <col5>[Guest]:[Song] <col6>[performed]:[text] <col7>[knows]:[guest] <col8>[host]:[Panelists] <col9>[text]:[Coat] <col10>[Cash]:[Wearing] <col11>[Celebrity]:[text] }
SELECT "Who `<col7>` the most about the guest host? Panelists" FROM `<table0>` WHERE "Air Date" = '8 June 2008'
Who was on the Who knows about the host panel on 8 June 2008?
<table0>[Has_amenity] { <col0>[dormid]:[INTEGER] <col1>[amenid]:[INTEGER] } <table1>[Dorm_amenity] { <col0>[amenid]:[INTEGER] <col1>[amenity_name]:[VARCHAR] } <table2>[Lives_in] { <col0>[stuid]:[INTEGER] <col1>[dormid]:[INTEGER] <col2>[room_number]:[INTEGER] } <table3>[Student] { <col0>[StuID]:[INTEGER] <col1>[LName...
SELECT dorm_name, COUNT( * ) FROM `<table3>` AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.Age > 20 GROUP BY T3.dorm_name
Find the number of students who is older than 20 in each dorm. Plot them as bar chart.
<table0>[table_9988] { <col0>[Year]:[real] <col1>[Film]:[text] <col2>[Song]:[text] <col3>[Composer]:[text] <col4>[Language]:[text] }
SELECT "Song" FROM `<table0>` WHERE "Composer" = 'v. selvaganesh' AND "Year" > '2010'
What song was composed by V. Selvaganesh later than 2010?
<table0>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditor...
SELECT `<table13>`.Id, COUNT( Posts.Id ) FROM `<table13>` LEFT JOIN Posts ON `<table13>`.Id = Posts.OwnerUserId WHERE Posts.DeletionDate IS NULL AND PostTypeId = 1 GROUP BY `<table13>`.Id
Users with most deleted questions.
<table0>[table_name_17] { <col0>[result]:[VARCHAR] <col1>[week]:[VARCHAR] <col2>[opponent]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 16 AND `<col2>` = "san francisco 49ers"
What was the result of the game against San Francisco 49ers before week 16?
<table0>[toronto_buildings] { <col0>[certification]:[VARCHAR] <col1>[sqft]:[INT] }
SELECT MAX( `<col1>` ) FROM `<table0>` WHERE `<col0>` = 'LEED';
What is the maximum square footage of a green-certified building in Toronto?
<table0>[table_2294] { <col0>[series]:[real] <col1>[season]:[real] <col2>[Title]:[text] <col3>[Directedby]:[text] <col4>[Writtenby]:[text] <col5>[Originalairdate]:[text] <col6>[Production]:[code] <col7>[text]:[viewers] <col8>[million]:[text] }
SELECT "Directedby" FROM `<table0>` WHERE "Title" = 'Andare Pescare'
Who directed the episode titled 'Andare Pescare'?
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[...
SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN lab ON `<table2>`.hadm_id = lab.hadm_id WHERE `<table2>`.dob_year < "2090" AND lab.fluid = "Cerebrospinal Fluid ( CSF )"
Find the number of patients who were born before 2090 and were ordered a csf lab test.
<table0>[Programs] { <col0>[ProgramID]:[INT] <col1>[ProgramName]:[TEXT] } <table1>[Volunteers] { <col0>[VolunteerID]:[INT] <col1>[ProgramID]:[INT] <col2>[Hours]:[INT] <col3>[VolunteerDate]:[DATE] }
SELECT `<table0>`.ProgramName, SUM( Volunteers.Hours ) AS TotalHours FROM `<table0>` JOIN Volunteers ON `<table0>`.ProgramID = Volunteers.ProgramID WHERE VolunteerDate >= DATEADD( year, -1, GETDATE( ) ) GROUP BY `<table0>`.ProgramName ORDER BY TotalHours DESC LIMIT 3;
Find the top 3 programs with the most volunteer hours in the past year, and the total volunteer hours for each program.
<table0>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table2>[labevents] { <col0>[r...
SELECT MAX( `<table2>`.valuenum ) FROM `<table2>` WHERE `<table2>`.hadm_id IN ( SELECT `<table13>`.hadm_id FROM `<table13>` WHERE `<table13>`.subject_id = 19412 ) AND `<table2>`.itemid IN ( SELECT `<table5>`.itemid FROM `<table5>` WHERE `<table5>`.label = 'myelocytes' ) GROUP BY STRFTIME( '%y', `<table2>`.charttime )
what is the yearly maximum amount of myelocytes patient 19412 has?
<table0>[subjects] { <col0>[subject_id]:[number] <col1>[subject_name]:[text] } <table1>[course_authors_and_tutors] { <col0>[author_id]:[number] <col1>[author_tutor_atb]:[text] <col2>[login_name]:[text] <col3>[password]:[text] <col4>[personal_name]:[text] <col5>[middle_name]:[text] <col6>[family_name]:[text] <col7>[gen...
SELECT personal_name, `<col7>` FROM `<table4>` ORDER BY `<col7>`
What are the personal names and family names of the students? Sort the result in alphabetical order of the family name.
<table0>[t_kc24] { <col0>[ACCOUNT_DASH_DATE]:[time] <col1>[ACCOUNT_DASH_FLG]:[number] <col2>[CASH_PAY]:[number] <col3>[CIVIL_SUBSIDY]:[number] <col4>[CKC102]:[number] <col5>[CLINIC_ID]:[text] <col6>[CLINIC_SLT_DATE]:[time] <col7>[COMP_ID]:[text] <col8>[COM_ACC_PAY]:[number] <col9>[COM_PAY]:[number] <col10>[DATA_ID]:[te...
SELECT `<table3>`.MED_AMOUT FROM `<table3>` WHERE `<table3>`.MED_CLINIC_ID = '89101528963'
医疗就诊89101528963的总医疗费是多少钱?
<table0>[table_name_8] { <col0>[start]:[VARCHAR] <col1>[stage]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 11
What is the start of stage 11?
<table0>[basketball_match] { <col0>[Team_ID]:[int] <col1>[School_ID]:[int] <col2>[Team_Name]:[text] <col3>[ACC_Regular_Season]:[text] <col4>[ACC_Percent]:[text] <col5>[ACC_Home]:[text] <col6>[ACC_Road]:[text] <col7>[All_Games]:[text] <col8>[All_Games_Percent]:[int] <col9>[All_Home]:[text] <col10>[All_Road]:[text] <col1...
SELECT ACC_Road, AVG( `<col1>` ) FROM `<table0>` GROUP BY `<col6>` ORDER BY AVG( `<col1>` )
A bar chart shows the distribution of ACC_Road and the average of School_ID , and group by attribute ACC_Road, list Y-axis in asc order.
<table0>[table_train_32] { <col0>[int]:[pregnancy_or_lactation] <col1>[bool]:[renal_disease] <col2>[bool]:[hemachromatosis] <col3>[bool]:[glucose_6_phosphate_dehydrogenase_deficiency_g6pd] <col4>[int]:[prisoners] <col5>[bool]:[NOUSE] }
SELECT * FROM `<table0>` WHERE hemachromatosis = 1
known hemachromatosis
<table0>[table_name_42] { <col0>[grid]:[INTEGER] <col1>[team]:[VARCHAR] <col2>[laps]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "germany" AND `<col2>` < 45
Which Grid is the lowest one that has a Team of germany, and Laps smaller than 45?
<table0>[deep_sea_expeditions] { <col0>[expedition_id]:[INT] <col1>[location]:[VARCHAR] <col2>[255]:[year] }
DELETE FROM `<table0>` WHERE year IS NULL;
Delete any records in the deep-sea expeditions table that do not include a year.
<table0>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table1>[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] } <table2>[patients] { <co...
SELECT `<table3>`.charttime FROM `<table3>` WHERE `<table3>`.icustay_id IN ( SELECT `<table9>`.icustay_id FROM `<table9>` WHERE `<table9>`.hadm_id IN ( SELECT `<table6>`.hadm_id FROM `<table6>` WHERE `<table6>`.subject_id = 9566 ) ) AND `<table3>`.itemid IN ( SELECT `<table5>`.itemid FROM `<table5>` WHERE `<table5>`.la...
when was the first time patient 9566 measured its heart rate less than 70.0 in yesterday?
<table0>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivilegedUserGuidance] <col5>[text]:[MarkdownConcensusDescription] <col6>[text]:[CreationDate] <col7>[time]:[CreationModer...
SELECT Title, Tags FROM `<table18>` WHERE Title LIKE 'WebRTC'
query all Post mentioned webrtc.
<table0>[marine_life] { <col0>[INT]:[name] <col1>[TEXT]:[location] <col2>[TEXT]:[depth] <col3>[FLOAT]:[INSERT] }
SELECT name, location FROM `<table0>` WHERE depth > 3000;
What are the names and locations of all marine life research stations deeper than 3000 meters?
<table0>[table_50135] { <col0>[Res]:[text] <col1>[Record]:[text] <col2>[Opponent]:[text] <col3>[Method]:[text] <col4>[Event]:[text] <col5>[Round]:[real] <col6>[Time]:[text] <col7>[Location]:[text] }
SELECT "Method" FROM `<table0>` WHERE "Round" = '1' AND "Record" = '6-3-1'
What method was used in the match that went to round 1, and had a 6-3-1 record?
<table0>[table_name_17] { <col0>[round]:[VARCHAR] <col1>[date]:[VARCHAR] <col2>[venue]:[VARCHAR] <col3>[result]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "a" AND `<col3>` = "1-2" AND `<col1>` = "7 december 2004"
What is the round of the match at venue A with a result of 1-2 on 7 December 2004?
<table0>[IntelligenceGatheringOperations] { <col0>[operation_name]:[VARCHAR] <col1>[100]:[operation_type] <col2>[VARCHAR]:[location] <col3>[VARCHAR]:[start_date] <col4>[DATE]:[end_date] <col5>[DATE]:[INSERT] }
SELECT operation_name, operation_type, location, start_date, end_date FROM `<table0>` ORDER BY start_date DESC LIMIT 1;
What are the latest intelligence gathering operations in the 'IntelligenceGatheringOperations' table?
<table0>[state] { <col0>[StateCode]:[text] <col1>[State]:[text] <col2>[Region]:[text] } <table1>[callcenterlogs] { <col0>[Date]:[received] <col1>[date]:[Complaint] <col2>[text]:[rand] <col3>[client]:[text] <col4>[phonefinal]:[text] <col5>[vru]:[line] <col6>[text]:[call_id] <col7>[integer]:[priority] <col8>[integer]:[t...
SELECT T1.first, T1.middle, T1.last FROM `<table2>` AS T1 INNER JOIN events AS T2 ON T1.`<table2>`_id = T2.Client_ID WHERE T2.Issue = 'Balance transfer'
What is the full name of clients who have issue about balance transfer?
<table0>[table_203_394] { <col0>[number]:[title] <col1>[text]:[author] <col2>[text]:[date] <col3>[number]:[length] <col4>[first]:[edition] }
SELECT "title" FROM `<table0>` WHERE "date" < 1921
which title was published before 1921 ?
<table0>[CREATE] { <col0>[SCHEMA]:[exists] } <table1>[exists] { <col0>[blockchain]:[digital_assets] <col1>[asset_id]:[INT] <col2>[AUTO_INCREMENT]:[asset_name] <col3>[VARCHAR]:[255] <col4>[market_cap]:[DECIMAL] <col5>[PRIMARY]:[KEY] <col6>[asset_id]:[INSERT] <col7>[blockchain]:[digital_assets] <col8>[asset_name]:[marke...
DELETE FROM blockchain.digital_assets WHERE market_cap < 100000000;
Delete digital assets with a market cap below $100M from the database.
<table0>[candidate] { <col0>[Candidate_ID]:[int] <col1>[People_ID]:[int] <col2>[Poll_Source]:[text] <col3>[Date]:[text] <col4>[Support_rate]:[real] <col5>[Consider_rate]:[real] <col6>[Oppose_rate]:[real] <col7>[Unsure_rate]:[real] } <table1>[people] { <col0>[People_ID]:[int] <col1>[Sex]:[text] <col2>[text]:[Date_of_Bi...
SELECT Date_of_Birth, Weight FROM `<table1>` ORDER BY Date_of_Birth DESC
Give me the comparison about Weight over the Date_of_Birth , list from high to low by the bar.
<table0>[table_59589] { <col0>[text]:[mail] <col1>[server]:[text] <col2>[Faxing]:[text] <col3>[Instant]:[messaging] <col4>[text]:[Telephony] <col5>[text]:[Videoconferencing] <col6>[text]:[Web] <col7>[conferencing]:[text] <col8>[Data]:[conferencing] <col9>[text]:[Application] <col10>[sharing]:[text] <col11>[Electronic]:...
SELECT "Videoconferencing" FROM `<table0>` WHERE "Data conferencing" = 'no' AND "Web conferencing" = 'no'
What is Videoconferencing, when Data Conferencing is 'No', and when Web Conferencing is 'No'?
<table0>[table_5907] { <col0>[Season]:[text] <col1>[real]:[GWS] <col2>[text]:[GWS] <col3>[text]:[real] }
SELECT COUNT( "W( OT )" ) FROM `<table0>` WHERE "W( GWS )*" = '0' AND "Season" = '2009–10' AND "L( OT )" < '0'
How many wins in OT are associated with a W(GWS)* of 0, a Season of 2009 10, and a L(OT) less than 0?
<table0>[wells] { <col0>[INT]:[region] <col1>[VARCHAR]:[255] <col2>[well_type]:[VARCHAR] <col3>[255]:[oil_production] <col4>[DECIMAL]:[INSERT] }
SELECT MAX( oil_production ) as max_oil_production FROM `<table0>` WHERE region = 'Middle East';
What is the maximum oil production rate for wells in the Middle East?
<table0>[table_name_93] { <col0>[opponent]:[VARCHAR] <col1>[game]:[VARCHAR] <col2>[record]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 72 AND `<col2>` = "39-27-9"
Who did the Rangers play in a game that was later than 72 when the team record was 39-27-9?
<table0>[table_test_6] { <col0>[int]:[scr] <col1>[int]:[anemia] <col2>[bool]:[blood_hemoglobin] <col3>[int]:[bleeding] <col4>[int]:[hemorrhagic_diseases] <col5>[bool]:[stroke] <col6>[bool]:[blood_platelet_counts] <col7>[int]:[trauma] <col8>[bool]:[renal_disease] <col9>[bool]:[hematocrit_hct] <col10>[float]:[hepatic_dis...
SELECT * FROM `<table0>` WHERE renal_disease = 1 OR estimated_glomerular_filtration_rate_egfr < 15
renal insufficiency ( egfr under 15 ml / min )
<table0>[Categories] { <col0>[CategoryID]:[integer] <col1>[CategoryName]:[text] <col2>[Description]:[text] } <table1>[Customers] { <col0>[CustomerID]:[integer] <col1>[CustomerName]:[text] <col2>[ContactName]:[text] <col3>[Address]:[text] <col4>[City]:[text] <col5>[PostalCode]:[text] <col6>[Country]:[text] } <table2>[...
SELECT T2.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T1.TerritoryDescription = 'Hoffman Estates'
Which region does Hoffman Estates belong to?
<table0>[table_65347] { <col0>[Tie]:[text] <col1>[Home]:[team] <col2>[text]:[Score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Date]:[text] }
SELECT "Score" FROM `<table0>` WHERE "Tie no" = 'replay' AND "Away team" = 'york city'
What is the score when the Tie no is replay, and the away team is York City?
<table0>[table_26593762_2] { <col0>[team]:[VARCHAR] }
SELECT `<col0>` AS captain FROM `<table0>` WHERE `<col0>` = "Cardiff City"
Who is the captain of Cardiff City?
<table0>[factories] { <col0>[factory_id]:[INT] <col1>[name]:[TEXT] <col2>[total_employees]:[INT] <col3>[avg_salary]:[INT] }
SELECT name, total_employees * avg_salary AS total_salaries FROM factories;
How many employees work in each factory and what are their total salaries?
<table0>[total_energy_production] { <col0>[source]:[VARCHAR] <col1>[255]:[month] <col2>[INT]:[year] <col3>[INT]:[production] }
SELECT source, production FROM `<table0>` WHERE year = 2021 AND production > 0.5 * ( SELECT SUM( production ) FROM `<table0>` WHERE year = 2021 );
Which renewable energy sources contributed more than 50% of the total energy production in any month of 2021?
<table0>[Dish] { <col0>[integer]:[name] <col1>[text]:[description] <col2>[text]:[menus_appeared] <col3>[integer]:[times_appeared] <col4>[integer]:[first_appeared] <col5>[integer]:[last_appeared] <col6>[integer]:[lowest_price] <col7>[real]:[highest_price] } <table1>[Menu] { <col0>[integer]:[name] <col1>[text]:[sponsor]...
SELECT location FROM `<table1>` WHERE id = 12472
Where is the place that menu with ID 12472 was created for?
<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>` WHERE `<table3>`.expire_flag = "0" AND `<table3>`.dob_year < "2083"
what is the number of patients whose death status is 0 and year of birth is less than 2083?
<table0>[sales] { <col0>[drug_name]:[TEXT] <col1>[quarter]:[INT] <col2>[year]:[INT] <col3>[revenue]:[FLOAT] }
SELECT SUM( `<col3>` ) FROM `<table0>` WHERE `<col0>` = 'DrugA' AND `<col1>` = 1 AND `<col2>` = 2020;
What was the total revenue for 'DrugA' in Q1 2020?
<table0>[table_43156] { <col0>[Week]:[real] <col1>[Date]:[text] <col2>[Time]:[text] <col3>[Opponent]:[text] <col4>[Result]:[text] <col5>[Record]:[text] <col6>[Game]:[site] }
SELECT "Date" FROM `<table0>` WHERE "Opponent" = 'new england patriots'
What date has new england patriots as the opponent?
<table0>[creative_ai] { <col0>[app_id]:[INT] <col1>[app_name]:[TEXT] <col2>[release_year]:[INT] <col3>[region]:[TEXT] <col4>[satisfaction_score]:[INT] }
SELECT region, AVG( `<col4>` ) FROM `<table0>` WHERE `<col2>` = 2020 GROUP BY region;
What is the average satisfaction score for creative AI applications, grouped by region, for applications released in 2020?
<table0>[ExcavationSites] { <col0>[SiteID]:[varchar] <col1>[SiteName]:[varchar] <col2>[ArtifactPeriod]:[varchar] }
SELECT SiteID, `<col1>` FROM `<table0>` WHERE `<col2>` = 'Bronze Age';
Find excavation sites with 'Bronze Age' artifacts.
<table0>[HealthEquityMetrics] { <col0>[MetricID]:[INT] <col1>[Country]:[VARCHAR] <col2>[255]:[Score] <col3>[INT]:[INSERT] }
SELECT Country, AVG( Score ) as AverageScore FROM `<table0>` GROUP BY Country;
What is the average health equity metric score in each country?
<table0>[table_32631] { <col0>[FAT16]:[text] <col1>[FAT32]:[text] <col2>[HPFS]:[text] <col3>[ISO]:[9660] <col4>[text]:[NTFS] <col5>[text]:[ReFS] }
SELECT "NTFS" FROM `<table0>` WHERE "FAT32" = 'yes' AND "ReFS" = 'no'
Which NTFS has a yes for FAT32 and a no for ReFS?
<table0>[companies] { <col0>[INT]:[name] <col1>[TEXT]:[country] <col2>[TEXT]:[num_workforce_programs] <col3>[INT]:[INSERT] }
SELECT MAX( num_workforce_programs ) AS max_programs FROM `<table0>` WHERE country IN ( 'USA', 'Canada', 'Mexico', 'Brazil' );
What is the maximum number of workforce development programs offered by companies in a single country?
<table0>[table_20722805_1] { <col0>[parish]:[VARCHAR] <col1>[mccain_percentage]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "45.37%"
What parish did McCain have 45.37% of the votes?
<table0>[table_name_12] { <col0>[round]:[VARCHAR] <col1>[position]:[VARCHAR] <col2>[player]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "linebacker" AND `<col2>` = "blane smith"
How many rounds did Blane Smith play linebacker?
<table0>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table1>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table2>[microbiologyevents]...
SELECT COUNT( DISTINCT `<table8>`.hadm_id ) FROM `<table8>` WHERE `<table8>`.subject_id = 5544 AND DATETIME( `<table8>`.admittime, 'start of year' ) = DATETIME( CURRENT_TIME( ), 'start of year', '-0 year' )
count the number of times patient 5544 arrived at the hospital this year.
<table0>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table1>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number...
SELECT ph.PostId AS "post_link", ph.CreationDate AS "protected_date", CASE ph.UserId WHEN NULL THEN ph.UserDisplayName ELSE ph.UserId END AS "user_link" FROM `<table14>` AS ph WHERE ph.`<table14>`TypeId = 19 ORDER BY ph.PostId, ph.CreationDate
Ever Protected Questions, simple search.
<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 `<table2>`.subject_id ) FROM `<table2>` WHERE `<table2>`.gender = "M" AND `<table2>`.diagnosis = "HYPERGLYCEMIA;HYPONATREMIA"
find the number of male patients whose primary disease is hyperglycemia;hyponatremia.
<table0>[song] { <col0>[artist_name]:[VARCHAR] <col1>[languages]:[VARCHAR] <col2>[rating]:[INTEGER] }
SELECT DISTINCT `<col0>` FROM `<table0>` WHERE `<col1>` = "english" EXCEPT SELECT DISTINCT `<col0>` FROM `<table0>` WHERE `<col2>` > 8
Find the names of the artists who have produced English songs but have never received rating higher than 8.
<table0>[Movie] { <col0>[YEAR]:[INTEGER] }
SELECT COUNT( * ) FROM `<table0>` WHERE `<col0>` < 2000
How many movies were made before 2000?
<table0>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table1>[VoteTypes] { <col0>[number]:[text] } <table2>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table3>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoti...
SELECT CreationDate, COUNT( Id ) FROM `<table4>` WHERE Tags LIKE '%<python-3.x>%' GROUP BY CreationDate
Stack Overflow: Python 3 vs Python 2.
<table0>[ArtsHeritage] { <col0>[SiteName]:[VARCHAR] <col1>[ArtType]:[VARCHAR] } <table1>[HeritageSites] { <col0>[SiteName]:[VARCHAR] <col1>[Country]:[VARCHAR] }
SELECT h.SiteName, a.ArtType FROM `<table1>` h JOIN ArtsHeritage a ON h.SiteName = a.SiteName;
Showcase the types of traditional arts performed at each heritage site.
<table0>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table1>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table2>[regions] { <col0>[REGION_ID]...
SELECT HIRE_DATE, AVG( `<col0>` ) FROM `<table3>` WHERE NOT `<col0>` IN ( SELECT `<col0>` FROM `<table5>` ) ORDER BY AVG( `<col0>` )
For those employees who did not have any job in the past, give me the comparison about the average of employee_id over the hire_date bin hire_date by weekday, and show in ascending by the y axis.
<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( `<table3>`.age ) FROM `<table3>` WHERE `<table3>`.marital_status = "SINGLE" AND `<table3>`.admityear >= "2156"
Specify the average age of unmarried patients admitted in or after the year 2156
<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>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[...
SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN diagnoses ON `<table1>`.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Intestinal abscess"
how many patients are diagnosed with intestinal abscess?
<table0>[table_name_16] { <col0>[round]:[VARCHAR] <col1>[player]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "tom morris"
Which round was Tom Morris picked in?
<table0>[Warehouse] { <col0>[INT]:[name] <col1>[TEXT]:[region] <col2>[TEXT]:[INSERT] } <table1>[Shipment] { <col0>[INT]:[warehouse_id] <col1>[INT]:[delivery_fee] <col2>[DECIMAL]:[INSERT] }
SELECT `<table0>`.region, SUM( Shipment.delivery_fee ) as total_revenue FROM `<table0>` INNER JOIN Shipment ON `<table0>`.id = Shipment.warehouse_id WHERE `<table0>`.region = 'Europe' GROUP BY `<table0>`.region;
What is the total revenue generated from deliveries in the 'Europe' region?
<table0>[drug_approval_2018] { <col0>[drug]:[VARCHAR] <col1>[year]:[INT] <col2>[status]:[VARCHAR] } <table1>[market_access] { <col0>[drug]:[VARCHAR] <col1>[country]:[VARCHAR] }
SELECT `<table1>`.drug FROM `<table1>` INNER JOIN drug_approval_2018 ON `<table1>`.drug = drug_approval_2018.drug WHERE drug_approval_2018.year = 2018 AND drug_approval_2018.status = 'Approved' AND `<table1>`.country = 'Canada';
List all drugs that were approved in 2018 and have market access in Canada?
<table0>[table_name_96] { <col0>[date]:[VARCHAR] <col1>[away_team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "geelong"
What day was geelong the away side?
<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>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] ...
SELECT COUNT( * ) FROM `<table10>` WHERE `<table10>`.hadm_id IN ( SELECT `<table16>`.hadm_id FROM `<table16>` WHERE `<table16>`.subject_id = 61751 ) AND `<table10>`.drug = 'polyethylene glycol' AND DATETIME( `<table10>`.startdate, 'start of month' ) = DATETIME( CURRENT_TIME( ), 'start of month', '-1 month' )
how many times has patient 61751 been prescribed with polyethylene glycol the previous month?
<table0>[Employees] { <col0>[Employee_ID]:[INTEGER] <col1>[Role_Code]:[CHAR] <col2>[Employee_Name]:[VARCHAR] <col3>[255]:[Gender_MFU] <col4>[CHAR]:[Date_of_Birth] <col5>[DATETIME]:[Other_Details] <col6>[VARCHAR]:[255] } <table1>[Roles] { <col0>[Role_Code]:[CHAR] <col1>[Role_Name]:[VARCHAR] <col2>[255]:[Role_Descriptio...
SELECT Calendar_Date, COUNT( `<col0>` ) FROM `<table6>` ORDER BY COUNT( `<col0>` )
Bar chart x axis calendar date y axis the number of calendar date, and display by the y axis from low to high.
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytim...
SELECT t3.drugname FROM ( SELECT t2.drugname, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT patient.uniquepid, `<table5>`.drugstarttime FROM `<table5>` JOIN patient ON `<table5>`.patientunitstayid = patient.patientunitstayid WHERE `<table5>`.drugname = 'magnesium sulfate 50 % ij soln' AND STRFTIME...
until 2101, what are the three most commonly prescribed drugs for patients who were also prescribed magnesium sulfate 50 % ij soln at the same time?
<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>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[t...
SELECT `<table4>`.religion, `<table4>`.insurance FROM `<table4>` WHERE `<table4>`.name = "Kelly Gallardo"
what is religion and insurance of subject name kelly gallardo?
<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>`.admityear < "2158" AND lab.label = "Theophylline"
Get me the number of patients admitted before the year 2158 who had a theophylline lab test.
<table0>[climate_mitigation] { <col0>[project_id]:[INT] <col1>[project_name]:[VARCHAR] <col2>[255]:[location] <col3>[VARCHAR]:[255] <col4>[start_date]:[DATE] }
SELECT `<col1>` FROM `<table0>` WHERE location = 'Oceania' AND `<col4>` BETWEEN '2000-01-01' AND '2005-12-31';
Get the names of all climate mitigation projects in 'Oceania' that started between 2000 and 2005.
<table0>[table_41351] { <col0>[Date]:[text] <col1>[Visitor]:[text] <col2>[Score]:[text] <col3>[Home]:[text] <col4>[Leading]:[scorer] <col5>[text]:[Record] }
SELECT "Leading scorer" FROM `<table0>` WHERE "Visitor" = 'villa de los barrios'
Who is the leading scorer of the Villa De Los Barrios visitor?
<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>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[itemid]:[...
SELECT DISTINCT t1.c1 FROM ( SELECT `<table12>`.valuenum, PERCENT_RANK( ) OVER ( ORDER BY `<table12>`.valuenum ) AS c1 FROM `<table12>` WHERE `<table12>`.itemid IN ( SELECT `<table14>`.itemid FROM `<table14>` WHERE `<table14>`.label = 'bicarbonate' ) AND `<table12>`.hadm_id IN ( SELECT `<table15>`.hadm_id FROM `<table1...
what is the percentile of 30.0 in a laboratory bicarbonate test given the same as patient 77177's age during the last hospital encounter?
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[lab] {...
SELECT MAX( `<table3>`.days_stay ) FROM `<table3>` WHERE `<table3>`.ethnicity = "BLACK/CAPE VERDEAN"
what is maximum days of hospital stay of patients whose ethnicity is black/cape verdean?
<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>`.gender = "F" AND `<table4>`.admityear < "2103"
how many female patients are admitted before the year 2103?
<table0>[Employees] { <col0>[EmployeeID]:[int] <col1>[FirstName]:[varchar] <col2>[LastName]:[varchar] <col3>[Department]:[varchar] <col4>[Gender]:[varchar] <col5>[Salary]:[decimal] <col6>[HireDate]:[date] <col7>[ManagerID]:[int] }
SELECT Department, ManagerID, COUNT( * ) as Total`<table0>` FROM `<table0>` GROUP BY Department, ManagerID;
What is the number of employees by department and manager?
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <t...
SELECT `<table6>`.`<table6>`resulttime 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 = '030-75705' ) ) AND `<ta...
what was the first time patient 030-75705 had the minimum level of -eos since 09/2105?
<table0>[states] { <col0>[state_name]:[VARCHAR] <col1>[255]:[budget] <col2>[INT]:[INSERT] } <table1>[services] { <col0>[service_name]:[VARCHAR] <col1>[255]:[state_name] <col2>[VARCHAR]:[255] <col3>[budget]:[INT] }
SELECT state_name, `<col3>` FROM ( SELECT state_name, SUM( `<col3>` ) AS `<col3>` FROM `<table1>` WHERE `<col0>` IN ( 'education', 'public transportation' ) GROUP BY state_name ORDER BY `<col3>` DESC ) AS subquery LIMIT 2;
Identify the top 2 states with the highest budget allocation for education and public transportation?
<table0>[table_name_77] { <col0>[tournament]:[VARCHAR] }
SELECT 2009 FROM `<table0>` WHERE `<col0>` = "year-end ranking"
What is 2009, when Tournament is 'Year-End Ranking'?
<table0>[competition_result] { <col0>[competition_id]:[number] <col1>[club_id_1]:[number] <col2>[club_id_2]:[number] <col3>[score]:[text] } <table1>[player] { <col0>[player_id]:[number] <col1>[name]:[text] <col2>[position]:[text] <col3>[club_id]:[number] <col4>[apps]:[number] <col5>[tries]:[number] <col6>[goals]:[text...
SELECT SUM( `<col7>` ) FROM `<table1>`
What is the total number of points for all players?
<table0>[table_17738] { <col0>[Year]:[real] <col1>[Song]:[title] <col2>[text]:[Artist] <col3>[text]:[Master] <col4>[recording]:[text] <col5>[Release]:[date] <col6>[text]:[Single] <col7>[Pack]:[text] }
SELECT COUNT( "Master `<col4>` ?" ) FROM `<table0>` WHERE "Song title" = 'Famous For Nothing'
How many master recordings are there for 'Famous for Nothing'?
<table0>[countries] { <col0>[country_code]:[CHAR] <col1>[country_name]:[VARCHAR] } <table1>[protected_areas] { <col0>[area_id]:[INT] <col1>[area_name]:[VARCHAR] <col2>[country_code]:[CHAR] <col3>[INSERT]:[countries] <col4>[country_code]:[country_name] <col5>[VALUES]:[Canada] <col6>[United]:[States] <col7>[Denmark]:[IN...
SELECT country_code, COUNT( * ) as total_`<table1>` FROM `<table1>` GROUP BY country_code;
What is the total number of protected areas in each country?
<table0>[blockchain_companies] { <col0>[company_id]:[INT] <col1>[company_name]:[VARCHAR] <col2>[platform]:[VARCHAR] } <table1>[blockchain_transactions] { <col0>[transaction_id]:[INT] <col1>[company_id]:[INT] <col2>[DECIMAL]:[INSERT] }
SELECT b.company_name, SUM( bt.amount ) as total_amount, ROW_NUMBER( ) OVER ( ORDER BY SUM( bt.amount ) DESC ) as rank FROM `<table1>` bt JOIN blockchain_companies b ON bt.company_id = b.company_id GROUP BY b.company_id, b.company_name;
What is the total transaction amount for each company, ranked by the total transaction amount in descending order?
<table0>[unesco_world_heritage_sites] { <col0>[site_id]:[INT] <col1>[name]:[VARCHAR] <col2>[country_id]:[INT] <col3>[is_protected]:[BOOLEAN] }
SELECT u.name, SUM( i.num_visitors ) as total_visitors FROM `<table0>` u INNER JOIN destinations d ON u.site_id = d.destination_id INNER JOIN international_visitors i ON d.destination_id = i.destination_id WHERE u.country_id IN ( SELECT `<col2>` FROM countries WHERE continent = 'Asia' ) GROUP BY u.name;
What is the total number of visitors to each UNESCO World Heritage Site in Asia?
<table0>[Streams] { <col0>[StreamID]:[INT] <col1>[UserID]:[INT] <col2>[ArtistID]:[INT] }
SELECT COUNT( DISTINCT `<col1>` ) AS UniqueUsers FROM ( SELECT `<col1>` FROM `<table0>` JOIN Artists ON `<table0>`.ArtistID = Artists.ArtistID WHERE Genre IN ( 'Rock', 'Jazz' ) GROUP BY `<col1>` HAVING COUNT( DISTINCT Genre ) = 2 );
Find the number of unique users who have streamed songs from artists in both 'Rock' and 'Jazz' genres?
<table0>[d_icd_procedures] { <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>[cost] { <col0>[row_i...
SELECT COUNT( DISTINCT t2.subject_id ) FROM ( SELECT t1.subject_id, t1.charttime, t1.hadm_id FROM ( SELECT `<table6>`.subject_id, `<table10>`.charttime, `<table6>`.hadm_id FROM `<table10>` JOIN `<table6>` ON `<table10>`.hadm_id = `<table6>`.hadm_id WHERE `<table10>`.icd9_code = ( SELECT `<table13>`.icd9_code FROM `<tab...
how many patients died after being diagnosed with dmii wo cmp nt st uncntr during the same hospital encounter since 6 years ago?
<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 ( SELECT `<table4>`.valuenum FROM `<table4>` WHERE `<table4>`.hadm_id IN ( SELECT `<table13>`.hadm_id FROM `<table13>` WHERE `<table13>`.subject_id = 8888 AND `<table13>`.dischtime IS NULL ) AND `<table4>`.itemid IN ( SELECT `<table8>`.itemid FROM `<table8>` WHERE `<table8>`.label = 'glucose' ) ORDER BY `<table4...
what was the change in glucose in patient 8888 last measured on the current hospital visit compared to the first value measured on the current hospital visit?
<table0>[table_name_12] { <col0>[surname]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE first = "donovan"
What is donovan's surname?
<table0>[urban_sustainability] { <col0>[INT]:[city] <col1>[VARCHAR]:[255] <col2>[co_ownership_cost]:[DECIMAL] <col3>[size]:[INT] }
SELECT AVG( co_ownership_cost / size ) OVER ( ORDER BY co_ownership_cost ) AS avg_cost_per_sqft FROM urban_sustainability;
What is the average co-ownership cost per square foot in the 'urban_sustainability' table, ordered by cost?
<table0>[country] { <col0>[country_id]:[integer] <col1>[country_iso_code]:[text] <col2>[country_name]:[text] } <table1>[department] { <col0>[department_id]:[integer] <col1>[department_name]:[text] } <table2>[gender] { <col0>[gender_id]:[integer] } <table3>[genre] { <col0>[genre_id]:[integer] <col1>[genre_name]:[text...
SELECT CAST( COUNT( CASE WHEN T3.genre_name = 'Horror' THEN T1.`<table7>`_id ELSE NULL END ) AS REAL ) / COUNT( T1.`<table7>`_id ) FROM `<table7>` AS T1 INNER JOIN `<table7>`_genres AS T2 ON T1.`<table7>`_id = T2.`<table7>`_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id
What is the average number of horror movies among all movies genre?
<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>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[startdate]:[time] <col4>[e...
SELECT `<table0>`.charttime FROM `<table0>` WHERE `<table0>`.icustay_id IN ( SELECT `<table10>`.icustay_id FROM `<table10>` WHERE `<table10>`.hadm_id IN ( SELECT `<table2>`.hadm_id FROM `<table2>` WHERE `<table2>`.subject_id = 25997 ) ) AND STRFTIME( '%y-%m-%d', `<table0>`.charttime ) = '2100-06-28' ORDER BY `<table0>`...
when did patient 25997 first have an intake, on 06/28/2100?
<table0>[table_name_91] { <col0>[player]:[VARCHAR] <col1>[score]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 72 - 68 - 78 - 71 = 289
Which Player has a Score of 72-68-78-71=289?
<table0>[CREATE] { <col0>[SCHEMA]:[MarineLife] } <table1>[Species] { <col0>[INT]:[name] <col1>[TEXT]:[biomass] <col2>[FLOAT]:[CREATE] <col3>[SCHEMA]:[MaritimeLaw] } <table2>[Regions] { <col0>[INT]:[name] <col1>[TEXT]:[compliance] }
SELECT SUM( s.biomass ) FROM MarineLife.Species s JOIN MaritimeLaw.Regions r ON s.id = r.id WHERE r.compliance = 'strict';
What is the total biomass of marine life species in regions with strict maritime law compliance?
<table0>[table_49622] { <col0>[Region]:[year] <col1>[text]:[text] <col2>[text]:[text] <col3>[text]:[text] <col4>[text]:[text] <col5>[text]:[text] }
SELECT "No. 2" FROM `<table0>` WHERE "No. 4" = 'ethan' AND "No. 7" = 'jackson'
What is the No. 2 of the person with a No. 5 of Ethan and NO. 7 of Jackson?
<table0>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] } <table1>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] }
SELECT Founder, SUM( `<col3>` ) FROM `<table0>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder
For those records from the products and each product's manufacturer, a bar chart shows the distribution of founder and the sum of manufacturer , and group by attribute founder.
<table0>[table_18254] { <col0>[District]:[text] <col1>[Incumbent]:[text] <col2>[Party]:[text] <col3>[elected]:[real] <col4>[Result]:[text] <col5>[Candidates]:[text] }
SELECT MAX( "First elected" ) FROM `<table0>` WHERE "Incumbent" = 'Gus Yatron'
what is the maximum first elected with incumbent being gus yatron
<table0>[marine_protected_areas] { <col0>[INT]:[name] <col1>[TEXT]:[area_size] <col2>[FLOAT]:[avg_depth] <col3>[FLOAT]:[ocean] <col4>[TEXT]:[INSERT] }
SELECT AVG( avg_depth ) FROM `<table0>` WHERE ocean = 'Pacific';
What is the average depth of all marine protected areas in the Pacific Ocean?"
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text]...
SELECT `<table1>`.admittime, lab.label FROM `<table1>` INNER JOIN lab ON `<table1>`.hadm_id = lab.hadm_id WHERE `<table1>`.subject_id = "22377"
what is admission time and lab test name of subject id 22377?
<table0>[table_28406] { <col0>[Institution]:[text] <col1>[Location]:[text] <col2>[Nickname]:[text] <col3>[Founded]:[real] <col4>[Type]:[text] <col5>[Enrollment]:[real] <col6>[Joined]:[text] }
SELECT MIN( "Founded" ) FROM `<table0>`
When was the earliest founded university?
<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 `<table1>`.drug_type, `<table1>`.formulary_drug_cd FROM `<table1>` WHERE `<table1>`.drug = "Tacrolimus"
Tell me the drug code and drug type of Tacrolimus.
<table0>[waste_stream] { <col0>[country]:[VARCHAR] <col1>[material]:[VARCHAR] <col2>[recycling_rate]:[DECIMAL] }
SELECT country, material, AVG( `<col2>` ) as avg_recycling_rate FROM `<table0>` GROUP BY country, material;
What are the recycling rates for each material and country in 'waste_stream'?
<table0>[Course_Authors_and_Tutors] { <col0>[author_id]:[INTEGER] <col1>[author_tutor_ATB]:[VARCHAR] <col2>[login_name]:[VARCHAR] <col3>[password]:[VARCHAR] <col4>[personal_name]:[VARCHAR] <col5>[middle_name]:[VARCHAR] <col6>[family_name]:[VARCHAR] <col7>[gender_mf]:[VARCHAR] <col8>[address_line_1]:[VARCHAR] } <table1...
SELECT date_test_taken, COUNT( `<col1>` ) FROM `<table2>` WHERE `<col2>` = "Pass" GROUP BY `<col1>` ORDER BY `<col1>`
Which tests have 'Pass' results? Return the dates when the tests were taken, and count them by a bar chart, sort by the names in asc please.
<table0>[table_name_34] { <col0>[player]:[VARCHAR] <col1>[total]:[VARCHAR] <col2>[year_s__won]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 293 AND `<col2>` = "1989"
What golfer has a greater than 293 total, and won in 1989?