schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[table_name_92] { <col0>[record]:[VARCHAR] <col1>[home]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "ny rangers" | What is the record for the NY Rangers?
|
<table0>[table_name_7] { <col0>[category]:[VARCHAR] <col1>[award]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "2nd melon music awards" | Name the category for 2nd melon music awards |
<table0>[table_1160660_1] { <col0>[acronym]:[VARCHAR] <col1>[website]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "ul.edu.lb" | What is the acronym for the school whose website is ul.edu.lb |
<table0>[table_75051] { <col0>[Date]:[text] <col1>[Result]:[text] <col2>[Score]:[text] <col3>[Brazil]:[scorers] <col4>[text]:[Competition] } | SELECT "Competition" FROM `<table0>` WHERE "Result" = 'w' AND "Date" = 'june 30, 1966' | What competition has a result of W on June 30, 1966?
|
<table0>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] <col5>[ethnicity]:[text] <col6>[hospitalid]:[number] <col7>[wardid]:[number] <col8>[admissionheight]:[number] <col9>[admissionweight]:[number] <col10>[disch... | SELECT `<table6>`.`<table6>`name FROM `<table6>` WHERE `<table6>`.`<table0>`unitstayid IN ( SELECT `<table0>`.`<table0>`unitstayid FROM `<table0>` WHERE `<table0>`.`<table0>`healthsystemstayid IN ( SELECT `<table0>`.`<table0>`healthsystemstayid FROM `<table0>` WHERE `<table0>`.uniquepid = '025-53538' ) ) AND DATETIME( ... | what was the name of the laboratory test that patient 025-53538 has received for the last time last month?
|
<table0>[table_name_28] { <col0>[score]:[VARCHAR] <col1>[record]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "15–12–2" | Which Score has a Record of 15 12 2? |
<table0>[table_name_33] { <col0>[format]:[VARCHAR] <col1>[country]:[VARCHAR] <col2>[label]:[VARCHAR] <col3>[catalogue_number_s]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "eagle eye media" AND catalogue_number_s_ = "—" AND `<col1>` = "united states" | Which Format has a Label of eagle eye media, a Catalogue number(s) of , and a Country of united states? |
<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 COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN prescriptions ON `<table3>`.hadm_id = prescriptions.hadm_id WHERE `<table3>`.gender = "M" AND prescriptions.drug = "Fentanyl Citrate" | what number of male patients have been given fentanyl citrate? |
<table0>[cars] { <col0>[integer]:[train_id] <col1>[integer]:[position] <col2>[integer]:[shape] <col3>[text]:[len] <col4>[text]:[sides] <col5>[text]:[roof] <col6>[text]:[wheels] <col7>[integer]:[load_shape] <col8>[text]:[load_num] } <table1>[trains] { <col0>[integer]:[direction] } | SELECT T1.direction FROM `<table1>` AS T1 INNER JOIN ( SELECT train_id, MAX( position ) AS trailPosi FROM `<table0>` GROUP BY train_id ) AS T2 ON T1.id = T2.train_id WHERE T2.trailPosi <= 2 | Provide the directions for all the trains that have 2 or less cars. |
<table0>[table_name_33] { <col0>[date_released]:[VARCHAR] <col1>[number_of_discs]:[INTEGER] } | SELECT `<col0>` FROM `<table0>` WHERE _number_of_discs > 4 | What Date Released, when # Of Discs is greater than 4? |
<table0>[table_name_8] { <col0>[sideline_reporter_s]:[VARCHAR] <col1>[year]:[INTEGER] } | SELECT sideline_reporter_s_ FROM `<table0>` WHERE `<col1>` < 1993 | Who was the sideline reporter prior to 1993?
|
<table0>[requirement] { <col0>[requirement_id]:[int] } <table1>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <table2>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table3>[gsi] { <col0>[course_offering_id]... | SELECT DISTINCT `<table14>`.department, `<table14>`.name, `<table14>`.number, program_`<table14>`.workload FROM `<table14>` INNER JOIN program_`<table14>` WHERE ( ( `<table14>`.number < 400 + 100 AND `<table14>`.number >= 400 ) OR ( `<table14>`.number < 500 + 100 AND `<table14>`.number >= 500 ) ) AND `<table14>`.depart... | Are there more 400 / 500 -level RACKHAM classes with less workloads ?
|
<table0>[table_name_3] { <col0>[lost]:[INTEGER] <col1>[points_difference]:[VARCHAR] <col2>[games]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "40 - 17" AND `<col2>` > 6 | What is the lowest number of games loss with a Points difference of 40 - 17, and over 6 games? |
<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>`.days_stay, `<table1>`.expire_flag FROM `<table1>` WHERE `<table1>`.name = "Paul Dunn" | let me know the death status and days for which patient paul dunn was hospitalized.
|
<table0>[table_19618] { <col0>[DVD]:[name] <col1>[text]:[Episodes] <col2>[real]:[Region] <col3>[text]:[Region] <col4>[text]:[Region] <col5>[text]:[Region] } | SELECT MIN( "Episodes" ) FROM `<table0>` WHERE "DVD name" = 'Season 1' | How many episodes were released in the season 1 DVD?
|
<table0>[requirement] { <col0>[requirement_id]:[int] } <table1>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table2>[student] { <col0>[student_id]:[int] <col1>[lastname]:[varchar] <col2>[firstname]:[varchar] <col3>[program_id]:... | SELECT DISTINCT `<table15>`.department, `<table15>`.name, `<table15>`.number, semester.semester FROM `<table15>` INNER JOIN area ON `<table15>`.`<table15>`_id = area.`<table15>`_id INNER JOIN `<table15>`_offering ON `<table15>`.`<table15>`_id = `<table15>`_offering.`<table15>`_id INNER JOIN semester ON semester.semeste... | Tell me what theory courses are available , for Spring or Summer 2006 .
|
<table0>[cinema] { <col0>[Cinema_ID]:[int] <col1>[text]:[Openning_year] <col2>[int]:[Capacity] <col3>[int]:[Location] } <table1>[schedule] { <col0>[Cinema_ID]:[int] <col1>[Film_ID]:[int] <col2>[Date]:[text] <col3>[Show_times_per_day]:[int] <col4>[Price]:[float] } <table2>[film] { <col0>[Film_ID]:[int] <col1>[Rank_in_... | SELECT Name, AVG( `<col4>` ) FROM `<table1>` AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID JOIN cinema AS T3 ON T1.Cinema_ID = T3.Cinema_ID GROUP BY Name | A bar chart showing the average price of each cinema. |
<table0>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table2>[patients] { <col0>[ro... | SELECT `<table15>`.short_title FROM `<table15>` WHERE `<table15>`.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, `<table14>`.charttime FROM `<table14>` JOIN admissions ON `<table14>`.hadm_id = admissions.hadm_id W... | what are the top four most frequent procedures given to patients in the same month after the diagnosis of hypotension nec this year?
|
<table0>[table_name_45] { <col0>[team]:[VARCHAR] <col1>[year]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 2000 | Which Team has a Year of 2000?
|
<table0>[table_204_188] { <col0>[number]:[rank] <col1>[number]:[player] <col2>[text]:[points] <col3>[number]:[points] <col4>[defending]:[number] <col5>[points]:[won] <col6>[number]:[new] <col7>[points]:[number] <col8>[withdrew]:[text] } | SELECT COUNT( "player" ) FROM `<table0>` WHERE "new points" > 2000 | how many players had more than 2000 new points ? |
<table0>[table_name_15] { <col0>[date]:[VARCHAR] <col1>[year]:[VARCHAR] <col2>[location]:[VARCHAR] <col3>[result]:[VARCHAR] <col4>[competition]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col3>` = "loss" AND `<col4>` = "europe/africa group i, round robin" AND `<col2>` = "murcia ( esp )" AND `<col1>` > 1998 | What is the date of the game with a loss result in the Europe/Africa Group I, Round Robin competition in Murcia (esp) after 1998? |
<table0>[table_2846320_4] { <col0>[au_won]:[INTEGER] <col1>[games_played]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 92 | what was the lowest number that auburn triumphed where the activities took part was 92
|
<table0>[table_21422977_1] { <col0>[coalition_parties]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE nº = 3 | When n is 3, what are all the coaliton parties?
|
<table0>[university] { <col0>[School_ID]:[int] <col1>[School]:[text] <col2>[Location]:[text] <col3>[Founded]:[real] <col4>[Affiliation]:[text] <col5>[Enrollment]:[real] <col6>[Nickname]:[text] <col7>[Primary_conference]:[text] } <table1>[basketball_match] { <col0>[Team_ID]:[int] <col1>[School_ID]:[int] <col2>[Team_Nam... | SELECT School_ID, `<col4>` FROM `<table1>` GROUP BY `<col9>` | Show school id vs acc_percent as scatter plot use a different color for each All_Home |
<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>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[eventtype]:... | SELECT `<table6>`.drug FROM `<table6>` WHERE `<table6>`.hadm_id IN ( SELECT `<table9>`.hadm_id FROM `<table9>` WHERE `<table9>`.subject_id = 95892 ) AND DATETIME( `<table6>`.startdate, 'start of day' ) = DATETIME( CURRENT_TIME( ), 'start of day', '-0 day' ) EXCEPT SELECT `<table6>`.drug FROM `<table6>` WHERE `<table6>`... | today compared to yesterday what is new in patient 95892's prescription?
|
<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 diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id WHERE `<table3>`.admityear < "2105" AND diagnoses.long_title = "Stevens-Johnson syndrome-toxic epidermal necrolysis overlap syndrome" | find the number of patients who were admitted before the year 2105 and diagnosed with stevens-johnson syndrome-toxic epidermal necrolysis overlap syndrome. |
<table0>[crop_water_usage] { <col0>[INT]:[crop_id] <col1>[INT]:[type] <col2>[VARCHAR]:[255] <col3>[water_usage]:[FLOAT] <col4>[timestamp]:[DATETIME] } | SELECT type, SUM( `<col3>` ) as total_water_usage FROM `<table0>` WHERE `<col4>` >= DATE_SUB( CURRENT_TIMESTAMP, INTERVAL 1 YEAR ) GROUP BY type ORDER BY total_water_usage ASC LIMIT 3; | Find the top 3 crops with the lowest water usage in the past year. |
<table0>[transportation] { <col0>[INT]:[year] <col1>[INT]:[transportation_method] <col2>[VARCHAR]:[255] <col3>[CO2_emissions]:[INT] } | SELECT `<table0>`_method, year, SUM( `<col3>` ) FROM `<table0>` GROUP BY `<table0>`_method, year; | What is the total CO2 emissions for each transportation method, by year? |
<table0>[city] { <col0>[city_code]:[varchar] <col1>[city_name]:[varchar] <col2>[state_code]:[varchar] <col3>[country_name]:[varchar] <col4>[time_zone_code]:[varchar] } <table1>[airport_service] { <col0>[city_code]:[varchar] <col1>[airport_code]:[varchar] <col2>[miles_distant]:[int] <col3>[direction]:[varchar] <col4>[m... | SELECT DISTINCT flight.flight_id FROM `<table1>` AS AIRPORT_SERVICE_0, `<table1>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ( ( ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'OAKLAND' AND flight.flight_number = 813 AND flight.to_airport = AIRPORT_SERVICE_1.airport_code... | is the AA flight 813 from BOSTON to OAKLAND a nonstop flight |
<table0>[table_59861] { <col0>[Team]:[text] <col1>[Average]:[real] <col2>[Points]:[real] <col3>[Played]:[real] <col4>[1991]:[text] <col5>[1992]:[text] <col6>[1993]:[real] } | SELECT "1991-92" FROM `<table0>` WHERE "1993-94" = '43' | Which 1991-92 has a 1993-94 of 43?
|
<table0>[table_name_62] { <col0>[lead]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE third = "hans frauenlob" | Which Lead has Hans Frauenlob as a Third?
|
<table0>[teachers] { <col0>[teacher_id]:[INT] <col1>[teacher_name]:[VARCHAR] <col2>[gender]:[VARCHAR] <col3>[courses_completed]:[INT] } | SELECT gender, SUM( `<col3>` ) FROM `<table0>` GROUP BY gender; | What is the number of professional development courses completed by teachers in each gender? |
<table0>[building_efficiency] { <col0>[country]:[VARCHAR] <col1>[building_type]:[VARCHAR] <col2>[efficiency]:[FLOAT] } | SELECT country, AVG( `<col2>` ) AS avg_efficiency FROM `<table0>` GROUP BY country; | What is the average energy efficiency of buildings in each country? |
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[eventtype]:[text] <col5>[careu... | SELECT `<table3>`.valuenum FROM `<table3>` WHERE `<table3>`.hadm_id IN ( SELECT `<table9>`.hadm_id FROM `<table9>` WHERE `<table9>`.subject_id = 61751 ) AND `<table3>`.itemid IN ( SELECT `<table4>`.itemid FROM `<table4>` WHERE `<table4>`.label = 'potassium' ) AND STRFTIME( '%y-%m', `<table3>`.charttime ) >= '2105-05' O... | what was patient 61751's first measured potassium since 05/2105? |
<table0>[table_1341604_26] { <col0>[result]:[VARCHAR] <col1>[incumbent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Ike Skelton" | What was the result of the election featuring ike skelton? |
<table0>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoticeTypeId] <col2>[number]:[CreationDate] <col3>[time]:[DeletionDate] <col4>[time]:[ExpiryDate] <col5>[time]:[Body] <col6>[text]:[OwnerUserId] <col7>[number]:[DeletionUs... | SELECT UserId, UserDisplayName, PostId, CreationDate, `<col7>` AS PostText FROM `<table18>` AS qh WHERE `<col7>` LIKE '%http%' ORDER BY `<col3>` | Text of Links in posthistory dz. |
<table0>[table_45929] { <col0>[Place]:[text] <col1>[Player]:[text] <col2>[Country]:[text] <col3>[Score]:[text] <col4>[par]:[real] <col5>[Money]:[real] } | SELECT "Score" FROM `<table0>` WHERE "Player" = 'dick metz' | What is the score of player dick metz?
|
<table0>[Invoices] { <col0>[Invoice_ID]:[INTEGER] <col1>[Order_ID]:[INTEGER] <col2>[payment_method_code]:[CHAR] <col3>[Product_ID]:[INTEGER] <col4>[Order_Quantity]:[VARCHAR] <col5>[288]:[Other_Item_Details] <col6>[VARCHAR]:[255] <col7>[Order_Item_ID]:[INTEGER] } <table1>[Customer_Orders] { <col0>[Order_ID]:[INTEGER] <... | SELECT Service_Type_Description, COUNT( `<col2>` ) FROM `<table2>` AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100 GROUP BY `<col2>` | A bar chart for giveing me the number of the descriptions of the service types that cost more than 100. |
<table0>[marine_species_location] { <col0>[INT]:[species_id] <col1>[INT]:[location] <col2>[TEXT]:[PRIMARY] <col3>[KEY]:[species_id] <col4>[FOREIGN]:[KEY] <col5>[species_id]:[REFERENCES] <col6>[marine_species]:[INSERT] } | SELECT marine_species.species_name FROM marine_species INNER JOIN marine_species_location ON marine_species.id = marine_species_location.species_id WHERE marine_species_location.location = 'Pacific Ocean'; | Which marine species are found in the Pacific Ocean? |
<table0>[Attributes] { <col0>[attribute_id]:[integer] <col1>[attribute_name]:[text] } <table1>[Categories] { <col0>[category_id]:[integer] <col1>[category_name]:[text] } <table2>[Compliments] { <col0>[compliment_id]:[integer] <col1>[compliment_type]:[text] } <table3>[Days] { <col0>[day_id]:[integer] <col1>[day_of_we... | SELECT COUNT( `<col1>` ) FROM `<table5>` WHERE `<col2>` > 1 | How many businesses have more than 1 attribute? |
<table0>[games] { <col0>[INT]:[name] <col1>[VARCHAR]:[100] <col2>[genre]:[VARCHAR] <col3>[revenue]:[FLOAT] } | SELECT genre, SUM( `<col3>` ) FROM `<table0>` WHERE `<col2>` = 'action' GROUP BY genre; | What is the total revenue for each game in the 'action' genre? |
<table0>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table1>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[numb... | SELECT u.Location, COUNT( * ) AS theCount FROM `<table22>` AS u INNER JOIN Posts AS p ON p.OwnerUserId = u.Id INNER JOIN PostTags AS pt ON p.ParentId = pt.PostId INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE LOWER( t.TagName ) LIKE LOWER( '%##TagName1##%' ) GROUP BY u.Location ORDER BY theCount DESC | Members with tag per country (1 tag). |
<table0>[Donors] { <col0>[INT]:[name] <col1>[TEXT]:[country] <col2>[TEXT]:[donation_amount] <col3>[DECIMAL]:[donation_date] } | INSERT INTO Donors ( id, name, country, donation_amount, donation_date ) VALUES ( 5, 'Fatima Alvarez', 'Guatemala', 100.00, '2021-12-25' ); | Insert a new record for a donation of 100.00 from 'Fatima Alvarez' from Guatemala on 2021-12-25. |
<table0>[table_name_66] { <col0>[score]:[VARCHAR] <col1>[date]:[VARCHAR] <col2>[time]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "15 aug" AND `<col2>` = "17:30" | What is the score on 15 Aug with a 17:30 time? |
<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>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:... | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` WHERE `<table4>`.admission_type = "URGENT" AND `<table4>`.admityear < "2190" | give me the number of patients whose admission type is urgent and admission year is less than 2190?
|
<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>` INNER JOIN prescriptions ON `<table4>`.hadm_id = prescriptions.hadm_id WHERE `<table4>`.gender = "M" AND prescriptions.formulary_drug_cd = "METR500PM" | give me the number of male patients with drug code: metr500pm. |
<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, `<table4>`.`<table4>`time FROM `<table4>` JOIN patient ON `<table4>`.patientunitstayid = patient.patientunitstayid WHERE `<table4>`.`<table4>`name = 'septic shock - cultures pending' AND ... | what was the five most frequent drugs that were prescribed to the septic shock - cultures pending male patients aged in the 60 or above within the same month after they had been diagnosed with septic shock - cultures pending in 2103? |
<table0>[table_name_71] { <col0>[jersey__number]:[INTEGER] <col1>[name]:[VARCHAR] <col2>[weight__kg]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "steve griffith" AND weight__kg_ < 84 | What was the average Jersey # of Steve Griffith, when his Weight (kg) was less than 84?
|
<table0>[public] { <col0>[taxis]:[SERIAL] <col1>[PRIMARY]:[KEY] <col2>[name]:[TEXT] <col3>[in_use]:[BOOLEAN] <col4>[city]:[TEXT] } | DELETE FROM public.taxis WHERE city = 'San Francisco' AND name LIKE 'Autonomous Taxi%' AND in_use = FALSE; | Delete all autonomous taxis in San Francisco that are not in use. |
<table0>[Satisfaction] { <col0>[Year]:[INT] <col1>[District]:[VARCHAR] <col2>[255]:[Score] <col3>[FLOAT]:[INSERT] } | SELECT District, AVG( Score ) as AverageScore FROM `<table0>` WHERE `<col0>` = 2022 GROUP BY District; | What is the average citizen satisfaction score for public services in each district of City X in 2022? |
<table0>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table1>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[l... | SELECT COUNT( * ) FROM `<table6>` WHERE `<table6>`.`<table8>`unitstayid IN ( SELECT `<table8>`.`<table8>`unitstayid FROM `<table8>` WHERE `<table8>`.`<table8>`healthsystemstayid IN ( SELECT `<table8>`.`<table8>`healthsystemstayid FROM `<table8>` WHERE `<table8>`.uniquepid = '007-15837' ) ) AND `<table6>`.cellpath LIKE ... | how many times since 12/28/2105 patient 007-15837 had produced a output amt-jackson pratt drain c output?
|
<table0>[south_america_ads] { <col0>[ad_id]:[INT] <col1>[campaign_id]:[INT] <col2>[ad_spend]:[DECIMAL] } | SELECT campaign_id, SUM( `<col2>` ) AS total_spend FROM `<table0>` GROUP BY campaign_id; | What is the sum of ad spending for each advertising campaign in "south_america_ads" table? |
<table0>[table_76119] { <col0>[Tie]:[text] <col1>[Home]:[team] <col2>[text]:[Score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Date]:[text] } | SELECT "Home team" FROM `<table0>` WHERE "Away team" = 'everton' | Which Home team has an Away team of everton?
|
<table0>[indian_marine_species] { <col0>[species]:[VARCHAR] <col1>[255]:[count] <col2>[INT]:[INSERT] } | SELECT COUNT( DISTINCT `<col0>` ) AS species_count, SUM( count ) AS total_count FROM `<table0>` WHERE `<col0>` NOT IN ( 'Shark', 'Manta Ray' ); | Find the total number of marine species and their observation counts in the Indian Ocean, excluding sharks and rays. |
<table0>[protected_land] { <col0>[INT]:[country_id] <col1>[INT]:[acres] } <table1>[country] { <col0>[INT]:[name] <col1>[VARCHAR]:[INSERT] <col2>[protected_land]:[country_id] <col3>[acres]:[VALUES] <col4>[1000000]:[500000] <col5>[750000]:[250000] <col6>[300000]:[INSERT] } | SELECT c.name, 100.0 * SUM( pl.acres ) / ( SELECT SUM( acres ) FROM `<table0>` pl2 WHERE pl2.country_id = c.id ) as percentage_of_total_`<table0>` FROM `<table0>` pl JOIN country c ON pl.country_id = c.id GROUP BY c.id, c.name; | Calculate the percentage of total protected land for each country in the 'protected_land' and 'country' tables. |
<table0>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table1>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table2>[Tags] { <col0>[number]:[TagNam... | SELECT p.Id AS "post_link" FROM `<table5>` AS p INNER JOIN PostHistory AS ph ON p.Id = ph.PostId AND ph.PostHistoryTypeId = 10 AND ph.Comment = '103' WHERE NOT p.ClosedDate IS NULL ORDER BY p.CreationDate DESC | Questions closed as 'Needs details or clarity'. |
<table0>[table_203_52] { <col0>[number]:[pos] <col1>[text]:[number] <col2>[driver]:[text] <col3>[constructor]:[text] <col4>[laps]:[number] <col5>[time]:[retired] <col6>[text]:[grid] <col7>[number]:[points] } | SELECT "driver" FROM `<table0>` WHERE "pos" = 1 | who placed first in the 2008 canadian grand prix ? |
<table0>[table_35683] { <col0>[text]:[Town] <col1>[City]:[text] <col2>[Region]:[text] <col3>[Dinosaur]:[Trail] <col4>[text]:[Education] <col5>[programs]:[Guided] <col6>[tours]:[text] <col7>[Associated]:[Field] <col8>[Digs]:[text] } | SELECT "Name" FROM `<table0>` WHERE "Associated Field Digs?" = 'no' AND "Town/City" = 'malta' | What is the name of the museum located in Malta with no associated field digs?
|
<table0>[table_name_3] { <col0>[opponent]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "21 jul 2007" | Which opponent has a date 21 jul 2007? |
<table0>[Batting_Style] { <col0>[Batting_Id]:[integer] <col1>[Batting_hand]:[text] } <table1>[Bowling_Style] { <col0>[Bowling_Id]:[integer] <col1>[Bowling_skill]:[text] } <table2>[City] { <col0>[City_Id]:[integer] <col1>[City_Name]:[text] <col2>[Country_id]:[integer] } <table3>[Country] { <col0>[Country_Id]:[integer... | SELECT AVG( T1.win_margin ) FROM `<table16>` AS T1 INNER JOIN Venue AS T2 ON T1.venue_id = T2.venue_id WHERE T2.venue_name = 'Newlands' | What is the average winning margin of the matches held in Newlands? |
<table0>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[itemid]:[number] <col5>[charttime]:[time] <col6>[valuenum]:[number] <col7>[valueuom]:[text] } <table1>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[... | SELECT COUNT( * ) FROM `<table3>` WHERE `<table3>`.icustay_id IN ( SELECT `<table2>`.icustay_id FROM `<table2>` WHERE `<table2>`.hadm_id IN ( SELECT `<table13>`.hadm_id FROM `<table13>` WHERE `<table13>`.subject_id = 65401 ) ) AND `<table3>`.itemid IN ( SELECT `<table7>`.itemid FROM `<table7>` WHERE `<table7>`.label = ... | let's count the number of times patient 65401 has had a gastric oral gastric output.
|
<table0>[mental_health_professionals] { <col0>[INT]:[profession] <col1>[TEXT]:[state] <col2>[TEXT]:[year] <col3>[INT]:[INSERT] } | SELECT profession, COUNT( * ) as num_professionals FROM `<table0>` WHERE state = 'NY' AND year = 2020 GROUP BY profession; | What is the distribution of mental health professionals by type in NY in 2020? |
<table0>[aircraft] { <col0>[aircraft_code]:[varchar] <col1>[aircraft_description]:[varchar] <col2>[manufacturer]:[varchar] <col3>[basic_type]:[varchar] <col4>[engines]:[int] <col5>[propulsion]:[varchar] <col6>[wide_body]:[varchar] <col7>[wing_span]:[int] <col8>[length]:[int] <col9>[weight]:[int] <col10>[capacity]:[int]... | SELECT DISTINCT flight.flight_id FROM `<table1>` AS AIRPORT_SERVICE_0, `<table1>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ( ( ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND date_day.day_number = 25 AND date_day.month_number = 6 AND ... | what is the earliest flight that has no stops from WASHINGTON to SAN FRANCISCO on friday
|
<table0>[table_name_89] { <col0>[issue_date]:[VARCHAR] <col1>[download]:[VARCHAR] <col2>[artist]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "no available" AND `<col2>` = "eric prydz" | What's the Issue Date for an Eric Prydz song with a no available Download information? |
<table0>[table_train_256] { <col0>[int]:[mini_mental_state_examination_mmse] <col1>[int]:[language] <col2>[string]:[mild_cognitive_impairment] <col3>[bool]:[moca_score] <col4>[int]:[dementia] <col5>[bool]:[body_mass_index_bmi] <col6>[float]:[age] <col7>[float]:[NOUSE] } | SELECT * FROM `<table0>` WHERE language = 'english' OR language = 'spanish' | english ( wumc ) or spanish speaking ( dh ) |
<table0>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table1>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table2>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <co... | SELECT HIRE_DATE, COUNT( `<col5>` ) FROM `<table2>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table0>` WHERE `<col9>` BETWEEN 100 AND 200 ) | For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of hire_date and the amount of hire_date bin hire_date by time in a bar chart. |
<table0>[table_1346137_4] { <col0>[candidates]:[VARCHAR] <col1>[district]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "South Carolina 5" | Who were the candidates in the district of South Carolina 5?
|
<table0>[table_29872] { <col0>[Game]:[real] <col1>[Date]:[text] <col2>[Team]:[text] <col3>[Score]:[text] <col4>[High]:[points] <col5>[text]:[High] <col6>[rebounds]:[text] <col7>[High]:[assists] <col8>[text]:[Location] <col9>[Attendance]:[text] <col10>[Record]:[text] } | SELECT "Record" FROM `<table0>` WHERE "High points" = 'C. J. Miles ( 20 )' | What record has c. j. miles (20) in the high points?
|
<table0>[student_record] { <col0>[student_id]:[int] <col1>[course_id]:[int] <col2>[semester]:[int] <col3>[grade]:[varchar] <col4>[varchar]:[transfer_source] <col5>[varchar]:[earn_credit] <col6>[varchar]:[repeat_term] <col7>[varchar]:[test_id] } <table1>[semester] { <col0>[semester_id]:[int] } <table2>[program_require... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id AND semester.semester = 'FA' AND semester.semester_id = course_... | Which of next semester 's classes can be taken as MDE ? |
<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>[COURSE] { <col0>[CRS_CODE]:[varchar] <col1>[DEPT_CODE]:[varchar] <col2>[CRS_DESCRIPTION]:[varchar] <col3>[CRS_CRE... | SELECT STU_FNAME, SUM( `<col7>` ) FROM `<table3>` WHERE `<col7>` < ( SELECT AVG( `<col7>` ) FROM `<table3>` ) GROUP BY `<col2>` | What is the first name and GPA of every student that has a GPA lower than average. Show bar chart.
|
<table0>[Companies] { <col0>[Sales_billion]:[INTEGER] <col1>[Industry]:[VARCHAR] } | SELECT MAX( `<col0>` ), MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` <> "Banking" | What are the maximum and minimum sales of the companies whose industries are not "Banking". |
<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>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay... | SELECT t3.drug FROM ( SELECT t2.drug, 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 WHERE `<table10>`.icd9_code = ( SELECT `<table14>`.icd9_code FROM `<table14>` WHERE `<table1... | since 2105, what are the four most frequent medications prescribed to female patients of 50s after they have been diagnosed with acute respiratry failure within 2 months? |
<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>`.age FROM `<table1>` WHERE `<table1>`.subject_id = "6983" | find the age of subject id 6983.
|
<table0>[table_name_98] { <col0>[rank]:[INTEGER] <col1>[laps]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 76 | What is the average rank of one who is at 76 laps? |
<table0>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table1>[Posts] { <col0>[number]:[PostTypeId] <col1... | SELECT DISTINCT ( DisplayName ), Location, CONCAT( AboutMe, WebsiteUrl ), Reputation, CONCAT( 'http://stackoverflow.com/users/', `<table3>`.Id ) FROM `<table3>` INNER JOIN Posts ON Posts.OwnerUserId = `<table3>`.Id INNER JOIN Post`<table24>` ON ( Posts.Id = Post`<table24>`.PostId ) WHERE Post`<table24>`.TagId IN ( SELE... | Users who have python + ios tags under age of 20. |
<table0>[table_name_73] { <col0>[station]:[VARCHAR] <col1>[services]:[VARCHAR] <col2>[zone_2008]:[VARCHAR] <col3>[zone_2007]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "8" AND `<col3>` = "outside zones" AND `<col1>` = "london overground" | Which Station has a Zone 2008 of 8, and a Zone 2007 of outside zones, and Services of london overground? |
<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 `<table2>`.age, prescriptions.route FROM `<table2>` INNER JOIN prescriptions ON `<table2>`.hadm_id = prescriptions.hadm_id WHERE `<table2>`.subject_id = "2560" | what is age and drug route of subject id 2560?
|
<table0>[Users] { <col0>[number]:[Reputation] <col1>[number]:[CreationDate] <col2>[time]:[DisplayName] <col3>[text]:[LastAccessDate] <col4>[time]:[WebsiteUrl] <col5>[text]:[Location] <col6>[text]:[AboutMe] <col7>[text]:[Views] <col8>[number]:[UpVotes] <col9>[number]:[DownVotes] <col10>[number]:[ProfileImageUrl] <col11>... | SELECT COUNT( sel.Id ) FROM ( SELECT c.Id FROM `<table22>` AS c WHERE YEAR( c.CreationDate ) >= 2019 ) AS sel | How often is reprex, mcve, mwe, sscce, mvce, example used in comments on SO?.
|
<table0>[record] { <col0>[int]:[Result] <col1>[text]:[Swimmer_ID] <col2>[int]:[Event_ID] } <table1>[event] { <col0>[int]:[text] <col1>[Stadium_ID]:[int] <col2>[Year]:[text] } <table2>[swimmer] { <col0>[int]:[name] <col1>[text]:[Nationality] <col2>[text]:[meter_100] <col3>[real]:[meter_200] <col4>[text]:[meter_300] <c... | SELECT meter_200, AVG( meter_100 ) FROM `<table2>` GROUP BY meter_200 ORDER BY meter_200 | Plot mean meter 100 by grouped by meter 200 as a bar graph, and order in ascending by the meter_200. |
<table0>[table_27374740_2] { <col0>[number]:[INTEGER] <col1>[viewers__m]:[VARCHAR] } | SELECT MAX( _number ) FROM `<table0>` WHERE viewers__m_ = "8.01" | how many maximum # when viewers (m) is 8.01
|
<table0>[table_19681738_1] { <col0>[total]:[VARCHAR] <col1>[hancock__number]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 1394 | how many times was total considered when hancock # was 1394 |
<table0>[table_name_13] { <col0>[number_in_class]:[INTEGER] <col1>[owner]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "whitehaven coal" | What is the total number in class for the Whitehaven Coal? |
<table0>[table_name_94] { <col0>[drawn]:[INTEGER] <col1>[goals]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "274-357" | What is the sum of draws with 274-357 goals? |
<table0>[city_education] { <col0>[city]:[VARCHAR] <col1>[255]:[budget] <col2>[INT]:[INSERT] } | SELECT SUM( budget ) FROM `<table0>` WHERE YEAR( event_date ) = 2022 AND category = 'education'; | What is the total budget allocated for education in 2022 across all cities in the 'city_education' table? |
<table0>[table_name_7] { <col0>[game]:[VARCHAR] <col1>[year]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 2011 | What game was in 2011? |
<table0>[Catalog_Contents_Additional_Attributes] { <col0>[catalog_entry_id]:[INTEGER] <col1>[catalog_level_number]:[INTEGER] <col2>[attribute_id]:[INTEGER] <col3>[attribute_value]:[VARCHAR] } <table1>[Catalog_Structure] { <col0>[catalog_level_number]:[INTEGER] <col1>[catalog_id]:[INTEGER] <col2>[catalog_level_name]:[V... | SELECT catalog_entry_name, `<col10>` FROM `<table4>` WHERE `<col7>` > 700 ORDER BY `<col10>` DESC | Which catalog contents has price above 700 dollars? Show their catalog entry names and capacities, I want to list in descending by the y-axis.
|
<table0>[countries] { <col0>[INT]:[name] } <table1>[vessels] { <col0>[INT]:[country_id] <col1>[INT]:[name] } <table2>[violations] { <col0>[INT]:[vessel_id] <col1>[INT]:[num_] } | SELECT c.name, SUM( v.num_violations ) as total_violations FROM `<table0>` c INNER JOIN vessels v ON c.id = v.country_id INNER JOIN violations vi ON v.id = vi.vessel_id GROUP BY c.name ORDER BY total_violations DESC; | Which countries have vessels with the most fishing violations?' |
<table0>[table_33100] { <col0>[Home]:[team] <col1>[text]:[Home] <col2>[team]:[score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Away]:[team] <col6>[score]:[text] <col7>[Venue]:[text] <col8>[Crowd]:[real] <col9>[Date]:[text] } | SELECT "Date" FROM `<table0>` WHERE "Home team" = 'footscray' | On what date was the home team Footscray?
|
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[... | SELECT SUM( CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME( '%j', patients.dod ) - STRFTIME( '%j', t4.charttime ) > 5 * 365 THEN 1 ELSE 0 END ) * 100 / COUNT( * ) FROM ( SELECT t2.subject_id, t2.charttime FROM ( SELECT t1.subject_id, t1.charttime FROM ( SELECT admissions.subject_id, `<table0>`.charttime FROM `<tab... | what is the five year survival rate of patients who were prescribed with morphine sulfate after the fetal/neonatal jaund nos?
|
<table0>[stadium] { <col0>[int]:[name] <col1>[text]:[Capacity] <col2>[int]:[City] <col3>[text]:[Country] <col4>[text]:[Opening_year] } <table1>[record] { <col0>[int]:[Result] <col1>[text]:[Swimmer_ID] <col2>[int]:[Event_ID] } <table2>[swimmer] { <col0>[int]:[name] <col1>[text]:[Nationality] <col2>[text]:[meter_100] <... | SELECT ID, meter_100 FROM `<table2>` | What is the relationship between ID and meter_100 ?
|
<table0>[table_10710364_2] { <col0>[literacy___percentage]:[VARCHAR] <col1>[growth__1991_2001]:[VARCHAR] } | SELECT literacy___percentage_ FROM `<table0>` WHERE growth__1991_2001_ = "103.1%" | What is the literacy rate for groups that grew 103.1% between 1991 and 2001? |
<table0>[table_name_16] { <col0>[event]:[VARCHAR] <col1>[competition]:[VARCHAR] <col2>[year]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "world junior championships" AND `<col2>` = 2010 | What event was the competition World Junior Championships in 2010? |
<table0>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table1>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text... | SELECT `<table4>`.hospitaldischargetime FROM `<table4>` WHERE `<table4>`.uniquepid = '010-11305' AND STRFTIME( '%y', `<table4>`.hospitaldischargetime ) <= '2101' ORDER BY `<table4>`.hospitaldischargetime DESC LIMIT 1 | when did patient 010-11305 for the last time leave the hospital until 2101? |
<table0>[aircraft_manufacturing] { <col0>[aircraft_id]:[INT] <col1>[manufacturer]:[VARCHAR] <col2>[production_year]:[INT] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col1>` = 'Brazil' AND `<col2>` BETWEEN 2010 AND 2020 AND `<col2>` != 2015; | What is the total number of aircraft manufactured in Brazil between 2010 and 2020, excluding aircraft with a production year of 2015? |
<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>` WHERE `<table3>`.diagnosis = "SIGMOID DIVERTICULITIS, COLOVESTICAL FISTULA/SDA" AND `<table3>`.dod_year <= "2148.0" | How many patients who died in or before the year 2148 had sigmoid diverticulitis colovestical fistula/sda ?
|
<table0>[revenue] { <col0>[product]:[VARCHAR] } | SELECT SUM( `<table0>` ) as total_`<table0>` FROM `<table0>` WHERE `<col0>` = 'Edibles' AND state = 'Washington' AND year = 2020; | What is the total revenue generated by cannabis edibles sales in Washington in 2020? |
<table0>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] <col5>[ethnicity]:[text] <col6>[hospitalid]:[number] <col7>[wardid]:[number] <col8>[admissionheight]:[number] <col9>[admissionweight]:[number] <col10>[disch... | SELECT `<table0>`.age FROM `<table0>` WHERE `<table0>`.uniquepid = '022-158213' AND NOT `<table0>`.hospitaldischargetime IS NULL ORDER BY `<table0>`.hospitaladmittime DESC LIMIT 1 | what was the age of patient 022-158213 in their last hospital encounter? |
<table0>[suppliers] { <col0>[supplier_id]:[INT] <col1>[PRIMARY]:[KEY] <col2>[name]:[VARCHAR] <col3>[255]:[location] <col4>[VARCHAR]:[255] <col5>[sustainability_score]:[INT] } | INSERT INTO suppliers ( supplier_id, name, location, sustainability_score ) VALUES ( 2, 'Supplier B', 'City B', 85 ); | Insert data into 'suppliers' table |
<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 T2.Name, T1.Code FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC | 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, I want to list from high to low by the bar.
|
<table0>[table_name_92] { <col0>[lost]:[VARCHAR] <col1>[team]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "flamengo" AND against < 5 | How many Lost have a Team of flamengo, and an Against smaller than 5? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.