schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table1>[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] } <table2>[d_icd_procedures] { <col0>... | SELECT t3.spec_type_desc FROM ( SELECT t2.spec_type_desc, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table3>`.charttime FROM `<table3>` JOIN admissions ON `<table3>`.hadm_id = admissions.hadm_id WHERE `<table3>`.icd9_code = ( SELECT `<table5>`.icd9_code FROM `<table5>` ... | what are the four most frequently ordered specimen test for patients who were diagnosed with fx facial bone nec-close previously within the same month, since 3 years ago?
|
<table0>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] <col6>[value]:[number] } <table1>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[admittim... | SELECT `<table7>`.short_title FROM `<table7>` WHERE `<table7>`.icd9_code IN ( SELECT `<table10>`.icd9_code FROM `<table10>` WHERE `<table10>`.hadm_id IN ( SELECT `<table1>`.hadm_id FROM `<table1>` WHERE `<table1>`.subject_id = 26398 ) AND DATETIME( `<table10>`.charttime ) >= DATETIME( CURRENT_TIME( ), '-1 year' ) ORDER... | since 1 year ago what was diagnosed with patient 26398 for the first time? |
<table0>[table_203_815] { <col0>[number]:[pick] <col1>[number]:[nfl] <col2>[team]:[text] <col3>[player]:[text] <col4>[position]:[text] <col5>[college]:[text] } | SELECT "player" FROM `<table0>` WHERE "pick #" = ( SELECT "pick #" FROM `<table0>` WHERE "player" = 'paul fanning' ) + 1 | who was the pick chosen after paul fanning ?
|
<table0>[marine_species] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[species_name] <col2>[VARCHAR]:[255] <col3>[conservation_status]:[VARCHAR] } | UPDATE marine_species SET conservation_status = 'Endangered' WHERE species_name = 'Green Sea Turtle'; | Update the conservation status of the Green Sea Turtle in the 'marine_species' table |
<table0>[table_name_15] { <col0>[station]:[VARCHAR] <col1>[height_above_sea_level__m]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE height_above_sea_level__m_ = "54m" AND "closed" = "closed" | Which station that sat 54m above seal level is now Closed? |
<table0>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table1>[area] { <col0>[course_id]:[int] } <table2>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } <table3>[student] { <col0>[student_id]:[int] <col1>[lastname]:[... | SELECT DISTINCT `<table7>`.`<table7>`, `<table7>`.year FROM course, course_offering, `<table7>` WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 560 AND course_offering.`<table7>` = `<table7>`.`<table7>`_id AND `<table7>`.`<table7>`_id > ( SELECT SEMESTERalias1.`<tab... | EECS 560 is offered when next time ? |
<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 t1.drug FROM ( SELECT `<table3>`.drug, COUNT( `<table3>`.startdate ) AS c1 FROM `<table3>` WHERE `<table3>`.hadm_id IN ( SELECT `<table11>`.hadm_id FROM `<table11>` WHERE `<table11>`.subject_id = 24029 ) AND DATETIME( `<table3>`.startdate, 'start of year' ) = DATETIME( CURRENT_TIME( ), 'start of year', '-1 year'... | what was the drug patient 24029 had been prescribed two or more times in 05/last year? |
<table0>[table_name_51] { <col0>[surface]:[VARCHAR] <col1>[opponent_in_the_final]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "wynne prakusya" | Which surface has wynne prakusya as the opponent in the final? |
<table0>[Companies] { <col0>[name]:[VARCHAR] <col1>[Market_Value_billion]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` ORDER BY `<col1>` DESC | List the names of companies in descending order of market value.
|
<table0>[table_name_59] { } | SELECT 2006 FROM `<table0>` WHERE 2013 = "4–4" | 2013 of 4 4 is involved in what 2006?
|
<table0>[table_24096813_15] { <col0>[part_number_s]:[VARCHAR] <col1>[tdp]:[VARCHAR] } | SELECT part_number_s_ FROM `<table0>` WHERE `<col1>` = "2.9 ( Max.4.1~5.4 ) W" | What's the part number of the model with TDP of 2.9 (max.4.1~5.4) w? |
<table0>[table_61607] { <col0>[Place]:[text] <col1>[Player]:[text] <col2>[Country]:[text] <col3>[Score]:[text] <col4>[par]:[text] } | SELECT "Score" FROM `<table0>` WHERE "Country" = 'australia' AND "Place" = 't1' | What is Australia's score where they were in place t1?
|
<table0>[Order_Items] { <col0>[order_item_id]:[INTEGER] <col1>[product_id]:[INTEGER] <col2>[order_id]:[INTEGER] <col3>[order_item_status]:[VARCHAR] <col4>[order_item_details]:[VARCHAR] } <table1>[Invoices] { <col0>[invoice_number]:[INTEGER] <col1>[invoice_date]:[DATETIME] <col2>[invoice_details]:[VARCHAR] } <table2>[... | SELECT T3.product_name, SUM( COUNT( * ) ) FROM `<table5>` AS T1 JOIN Order_Items AS T2 JOIN Products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_name | For each product, show its name and the number of times it was ordered. Show the proportion. |
<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 `<table3>`.dod FROM `<table3>` WHERE `<table3>`.subject_id = "66411" | what is date of death of subject id 66411?
|
<table0>[table_22457674_1] { <col0>[master_recording]:[VARCHAR] <col1>[artist]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Doobie Brothers The Doobie Brothers" | Name the number of master recording for doobie brothers the doobie brothers |
<table0>[table_30049462_5] { <col0>[score]:[VARCHAR] <col1>[team]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Philadelphia" | what is the score in the philadelphia team
|
<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 COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN procedures ON `<table3>`.hadm_id = procedures.hadm_id INNER JOIN lab ON `<table3>`.hadm_id = lab.hadm_id WHERE procedures.long_title = "Angiocardiography of right heart structures" AND lab.fluid = "Blood" | how many patients whose procedure long title is angiocardiography of right heart structures and lab test fluid is blood?
|
<table0>[table_67045] { <col0>[Ship]:[text] <col1>[Pennant]:[number] <col2>[text]:[Laid] <col3>[text]:[Launched] <col4>[text]:[Commissioned] } | SELECT "Ship" FROM `<table0>` WHERE "Pennant number" = 'h.69' | Which ship has a Pennant number of h.69?
|
<table0>[table_name_75] { <col0>[gross_tonnage]:[INTEGER] <col1>[ship]:[VARCHAR] <col2>[material]:[VARCHAR] <col3>[date_commissioned]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col2>` = "wood" AND `<col3>` > 1846 AND `<col1>` = "esk" | Name the sum of gross tonnage for wood on date more tahn 1846 for comissioned and ship of esk |
<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>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[numbe... | SELECT `<table1>`.dischtime FROM `<table1>` WHERE `<table1>`.subject_id = 19691 ORDER BY `<table1>`.dischtime LIMIT 1 | when was patient 19691 discharged for the first time from the hospital?
|
<table0>[table_name_73] { <col0>[news_freq]:[VARCHAR] <col1>[show_name]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "locker room" | What is the news frequency for the show Locker Room? |
<table0>[table_18064020_21] { <col0>[solo]:[VARCHAR] <col1>[name]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Jake Flaherty" | How many players named jake flaherty? |
<table0>[INT] { <col0>[name]:[TEXT] <col1>[location]:[TEXT] } <table1>[employee] { <col0>[INT]:[mine_id] <col1>[INT]:[name] <col2>[TEXT]:[diversity_group] <col3>[TEXT]:[join_date] <col4>[DATE]:[INSERT] <col5>[VALUES]:[Country] <col6>[INSERT]:[VALUES] <col7>[Country]:[INSERT] } | SELECT mine.name, diversity_group, COUNT( employee.id ) AS total_count, COUNT( DISTINCT employee.join_date ) AS unique_dates FROM mine INNER JOIN employee ON mine.id = employee.mine_id GROUP BY mine.name, employee.diversity_group; | Show the change in workforce diversity in each mine over time |
<table0>[table_203_646] { <col0>[number]:[year] <col1>[number]:[competition] <col2>[text]:[venue] <col3>[text]:[position] <col4>[text]:[notes] } | SELECT "competition" FROM `<table0>` WHERE "position" = 1 | what was the only competition kazakhstan had a position of 1st ?
|
<table0>[table_name_46] { <col0>[february]:[VARCHAR] <col1>[record]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "21-29-11" | What is February, when Record is "21-29-11"? |
<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, COUNT( * ) FROM `<table5>` WHERE `<col4>` = 'Ph.D.' GROUP BY `<col1>` ORDER BY COUNT( * ) | A bar chart about how many professors have a PhD in each department?, and I want to display by the Y from low to high. |
<table0>[table_name_95] { <col0>[place]:[INTEGER] <col1>[language]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "croatian" | what is the lowest place when the language is croatian? |
<table0>[table_name_72] { <col0>[rank_points]:[VARCHAR] <col1>[total]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "11" | What were the rank points when the total was 11? |
<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 `<table2>`.subject_id ) FROM `<table2>` INNER JOIN prescriptions ON `<table2>`.hadm_id = prescriptions.hadm_id WHERE `<table2>`.expire_flag = "0" AND prescriptions.drug = "Fluconazole" | Provide the number of patients that survived and had a drug named fluconazole. |
<table0>[table_25597136_1] { <col0>[focal_plane_in_ft__m]:[VARCHAR] <col1>[tower_height_in_ft__m]:[VARCHAR] } | SELECT focal_plane_in_ft__m_ FROM `<table0>` WHERE tower_height_in_ft__m_ = "46ft ( 14.0m )" | Where tower height in ft (m) is 46ft (14.0m) the focal plane is ft (m). |
<table0>[record] { <col0>[int]:[Result] <col1>[text]:[Swimmer_ID] <col2>[int]:[Event_ID] } <table1>[stadium] { <col0>[int]:[name] <col1>[text]:[Capacity] <col2>[int]:[City] <col3>[text]:[Country] <col4>[text]:[Opening_year] } <table2>[event] { <col0>[int]:[text] <col1>[Stadium_ID]:[int] <col2>[Year]:[text] } <table3... | SELECT meter_200, AVG( meter_100 ) FROM `<table3>` GROUP BY meter_200 ORDER BY AVG( meter_100 ) DESC | Find meter_200 and the average of meter_100 , and group by attribute meter_200, and visualize them by a bar chart, and list mean meter 100 from high to low order.
|
<table0>[marine_species] { <col0>[name]:[VARCHAR] <col1>[255]:[conservation_status] <col2>[VARCHAR]:[ocean] <col3>[VARCHAR]:[INSERT] } | SELECT COUNT( * ) FROM `<table0>` WHERE conservation_status = 'Vulnerable' AND ocean = 'Pacific'; | Identify the number of marine species in the Pacific Ocean with a vulnerable conservation status.' |
<table0>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table1>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number... | SELECT COUNT( * ) > 0 FROM `<table7>` WHERE `<table7>`.`<table5>`unitstayid IN ( SELECT `<table5>`.`<table5>`unitstayid FROM `<table5>` WHERE `<table5>`.`<table5>`healthsystemstayid IN ( SELECT `<table5>`.`<table5>`healthsystemstayid FROM `<table5>` WHERE `<table5>`.uniquepid = '012-40970' ) ) AND `<table7>`.respiratio... | have patient 012-40970's been normal until 56 months ago in respiration? |
<table0>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[ReviewTaskStateId] <col4>[number]:[PostId] <col5>[number]:[SuggestedEditId] <col6>[number]:[CompletedByReviewTaskId] } <table1>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNo... | SELECT Id, * FROM `<table2>` AS Question WHERE Tags LIKE '%<ruby-on-rails>%' ORDER BY Score DESC LIMIT 150 | Most voted questions tagged with iPhone. |
<table0>[countries] { <col0>[INT]:[name] <col1>[VARCHAR]:[INSERT] } <table1>[post_metrics] { <col0>[INT]:[post_id] <col1>[INT]:[user_id] <col2>[INT]:[likes] <col3>[INT]:[comments] <col4>[INT]:[country_id] } | SELECT c.name AS country, SUM( pml.likes ) + SUM( pml.comments ) AS total_engagement FROM `<table1>` pml JOIN countries c ON pml.country_id = c.id GROUP BY c.name ORDER BY total_engagement DESC LIMIT 3; | Identify the top 3 countries with the most user engagement in the form of likes and comments in the social_media schema. |
<table0>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <col7>[number]:[ApprovedByUserId] <col8>[number]:[ApprovalDate] } <table1>[PostsWithDeleted] {... | SELECT DisplayName, Id, Location, Reputation FROM `<table27>` WHERE Reputation >= 550000 | SELECT DisplayName, Id, Location, Reputation FROM Users. |
<table0>[table_name_32] { <col0>[finish]:[VARCHAR] <col1>[race]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "kentucky derby" | What was the finish of the Kentucky Derby? |
<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 SUM( CASE WHEN CAST( REPLACE( trim( inflation_adjusted_gross, '$' ), ',', '' ) AS REAL ) > 1236035515 THEN CAST( REPLACE( trim( inflation_adjusted_gross, '$' ), ',', '' ) AS REAL ) ELSE 0 END ) * 100 / SUM( CAST( REPLACE( trim( inflation_adjusted_gross, '$' ), ',', '' ) AS REAL ) ) FROM `<table2>` | Name the top 5 highest-grossing Disney movies adjusted for inflation. Identify the percentage they contributed to the total of Disney's current gross. |
<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>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id INNER JOIN lab ON `<table2>`.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Hyperacusis" AND lab."CATEGORY" = "Blood Gas" | What number of patients diagnosed with hyperacusis had a lab test for blood gas?
|
<table0>[table_7230] { <col0>[text]:[text] <col1>[text]:[text] <col2>[text]:[text] } | SELECT "8:30" FROM `<table0>` WHERE "8:00" = 'million dollar password' | What is on at 8:30 when million dollar password is on at 8:00?
|
<table0>[table_name_32] { <col0>[round]:[VARCHAR] <col1>[home_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "pohang steelers" | What round did the home team Pohang Steelers play?
|
<table0>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[startdate]:[time] <col4>[enddate]:[time] <col5>[drug]:[text] <col6>[dose_val_rx]:[text] <col7>[dose_unit_rx]:[text] <col8>[route]:[text] } <table1>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:... | SELECT `<table12>`.short_title FROM `<table12>` WHERE `<table12>`.icd9_code IN ( SELECT t3.icd9_code FROM ( SELECT t2.icd9_code, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table10>`.charttime FROM `<table10>` JOIN admissions ON `<table10>`.hadm_id = admissions.hadm_id W... | since 2103 what are the top four most frequent diagnoses that patients were given within the same month after being diagnosed with resp obstr-inhal obj nec?
|
<table0>[table_25644] { <col0>[Model]:[number] <col1>[text]:[sSpec] <col2>[number]:[text] <col3>[Frequency]:[text] <col4>[Turbo]:[text] <col5>[GPU]:[frequency] <col6>[text]:[Cores] <col7>[real]:[cache] <col8>[text]:[cache] <col9>[text]:[bus] <col10>[text]:[Mult] <col11>[text]:[Memory] <col12>[text]:[Voltage] <col13>[te... | SELECT COUNT( "Frequency" ) FROM `<table0>` WHERE "Model number" = 'Core i5-655K' | How many frequencies have a model number of core i5-655k?
|
<table0>[table_name_12] { <col0>[decision]:[VARCHAR] <col1>[home]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "montreal" | What was the decision when montreal was at home? |
<table0>[table_name_59] { <col0>[representative]:[VARCHAR] <col1>[termination_of_mission]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "mar 25, 1976" | Which representative has a Termination of MIssion date Mar 25, 1976? |
<table0>[table_name_86] { <col0>[points]:[VARCHAR] <col1>[points_for]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "points for" | when points for was points for what was the points? |
<table0>[rd_expenditure_3] { <col0>[dept]:[TEXT] <col1>[year]:[INT] <col2>[FLOAT]:[INSERT] } | SELECT SUM( amount ) AS total_rd_expenditure FROM `<table0>` WHERE `<col0>` = 'Neurology' AND `<col1>` = 2019; | What is the total R&D expenditure for the neurology department for the year 2019? |
<table0>[Customers] { <col0>[CustomerID]:[integer] <col1>[Customer]:[Names] } <table1>[Products] { <col0>[ProductID]:[integer] <col1>[Product]:[text] } <table2>[Regions] { <col0>[StateCode]:[text] <col1>[State]:[text] <col2>[Region]:[text] } <table3>[Sales] { <col0>[Team]:[SalesTeamID] } <table4>[Store] { <col0>[Lo... | SELECT SUM( CASE WHEN T1.`Product Name` = 'Candles' THEN T2.`Order Quantity` ELSE 0 END ), CAST( SUM( CASE WHEN T1.`Product Name` = 'Candles' THEN T2.`Order Quantity` ELSE 0 END ) AS REAL ) * 100 / SUM( T2.`Order Quantity` ) FROM `<table1>` AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID INNER JOI... | Please indicate total order quantity of product Candles and calculate the percentage of such product among all the orders. |
<table0>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[startdate]:[time] <col4>[enddate]:[time] <col5>[drug]:[text] <col6>[dose_val_... | SELECT t3.drug FROM ( SELECT t2.drug, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table5>`.charttime FROM `<table5>` JOIN admissions ON `<table5>`.hadm_id = admissions.hadm_id WHERE `<table5>`.icd9_code = ( SELECT `<table0>`.icd9_code FROM `<table0>` WHERE `<table0>`.sho... | what are the four most common drugs that were prescribed to the male patients of the 60 or above during the same month after they were diagnosed with psoriatic arthropathy the last year? |
<table0>[body_builder] { <col0>[Body_Builder_ID]:[int] <col1>[People_ID]:[int] <col2>[Snatch]:[real] <col3>[Clean_Jerk]:[real] <col4>[Total]:[real] } <table1>[people] { <col0>[People_ID]:[int] <col1>[text]:[Height] <col2>[real]:[Weight] <col3>[real]:[Birth_Date] <col4>[text]:[Birth_Place] } | SELECT Height, Weight FROM `<table1>` | List the height and weight of people in descending order of height. Show scatter chart.
|
<table0>[Detention] { <col0>[detention_id]:[INTEGER] <col1>[detention_type_code]:[VARCHAR] <col2>[teacher_id]:[INTEGER] <col3>[datetime_detention_start]:[DATETIME] <col4>[datetime_detention_end]:[DATETIME] <col5>[detention_summary]:[VARCHAR] <col6>[255]:[other_details] <col7>[VARCHAR]:[255] } <table1>[Addresses] { <co... | SELECT date_of_notes, COUNT( `<col3>` ) FROM `<table9>` ORDER BY COUNT( `<col3>` ) | What are the dates of the assessment notes, and count them by a bar chart, display y axis from low to high order. |
<table0>[Employees] { <col0>[EmployeeID]:[INT] <col1>[Gender]:[VARCHAR] <col2>[Department]:[VARCHAR] } | SELECT ( COUNT( * ) / ( SELECT COUNT( * ) FROM `<table0>` WHERE `<col2>` = 'Finance' ) ) * 100 FROM `<table0>` WHERE `<col2>` = 'Finance' AND `<col1>` = 'Indigenous'; | What is the percentage of employees who identify as Indigenous in the Finance department? |
<table0>[table_51107] { <col0>[Rider]:[text] <col1>[Manufacturer]:[text] <col2>[Laps]:[real] <col3>[Time]:[text] <col4>[Grid]:[real] } | SELECT AVG( "Grid" ) FROM `<table0>` WHERE "Manufacturer" = 'aprilia' AND "Rider" = 'bradley smith' | Count the Grid which has a Manufacturer of aprilia, and a Rider of bradley smith?
|
<table0>[table_45583] { <col0>[State]:[text] <col1>[Type]:[text] <col2>[text]:[Title] <col3>[text]:[Royal] <col4>[house]:[text] } | SELECT "From" FROM `<table0>` WHERE "Name" = 'zhong' | What year is Zhong from?
|
<table0>[table_name_25] { <col0>[score_in_the_final]:[VARCHAR] <col1>[opponent_in_the_final]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "alberto berasategui" | What is the score of the match that was against alberto berasategui? |
<table0>[table_name_74] { <col0>[away_team]:[VARCHAR] <col1>[home_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "richmond" | I want to see the away team the has a home team of richmond |
<table0>[faculty] { <col0>[faculty_id]:[INT] <col1>[name]:[TEXT] <col2>[department]:[TEXT] } <table1>[publications] { <col0>[paper_id]:[INT] <col1>[faculty_id]:[INT] <col2>[title]:[TEXT] } | SELECT `<table0>`.name, `<table0>`.department FROM `<table0>` LEFT JOIN publications ON `<table0>`.`<table0>`_id = publications.`<table0>`_id WHERE publications.`<table0>`_id IS NULL; | What is the name and department of all faculty members who have not published any papers? |
<table0>[table_204_547] { <col0>[number]:[rank] <col1>[number]:[lane] <col2>[number]:[name] <col3>[text]:[nationality] <col4>[text]:[time] <col5>[number]:[notes] } | SELECT "nationality" FROM `<table0>` WHERE "nationality" IN ( 'iceland', 'finland' ) ORDER BY "time" LIMIT 1 | who was the fastest , iceland or finland ?
|
<table0>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] <col5>[et... | SELECT `<table9>`.`<table9>`time FROM `<table9>` WHERE `<table9>`.`<table1>`unitstayid IN ( SELECT `<table1>`.`<table1>`unitstayid FROM `<table1>` WHERE `<table1>`.`<table1>`healthsystemstayid IN ( SELECT `<table1>`.`<table1>`healthsystemstayid FROM `<table1>` WHERE `<table1>`.uniquepid = '002-21509' ) ) AND `<table9>`... | when was the first time patient 002-21509 was until 4 years ago diagnosed with hyperglycemia?
|
<table0>[dual_carrier] { <col0>[main_airline]:[varchar] <col1>[low_flight_number]:[int] <col2>[high_flight_number]:[int] <col3>[dual_airline]:[varchar] <col4>[service_name]:[text] } <table1>[ground_service] { <col0>[city_code]:[text] <col1>[airport_code]:[text] <col2>[transport_type]:[text] <col3>[ground_fare]:[int] ... | SELECT DISTINCT flight.flight_id FROM `<table4>` AS AIRPORT_SERVICE_0, `<table4>` 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 = 'WASHINGTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND f... | i would like information on flights leaving from WASHINGTON to DENVER
|
<table0>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[startdate]:[time] <col4>[enddate]:[time] <col5>[drug]:[text] <col6>[dose_val_rx]:[text] <col7>[dose_unit_rx]:[text] <col8>[route]:[text] } <table1>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[numbe... | SELECT 24 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table1>`.intime ) ) FROM `<table1>` WHERE `<table1>`.hadm_id IN ( SELECT `<table7>`.hadm_id FROM `<table7>` WHERE `<table7>`.subject_id = 80555 ) AND `<table1>`.outtime IS NULL | how many hours has passed since patient 80555 was admitted to the intensive care unit?
|
<table0>[defense_projects] { <col0>[INT]:[project_name] <col1>[VARCHAR]:[start_date] <col2>[DATE]:[end_date] <col3>[DATE]:[INSERT] } | SELECT project_name FROM `<table0>` WHERE start_date < '2020-01-01' AND end_date IS NULL; | Identify defense projects that started before 2020 and have not been completed yet. |
<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 lab ON `<table1>`.hadm_id = lab.hadm_id WHERE `<table1>`.dob_year < "2056" AND lab.fluid = "Cerebrospinal Fluid ( CSF )" | Tell me the number of patients born before 2056 who had a cerebrospinal fluid lab test done.
|
<table0>[table_name_13] { <col0>[record]:[VARCHAR] <col1>[game]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "45" | What was the record after game 45? |
<table0>[MiningOperations] { <col0>[OperationID]:[INT] <col1>[OperationName]:[VARCHAR] <col2>[Location]:[VARCHAR] <col3>[ResourcesExtracted]:[INT] <col4>[OperationDate]:[DATE] } | SELECT OperationName, `<col3>` FROM `<table0>` WHERE ROW_NUMBER( ) OVER( ORDER BY `<col3>` DESC ) <= 3; | What are the top three mining operations with the highest resource extraction? |
<table0>[table_34642] { <col0>[Year]:[text] <col1>[Venue]:[text] <col2>[Winner]:[text] <col3>[Country]:[text] <col4>[Score]:[text] <col5>[Runner]:[text] } | SELECT "Runner-up" FROM `<table0>` WHERE "Venue" = 'minikahda club' | Who was the runner-up of the competition played at Minikahda Club?
|
<table0>[table_name_75] { <col0>[passengers]:[INTEGER] <col1>[airport]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "dallas/fort worth international ( dfw )" | What is the least passengers from the Dallas/Fort Worth International (DFW) airport? |
<table0>[historical_artifacts] { <col0>[artifact_id]:[INT] <col1>[artifact_name]:[VARCHAR] <col2>[year_made]:[INT] <col3>[origin_country]:[VARCHAR] <col4>[description]:[TEXT] } | DROP TABLE historical_artifacts; | Drop the "historical_artifacts" table from the database. |
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN procedures ON `<table1>`.hadm_id = procedures.hadm_id WHERE `<table1>`.days_stay > "43" AND procedures.short_title = "Aortocor bypas-2 cor art" | How many patients stayed in hospital for more than 43 days and diagnosed for aortocor bypas-2 cor art? |
<table0>[Allergy_Type] { <col0>[Allergy]:[VARCHAR] <col1>[AllergyType]:[VARCHAR] } <table1>[Has_Allergy] { <col0>[StuID]:[INTEGER] <col1>[Allergy]:[VARCHAR] } <table2>[Student] { <col0>[StuID]:[INTEGER] <col1>[LName]:[VARCHAR] <col2>[Fname]:[VARCHAR] <col3>[Age]:[INTEGER] <col4>[Sex]:[VARCHAR] <col5>[Major]:[INTEGER]... | SELECT Allergy, COUNT( * ) FROM `<table1>` GROUP BY `<col1>` ORDER BY `<col1>` DESC | How many students have each different allergy Show bar chart, and I want to order X in desc order please. |
<table0>[table_train_243] { <col0>[int]:[c_peptide_level] <col1>[float]:[finger_stick_measurements] <col2>[bool]:[diabetic] <col3>[string]:[fasting_blood_glucose_fbg] <col4>[float]:[hypoglycemia] <col5>[bool]:[insulin_requirement] <col6>[float]:[triglyceride_tg] <col7>[float]:[a1c] <col8>[float]:[age] <col9>[float]:[NO... | SELECT * FROM `<table0>` WHERE insulin_requirement = 1 AND diabetic = 'ii' AND c_peptide_level < 0.8 AND fasting_blood_glucose_fbg > 150 AND ( hypoglycemia = 0 AND finger_stick_measurements = 0 ) | safety substudy in 20 iddm patients only: insulin _ treated type ii diabetics with a c _ peptide of < 0.8 ng / mld and fasting blood glucose > 150 mg / dl will be excluded even without history of hypoglycemia during finger stick measurements. |
<table0>[table_203_613] { <col0>[number]:[formula] <col1>[text]:[color] <col2>[text]:[symmetry] <col3>[text]:[space] <col4>[group]:[text] <col5>[number]:[pearson] <col6>[symbol]:[text] <col7>[number]:[number] <col8>[number]:[number] <col9>[density]:[cm3] } | SELECT SUM( "density, g/cm3" ) FROM `<table0>` WHERE "formula" IN ( 'pao', 'pao2' ) | what is the total combined density of pao and pao2 ?
|
<table0>[table_name_81] { <col0>[date]:[VARCHAR] <col1>[opponents]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "sheffield wednesday" | Opponents of sheffield wednesday had what date? |
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[prescr... | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN procedures ON `<table4>`.hadm_id = procedures.hadm_id WHERE `<table4>`.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND procedures.short_title = "Cystoscopy NEC" | count the number of patients whose ethnicity is hispanic/latino - puerto rican and procedure short title is cystoscopy nec? |
<table0>[table_name_92] { <col0>[attendance]:[INTEGER] <col1>[date]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "september 28" | What was the attendance on September 28? |
<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 Founder, COUNT( Founder ) FROM `<table1>` 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, visualize a bar chart about the distribution of founder and the amount of founder , and group by attribute founder. |
<table0>[departments] { <col0>[department_id]:[number] <col1>[department_name]:[text] <col2>[manager_id]:[number] <col3>[location_id]:[number] } <table1>[job_history] { <col0>[employee_id]:[number] <col1>[start_date]:[time] <col2>[end_date]:[time] <col3>[job_id]:[text] <col4>[department_id]:[number] } <table2>[countr... | SELECT first_name, `<col2>` FROM `<table3>` WHERE `<col7>` > ( SELECT `<col7>` FROM `<table3>` WHERE `<col0>` = 163 ) | Provide the full names of employees earning more than the employee with id 163. |
<table0>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table1>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden... | SELECT `<table21>`.Id, `<table21>`.Title, `<table21>`.Tags, `<table21>`.AcceptedAnswerId, `<table21>`.Score, `<table21>`.ViewCount, `<table21>`.AnswerCount, `<table21>`.CommentCount FROM `<table21>` INNER JOIN PostTags AS pt ON `<table21>`.Id = Pt.PostId INNER JOIN Tags AS t ON pt.TagId = t.Id WHERE t.TagName = 'google... | Google Map Questions and Answer Statistics.
|
<table0>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <col7>[number]:[ApprovedByUserId] <col8>[number]:[ApprovalDate] } <table1>[PendingFlags] { <co... | SELECT `<table2>`.Id AS "post_link", `<table2>`.Title, `<table2>`.ViewCount AS Views FROM `<table2>` ORDER BY `<table2>`.ViewCount DESC LIMIT 100 | Ranking of questions by views.
|
<table0>[table_19015] { <col0>[Rank]:[real] <col1>[Airport]:[text] <col2>[Total]:[Passengers] <col3>[2008]:[real] <col4>[Total]:[Passengers] <col5>[2009]:[real] <col6>[Change]:[2008] <col7>[text]:[Aircraft] <col8>[movements]:[2009] } | SELECT "Airport" FROM `<table0>` WHERE "Aircraft `<col8>` 2009" < '238223.1659471435' AND "Change 2008/09" = '0.5%' | what's the airport with aircraft movements 2009 being smaller than 238223.1659471435 and change 2008/09 being 0.5% |
<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 All_Road, `<col1>` FROM `<table0>` | Draw a bar chart about the distribution of All_Road and School_ID . |
<table0>[table_name_97] { <col0>[position]:[INTEGER] <col1>[speed]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "143.5km/h" | What is the average Position, when Speed is "143.5km/h"? |
<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>[prescr... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.discharge_location = "LONG TERM CARE HOSPITAL" AND `<table3>`.dob_year < "2058" | how many patients discharged to long term care hospital were born before 2058?
|
<table0>[donors] { <col0>[donor_id]:[INT] <col1>[donation_amount]:[DECIMAL] <col2>[last_name]:[VARCHAR] } | SELECT SUM( `<col1>` ) FROM `<table0>` WHERE `<col2>` = 'Garcia'; | What is the total amount donated by donors with the last name 'Garcia'? |
<table0>[table_35425] { <col0>[Round]:[real] <col1>[Overall]:[real] <col2>[Player]:[text] <col3>[Position]:[text] <col4>[College]:[text] } | SELECT "Position" FROM `<table0>` WHERE "Round" > '1' AND "Player" = 'jafus white' | What position was Jafus White who was picked after round 1?
|
<table0>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table1>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heartrate]:[number] <... | SELECT COUNT( DISTINCT `<table7>`.uniquepid ) FROM `<table7>` WHERE `<table7>`.`<table7>`unitstayid IN ( SELECT `<table3>`.`<table7>`unitstayid FROM `<table3>` WHERE `<table3>`.drugname = 'vancomycin consult to pharmacy' ) | calculate the number of patients who have been prescribed vancomycin consult to pharmacy.
|
<table0>[table_204_971] { <col0>[number]:[number] <col1>[date]:[text] <col2>[tournament]:[text] <col3>[round]:[text] <col4>[ground]:[text] <col5>[opponent]:[text] <col6>[score]:[text] <col7>[attendance]:[number] <col8>[dinamo]:[scorers] <col9>[text]:[report] } | SELECT SUM( "attendance" ) FROM `<table0>` WHERE "date" = 2 | what was the total attendance in the month of february ? |
<table0>[news_articles] { <col0>[INT]:[title] <col1>[VARCHAR]:[100] <col2>[section]:[VARCHAR] <col3>[publication_date]:[DATE] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col2>` = 'culture' AND `<col3>` >= DATE_SUB( CURDATE( ), INTERVAL 1 MONTH ); | How many news articles were published in the 'culture' section in the last month? |
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN procedures ON `<table3>`.hadm_id = procedures.hadm_id WHERE `<table3>`.ethnicity = "BLACK/AFRICAN AMERICAN" AND procedures.short_title = "Pericardiocentesis" | how many patients with black/african american ethnicity are diagnosed with pericardiocentesis?
|
<table0>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table1>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmentt... | SELECT t3.`<table6>`name FROM ( SELECT t2.`<table6>`name, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT patient.uniquepid, `<table1>`.`<table1>`time, patient.patienthealthsystemstayid FROM `<table1>` JOIN patient ON `<table1>`.patientunitstayid = patient.patientunitstayid WHERE `<table1>`.`<table1... | what were the three most frequently ordered laboratory tests for patients who received ultrafiltration (fluid removal only) previously during the same hospital visit in 2105?
|
<table0>[table_name_64] { <col0>[away_team]:[VARCHAR] <col1>[venue]:[VARCHAR] } | SELECT `<col0>` AS score FROM `<table0>` WHERE `<col1>` = "victoria park" | What did the Away team score in their game at Victoria Park? |
<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 DATE( CreationDate ) AS post_date, Tags, SUM( Score ) AS score_sum, SUM( ViewCount ) AS views, SUM( AnswerCount ) AS answers, SUM( FavoriteCount ) AS favorites, SUM( CommentCount ) AS comments, COUNT( 1 ) AS usage_cnt FROM `<table0>` WHERE Tags IN ( '<r>', '<python>', '<java>', '<scala>', '<ruby>', '<c>', '<c++>... | Stats for tags per days #1.
|
<table0>[micro_mobility] { <col0>[INT]:[vehicle_type] <col1>[VARCHAR]:[quantity] <col2>[INT]:[INSERT] } | SELECT SUM( quantity ) FROM `<table0>` WHERE vehicle_type = 'ebike'; | What is the total number of electric bikes in the micro_mobility table? |
<table0>[table_name_75] { <col0>[delegates]:[INTEGER] <col1>[candidate]:[VARCHAR] <col2>[counties]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "john mccain" AND `<col2>` < 45 | What is the lowest number of delegates when John McCain was the candidate with less than 45 candidates?
|
<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>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[n... | SELECT `<table10>`.charttime FROM `<table10>` WHERE `<table10>`.itemid IN ( SELECT `<table9>`.itemid FROM `<table9>` WHERE `<table9>`.label = 'potassium' ) AND `<table10>`.hadm_id IN ( SELECT `<table15>`.hadm_id FROM `<table15>` WHERE `<table15>`.subject_id = 3516 ) AND STRFTIME( '%y-%m', `<table10>`.charttime ) >= '21... | when did patient 3516 first receive a lab test for potassium since 04/2103?
|
<table0>[table_name_34] { <col0>[erp___power_w]:[VARCHAR] <col1>[frequency]:[VARCHAR] <col2>[facility_id]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "89.3 fm" AND `<col2>` < 40430 | Name the total number of ERP/Power W for frequency of 89.3 fm and facility ID less than 40430
|
<table0>[table_27721131_10] { <col0>[high_rebounds]:[VARCHAR] <col1>[high_points]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Jordan Crawford ( 27 )" | Who got high rebounds when Jordan Crawford (27) got high points?
|
<table0>[table_name_67] { <col0>[quantity_made]:[VARCHAR] <col1>[class]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "waterford" | What is the quantity made of the locomotive with a Waterford class?
|
<table0>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table1>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varcha... | SELECT JOB_ID, SUM( `<col9>` ) FROM `<table4>` WHERE NOT `<col0>` IN ( SELECT `<col0>` FROM `<table3>` ) GROUP BY `<col6>` ORDER BY SUM( `<col9>` ) DESC | For those employees who did not have any job in the past, draw a bar chart about the distribution of job_id and the sum of manager_id , and group by attribute job_id, and order in descending by the y axis please.
|
<table0>[table_name_50] { <col0>[year]:[INTEGER] <col1>[actor]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "marianne jean-baptiste" | What is the latest Year with Marianne Jean-Baptiste as the Golden Globe Actor?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.