schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[table_58743] { <col0>[District]:[text] <col1>[Incumbent]:[text] <col2>[Party]:[text] <col3>[elected]:[real] <col4>[Results]:[text] } | SELECT "Incumbent" FROM `<table0>` WHERE "Results" = 're-elected' AND "Party" = 'democratic' AND "District" = 'minnesota 7' | What is Incumbent, when Results is 'Re-Elected', when Party is 'Democratic', and when District is 'Minnesota 7'?
|
<table0>[cybersecurity_policies] { <col0>[INT]:[policy_name] <col1>[VARCHAR]:[255] <col2>[last_reviewed]:[DATE] } | SELECT policy_name FROM `<table0>` WHERE `<col2>` < DATEADD( year, -1, GETDATE( ) ) ORDER BY policy_name; | List all cybersecurity policies that have not been reviewed in the last year, in alphabetical order. |
<table0>[ship] { <col0>[TYPE]:[VARCHAR] } | SELECT TYPE, COUNT( * ) FROM `<table0>` GROUP BY `<col0>` | Show different types of ships and the number of ships of each type. |
<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 WHERE `<table2>`.insurance = "Private" AND diagnoses.short_title = "Schizoaffective dis NOS" | calculate the total number of private patients diagnosed with schizoaffective dis nos.
|
<table0>[keyphrase] { <col0>[keyphraseid]:[int] <col1>[keyphrasename]:[varchar] } <table1>[field] { <col0>[fieldid]:[int] } <table2>[author] { <col0>[authorid]:[int] <col1>[authorname]:[varchar] } <table3>[paperkeyphrase] { <col0>[paperid]:[int] <col1>[keyphraseid]:[int] } <table4>[paper] { <col0>[paperid]:[int] <c... | SELECT DISTINCT paper.paperid FROM paper, venue WHERE paper.year = 2016 AND venue.venueid = paper.venueid AND venue.venuename = 'ictd' | Papers from ictd 2016 conference |
<table0>[table_1341586_19] { <col0>[result]:[VARCHAR] <col1>[candidates]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Billy Tauzin ( D ) Unopposed" | what's the result with candidates being billy tauzin (d) unopposed |
<table0>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table1>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table2>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY... | SELECT HIRE_DATE, `<col0>` FROM `<table6>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table5>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY `<col5>` | For those employees who do not work in departments with managers that have ids between 100 and 200, show me the trend about employee_id over hire_date with a line chart, I want to display in ascending by the HIRE_DATE. |
<table0>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table1>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table2>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[va... | SELECT HIRE_DATE, AVG( `<col7>` ) FROM `<table3>` WHERE `<col5>` < '2002-06-21' ORDER BY AVG( `<col7>` ) DESC | For those employees who was hired before 2002-06-21, return a bar chart about the distribution of hire_date and the average of salary bin hire_date by weekday, and could you list y axis from high to low order?
|
<table0>[table_25714995_2] { <col0>[VARCHAR]:[VARCHAR] } | SELECT COUNT( pf ) FROM `<table0>` WHERE l = 3 | How many pf catagories are listed for the skip that had 3 for l
|
<table0>[table_name_79] { <col0>[team_1]:[VARCHAR] <col1>[team_2]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "asante kotoko" | Which team 1 had a team 2 of Asante Kotoko?
|
<table0>[Trees] { <col0>[INT]:[species] <col1>[VARCHAR]:[255] <col2>[age]:[INT] } | SELECT species FROM `<table0>` GROUP BY species HAVING COUNT( * ) > 3; | List all the tree species in the Trees table that have more than 3 trees. |
<table0>[garment_sales] { <col0>[INT]:[garment_type] <col1>[VARCHAR]:[sustainability_rating] <col2>[INT]:[country] <col3>[VARCHAR]:[price] <col4>[DECIMAL]:[quantity] <col5>[INT]:[INSERT] } | SELECT SUM( price * quantity ) FROM `<table0>` WHERE garment_type = 'jeans' AND country = 'France' AND sustainability_rating >= 4; | Calculate the total revenue generated from the sales of sustainable denim jeans in France. |
<table0>[table_22603701_1] { <col0>[position]:[VARCHAR] <col1>[college]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Menlo college" | What are the positions for Menlo College? |
<table0>[Subjects] { <col0>[subject_id]:[INTEGER] <col1>[subject_name]:[VARCHAR] } <table1>[Students] { <col0>[student_id]:[INTEGER] <col1>[date_of_registration]:[DATETIME] <col2>[date_of_latest_logon]:[DATETIME] <col3>[login_name]:[VARCHAR] <col4>[password]:[VARCHAR] <col5>[personal_name]:[VARCHAR] <col6>[middle_name... | SELECT password, `<col0>` FROM `<table3>` ORDER BY `<col4>` | Give me the comparison about author_id over the password by a bar chart. |
<table0>[exists] { <col0>[solar_power_plants]:[plant_id] <col1>[integer]:[plant_name] <col2>[varchar]:[255] <col3>[plant_location]:[varchar] <col4>[255]:[commissioning_date] <col5>[date]:[capacity_mw] <col6>[integer]:[INSERT] <col7>[solar_power_plants]:[plant_id] <col8>[plant_name]:[plant_location] <col9>[commissioning... | SELECT plant_location, SUM( capacity_mw ) as total_capacity FROM solar_power_plants WHERE plant_location LIKE 'India%' AND commissioning_date > '2015-12-31' GROUP BY plant_location; | What is the total installed capacity (in MW) of solar power plants in India that were commissioned after 2015? |
<table0>[funding_rounds] { <col0>[INT]:[company_id] <col1>[INT]:[round_number] <col2>[INT]:[funding_date] } <table1>[companies] { <col0>[INT]:[name] <col1>[TEXT]:[industry] <col2>[TEXT]:[founding_date] } | SELECT MAX( round_number ), MIN( round_number ) FROM `<table0>` JOIN companies ON `<table0>`.company_id = companies.id WHERE companies.industry = 'Renewable Energy'; | Find the maximum and minimum number of funding rounds for companies in the renewable energy sector. |
<table0>[INSERT] { <col0>[music_genres_ext]:[genre] <col1>[popularity]:[VALUES] <col2>[Hip]:[Hop] } | INSERT INTO music_genres_ext ( id, genre, popularity, release_year ) | as of 2022 |
<table0>[table_name_34] { <col0>[report]:[VARCHAR] <col1>[pole_position]:[VARCHAR] <col2>[tyre]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "juan manuel fangio" AND `<col2>` = "c" | What was Juan Manuel Fangio's reported pole position and the tire of C? |
<table0>[date_day] { <col0>[month_number]:[int] <col1>[day_number]:[int] <col2>[year]:[int] <col3>[day_name]:[varchar] } <table1>[flight] { <col0>[aircraft_code_sequence]:[text] <col1>[airline_code]:[varchar] } <table2>[compartment_class] { <col0>[compartment]:[varchar] <col1>[class_type]:[varchar] } <table3>[class_... | SELECT DISTINCT flight.flight_id FROM `<table16>` AS AIRPORT_SERVICE_0, `<table16>` 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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGTON' A... | i would like to fly UA from WASHINGTON to DENVER colorado
|
<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>` WHERE `<table3>`.admission_type = "EMERGENCY" AND `<table3>`.days_stay > "10" | give me the number of patients whose admission type is emergency and days of hospital stay is greater than 10?
|
<table0>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table1>[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] ... | SELECT HIRE_DATE, AVG( `<col9>` ) FROM `<table1>` WHERE `<col5>` < '2002-06-21' ORDER BY AVG( `<col9>` ) | For those employees who was hired before 2002-06-21, show me about the distribution of hire_date and the average of manager_id bin hire_date by time in a bar chart, could you list from low to high by the the average of manager id please?
|
<table0>[Erbium_Production] { <col0>[INT]:[year] <col1>[INT]:[country] <col2>[VARCHAR]:[255] <col3>[quantity]:[FLOAT] <col4>[market_price]:[FLOAT] } | SELECT AVG( `<col4>` ) FROM `<table0>` WHERE year = 2019 AND country = 'Malaysia'; | What is the average market price of Erbium extracted in Malaysia in 2019? |
<table0>[table_name_76] { <col0>[club]:[VARCHAR] <col1>[founded]:[VARCHAR] <col2>[league]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 1882 AND `<col2>` = "fa premier league" | Which Club has a Founded smaller than 1882, and a League of fa premier league?
|
<table0>[table_71057] { <col0>[Year]:[real] <col1>[Population]:[Total] <col2>[real]:[Caboolture] <col3>[real]:[Pine] <col4>[Rivers]:[real] <col5>[Redcliffe]:[real] } | SELECT COUNT( "( Pine `<col4>` )" ) FROM `<table0>` WHERE "Year" > '1947' AND "( `<col5>` )" < '68,877' AND "Population ( Total )" > '50,785' AND "( Caboolture )" > '12,207' | What is the Pine Rivers total population after 1947 with a Redcliffe population smaller than 68,877, a total population greater than 50,785, and a Caboolture population greater than 12,207? |
<table0>[consumer_preferences] { <col0>[product_id]:[INT] <col1>[preference_score]:[DECIMAL] <col2>[country]:[VARCHAR] } | SELECT product_id, `<col1>` FROM `<table0>` WHERE `<col2>` = 'USA' GROUP BY `<col0>` ORDER BY `<col1>` DESC LIMIT 3; | List the top 3 beauty products with the highest consumer preference score in the USA, ordered by the score in descending order. |
<table0>[table_20466963_4] { <col0>[guest_1]:[VARCHAR] <col1>[guest_4]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Jill Douglas" | Who is the guest 1 in the episode where guest 4 is Jill Douglas? |
<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>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } ... | SELECT `<table15>`.short_title FROM `<table15>` WHERE `<table15>`.icd9_code IN ( SELECT t4.icd9_code FROM ( SELECT t3.icd9_code, DENSE_RANK( ) OVER ( ORDER BY t3.c1 DESC ) AS c2 FROM ( SELECT t2.icd9_code, 100 - SUM( CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME( '%j', patients.dod ) - STRFTIME( '%j', t2.charttim... | what were the top five diagnoses that had the highest four year mortality rate?
|
<table0>[water_usage] { <col0>[date]:[DATE] <col1>[usage_category]:[VARCHAR] <col2>[region]:[VARCHAR] <col3>[usage_amount]:[INT] } | SELECT usage_category, `<col3>` FROM `<table0>` WHERE `<col0>` BETWEEN '2022-07-01' AND '2022-07-15'; | Provide the usage_category and usage_amount for the water_usage table where the date is between '2022-07-01' and '2022-07-15' |
<table0>[table_2779] { <col0>[real]:[real] <col1>[Title]:[text] <col2>[Directed]:[text] <col3>[Written]:[text] <col4>[viewers]:[million] <col5>[text]:[Rank] <col6>[week]:[real] <col7>[Original]:[air] <col8>[date]:[text] } | SELECT "Rank ( `<col6>` )" FROM `<table0>` WHERE "Written by" = 'Russel Friend & Garrett Lerner' | What was the week ranking of the episode written by Russel Friend & Garrett Lerner?
|
<table0>[table_name_56] { <col0>[competition]:[VARCHAR] <col1>[town]:[VARCHAR] <col2>[opponent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "budva" AND `<col2>` = "italy" | what is the competition played in budva against italy?
|
<table0>[table_10782] { <col0>[sign]:[text] <col1>[Frequency]:[MHz] <col2>[text]:[City] <col3>[license]:[text] <col4>[ERP]:[text] <col5>[FCC]:[info] } | SELECT "Frequency MHz" FROM `<table0>` WHERE "ERP W" = '850 watts' | Name the frequency mhz for ERP W of 850 watts
|
<table0>[construction_labor] { <col0>[INT]:[worker_name] <col1>[VARCHAR]:[hours_worked] <col2>[INT]:[project_type] <col3>[VARCHAR]:[state] <col4>[VARCHAR]:[INSERT] } | UPDATE construction_labor SET hours_worked = 110 WHERE worker_name = 'Jane Doe' AND project_type = 'Sustainable' AND state = 'New York'; | Update the hours worked by a worker on a sustainable project in New York. |
<table0>[table_29256] { <col0>[Overall]:[rank] <col1>[real]:[Country] <col2>[text]:[Overall] <col3>[life]:[expectancy] <col4>[real]:[Male] <col5>[life]:[expectancy] <col6>[real]:[Male] <col7>[rank]:[real] <col8>[Female]:[life] <col9>[expectancy]:[real] <col10>[Female]:[rank] } | SELECT MAX( "Overall rank" ) FROM `<table0>` WHERE "Country" = 'Czech Republic' | Name the most overall rank for czech republic
|
<table0>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table1>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId]... | SELECT question.Id AS "post_link", question.Title, question.Score, question.Body, question.AnswerCount AS "Answer Count", question.ViewCount, t.TagName FROM `<table9>` AS question JOIN PostTypes AS ty ON ty.Id = question.PostTypeId JOIN PostTags AS questiont ON question.Id = questiont.PostId JOIN Tags AS t ON t.Id = qu... | Most popular bad questions about Python with body _R-year by year. All non-CW questions with at least 1000 views ordered by votes ascending so that the least popular of the questions is on top |
<table0>[table_train_234] { <col0>[int]:[orthostatic_hypotension] <col1>[bool]:[systolic_blood_pressure_sbp] <col2>[int]:[estimated_glomerular_filtration_rate_egfr] <col3>[int]:[postural_fall_of_dbp] <col4>[int]:[diastolic_blood_pressure_dbp] <col5>[int]:[postural_fall_of_sbp] <col6>[int]:[allergy_to_sglt_2_inhibitors]... | SELECT * FROM `<table0>` WHERE estimated_glomerular_filtration_rate_egfr > 60 | egfr > 60 |
<table0>[keyword] { } <table1>[tags] { <col0>[int]:[msid] <col1>[int]:[kid] } <table2>[copyright] { <col0>[int]:[msid] <col1>[int]:[cid] } <table3>[actor] { <col0>[aid]:[int] <col1>[gender]:[text] <col2>[name]:[text] <col3>[nationality]:[text] <col4>[birth_city]:[text] <col5>[birth_year]:[int] } <table4>[classifica... | SELECT COUNT( DISTINCT ( movie.title ) ) FROM directed_by, director, movie WHERE director.did = directed_by.did AND director.name = 'Matt Damon' AND movie.mid = directed_by.msid | How many movies did ' Matt Damon ' direct ?
|
<table0>[table_name_80] { <col0>[rank]:[INTEGER] <col1>[singapore_cup]:[VARCHAR] <col2>[name]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "0 ( 1 )" AND `<col2>` = "masrezwan masturi" | What is the sum of Rank that when the Singapore Cup is 0 (1), and the Name is masrezwan masturi? |
<table0>[deliveries] { <col0>[INT]:[shipment_id] <col1>[INT]:[delivery_date] <col2>[DATE]:[delivery_time_days] <col3>[INT]:[INSERT] } | SELECT AVG( delivery_time_days ) FROM `<table0>` D INNER JOIN ( SELECT id AS shipment_id FROM shipments WHERE origin_country = 'Germany' AND destination_country = 'Spain' ) AS S ON D.shipment_id = S.shipment_id; | What is the average delivery time in days for shipments from Germany to Spain? |
<table0>[rural_infrastructure] { <col0>[INT]:[name] <col1>[VARCHAR]:[type] <col2>[VARCHAR]:[budget] <col3>[FLOAT]:[INSERT] } | SELECT name FROM `<table0>` WHERE type = 'Agricultural Innovation' AND budget < 150000; | What are the names of the agricultural innovation projects in the 'rural_infrastructure' table that have a budget less than 150000? |
<table0>[Certificate] { <col0>[eid]:[VARCHAR] <col1>[aid]:[VARCHAR] } <table1>[Aircraft] { <col0>[aid]:[VARCHAR] <col1>[name]:[VARCHAR] } <table2>[Employee] { <col0>[name]:[VARCHAR] <col1>[eid]:[VARCHAR] } | SELECT `<col0>` FROM `<table2>` EXCEPT SELECT T1.name FROM `<table2>` AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Boeing 737-800" | Show names for all employees who do not have certificate of Boeing 737-800.
|
<table0>[table_33922] { <col0>[City]:[text] <col1>[Country]:[text] <col2>[IATA]:[text] <col3>[ICAO]:[text] <col4>[Airport]:[text] } | SELECT "City" FROM `<table0>` WHERE "Airport" = 'toamasina airport' | what city is the toamasina airport in?
|
<table0>[ContractNegotiations] { <col0>[INT]:[contractor] <col1>[VARCHAR]:[255] <col2>[government]:[VARCHAR] <col3>[255]:[contract_value] <col4>[INT]:[negotiation_date] <col5>[DATE]:[INSERT] } | SELECT SUM( contract_value ) as total_value FROM `<table0>` WHERE `<col2>` = 'US Government' AND negotiation_date >= DATE_SUB( CURRENT_DATE, INTERVAL 2 YEAR ); | What is the total value of contracts negotiated with the US government by defense contractors in the last 2 years? |
<table0>[table_name_63] { <col0>[country]:[VARCHAR] <col1>[money___]:[INTEGER] } | SELECT `<col0>` FROM `<table0>` WHERE money___$__ < 216 | From which country is the player who made less than $216? |
<table0>[table_28194879_1] { <col0>[number]:[INTEGER] <col1>[written_by]:[VARCHAR] } | SELECT MAX( _number ) FROM `<table0>` WHERE `<col1>` = "Dan Vebber" | What is the last number in season of the episodes written by Dan Vebber? |
<table0>[table_11608735_3] { <col0>[state]:[VARCHAR] <col1>[federal]:[VARCHAR] <col2>[property_taxes]:[VARCHAR] } | SELECT state_ & _federal FROM `<table0>` WHERE `<col2>` = "17,199,210" | Name the state and federal when property taxes is 17,199,210
|
<table0>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[VoteTypes] { <col0>[number]:[text] } <table2>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table3>[PostTypes] { <col0>[number]:[text] } <table4>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymou... | SELECT Users.DisplayName, COUNT( * ) AS `<table20>`, CAST( TIME_TO_STR( p.CreationDate, '%Y.%m.%d' ) AS TEXT( 7 ) ) AS Month FROM `<table20>` AS p JOIN Users ON Users.Id = p.OwnerUserId WHERE p.OwnerUserId IN ( 8173, 62278, 8348, 15416, 45760, 23353, 21674, 14082, 25805, 34662, 12952 ) GROUP BY CAST( TIME_TO_STR( p.Cre... | Posts by month, for all math.se moderator election nominees. |
<table0>[table_26651] { <col0>[State]:[class] <col1>[text]:[Vacator] <col2>[text]:[Reason] <col3>[change]:[text] <col4>[Successor]:[text] <col5>[Date]:[successors] <col6>[formal]:[installation] } | SELECT "State ( class )" FROM `<table0>` WHERE "Date of successors `<col6>` installation" = 'June 22, 1868' | List all state classes when successors were formally installed on June 22, 1868.
|
<table0>[table_2528382_2] { <col0>[year]:[VARCHAR] <col1>[co_stars]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Mala Sinha and Amitabh Bachchan" | In which years are co-stars mala sinha and amitabh bachchan?
|
<table0>[table_50058] { <col0>[Place]:[text] <col1>[Player]:[text] <col2>[Country]:[text] <col3>[Score]:[text] <col4>[par]:[text] } | SELECT "Country" FROM `<table0>` WHERE "Player" = 'bob tway' | What country is Bob Tway from?
|
<table0>[Contacts] { <col0>[contact_id]:[INTEGER] <col1>[customer_id]:[INTEGER] <col2>[gender]:[VARCHAR] <col3>[first_name]:[VARCHAR] <col4>[last_name]:[VARCHAR] <col5>[contact_phone]:[VARCHAR] } <table1>[Addresses] { <col0>[address_id]:[INTEGER] <col1>[line_1_number_building]:[VARCHAR] <col2>[city]:[VARCHAR] <col3>[z... | SELECT product_name, COUNT( `<col2>` ) FROM `<table6>` WHERE `<col3>` > 1000 OR `<col3>` < 500 GROUP BY `<col2>` ORDER BY `<col2>` DESC | Show the number of products with price higher than 1000 or lower than 500 for each product name in a bar chart, and display from high to low by the x axis please. |
<table0>[table_1507852_5] { <col0>[cancelable]:[VARCHAR] <col1>[bubbles]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Yes" | what's the cancelable with bubbles being yes |
<table0>[CaseDates] { <col0>[CaseID]:[INT] <col1>[Date]:[DATE] } | SELECT COUNT( * ) FROM `<table0>` WHERE DATE_FORMAT( `<table0>`.Date, '%Y-%m' ) IN ( '2022-01', '2022-02' ); | How many cases were opened in January and February of 2022? |
<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 `<table4>`.subject_id ) FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id INNER JOIN lab ON `<table4>`.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Secondary neuroendocrine tumor of bone" AND lab.flag = "abnormal" | look for the number of patients with abnormal lab tests diagnosed with secondary neuroendocrine tumor of bone.
|
<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 `<table4>`.drugstarttime FROM `<table4>` WHERE `<table4>`.`<table1>`unitstayid IN ( SELECT `<table1>`.`<table1>`unitstayid FROM `<table1>` WHERE `<table1>`.`<table1>`healthsystemstayid IN ( SELECT `<table1>`.`<table1>`healthsystemstayid FROM `<table1>` WHERE `<table1>`.uniquepid = '028-55503' ) ) AND `<table4>`.... | when was patient 028-55503 for the last time prescribed a drug via oral route in 11/2105?
|
<table0>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] } <table1>[PostTypes] { <col0>[number]:[text] } <table2>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[Revie... | SELECT p.Id, p2.Score, p2.ParentId, p2.Body FROM `<table5>` AS p JOIN `<table5>` AS p2 ON p2.ParentId = p.Id JOIN PostTags AS pt ON p.Id = pt.PostId JOIN Tags AS t ON t.Id = pt.TagId WHERE t.TagName LIKE '%python%' | query question, get top python answers. |
<table0>[table_16290] { <col0>[Conference]:[text] <col1>[Bids]:[real] <col2>[Record]:[text] <col3>[Win]:[text] <col4>[Round]:[real] <col5>[Sweet]:[Sixteen] <col6>[real]:[Elite] <col7>[real]:[Final] <col8>[real]:[Championship] <col9>[Game]:[real] } | SELECT "Record" FROM `<table0>` WHERE "Round of 32" = '0' AND "Conference" = 'Metro Atlantic' | What is the record when round of 32 is 0 and metro atlantic conference?
|
<table0>[player] { <col0>[Gender]:[VARCHAR] <col1>[Occupation]:[VARCHAR] } | SELECT Gender, `<col1>` FROM `<table0>` | What are the gender and occupation of players? |
<table0>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table1>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[PostNotices] { <col0... | SELECT TagName, YEAR( Posts.CreationDate ) AS year, COUNT( * ) AS postcount FROM `<table8>` INNER JOIN Post`<table8>` ON Post`<table8>`.TagId = `<table8>`.Id INNER JOIN Posts ON Posts.ParentId = Post`<table8>`.PostId WHERE ( TagName = 'symfony2' OR TagName = 'laravel' OR TagName = 'zend-framework2' ) GROUP BY TagName, ... | Number of posts created in symfony2, laravel and zend-framework2 since 2012. |
<table0>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table1>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table2>[countries] { <co... | SELECT HIRE_DATE, AVG( `<col0>` ) FROM `<table3>` WHERE `<col7>` BETWEEN 8000 AND 12000 AND `<col8>` <> "null" OR `<col10>` <> 40 ORDER BY AVG( `<col0>` ) | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, draw a bar chart about the distribution of hire_date and the average of employee_id bin hire_date by time, and I want to display y axis from low to high order.
|
<table0>[clients] { <col0>[client_id]:[INT] <col1>[name]:[VARCHAR] <col2>[last_workshop_date]:[DATE] } | DELETE FROM `<table0>` WHERE `<col2>` < DATE_SUB( CURDATE( ), INTERVAL 1 YEAR ); | Delete records of clients who have not taken part in any financial wellbeing workshops in the past year. |
<table0>[table_name_90] { <col0>[visitor]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "december 17" | Who was the visiting team on December 17? |
<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 `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.discharge_location = "LONG TERM CARE HOSPITAL" AND `<table3>`.diagnosis = "INFECTED RIGHT THIGH GRAFT" | Which patients with infected right thigh graft as their primary disease have long term care as their hospital discharge?
|
<table0>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table1>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table2>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:... | SELECT HIRE_DATE, AVG( `<col9>` ) FROM `<table6>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table5>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY AVG( `<col9>` ) | For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about the average of manager_id over the hire_date bin hire_date by time, and order in asc by the y-axis.
|
<table0>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } <table1>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID... | SELECT JOB_ID, SUM( `<col10>` ) FROM `<table2>` WHERE `<col1>` LIKE '%D%' OR `<col1>` LIKE '%S%' GROUP BY `<col6>` ORDER BY `<col6>` | For all employees who have the letters D or S in their first name, give me the comparison about the sum of department_id over the job_id , and group by attribute job_id, could you rank bars in asc order?
|
<table0>[table_name_77] { <col0>[opponent]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "april 28" | Who was the opponent when the Phillies played on April 28?
|
<table0>[Customers_Cards] { <col0>[card_type_code]:[VARCHAR] } | SELECT DISTINCT `<col0>` FROM `<table0>` | Show all card type codes. |
<table0>[table_10818] { <col0>[Pick]:[real] <col1>[Round]:[text] <col2>[Player]:[text] <col3>[Free]:[Agent] <col4>[Class]:[text] <col5>[New]:[Team] } | SELECT "Pick" FROM `<table0>` WHERE "Round" = 'compensation-a' AND "Player" = 'frank catalanotto' | What was the pick number for the compensation-a round, for player Frank Catalanotto?
|
<table0>[revenue] { <col0>[revenue_id]:[INT] <col1>[hotel_id]:[INT] <col2>[revenue_date]:[DATE] <col3>[revenue_channel]:[TEXT] <col4>[FLOAT]:[INSERT] } <table1>[hotels] { <col0>[hotel_id]:[INT] <col1>[region]:[TEXT] <col2>[ai_concierge]:[BOOLEAN] } | SELECT region, SUM( amount ) FROM `<table0>` r JOIN hotels h ON r.hotel_id = h.hotel_id WHERE ai_concierge = true GROUP BY region; | What is the total revenue generated by hotels in the Middle East region that have adopted AI-powered concierge systems? |
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[demogr... | SELECT `<table2>`.days_stay FROM `<table2>` WHERE `<table2>`.subject_id = "6983" | for how many days was the patient with patient id 6983 admitted in hospital? |
<table0>[vulnerabilities] { <col0>[INT]:[sector] <col1>[VARCHAR]:[type] <col2>[VARCHAR]:[exploit_count] <col3>[INT]:[last_seen] } | SELECT sector, type, exploit_count FROM `<table0>` WHERE sector = 'healthcare' AND last_seen >= NOW( ) - INTERVAL 3 MONTH ORDER BY exploit_count DESC LIMIT 3; | What are the top 3 most frequently exploited vulnerabilities in the healthcare sector in the last 3 months? |
<table0>[table_name_56] { <col0>[played]:[VARCHAR] <col1>[try_bonus]:[VARCHAR] <col2>[club]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "2" AND `<col2>` = "pontyberem rfc" | For Pontyberem RFC that has a Try Bonus of 2, what is the played?
|
<table0>[CREATE] { <col0>[SCHEMA]:[Government] } <table1>[Government] { <col0>[Agency]:[name] <col1>[VARCHAR]:[255] <col2>[budget]:[INT] } <table2>[Government] { <col0>[Department]:[name] <col1>[VARCHAR]:[255] <col2>[agency]:[VARCHAR] <col3>[255]:[employees] <col4>[INT]:[budget] } | SELECT agency, AVG( employees ) FROM Government.Department WHERE agency IN ( SELECT name FROM Government.Agency WHERE budget > 3000000 ) GROUP BY agency; | What is the average number of employees in each department in the 'Health' agency? |
<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>` WHERE `<table1>`.age < "45" | how many patients whose age is less than 45?
|
<table0>[table_19683] { <col0>[Position]:[real] <col1>[Team]:[text] <col2>[Played]:[real] <col3>[Wins]:[real] <col4>[Draws]:[real] <col5>[Losses]:[real] <col6>[Scored]:[real] <col7>[Conceded]:[real] <col8>[Points]:[real] } | SELECT MIN( "Played" ) FROM `<table0>` | How many games were played?
|
<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>[Participates_in] { <col0>[stuid]:[INTEGER] <col1>[actid]:[INTEGER] } <table2>[Faculty_Partici... | SELECT Building, COUNT( * ) FROM `<table3>` GROUP BY `<col7>` ORDER BY COUNT( * ) | How many faculty members does each building have? List the result with the name of the building Visualize by bar chart, order total number from low to high order. |
<table0>[cases] { <col0>[INT]:[client_id] <col1>[INT]:[case_type] <col2>[VARCHAR]:[opened_date] <col3>[DATE]:[closed_date] <col4>[DATE]:[INSERT] } | DELETE FROM `<table0>` WHERE id = 1; | Delete a client's case information |
<table0>[table_name_23] { <col0>[song_choice]:[VARCHAR] <col1>[original_artist]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "bonnie tyler" | Which song choice was originally performed by Bonnie Tyler? |
<table0>[table_78996] { <col0>[Time]:[text] <col1>[text]:[Local] <col2>[Networked]:[text] <col3>[Freq]:[text] <col4>[News]:[Freq] } | SELECT "Ad Freq" FROM `<table0>` WHERE "News Freq" = '60 minutes' AND "Local/Networked" = 'local' | What Ad Freq has a News Freq of 60 minutes, and a Local/Networked of local? |
<table0>[table_58111] { <col0>[Driver]:[text] <col1>[Constructor]:[text] <col2>[Laps]:[real] <col3>[Time]:[Retired] <col4>[text]:[Grid] } | SELECT "Driver" FROM `<table0>` WHERE "Grid" = '18' | Which driver had a grid number of 18?
|
<table0>[movie] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[title] <col2>[VARCHAR]:[255] <col3>[year]:[INT] <col4>[country]:[VARCHAR] <col5>[255]:[budget] <col6>[INT]:[INSERT] } | SELECT AVG( budget ) FROM `<table0>` WHERE `<col4>` = 'South Korea' AND `<col3>` > 2010; | What's the average budget for Korean movies released after 2010? |
<table0>[PostTypes] { <col0>[number]:[text] } <table1>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table2>[VoteTypes] { <col0>[number]:[text] } <table3>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Te... | SELECT * FROM `<table15>` INNER JOIN Votes ON `<table15>`.Id = Votes.PostId INNER JOIN VoteTypes ON VoteTypeId = VoteTypes.Id WHERE OwnerUserId = @UserId AND VoteTypeId NOT IN ( 2, 3 ) | See non up/down-votes on my posts.
|
<table0>[table_204_431] { <col0>[number]:[yacht] <col1>[text]:[nation] <col2>[text]:[owner] <col3>[text]:[skipper] <col4>[text]:[launch] <col5>[year]:[number] } | SELECT ( SELECT "launch year" FROM `<table0>` WHERE "yacht" = 'morna' ) = ( SELECT "launch year" FROM `<table0>` WHERE "yacht" = 'toyota aurion' ) | was the morna launched the same year as the toyota aurion ? |
<table0>[table_name_78] { <col0>[type_of_game]:[VARCHAR] <col1>[results]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE results¹ = "1:0" | what type of game has the resuts of 1:0?
|
<table0>[organizations] { <col0>[INT]:[sector] <col1>[VARCHAR]:[ESG_rating] <col2>[FLOAT]:[INSERT] } <table1>[investments] { <col0>[INT]:[organization_id] <col1>[INT]:[INSERT] } | DELETE FROM `<table1>` WHERE id = 2; | Delete the investment with ID 2 from the investments table. |
<table0>[startups] { <col0>[INT]:[name] <col1>[TEXT]:[exit_strategy] <col2>[TEXT]:[INSERT] } | SELECT name FROM `<table0>` WHERE exit_strategy IS NOT NULL; | List companies that have had successful exit strategies in the form of IPOs or acquisitions? |
<table0>[hydro_power] { <col0>[country]:[VARCHAR] <col1>[installed_capacity]:[INT] } | SELECT MAX( `<col1>` ) FROM `<table0>` WHERE `<col0>` IN ( 'Colombia', 'Peru' ); | What is the maximum installed capacity for hydroelectric power plants in Colombia and Peru? |
<table0>[table_78149] { <col0>[Home]:[team] <col1>[text]:[Home] <col2>[team]:[score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Away]:[team] <col6>[score]:[text] <col7>[Venue]:[text] <col8>[Crowd]:[real] <col9>[Date]:[text] } | SELECT "Venue" FROM `<table0>` WHERE "Away `<col2>` score" = '14.11 ( 95 )' | What is the name of the Venue for the team that has an Away team score of 14.11 (95)?
|
<table0>[review] { <col0>[name]:[VARCHAR] <col1>[u_id]:[VARCHAR] } <table1>[useracct] { <col0>[name]:[VARCHAR] <col1>[u_id]:[VARCHAR] } | SELECT `<col0>` FROM `<table1>` WHERE NOT `<col1>` IN ( SELECT `<col1>` FROM `<table0>` ) | Find the names of users who did not leave any review. |
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>... | SELECT COUNT( DISTINCT `<table0>`.subject_id ) FROM `<table0>` INNER JOIN procedures ON `<table0>`.hadm_id = procedures.hadm_id WHERE `<table0>`.admityear < "2115" AND procedures.long_title = "Injection or infusion of oxazolidinone class of antibiotics" | provide the number of patients whose admission year is less than 2115 and procedure long title is injection or infusion of oxazolidinone class of antibiotics? |
<table0>[table_204_958] { <col0>[number]:[episode] <col1>[number]:[original] <col2>[broadcast]:[date] <col3>[text]:[average] <col4>[number]:[rank] <col5>[number]:[remarks] } | SELECT "original `<col2>` date" FROM `<table0>` ORDER BY "episode" DESC LIMIT 1 | in what month was the last episode broadcast ?
|
<table0>[Services] { <col0>[service_id]:[INTEGER] <col1>[organization_id]:[INTEGER] <col2>[service_type_code]:[CHAR] <col3>[service_details]:[VARCHAR] } <table1>[Timed_Status_of_Things] { <col0>[thing_id]:[INTEGER] <col1>[Date_and_Date]:[DATETIME] <col2>[Status_of_Thing_Code]:[CHAR] } <table2>[Organizations] { <col0>... | SELECT customer_details, COUNT( `<col1>` ) FROM `<table8>` GROUP BY `<col1>` ORDER BY `<col1>` DESC | Can you draw a bar chart to show the number of items in each customer details category?, list in desc by the names.
|
<table0>[table_204_114] { <col0>[number]:[pos] <col1>[text]:[rider] <col2>[text]:[manufacturer] <col3>[text]:[time] <col4>[retired]:[text] <col5>[grid]:[number] <col6>[points]:[number] } | SELECT "rider" FROM `<table0>` WHERE "points" = 2 | which rider earned only 2 points ?
|
<table0>[table_19868] { <col0>[Stage]:[real] <col1>[Stage]:[winner] <col2>[text]:[General] <col3>[classification]:[text] <col4>[Points]:[classification] <col5>[text]:[Mountains] <col6>[classification]:[text] <col7>[Malaysian]:[rider] <col8>[classification]:[text] <col9>[Team]:[classification] } | SELECT "Malaysian rider classification" FROM `<table0>` WHERE "Stage winner" = 'Hossein Askari' | When hossein askari is the stage winner who is the malaysian rider classification ? |
<table0>[rice_yields] { <col0>[farmer_id]:[INT] <col1>[country]:[VARCHAR] <col2>[crop]:[VARCHAR] <col3>[yield]:[INT] <col4>[is_organic]:[BOOLEAN] } | SELECT AVG( `<col3>` ) FROM `<table0>` WHERE `<col1>` = 'Indonesia' AND `<col4>` = true; | What is the average yield of rice crops in Indonesia, considering only organic farming methods? |
<table0>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[ReviewTaskStateId] <col4>[number]:[PostId] <col5>[number]:[SuggestedEditId] <col6>[number]:[CompletedByReviewTaskId] } <table1>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[Accepted... | SELECT EmailHash FROM `<table19>` WHERE Id = 4555 | select on the database by id. |
<table0>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table1>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[Posts] { <col0>[number]:[PostTypeId] <c... | SELECT ROW_NUMBER( ) OVER ( ORDER BY Reputation DESC ) AS "#", Id AS "user_link", Location, Reputation FROM `<table11>` WHERE Reputation > 99000 AND LOWER( Location ) LIKE LOWER( '%italy%' ) ORDER BY Reputation DESC | Italian Stackoverflow Users > 99k. |
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>... | SELECT COUNT( DISTINCT `<table0>`.subject_id ) FROM `<table0>` INNER JOIN diagnoses ON `<table0>`.hadm_id = diagnoses.hadm_id WHERE `<table0>`.age < "62" AND diagnoses.short_title = "Esophageal reflux" | provide the number of patients less than 62 years who have been diagnosed with esophageal reflux.
|
<table0>[cite] { <col0>[cited]:[int] <col1>[citing]:[int] } <table1>[organization] { <col0>[continent]:[varchar] <col1>[homepage]:[varchar] <col2>[name]:[varchar] <col3>[oid]:[int] } <table2>[author] { <col0>[aid]:[int] <col1>[homepage]:[varchar] <col2>[name]:[varchar] <col3>[oid]:[int] } <table3>[domain_author] { <... | SELECT COUNT( DISTINCT ( organization.name ) ) FROM author, domain, domain_author, organization WHERE domain_author.aid = author.aid AND domain.did = domain_author.did AND domain.name = 'Databases' AND organization.continent = 'North America' AND organization.oid = author.oid | return me the number of organizations in Databases area located in ' North America ' . |
<table0>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table1>[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]:[va... | SELECT HIRE_DATE, `<col7>` FROM `<table1>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table5>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY `<col5>` | For those employees who do not work in departments with managers that have ids between 100 and 200, draw a line chart about the change of salary over hire_date , show by the x axis in ascending please.
|
<table0>[otas] { <col0>[ota_id]:[INT] <col1>[ota_name]:[TEXT] <col2>[region]:[TEXT] <col3>[virtual_tour_sessions]:[INT] } | SELECT ota_name, `<col3>` FROM `<table0>` WHERE `<col2>` = 'Asia' ORDER BY `<col3>` DESC LIMIT 1; | Which online travel agencies have the highest number of virtual tour sessions in 'Asia'? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.