schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[te... | SELECT `<table3>`.admission_type, `<table3>`.insurance FROM `<table3>` WHERE `<table3>`.subject_id = "17595" | tell me the type of admission and health insurance for the patient with patient id 17595. |
<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 `<table4>`.subject_id ) FROM `<table4>` INNER JOIN procedures ON `<table4>`.hadm_id = procedures.hadm_id WHERE `<table4>`.religion = "JEWISH" AND procedures.short_title = "Closed liver biopsy" | what number of patients are jews and had closed liver biopsy? |
<table0>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivilegedUserGuidance] <col5>[text]:... | SELECT SE.PostId AS "post_link", V.Name AS "vote_type", SE.ApprovalDate, SE.RejectionDate FROM `<table11>` AS SEV INNER JOIN SuggestedEdits AS SE ON SEV.SuggestedEditId = SE.Id INNER JOIN VoteTypes AS V ON V.Id = SEV.VoteTypeId WHERE SEV.UserId = @UserId AND ( ( SEV.VoteTypeId = 2 AND NOT RejectionDate IS NULL ) OR ( S... | When my Suggested Edit decisions were reversed.
|
<table0>[volunteers] { <col0>[INT]:[state] <col1>[VARCHAR]:[255] <col2>[cause]:[VARCHAR] <col3>[255]:[INSERT] } | SELECT cause, COUNT( * ) FROM `<table0>` WHERE state = 'Texas' AND `<col2>` = 'environment' GROUP BY cause; | What is the total number of volunteers for environmental causes in Texas? |
<table0>[person_info] { <col0>[CSD]:[text] <col1>[CSRQ]:[time] <col2>[GJDM]:[text] <col3>[GJMC]:[text] <col4>[JGDM]:[text] <col5>[JGMC]:[text] <col6>[MZDM]:[text] <col7>[MZMC]:[text] <col8>[RYBH]:[text] <col9>[XBDM]:[number] <col10>[XBMC]:[text] <col11>[XLDM]:[text] <col12>[XLMC]:[text] <col13>[text]:[ZYLBDM] <col14>[t... | SELECT jyjgzbb.JCFF FROM `<table0>` JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON `<table0>`.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgz... | 列出患者奚经略所有检验结果指标记录中的检测方法在2007-09-21到2008-12-08内有什么?
|
<table0>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] } <table1>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] } | SELECT T1.Name, T1.Code FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Code | For those records from the products and each product's manufacturer, give me the comparison about the average of code over the name , and group by attribute name, I want to list in asc by the Y.
|
<table0>[people] { <col0>[People_ID]:[int] <col1>[text]:[Height] <col2>[real]:[Weight] <col3>[real]:[Date_of_Birth] } <table1>[entrepreneur] { <col0>[Entrepreneur_ID]:[int] <col1>[People_ID]:[int] <col2>[Company]:[text] <col3>[Money_Requested]:[real] <col4>[Investor]:[text] } | SELECT Investor, COUNT( * ) FROM `<table1>` GROUP BY `<col4>` ORDER BY `<col4>` DESC | Display a bar chart for what are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor?, rank in descending by the bar please. |
<table0>[table_204_442] { <col0>[number]:[institution] <col1>[text]:[location] <col2>[text]:[enrollment] <col3>[number]:[nickname] <col4>[text]:[varsity] <col5>[nsports]:[number] <col6>[rugby]:[nsince] <col7>[text]:[head] <col8>[coach]:[text] } | SELECT ABS( ( SELECT "rugby\nsince" FROM `<table0>` WHERE "nickname" = 'wolfpack' ) - ( SELECT "rugby\nsince" FROM `<table0>` WHERE "nickname" = 'tar heels' ) ) | how much longer has the north carolina wolfpack been around compared to the tar heels ? |
<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 EMPLOYEE_ID, `<col8>` FROM `<table0>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table2>` WHERE `<col9>` BETWEEN 100 AND 200 ) | For those employees who do not work in departments with managers that have ids between 100 and 200, what is the relationship between employee_id and commission_pct ? |
<table0>[Order_Items] { <col0>[order_item_id]:[INTEGER] <col1>[order_id]:[INTEGER] <col2>[product_id]:[INTEGER] <col3>[product_quantity]:[VARCHAR] <col4>[other_order_item_details]:[VARCHAR] } <table1>[Accounts] { <col0>[account_id]:[INTEGER] <col1>[customer_id]:[INTEGER] <col2>[date_account_opened]:[DATETIME] <col3>[a... | SELECT customer_last_name, COUNT( * ) FROM `<table1>` AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY customer_last_name DESC | How many accounts for each customer? Show a bar chart that groups by customer's last name, sort in descending by the customer_last_name please. |
<table0>[table_6553] { <col0>[Game]:[text] <col1>[Date]:[text] <col2>[Home]:[Team] <col3>[text]:[Result] <col4>[text]:[Road] <col5>[Team]:[text] } | SELECT "Road Team" FROM `<table0>` WHERE "Home Team" = 'philadelphia' AND "Result" = '105-102' | What is the road team of the game with Philadelphia as the home team with a result of 105-102?
|
<table0>[table_21501565_1] { <col0>[week__number]:[VARCHAR] <col1>[original_artist]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Tina Turner" | With original artist of Tina Turner, what is the week number? |
<table0>[table_203_71] { <col0>[number]:[name] <col1>[text]:[service] <col2>[text]:[rank] <col3>[text]:[role] <col4>[unit]:[text] <col5>[date]:[award] <col6>[text]:[notes] <col7>[text]:[image] } | SELECT COUNT( "name" ) FROM `<table0>` WHERE "date of award" < 1940 | how many individuals were awarded the knight 's cross of the iron cross before 1940 ? |
<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>[Lives_in] { <col0>[stuid]:[INTEGER] <col1>[dormid]:[INTEGER] <col2>[room_number]:[INTEGER] } ... | SELECT city_code, AVG( `<col3>` ) FROM `<table0>` WHERE `<col4>` = 'M' GROUP BY `<col7>` ORDER BY AVG( `<col3>` ) | Find the average age of male students (with sex M) from each city, and rank Y from low to high order.
|
<table0>[infectious_disease_reporting] { <col0>[INT]:[city] <col1>[TEXT]:[year] <col2>[INT]:[num_cases] <col3>[INT]:[INSERT] } | SELECT SUM( num_cases ) FROM `<table0>` WHERE city = 'New York City' AND year = 2021; | How many infectious disease cases were reported in New York City in 2021? |
<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 `<table1>`.flag FROM `<table1>` WHERE `<table1>`.subject_id = "6983" | what is lab test abnormal status of subject id 6983?
|
<table0>[community_engagement] { <col0>[INT]:[name] <col1>[VARCHAR]:[language] <col2>[VARCHAR]:[age] <col3>[INT]:[INSERT] } | SELECT AVG( age ) FROM `<table0>` WHERE language IS NOT NULL; | What is the average age of language speakers in the 'community_engagement' table? |
<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>[vulnerabilities] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[severity]:[VARCHAR] <col3>[reported_date]:[DATE] } | SELECT name, `<col2>` FROM `<table0>` ORDER BY `<col3>` DESC LIMIT 1; | What is the name of the most recently added vulnerability and its severity in the 'vulnerabilities' table? |
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>... | SELECT `<table0>`.diagnosis, diagnoses.long_title FROM `<table0>` INNER JOIN diagnoses ON `<table0>`.hadm_id = diagnoses.hadm_id WHERE `<table0>`.name = "Bryant Johnson" | what is primary disease and diagnoses long title of subject name bryant johnson? |
<table0>[sustainable_restaurants] { <col0>[restaurant_id]:[INT] <col1>[cuisine]:[VARCHAR] <col2>[255]:[avg_calories] } | SELECT cuisine, AVG( avg_calories ) FROM `<table0>` GROUP BY cuisine; | What is the average calorie intake for meals served in 'sustainable_restaurants' table, grouped by cuisine type? |
<table0>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table1>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table2>[area] { <col0>[course_id]:[int] } <table3>[comment_instructor] { <col0>[instru... | SELECT DISTINCT course.department, course.name, course.number, `<table10>`.workload, `<table10>`.workload FROM course, `<table10>` WHERE `<table10>`.category LIKE '%ULCS%' AND `<table10>`.course_id = course.course_id AND `<table10>`.workload = ( SELECT MIN( PROGRAM_COURSEalias1.workload ) FROM `<table10>` AS PROGRAM_CO... | Which classes are the least demanding to satisfy the ULCS requirement ?
|
<table0>[table_24776075_2] { <col0>[final_score]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Saturday, May 25" | What was the final score on Saturday, May 25? |
<table0>[table_203_494] { <col0>[number]:[party] <col1>[text]:[votes] <col2>[number]:[number] <col3>[swing]:[number] <col4>[seats]:[number] <col5>[change]:[number] } | SELECT "party" FROM `<table0>` WHERE "%" < 5 | which party or parties received less than five percent of the votes ?
|
<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>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[chartt... | SELECT MAX( `<table6>`.valuenum ) FROM `<table6>` WHERE `<table6>`.hadm_id IN ( SELECT `<table2>`.hadm_id FROM `<table2>` WHERE `<table2>`.subject_id = 31300 ) AND `<table6>`.itemid IN ( SELECT `<table16>`.itemid FROM `<table16>` WHERE `<table16>`.label = 'albumin, body fluid' ) AND STRFTIME( '%y-%m', `<table6>`.chartt... | what is until 04/2105 maximum albumin, body fluid value of patient 31300? |
<table0>[CREATE] { <col0>[SCHEMA]:[exists] } <table1>[exists] { <col0>[pharma]:[sales] <col1>[year]:[INT] <col2>[drug]:[VARCHAR] <col3>[255]:[revenue] <col4>[FLOAT]:[INSERT] <col5>[pharma]:[sales] <col6>[year]:[drug] <col7>[revenue]:[VALUES] <col8>[2018]:[Drug] <col9>[15000000]:[2019] <col10>[Drug]:[20000000] <col11>[... | SELECT SUM( revenue ) FROM pharma.sales WHERE drug = 'Drug B' AND year BETWEEN 2019 AND 2021; | What was the total sales for drug B for the years 2019-2021? |
<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 AVG( `<table11>`.valuenum ) FROM `<table11>` WHERE `<table11>`.icustay_id IN ( SELECT `<table10>`.icustay_id FROM `<table10>` WHERE `<table10>`.hadm_id IN ( SELECT `<table2>`.hadm_id FROM `<table2>` WHERE `<table2>`.subject_id = 28447 ) ) AND `<table11>`.itemid IN ( SELECT `<table3>`.itemid FROM `<table3>` WHERE... | indicate the yearly average amount of sao2 for patient 28447 since 12/2105.
|
<table0>[table_name_91] { <col0>[club]:[VARCHAR] <col1>[city]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "rovigo" | What is Rovigo's Club?
|
<table0>[table_name_84] { <col0>[date]:[VARCHAR] <col1>[score]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "l 111–122 ( ot )" | When was the score l 111–122 (ot)? |
<table0>[Temperature_Data] { <col0>[year]:[INT] <col1>[temperature]:[FLOAT] } <table1>[Climate_Trends] { <col0>[year]:[INT] <col1>[temperature]:[FLOAT] } | SELECT AVG( `<col1>` ) FROM `<table0>` GROUP BY `<col0>` UNION ALL SELECT AVG( `<col1>` ) FROM `<table1>` GROUP BY `<col0>` | Find the average temperature increase for each year in the 'Temperature_Data' table and the 'Climate_Trends' table, then sum the results. |
<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 ROW_NUMBER( ) OVER ( ORDER BY `<table23>`.Id DESC ), `<table23>`.Id AS "user_link", `<table23>`.Reputation, `<table23>`.Views, CAST( `<table23>`.Views AS FLOAT ) / `<table23>`.Reputation AS Ratio FROM `<table23>` WHERE `<table23>`.Reputation > 1 AND `<table23>`.Views > 10000 ORDER BY Ratio DESC LIMIT 256 | Users with the highest Profile views / Reputation ratio. |
<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 `<table2>`.subject_id ) FROM `<table2>` INNER JOIN procedures ON `<table2>`.hadm_id = procedures.hadm_id WHERE `<table2>`.admission_type = "ELECTIVE" AND procedures.long_title = "Catheter based invasive electrophysiologic testing" | provide the number of patients having catheter based invasive electrophysiologic testing and whose admission type is elective.
|
<table0>[table_27611] { <col0>[Season]:[real] <col1>[Series]:[text] <col2>[Team]:[text] <col3>[Races]:[real] <col4>[Wins]:[real] <col5>[Poles]:[real] <col6>[Laps]:[real] <col7>[Podiums]:[real] <col8>[Points]:[text] <col9>[Position]:[text] } | SELECT "Series" FROM `<table0>` WHERE "Points" = '56' | What was the series where a team scored 56 points?
|
<table0>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table1>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentim... | SELECT t3.`<table9>`name FROM ( SELECT t2.`<table9>`name, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT patient.uniquepid, `<table5>`.`<table5>`time, patient.patienthealthsystemstayid FROM `<table5>` JOIN patient ON `<table5>`.patientunitstayid = patient.patientunitstayid WHERE `<table5>`.`<table5... | what are the four most common lab tests that followed in the same hospital visit for a patient who received alpha/beta blocker - carvedilol until 2104? |
<table0>[Students] { <col0>[student_id]:[INTEGER] <col1>[address_id]:[INTEGER] <col2>[first_name]:[VARCHAR] <col3>[middle_name]:[VARCHAR] <col4>[last_name]:[VARCHAR] <col5>[cell_mobile_number]:[VARCHAR] <col6>[email_address]:[VARCHAR] <col7>[date_first_rental]:[DATETIME] <col8>[date_left_university]:[DATETIME] <col9>[o... | SELECT student_id, `<col4>` FROM `<table4>` GROUP BY `<col5>` ORDER BY `<col4>` DESC | Show me about the correlation between student_id and monthly_rental , and group by attribute other_details in a scatter chart.
|
<table0>[table_66946] { <col0>[Date]:[text] <col1>[Opponents]:[text] <col2>[Result]:[u2013A] <col3>[text]:[Scorers] <col4>[text]:[Attendance] <col5>[real]:[Group] <col6>[position]:[text] } | SELECT "Scorers" FROM `<table0>` WHERE "Result F\u2013A" = '1–0' | Who were F A of 1 0 scorers? |
<table0>[table_name_92] { <col0>[chassis]:[VARCHAR] <col1>[engine]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "brm v8" | What chassis did the BRM V8 engine have? |
<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 `<table3>`.subject_id ) FROM `<table3>` INNER JOIN lab ON `<table3>`.hadm_id = lab.hadm_id WHERE `<table3>`.admission_type = "ELECTIVE" AND lab.label = "Acetaminophen" | give me the number of patients who had elective type hospital admission along with acetaminophen lab test.
|
<table0>[Country] { <col0>[CountryCode]:[text] <col1>[ShortName]:[text] <col2>[TableName]:[text] <col3>[LongName]:[text] <col4>[Alpha2Code]:[text] <col5>[CurrencyUnit]:[text] <col6>[SpecialNotes]:[text] <col7>[Region]:[text] <col8>[IncomeGroup]:[text] <col9>[Wb2Code]:[text] <col10>[NationalAccountsBaseYear]:[text] <col... | SELECT `<col0>` FROM `<table4>` WHERE `<col4>` = 1979 AND `<col2>` = 'Fertility rate, total ( births per woman )' AND value >= 4 AND `<col5>` <= 5 | Which countries have a fertility rate between 4 and 5 in 1979? List their names. |
<table0>[climate_adaptation_projects] { <col0>[year]:[INT] <col1>[project]:[VARCHAR] <col2>[sector]:[VARCHAR] } | SELECT project, `<col2>` FROM `<table0>` WHERE `<col0>` IN ( 2019, 2020 ) GROUP BY project, sector; | Identify the number of unique adaptation projects in 2019 and 2020, and list the project names and their respective funding sectors. |
<table0>[dishes] { <col0>[dish_id]:[INT] <col1>[dish]:[VARCHAR] <col2>[category]:[VARCHAR] <col3>[calories]:[INT] } <table1>[categories] { <col0>[category_id]:[INT] <col1>[category]:[VARCHAR] } | SELECT c.category, SUM( d.calories ) as total_calories FROM `<table0>` d JOIN categories c ON d.category = c.category WHERE c.category = 'appetizer' GROUP BY c.category; | What are the total calories of the dishes in the appetizer category? |
<table0>[medical_procedures] { <col0>[INT]:[name] <col1>[TEXT]:[hospital] <col2>[TEXT]:[procedure_date] <col3>[DATE]:[cost] <col4>[FLOAT]:[INSERT] } | SELECT hospital, AVG( cost ) as avg_cost FROM `<table0>` WHERE procedure_date >= '2020-01-01' AND procedure_date < '2021-01-01' GROUP BY hospital; | What is the average cost of medical procedures performed in each hospital in 2020? |
<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 T2.Name, T2.Revenue FROM `<table0>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Revenue DESC | For those records from the products and each product's manufacturer, give me the comparison about the average of revenue over the name , and group by attribute name, display in desc by the the average of revenue. |
<table0>[officers] { <col0>[officer_id]:[INT] <col1>[first_name]:[VARCHAR] <col2>[last_name]:[VARCHAR] } | DELETE FROM `<table0>` WHERE `<col0>` BETWEEN 50 AND 60; | Delete records from the 'officers' table where officer_id is between 50 and 60 |
<table0>[donors] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[donor_status] <col2>[VARCHAR]:[donor_since] <col3>[DATE]:[INSERT] } | SELECT SUM( donation_amount ) FROM donations d JOIN donors don ON d.id = don.id WHERE donor_status = 'new' AND donation_date > '2021-06-30'; | What was the total amount donated by new donors after June 2021? |
<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 `<table16>`.label FROM `<table16>` WHERE `<table16>`.itemid IN ( SELECT t3.itemid FROM ( SELECT t2.itemid, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table15>`.charttime FROM `<table15>` JOIN admissions ON `<table15>`.hadm_id = admissions.hadm_id WHERE `<table15>... | what are the five most frequent lab tests patients have taken within the same month after being diagnosed with senile dementia uncomp?
|
<table0>[table_19179465_1] { <col0>[played]:[VARCHAR] <col1>[club]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Featherstone Rovers" | Featherstone Rovers club played a total of how many games? |
<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 `<table4>`.subject_id ) FROM `<table4>` WHERE `<table4>`.admission_location = "TRSF WITHIN THIS FACILITY" AND `<table4>`.dob_year < "2089" | how many patients admission location is transferred within this facility with the birth year before 2089?
|
<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 `<table4>`.admission_location, diagnoses.icd9_code FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id WHERE `<table4>`.subject_id = "1875" | what is admission location and diagnoses icd9 code of subject id 1875? |
<table0>[model_fairness] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[model_name] <col2>[VARCHAR]:[100] <col3>[model_type]:[VARCHAR] <col4>[fairness_score]:[DECIMAL] <col5>[created_date]:[DATE] } | SELECT model_type, MAX( `<col4>` ) as max_fairness_score FROM `<table0>` WHERE `<col3>` = 'Reinforcement Learning' GROUP BY model_type; | What is the maximum fairness score achieved by a model using reinforcement learning? |
<table0>[publication] { <col0>[abstract]:[varchar] <col1>[cid]:[int] <col2>[citation_num]:[int] <col3>[jid]:[int] <col4>[pid]:[int] <col5>[reference_num]:[int] <col6>[title]:[varchar] <col7>[year]:[int] } <table1>[domain_keyword] { <col0>[int]:[kid] } <table2>[domain_conference] { <col0>[cid]:[int] } <table3>[domain... | SELECT publication.title FROM journal, publication WHERE journal.name = 'PVLDB' AND publication.jid = journal.jid | return me the papers on PVLDB .
|
<table0>[table_77112] { <col0>[Player]:[text] <col1>[Country]:[text] <col2>[Year]:[won] <col3>[text]:[Total] <col4>[real]:[par] <col5>[text]:[Finish] } | SELECT "Country" FROM `<table0>` WHERE "Year( s ) won" = '1962' | What is Country, when Year(s) Won is '1962'?
|
<table0>[table_test_19] { <col0>[int]:[gender] <col1>[string]:[left_ventricular_ejection_fraction_lvef] <col2>[int]:[systolic_blood_pressure_sbp] <col3>[int]:[acute_infectious] <col4>[bool]:[hypertensive_retinopathy] <col5>[bool]:[leukocyte_count] <col6>[int]:[severe_uncontrolled_hypertension] <col7>[bool]:[chronic_inf... | SELECT * FROM `<table0>` WHERE age >= 18 AND age < 75 | age: over 18 or 18 years old, less than 75 years old;
|
<table0>[city] { <col0>[city_id]:[VARCHAR] } <table1>[temperature] { <col0>[Jan]:[VARCHAR] <col1>[city_id]:[VARCHAR] } | SELECT T2.Jan FROM `<table0>` AS T1 JOIN temperature AS T2 ON T1.`<table0>`_id = T2.`<table0>`_id WHERE T1.`<table0>` = "Shanghai" | Give me the temperature of Shanghai in January.
|
<table0>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table1>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } <tab... | SELECT JOB_ID, AVG( `<col0>` ) FROM `<table5>` WHERE `<col5>` < '2002-06-21' GROUP BY `<col6>` | For those employees who was hired before 2002-06-21, give me the comparison about the average of employee_id over the job_id , and group by attribute job_id by a bar chart.
|
<table0>[Student_Course_Enrolment] { <col0>[registration_id]:[INTEGER] <col1>[student_id]:[INTEGER] <col2>[course_id]:[INTEGER] <col3>[date_of_enrolment]:[DATETIME] <col4>[date_of_completion]:[DATETIME] } <table1>[Subjects] { <col0>[subject_id]:[INTEGER] <col1>[subject_name]:[VARCHAR] } <table2>[Students] { <col0>[st... | SELECT date_of_latest_logon, COUNT( `<col2>` ) FROM `<table2>` WHERE `<col7>` = "Jaskolski" OR `<col7>` = "Langosh" | A bar chart for what are the number of the dates of the latest logon of the students with family name 'Jaskolski' or 'Langosh'? |
<table0>[Astronauts] { <col0>[AstronautID]:[INT] <col1>[TotalTimeInSpace]:[FLOAT] } | SELECT AstronautID, TotalTimeInSpace FROM ( SELECT AstronautID, SUM( Duration ) AS TotalTimeInSpace FROM SpaceMissions GROUP BY AstronautID ) subquery ORDER BY TotalTimeInSpace DESC LIMIT 1; | Who are the astronauts who have spent the most time in space, and what is their total time spent in space? |
<table0>[teaches] { <col0>[varchar]:[course_id] <col1>[varchar]:[sec_id] <col2>[varchar]:[semester] <col3>[varchar]:[year] } <table1>[takes] { <col0>[varchar]:[course_id] <col1>[varchar]:[sec_id] <col2>[varchar]:[semester] <col3>[varchar]:[year] <col4>[numeric]:[grade] } <table2>[advisor] { <col0>[s_ID]:[varchar] <co... | SELECT dept_name, COUNT( `<col2>` ) FROM `<table9>` AS T1 JOIN prereq AS T2 ON T1.`<table9>`_id = T2.`<table9>`_id GROUP BY `<col2>` ORDER BY COUNT( `<col2>` ) DESC | How many courses have more than one prerequisite for each department? Visualize with a bar chart, I want to list in descending by the y-axis.
|
<table0>[ticket_sales] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[event_id] <col2>[INT]:[sport] <col3>[VARCHAR]:[tickets_sold] <col4>[INT]:[price] } <table1>[events] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[100] <col3>[date]:[DATE] <col4>[location]:[VARCHAR] } | SELECT t.sport, SUM( t.tickets_sold ) as total_tickets_sold FROM `<table0>` t JOIN events e ON t.event_id = e.id GROUP BY t.sport; | What is the total number of tickets sold for each sport in the 'ticket_sales' table? |
<table0>[sales] { <col0>[INT]:[menu_item_id] } <table1>[menus] { <col0>[INT]:[menu_item_name] <col1>[TEXT]:[INSERT] } | SELECT SUM( `<table0>` ) FROM `<table0>` JOIN menus ON `<table0>`.menu_item_id = menus.id WHERE menu_item_name LIKE '%cheese%'; | What is the total sales of all menu items that contain 'cheese' in their name? |
<table0>[table_47067] { <col0>[Rank]:[text] <col1>[Nation]:[text] <col2>[Gold]:[real] <col3>[Silver]:[real] <col4>[Bronze]:[real] <col5>[Total]:[real] } | SELECT AVG( "Total" ) FROM `<table0>` WHERE "Silver" = '0' AND "Rank" = '6' AND "Gold" < '0' | Can you tell me the average Total that had the Silver of 0, and the Rank of 6, and the Gold smaller than 0?
|
<table0>[table_name_98] { <col0>[roll]:[INTEGER] <col1>[name]:[VARCHAR] <col2>[decile]:[VARCHAR] <col3>[authority]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col2>` < 8 AND `<col3>` = "state" AND `<col1>` = "orere school" | What is the highest Roll of Orere School with a Decile less than 8 with a State Authority? |
<table0>[Person] { <col0>[name]:[varchar] <col1>[age]:[INTEGER] <col2>[city]:[TEXT] <col3>[gender]:[TEXT] <col4>[job]:[TEXT] } <table1>[PersonFriend] { <col0>[name]:[varchar] <col1>[friend]:[varchar] <col2>[year]:[INTEGER] } | SELECT job, AVG( `<col1>` ) FROM `<table0>` WHERE `<col3>` = 'male' GROUP BY `<col4>` ORDER BY AVG( `<col1>` ) DESC | Return a bar chart on what is the average age for a male in each job?, rank in descending by the Y. |
<table0>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table1>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table2>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[numb... | SELECT COUNT( DISTINCT `<table14>`.subject_id ) FROM `<table14>` WHERE `<table14>`.hadm_id IN ( SELECT `<table3>`.hadm_id FROM `<table3>` WHERE `<table3>`.icd9_code = ( SELECT `<table1>`.icd9_code FROM `<table1>` WHERE `<table1>`.short_title = 'shock w/o trauma nec' ) ) | count the number of patients that were diagnosed with shock w/o trauma nec.
|
<table0>[rural_hospitals] { <col0>[INT]:[name] <col1>[VARCHAR]:[beds] <col2>[INT]:[location] } | DELETE FROM `<table0>` WHERE beds < 25; | Delete records with less than 25 beds in the 'rural_hospitals' table |
<table0>[table_name_96] { <col0>[episode]:[INTEGER] <col1>[performer_4]:[VARCHAR] <col2>[performer_1]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "chip esten" AND `<col2>` = "jim meskimen" | What is the sum of the episodes where chip esten was the 4th performer and jim meskimen was the 1st performer?
|
<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 AVG( `<table0>`.age ) FROM `<table0>` WHERE `<table0>`.marital_status = "SINGLE" AND `<table0>`.dob_year > "2087" | calculate the average age of unmarried patients born after 2087.
|
<table0>[table_name_52] { <col0>[year]:[VARCHAR] <col1>[meeting]:[VARCHAR] <col2>[venue]:[VARCHAR] <col3>[extra]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "algiers, algeria" AND `<col3>` < 8.03 AND `<col1>` = "all africa games" | What year has a venue of algiers, algeria, extra smaller than 8.03, and a Meeting of all africa games? |
<table0>[farms] { <col0>[INT]:[name] <col1>[TEXT]:[location] <col2>[TEXT]:[size] <col3>[FLOAT]:[INSERT] } <table1>[crops] { <col0>[INT]:[farm_id] <col1>[INT]:[crop] <col2>[TEXT]:[yield] <col3>[INT]:[year] } | INSERT INTO crops ( id, farm_id, crop, yield, year ) VALUES ( 4, ( SELECT id FROM `<table0>` WHERE name = 'Sunny Meadows' ), 'eggplant', 70, 2022 ); | Insert a new record of crop 'eggplant' for farm 'Sunny Meadows' in 2022 |
<table0>[salaries] { <col0>[INT]:[employee_id] <col1>[INT]:[salary] <col2>[INT]:[INSERT] } | SELECT AVG( salary ) FROM `<table0>` JOIN employees ON `<table0>`.employee_id = employees.id WHERE employees.department IN ( 'manufacturing', 'engineering' ); | What is the average salary of employees in the 'manufacturing' and 'engineering' departments? |
<table0>[table_62187] { <col0>[text]:[Championship] <col1>[real]:[League] <col2>[Cup]:[real] <col3>[Cup]:[real] <col4>[Total]:[real] } | SELECT AVG( "Total" ) FROM `<table0>` WHERE "Championship" < '1' | What is the average total for less than 1 championship?
|
<table0>[startup] { <col0>[INT]:[name] <col1>[VARCHAR]:[100] <col2>[industry]:[VARCHAR] <col3>[founder_country]:[VARCHAR] <col4>[investment_round]:[INT] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col3>` IN ( 'India', 'Brazil' ) AND `<col2>` = 'Blockchain' AND `<col4>` IS NOT NULL; | List the number of startups founded by individuals from underrepresented countries in the blockchain sector that have had at least one investment round. |
<table0>[table_name_96] { <col0>[countries_visited]:[VARCHAR] <col1>[presenter]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "natalia makarova" | Which country did Natalia Makarova visit? |
<table0>[table_67089] { <col0>[Pick]:[text] <col1>[Player]:[text] <col2>[Position]:[text] <col3>[Nationality]:[text] <col4>[NHL]:[team] <col5>[text]:[College] <col6>[junior]:[club] <col7>[team]:[text] } | SELECT "NHL team" FROM `<table0>` WHERE "College/junior/club team" = 'toronto marlboros ( oha )' AND "Pick #" = '32' | Which team picked the player from the Toronto Marlboros (OHA) as Pick #32?
|
<table0>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comment_text]:[varchar] } <table1>[student] { <col0>[student_id]:[int] <col1>[lastname]:[varchar] <col2>[firstname]:[varchar] <col3>[program_id]:[int] <col4>[declare_major]:[varchar] <col5>[total_credit]:[int... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course_offering.`<table7>` < ( SELECT SEMESTERalias0.`<table7>`_id FROM `<table7>` AS SEMESTERalias0 WHERE SEMESTERalias0.`<table7>` = 'WN' AND SEMESTERalias0.year = 2016 ) AND course.course... | Which classes are handled by Dr. Tanya Logan ? |
<table0>[status] { <col0>[station_id]:[INTEGER] <col1>[bikes_available]:[INTEGER] <col2>[docks_available]:[INTEGER] <col3>[time]:[TEXT] } <table1>[station] { <col0>[INTEGER]:[name] <col1>[TEXT]:[lat] <col2>[NUMERIC]:[long] <col3>[NUMERIC]:[dock_count] <col4>[INTEGER]:[city] <col5>[TEXT]:[installation_date] } <table2>... | SELECT date, COUNT( `<col0>` ) FROM `<table2>` WHERE `<col1>` > 85 ORDER BY COUNT( `<col0>` ) DESC | Give me the number of the dates when the max temperature was higher than 85, and display from high to low by the Y.
|
<table0>[table_54924] { <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>[Date]:[text] } | SELECT "Away `<col2>` score" FROM `<table0>` WHERE "Home team" = 'geelong' | What is the Away team score when they played Geelong as the Home team?
|
<table0>[table_name_50] { <col0>[event]:[VARCHAR] <col1>[round]:[VARCHAR] <col2>[opponent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 3 AND `<col2>` = "fernando terere" | Which event only lasted for 3 rounds against Fernando Terere?
|
<table0>[table_name_43] { <col0>[winner_and_score]:[VARCHAR] <col1>[semifinalists]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "goran prpić sergi bruguera" | Who is the winner and score of the tournament with semifinalists goran prpi sergi bruguera?
|
<table0>[table_name_46] { <col0>[league_cup_goals]:[INTEGER] <col1>[name]:[VARCHAR] <col2>[flt_goals]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "tyrone thompson" AND `<col2>` > 0 | How many league cup goals for tyrone thompson with 0 FLT goals? |
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[ce... | SELECT t2.drugname FROM ( SELECT `<table6>`.uniquepid, `<table8>`.`<table8>`time FROM `<table8>` JOIN `<table6>` ON `<table8>`.`<table6>`unitstayid = `<table6>`.`<table6>`unitstayid WHERE `<table6>`.`<table6>`healthsystemstayid IN ( SELECT `<table6>`.`<table6>`healthsystemstayid FROM `<table6>` WHERE `<table6>`.uniquep... | what was the name of the medicine patient 013-28507 was prescribed during the same day after having received a cpap/peep therapy - 5-10 cm h2o procedure in their current hospital encounter?
|
<table0>[table_name_80] { <col0>[purse]:[INTEGER] <col1>[dates]:[VARCHAR] } | SELECT MAX( purse__ ) AS $_ FROM `<table0>` WHERE `<col1>` = "aug 3–5" | What is the highest Purse for aug 3–5? |
<table0>[film_text] { <col0>[film_id]:[integer] <col1>[title]:[text] <col2>[description]:[text] } <table1>[actor] { <col0>[actor_id]:[integer] <col1>[first_name]:[text] <col2>[last_name]:[text] <col3>[last_update]:[datetime] } <table2>[address] { <col0>[address_id]:[integer] } <table3>[category] { <col0>[category_id... | SELECT T2.title FROM `<table8>` AS T1 INNER JOIN film AS T2 ON T1.film_id = T2.film_id INNER JOIN actor AS T3 ON T1.actor_id = T3.actor_id WHERE T3.first_name = 'PENELOPE' AND T3.last_name = 'GUINESS' | Please list the titles of all the films starring the actor PENELOPE GUINESS. |
<table0>[Restaurants] { <col0>[RestaurantID]:[int] <col1>[RestaurantName]:[varchar] } <table1>[Inspections] { <col0>[InspectionID]:[int] <col1>[RestaurantID]:[int] <col2>[InspectionGrade]:[varchar] <col3>[InspectionDate]:[date] } | SELECT R.RestaurantName, I.InspectionGrade, I.InspectionDate FROM `<table0>` R INNER JOIN Inspections I ON R.RestaurantID = I.RestaurantID WHERE I.InspectionGrade = 'Pass'; | List all food safety inspections with a passing grade, their corresponding restaurant, and the date of inspection. |
<table0>[employee_history] { <col0>[INT]:[hire_date] <col1>[DATE]:[employee_id] <col2>[INT]:[INSERT] } | SELECT CASE WHEN hire_date < '2021-01-01' THEN 'Before' ELSE 'After' END as hire_period, COUNT( * ) as num_employees FROM `<table0>` GROUP BY hire_period; | Find the total number of employees who joined before and after January 1, 2021 |
<table0>[test_flights] { <col0>[manufacturer]:[VARCHAR] } | SELECT manufacturer, test_flights FROM test_flights; | What is the number of test flights conducted by each aircraft manufacturer? |
<table0>[regions] { <col0>[region_id]:[number] <col1>[region_name]:[text] } <table1>[countries] { <col0>[country_id]:[text] <col1>[country_name]:[text] <col2>[region_id]:[number] } <table2>[job_history] { <col0>[employee_id]:[number] <col1>[start_date]:[time] <col2>[end_date]:[time] <col3>[job_id]:[text] <col4>[depar... | SELECT first_name, last_name, `<col10>` FROM `<table4>` WHERE `<col7>` IN ( SELECT MIN( `<col7>` ) FROM `<table4>` GROUP BY `<col10>` ) | What are the full names and department ids for the lowest paid employees across all departments. |
<table0>[table_name_13] { <col0>[name]:[VARCHAR] <col1>[authority]:[VARCHAR] <col2>[roll]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "state" AND `<col2>` = "72" | What is the Name of a state Authority that has a Roll of 72? |
<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_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table2>[prescriptions] ... | SELECT MIN( `<table11>`.amount ) FROM `<table11>` WHERE `<table11>`.icustay_id IN ( SELECT `<table6>`.icustay_id FROM `<table6>` WHERE `<table6>`.hadm_id IN ( SELECT `<table12>`.hadm_id FROM `<table12>` WHERE `<table12>`.subject_id = 10266 ) ) AND `<table11>`.itemid IN ( SELECT `<table10>`.itemid FROM `<table10>` WHERE... | what was the daily minimum intake of po intake that patient 10266 had received since 01/2104? |
<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 prescriptions ON `<table2>`.hadm_id = prescriptions.hadm_id INNER JOIN lab ON `<table2>`.hadm_id = lab.hadm_id WHERE prescriptions.drug_type = "MAIN" AND lab.label = "Reticulocyte Count, Manual" | provide the number of patients on main type of drug prescription who had manual reticulocyte count.
|
<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 T2.Name, T1.Code FROM `<table0>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name | For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and the average of code , and group by attribute name, sort in ascending by the x axis. |
<table0>[semester] { <col0>[semester_id]:[int] } <table1>[course_tags_count] { <col0>[course_id]:[int] <col1>[clear_grading]:[int] <col2>[pop_quiz]:[int] <col3>[group_projects]:[int] <col4>[inspirational]:[int] <col5>[long_lectures]:[int] <col6>[extra_credit]:[int] <col7>[few_tests]:[int] <col8>[good_feedback]:[int] <... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND course.department = 'PHARMACY' AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'Wi... | Are there any upper-level PHARMACY classes being given this Winter ? |
<table0>[table_name_59] { <col0>[loss]:[VARCHAR] <col1>[record]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "3-10" | Who loss the game when the record was 3-10?
|
<table0>[instructor] { <col0>[instructor_id]:[int] <col1>[name]:[varchar] <col2>[uniqname]:[varchar] } <table1>[course_tags_count] { <col0>[course_id]:[int] <col1>[clear_grading]:[int] <col2>[pop_quiz]:[int] <col3>[group_projects]:[int] <col4>[inspirational]:[int] <col5>[long_lectures]:[int] <col6>[extra_credit]:[int]... | SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number BETWEEN 200 AND 200 + 100 AND semester.semester IN ( 'FA', 'WN' ) AND semester.semester_id = course_... | Are there any Fall or Winter classes available for the 200 -level ?
|
<table0>[table_203_359] { <col0>[number]:[outcome] <col1>[text]:[year] <col2>[number]:[championship] <col3>[text]:[surface] <col4>[text]:[opponent] <col5>[text]:[score] } | SELECT COUNT( * ) FROM `<table0>` WHERE "outcome" = 'runner-up' | how many times has he been runner up ?
|
<table0>[renewable_energy] { <col0>[country]:[VARCHAR] <col1>[255]:[project_name] <col2>[VARCHAR]:[255] <col3>[type]:[VARCHAR] <col4>[255]:[count] } | SELECT SUM( count ) FROM `<table0>` WHERE `<col0>` = 'Sweden' AND `<col3>` = 'renewable'; | What's the total number of renewable energy projects in Sweden? |
<table0>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table1>[VoteTypes] { <col0>[number]:[text] } <table2>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[Deletion... | SELECT Location, COUNT( * ) AS UserCount, SUM( Reputation ) AS TotalRep, CAST( SUM( Reputation ) AS FLOAT( 12, 3 ) ) / COUNT( * ) AS AvgRep FROM `<table8>` WHERE Location != '' GROUP BY Location HAVING COUNT( * ) >= 100 ORDER BY UserCount DESC, TotalRep DESC, AvgRep DESC LIMIT 1000 | Most commonly reported locations on user profiles.
|
<table0>[party] { <col0>[Party_ID]:[int] <col1>[Year]:[real] <col2>[Party]:[text] <col3>[Governor]:[text] <col4>[Lieutenant_Governor]:[text] <col5>[Comptroller]:[text] <col6>[Attorney_General]:[text] <col7>[US_Senate]:[text] } <table1>[county] { <col0>[County_Id]:[int] <col1>[County_name]:[text] <col2>[Population]:[re... | SELECT County_name, COUNT( * ) FROM `<table1>` AS T1 JOIN election AS T2 ON T1.County_Id = T2.District GROUP BY T1.County_Id | For each county, find the name of the county and the number of delegates from that county. Show bar chart. |
<table0>[table_203_36] { <col0>[number]:[parish] <col1>[text]:[locality] <col2>[text]:[parish] <col3>[priest]:[text] <col4>[founded]:[number] <col5>[closed]:[number] } | SELECT COUNT( "parish" ) FROM `<table0>` WHERE "parish priest" = 'fr frank thorpe' | how many parishes had fr frank thorpe as their parish priest ? |
<table0>[table_name_79] { <col0>[place]:[VARCHAR] <col1>[player]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "don whitt" | What place did Don Whitt finish? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.