schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<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 `<table2>`.days_stay, `<table2>`.admittime FROM `<table2>` WHERE `<table2>`.subject_id = "52012"
what is the number of days of hospital stay and admission time for patient id 52012?
<table0>[RuralHealthFacility4] { <col0>[patient_id]:[INT] <col1>[patient_name]:[VARCHAR] <col2>[age]:[INT] <col3>[diagnosis]:[VARCHAR] }
UPDATE RuralHealthFacility4 SET diagnosis = 'diabetes' WHERE patient_name = 'Eve';
Update the diagnosis of patient 'Eve' to 'diabetes' in 'RuralHealthFacility4'.
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[admittime]:[time] <col4>[dischtime]:[time] <col5>[admissi...
SELECT COUNT( * ) > 0 FROM `<table12>` WHERE `<table12>`.hadm_id IN ( SELECT `<table1>`.hadm_id FROM `<table1>` WHERE `<table1>`.subject_id = 28447 ) AND DATETIME( `<table12>`.startdate, 'start of month' ) = DATETIME( CURRENT_TIME( ), 'start of month', '-0 month' )
has patient 28447 received any medication this month?
<table0>[Players] { <col0>[PlayerID]:[INT] <col1>[PRIMARY]:[KEY] <col2>[VARCHAR]:[Age] <col3>[INT]:[GamingCommunity] <col4>[VARCHAR]:[INSERT] }
SELECT AVG( Age ) FROM `<table0>` WHERE GamingCommunity = 'GamingCommunity' AND YEAR( JoinDate ) = 2021;
What's the average age of players who joined the "GamingCommunity" in 2021?
<table0>[faculty_participates_in] { <col0>[facid]:[number] <col1>[actid]:[number] } <table1>[activity] { <col0>[actid]:[number] <col1>[activity_name]:[text] } <table2>[student] { <col0>[stuid]:[number] <col1>[lname]:[text] <col2>[fname]:[text] <col3>[age]:[number] <col4>[sex]:[text] <col5>[major]:[number] <col6>[advi...
SELECT T3.activity_name FROM `<table3>` AS T1 JOIN `<table3>`_participates_in AS T2 ON T1.facid = T2.facid JOIN activity AS T3 ON T3.actid = T2.actid WHERE T1.fname = "Mark" AND T1.lname = "Giuliano"
Show the names of all the activities Mark Giuliano participates in.
<table0>[hotel_revenue] { <col0>[hotel_id]:[INT] <col1>[country]:[VARCHAR] <col2>[monthly_revenue]:[FLOAT] } <table1>[museum_visitors] { <col0>[visit_id]:[INT] <col1>[country]:[VARCHAR] <col2>[monthly_visitors]:[INT] }
SELECT AVG( `<col2>` ) FROM `<table0>` WHERE `<col1>` IN ( 'India', 'Mexico' ) UNION ALL SELECT AVG( `<col2>` ) FROM `<table1>` WHERE `<col1>` IN ( 'India', 'Mexico' );
Find the average monthly revenue of eco-friendly hotels in India and Mexico, and the average monthly visitor count to museums in these two countries.
<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>`.gender = "M" AND procedures.icd9_code = "3799"
how many male patients have 3799 as the procedure icd9 code?
<table0>[Catalogs] { <col0>[catalog_id]:[INTEGER] <col1>[catalog_name]:[VARCHAR] <col2>[catalog_publisher]:[VARCHAR] <col3>[date_of_publication]:[DATETIME] <col4>[date_of_latest_revision]:[DATETIME] } <table1>[Catalog_Contents] { <col0>[catalog_entry_id]:[INTEGER] <col1>[catalog_level_number]:[INTEGER] <col2>[parent_e...
SELECT attribute_name, COUNT( `<col1>` ) FROM `<table4>` AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 0 GROUP BY `<col1>` ORDER BY COUNT( `<col1>` )
Which attribute definitions have attribute value 0? Give me the number of attributes in each attribute name, and show total number from low to high order.
<table0>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[admittime]:[time] <col4>[dischtime]:[time] <col5>[admission_type]:[text] <col6>[admission_location]:[text] <col7>[discharge_location]:[text] <col8>[insurance]:[text] <col9>[language]:[text] <col10>[marital_status]...
SELECT `<table0>`.insurance FROM `<table0>` WHERE `<table0>`.subject_id = 6170 AND `<table0>`.dischtime IS NULL
what was patient 6170's insurance plan during this hospital visit.
<table0>[table_76714] { <col0>[Week]:[text] <col1>[Theme]:[text] <col2>[Artist]:[text] <col3>[Order]:[sung] <col4>[text]:[Status] }
SELECT "Week" FROM `<table0>` WHERE "Status" = 'bottom 2' AND "Artist" = 'celine dion'
What week did the contestant finish in the bottom 2 with a Celine Dion song?
<table0>[virtual_tours] { <col0>[region]:[VARCHAR] <col1>[255]:[quarter] <col2>[VARCHAR]:[local_impact] <col3>[FLOAT]:[INSERT] }
SELECT SUM( local_impact ) FROM `<table0>` WHERE `<col0>` IN ( 'Germany', 'France', 'Italy' ) AND quarter = 'Q2';
What was the local economic impact of virtual tours in Europe in Q2 2022?
<table0>[construction_workers] { <col0>[INT]:[name] <col1>[VARCHAR]:[salary] <col2>[DECIMAL]:[state] <col3>[VARCHAR]:[INSERT] }
SELECT MAX( salary ) FROM `<table0>` WHERE state = 'New York';
What is the maximum salary earned by a construction worker in New York?
<table0>[table_11961582_10] { <col0>[high_rebounds]:[VARCHAR] <col1>[high_assists]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "J. Johnson ( 7 )"
Who had the high rebounds when the high assists were from J. Johnson (7)?
<table0>[Production] { <col0>[INT]:[chemical] <col1>[VARCHAR]:[255] <col2>[volume]:[INT] <col3>[production_date]:[DATE] }
SELECT chemical, SUM( `<col2>` ) FROM `<table0>` WHERE `<col3>` >= DATE_SUB( CURDATE( ), INTERVAL 1 YEAR ) GROUP BY chemical
Calculate the total production volume for each chemical type in the past year.
<table0>[artist] { <col0>[artist_name]:[text] <col1>[country]:[text] <col2>[gender]:[text] <col3>[preferred_genre]:[text] } <table1>[files] { <col0>[f_id]:[number] <col1>[artist_name]:[text] <col2>[file_size]:[text] <col3>[duration]:[text] <col4>[formats]:[text] } <table2>[song] { <col0>[song_name]:[text] <col1>[arti...
SELECT DISTINCT `<table0>`_name FROM `<table0>` WHERE `<col1>` = "Bangladesh" EXCEPT SELECT DISTINCT `<table0>`_name FROM `<table2>` WHERE `<col5>` > 7
What are the names of the different artists from Bangladesh who never received a rating higher than a 7?
<table0>[patient_treatments] { <col0>[patient_id]:[INT] <col1>[age]:[INT] <col2>[therapy_type]:[VARCHAR] <col3>[treatment_score]:[INT] }
SELECT AVG( `<col3>` ) FROM `<table0>` WHERE `<col1>` BETWEEN 25 AND 30 AND `<col2>` = 'CBT';
What is the average anxiety treatment score for patients aged 25-30?
<table0>[table_10294071_1] { <col0>[ties_played]:[VARCHAR] <col1>[total_w_l]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "38–24"
what is the total number of ties played where total w l is 38 24
<table0>[teachers] { <col0>[teacher_id]:[INT] <col1>[last_pd_completion_date]:[DATE] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` >= DATE_SUB( CURRENT_DATE, INTERVAL 6 MONTH );
How many professional development courses were completed by teachers in the last 6 months?
<table0>[customer] { <col0>[customer_id]:[SMALLINT] <col1>[UNSIGNED]:[store_id] <col2>[TINYINT]:[UNSIGNED] <col3>[first_name]:[VARCHAR] <col4>[last_name]:[VARCHAR] <col5>[email]:[VARCHAR] <col6>[address_id]:[SMALLINT] <col7>[UNSIGNED]:[active] <col8>[BOOLEAN]:[create_date] <col9>[DATETIME]:[last_update] } <table1>[add...
SELECT `<table4>`_date, COUNT( `<table4>`_date ) FROM `<table4>` WHERE amount > 10 UNION SELECT T1.`<table4>`_date FROM `<table4>` AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa' GROUP BY `<table4>`_date
A line chart for what are the number of the payment dates for any payments that have an amount greater than 10 or were handled by a staff member with the first name Elsa?
<table0>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table1>[labevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[itemid]:[number] <col4>[charttime]:[time] <col5>[valuenum]:[number] <col6>[valueuom]:[text] } <tab...
SELECT `<table1>`.charttime FROM `<table1>` WHERE `<table1>`.itemid IN ( SELECT `<table9>`.itemid FROM `<table9>` WHERE `<table9>`.label = 'pt' ) AND `<table1>`.hadm_id IN ( SELECT `<table15>`.hadm_id FROM `<table15>` WHERE `<table15>`.subject_id = 87942 AND NOT `<table15>`.dischtime IS NULL ORDER BY `<table15>`.admitt...
tell me the first time that patient 87942 had a pt lab test in the last hospital visit?
<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 * FROM dbo.Posts AS p WHERE p.Id = 100
select top 10 * from dbo.Posts.
<table0>[hotels] { <col0>[hotel_id]:[INT] <col1>[name]:[TEXT] <col2>[city]:[TEXT] <col3>[country]:[TEXT] <col4>[rating]:[FLOAT] <col5>[eco_friendly]:[BOOLEAN] }
SELECT AVG( `<col4>` ) FROM `<table0>` WHERE `<col5>` = TRUE;
What is the average rating of 'eco-friendly' hotels worldwide?
<table0>[table_name_36] { <col0>[voice_actor__english_1998___pioneer]:[VARCHAR] <col1>[voice_actor__english_1997___saban]:[VARCHAR] }
SELECT voice_actor__english_1998___pioneer_ FROM `<table0>` WHERE voice_actor__english_1997___saban_ = "dave ward"
what character did dave ward play
<table0>[table_2668416_18] { <col0>[candidates]:[VARCHAR] <col1>[district]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Virginia 17"
If the district is Virginia 17, who are the candidates?
<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 24 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table5>`.`<table5>`time ) ) FROM `<table5>` WHERE `<table5>`.`<table0>`unitstayid IN ( SELECT `<table0>`.`<table0>`unitstayid FROM `<table0>` WHERE `<table0>`.`<table0>`healthsystemstayid IN ( SELECT `<table0>`.`<table0>`healthsystemstayid FROM `<table...
i mean how many hours has it been since the first time patient 005-87465 had a intake (ml)-gastrostomy/enterostomy percutaneous endoscopic gastrostomy (peg) 20 fr. umbilicus intake on the current intensive care unit visit?
<table0>[Dorm_amenity] { <col0>[amenid]:[INTEGER] <col1>[amenity_name]:[VARCHAR] } <table1>[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] } <table2>[Dorm] { <c...
SELECT Sex, MAX( `<col3>` ) FROM `<table1>` GROUP BY `<col4>`
Find the oldest age for students with different sex in a pie chart.
<table0>[train] { <col0>[int]:[train_number] <col1>[int]:[name] <col2>[text]:[origin] <col3>[text]:[destination] <col4>[text]:[time] <col5>[text]:[interval] } <table1>[route] { <col0>[train_id]:[int] <col1>[station_id]:[int] } <table2>[station] { <col0>[int]:[network_name] <col1>[text]:[services] <col2>[text]:[local_...
SELECT services, COUNT( services ) FROM `<table2>` GROUP BY services ORDER BY services DESC
Group by services attribute in station table and compute the total number of services with a bar chart, display x-axis from high to low order please.
<table0>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table1>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvalue...
SELECT DISTINCT `<table3>`.`<table3>` FROM `<table3>` WHERE `<table3>`.eventtype = '`<table7>`' AND `<table3>`.eventid IN ( SELECT `<table7>`.`<table7>`id FROM `<table7>` WHERE `<table7>`.`<table7>`name = 'svt - re-entrant' )
what is the price of a diagnosis for svt - re-entrant?
<table0>[table_43336] { <col0>[Tournament]:[text] <col1>[Wins]:[real] <col2>[Top]:[real] <col3>[Top]:[real] <col4>[Top]:[real] <col5>[Events]:[real] <col6>[Cuts]:[real] }
SELECT MIN( "Wins" ) FROM `<table0>` WHERE "Top-10" > '9'
What is the lowest Wins with a Top-10 that is larger than 9?
<table0>[record] { <col0>[int]:[Result] <col1>[text]:[Swimmer_ID] <col2>[int]:[Event_ID] } <table1>[swimmer] { <col0>[int]:[name] <col1>[text]:[Nationality] <col2>[text]:[meter_100] <col3>[real]:[meter_200] <col4>[text]:[meter_300] <col5>[text]:[meter_400] <col6>[text]:[meter_500] <col7>[text]:[meter_600] <col8>[text]...
SELECT meter_200, SUM( ID ) FROM `<table1>` GROUP BY meter_200 ORDER BY meter_200
Find meter_200 and the sum of ID , and group by attribute meter_200, and visualize them by a bar chart, and I want to display in ascending by the x axis.
<table0>[table_name_54] { <col0>[hdtv]:[VARCHAR] <col1>[content]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "timeshift +1 di disney junior"
What is the HDTV when the content shows a timeshift +1 di disney junior?
<table0>[table_train_76] { <col0>[int]:[mini_mental_state_examination_mmse] <col1>[int]:[language] <col2>[string]:[csf] <col3>[int]:[rosen_modified_hachinski_ischemic_score] <col4>[int]:[bool] <col5>[age]:[float] <col6>[NOUSE]:[float] }
SELECT * FROM `<table0>` WHERE language = 'english'
fluent in english
<table0>[Policy] { <col0>[PolicyNumber]:[INT] <col1>[PolicyholderName]:[VARCHAR] } <table1>[Claim] { <col0>[ClaimID]:[INT] <col1>[PolicyNumber]:[INT] <col2>[ClaimDate]:[DATE] <col3>[ClaimAmount]:[DECIMAL] <col4>[INSERT]:[Policy] <col5>[VALUES]:[Ayo] <col6>[Fayose]:[Peter] <col7>[Jackson]:[INSERT] }
SELECT PolicyNumber, MAX( `<table1>`Amount ) as Max`<table1>`Amount FROM `<table1>` WHERE `<table1>`Date >= DATEADD( MONTH, -6, GETDATE( ) ) GROUP BY `<col1>` ORDER BY Max`<table1>`Amount DESC;
What is the policy number with the highest claim amount in the last 6 months?
<table0>[table_10070] { <col0>[City]:[text] <col1>[Province]:[text] <col2>[Country]:[text] <col3>[IATA]:[text] <col4>[ICAO]:[text] <col5>[Airport]:[text] }
SELECT "Province" FROM `<table0>` WHERE "ICAO" = 'vmmc'
which Province has a ICAO of vmmc?
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table2>[medicati...
SELECT `<table2>`.drugname FROM `<table2>` WHERE `<table2>`.`<table5>`unitstayid IN ( SELECT `<table5>`.`<table5>`unitstayid FROM `<table5>` WHERE `<table5>`.uniquepid = '006-80884' ) AND DATETIME( `<table2>`.drugstarttime, 'start of day' ) = DATETIME( CURRENT_TIME( ), 'start of day', '-0 day' ) EXCEPT SELECT `<table2>...
what were the drugs added to patient 006-80884 today versus yesterday?
<table0>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table1>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <tab...
SELECT HIRE_DATE, SUM( `<col9>` ) FROM `<table4>` WHERE `<col7>` BETWEEN 8000 AND 12000 AND `<col8>` <> "null" OR `<col10>` <> 40
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 sum of manager_id bin hire_date by weekday.
<table0>[cases] { <col0>[case_id]:[INT] <col1>[case_type]:[VARCHAR] <col2>[255]:[year] <col3>[INT]:[restorative_justice] <col4>[BOOLEAN]:[INSERT] }
SELECT case_type, year, ROUND( SUM( CASE WHEN restorative_justice THEN 1 ELSE 0 END ) * 100.0 / COUNT( * ), 2 ) as pct_restorative_justice FROM `<table0>` GROUP BY case_type, year;
What is the percentage of cases resolved through restorative justice, by type and year?
<table0>[donations] { <col0>[INT]:[country] <col1>[TEXT]:[DECIMAL] }
SELECT country, MAX( amount ) FROM `<table0>` GROUP BY country;
What is the maximum donation amount per country, for countries that have received donations?
<table0>[table_name_95] { <col0>[total]:[INTEGER] <col1>[silver]:[VARCHAR] <col2>[gold]:[VARCHAR] }
SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 1 AND `<col2>` < 0
What's the total when the gold is less than 0 and silver is less than 1?
<table0>[table_54344] { <col0>[Dismissals]:[text] <col1>[Player]:[text] <col2>[Versus]:[text] <col3>[Venue]:[text] <col4>[Date]:[text] }
SELECT "Venue" FROM `<table0>` WHERE "Date" = '27-02-2003'
What is the Venue with a Date with 27-02-2003?
<table0>[table_name_88] { <col0>[poll_source]:[VARCHAR] <col1>[lead_margin]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 5.5
Which organization administered the poll that showed a lead margin of 5.5?
<table0>[table_72924] { <col0>[Body]:[style] <col1>[text]:[Wheelbase] <col2>[text]:[Length] <col3>[text]:[Height] <col4>[text]:[Curb] <col5>[weight]:[text] }
SELECT "Curb weight" FROM `<table0>` WHERE "Wheelbase" = 'mm ( in )' AND "Height" = 'mm ( in ) mm ( in ) ( 4Matic )'
What's the curb weight of the model with a wheelbase of mm (in) and height of mm (in) mm (in) (4Matic)?
<table0>[table_name_81] { <col0>[touchdowns]:[INTEGER] <col1>[points]:[VARCHAR] <col2>[field_goals]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 5 AND `<col2>` > 0
Which Touchdowns is the lowest one that has Points of 5, and a Field goals larger than 0?
<table0>[awards_players] { <col0>[playerID]:[text] <col1>[award]:[text] <col2>[year]:[integer] <col3>[lgID]:[text] <col4>[note]:[text] <col5>[pos]:[text] } <table1>[coaches] { <col0>[coachID]:[text] <col1>[year]:[integer] <col2>[tmID]:[text] <col3>[lgID]:[text] <col4>[stint]:[integer] <col5>[won]:[integer] <col6>[lost...
SELECT T1.firstName FROM `<table4>` AS T1 INNER JOIN `<table4>`_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.lgID = 'NBL' GROUP BY T1.playerID, T1.firstName ORDER BY COUNT( PF ) DESC LIMIT 1
Please list the first names of the players with the most personal fouls in the 'NBL' league.
<table0>[table_name_36] { <col0>[losses]:[VARCHAR] <col1>[draws]:[VARCHAR] <col2>[points]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 4 AND `<col2>` = 9
What is the number of losses when there were less than 4 draws, and points were 9?
<table0>[table_name_62] { <col0>[attendance]:[INTEGER] <col1>[week]:[VARCHAR] <col2>[opponent]:[VARCHAR] }
SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` > 11 AND `<col2>` = "washington redskins"
What was the attendance during the match that took place after week 11 against the washington redskins?
<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 t3.drugname FROM ( SELECT t2.drugname, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT patient.uniquepid, `<table2>`.drugstarttime FROM `<table2>` JOIN patient ON `<table2>`.patientunitstayid = patient.patientunitstayid WHERE `<table2>`.drugname = '100 ml glass cont : iopamidol 61 % iv soln' ...
among patients that were prescribed 100 ml glass cont : iopamidol 61 % iv soln, what was the four most commonly prescribed drugs at the same time, since 5 years ago?
<table0>[table_70569] { <col0>[Rank]:[real] <col1>[Nation]:[text] <col2>[Gold]:[real] <col3>[Silver]:[real] <col4>[Bronze]:[real] <col5>[Total]:[real] }
SELECT MIN( "Gold" ) FROM `<table0>` WHERE "Rank" > '4' AND "Total" < '1'
What's the lowest Gold if the Rank is over 4 but the Total is less than 1?
<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 `<col7>` BETWEEN 8000 AND 12000 AND `<col8>` <> "null" OR `<col10>` <> 40
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, visualize a bar chart about the distribution of hire_date and the average of manager_id bin hire_date by time.
<table0>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heartrate]:[number] <col5>[respiration]:[number] <col6>[systemicsystolic]:[number] <col7>[systemicdiastolic]:[number] <col8>[systemicmean]:[number] <col9>[observationti...
SELECT COUNT( * ) FROM `<table8>` WHERE `<table8>`.`<table8>`name = 'cardiac surgery consultation' AND STRFTIME( '%y', `<table8>`.`<table8>`time ) = '2104'
how many cardiac surgery consultation procedures have occured in 2104?
<table0>[table_204_414] { <col0>[number]:[name] <col1>[text]:[armenian] <col2>[text]:[location] <col3>[text]:[prisoners] <col4>[designed]:[number] <col5>[notes]:[text] }
SELECT "# of prisoners `<col4>` for" FROM `<table0>` WHERE "name" = 'artik'
how many prisoners is artik designed to hold ?
<table0>[table_train_189] { <col0>[int]:[alt] <col1>[float]:[hyperglycemia] <col2>[bool]:[liver_disease] <col3>[bool]:[smoking] <col4>[bool]:[alcohol_abuse] <col5>[bool]:[drug_abuse] <col6>[bool]:[triglyceride_tg] <col7>[float]:[NOUSE] }
SELECT * FROM `<table0>` WHERE alcohol_abuse = 1 OR drug_abuse = 1
chronic or persistent alcohol or drug abuse
<table0>[wells] { <col0>[well_name]:[VARCHAR] <col1>[date]:[DATE] <col2>[oil_production]:[NUMERIC] }
SELECT date, oil_production, AVG( `<col2>` ) OVER ( ORDER BY `<col1>` ROWS BETWEEN 2 PRECEDING AND CURRENT ROW ) as moving_average FROM `<table0>` WHERE `<col0>` = 'Well A';
Calculate the moving average of oil production for the last 3 days from the 'wells' table.
<table0>[AtmosphericMonitoringStation] { <col0>[INT]:[year] <col1>[INT]:[month] <col2>[INT]:[co2_level] <col3>[FLOAT]:[INSERT] }
SELECT month, AVG( co2_level ) FROM `<table0>` GROUP BY year, month;
What is the average CO2 level per month in the AtmosphericMonitoringStation?
<table0>[table_name_42] { <col0>[type]:[VARCHAR] <col1>[artist]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "hiroyuki takami"
What Type has the Artist of Hiroyuki Takami?
<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 diagnoses ON `<table1>`.hadm_id = diagnoses.hadm_id WHERE `<table1>`.admission_type = "EMERGENCY" AND diagnoses.icd9_code = "1550"
give the number of patients who got admitted in mergencye and diagnosis icd9 code is 1550
<table0>[security_incidents] { <col0>[INT]:[system] <col1>[VARCHAR]:[255] <col2>[incident_date]:[DATE] }
SELECT system, ROW_NUMBER( ) OVER ( ORDER BY COUNT( * ) DESC ) as rank FROM `<table0>` WHERE `<col2>` >= DATEADD( week, -1, GETDATE( ) ) GROUP BY system;
Identify the top 5 most frequently targeted systems in the last week, ranked by number of security incidents.
<table0>[Student] { <col0>[Age]:[VARCHAR] <col1>[Fname]:[VARCHAR] <col2>[Lname]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Linda" AND `<col2>` = "Smith"
What is the age of student Linda Smith?
<table0>[table_67076] { <col0>[Competition]:[text] <col1>[1993]:[u2013] <col2>[text]:[1994] <col3>[u2013]:[text] <col4>[1995]:[u2013] <col5>[text]:[1996] <col6>[u2013]:[text] <col7>[1997]:[u2013] <col8>[text]:[1998] <col9>[u2013]:[text] <col10>[1999]:[u2013] <col11>[2000]:[text] <col12>[2000]:[u2013] <col13>[text]:[200...
SELECT "1999\u2013 2000" FROM `<table0>` WHERE "1993\u2013 94" = 'did not participate'
Name the 1999-2000 for 1993-94 of did not participate
<table0>[company_info] { <col0>[INT]:[name] <col1>[TEXT]:[sector] <col2>[TEXT]:[membership] <col3>[TEXT]:[INSERT] }
SELECT * FROM `<table0>` WHERE sector = 'Energy' AND membership = 'UN Global Compact' AND country LIKE 'South%';
List companies in the energy sector with a UN Global Compact membership in South America.
<table0>[table_name_21] { <col0>[wins]:[INTEGER] <col1>[team]:[VARCHAR] <col2>[draws]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "olimpia" AND `<col2>` < 4
What is the lowest Wins that has the Team of Olimpia and Draws that's smaller than 4?
<table0>[table_33772] { <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 "Away team" FROM `<table0>` WHERE "Away `<col2>` score" = '7.10 ( 52 )'
What is the away team name that has a score of 7.10 (52)?
<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>`.diagnosis = "ABDOMINAL ABSCESS" AND `<table1>`.age < "58"
give me the number of patients whose primary disease is abdominal abscess and age is less than 58?
<table0>[green_energy_projects] { <col0>[INT]:[funded] <col1>[DATE]:[region] <col2>[VARCHAR]:[INSERT] }
SELECT COUNT( * ) FROM `<table0>` WHERE region = 'Asia' AND funded >= DATE_SUB( CURRENT_DATE, INTERVAL 5 YEAR );
How many green energy projects were funded in Asia in the last 5 years?
<table0>[table_204_961] { <col0>[number]:[title] <col1>[text]:[director] <col2>[text]:[production] <col3>[text]:[music] <col4>[text]:[cast] <col5>[text]:[release] <col6>[date]:[text] }
SELECT "title" FROM `<table0>` WHERE id = ( SELECT id FROM `<table0>` WHERE "title" = 'devakanya' ) - 1
what film was released before devakanya ?
<table0>[complaints] { <col0>[complaint_status_code]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` GROUP BY `<col0>` HAVING COUNT( * ) > 3
Which complaint status has more than 3 records on file?
<table0>[table_name_74] { <col0>[mountain_peak]:[VARCHAR] <col1>[location]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "53.1370°n 119.2667°w"
what is the mountain peak when the location is 53.1370°n 119.2667°w?
<table0>[table_45834] { <col0>[Continent]:[text] <col1>[Structure]:[text] <col2>[Height]:[text] <col3>[Year]:[real] <col4>[Country]:[text] }
SELECT MIN( "Year" ) FROM `<table0>` WHERE "Structure" = 'mercury city tower'
What year was the Mercury City Tower?
<table0>[table_204_354] { <col0>[number]:[opus] <col1>[text]:[title] <col2>[text]:[genre] <col3>[text]:[sub] <col4>[u00addivisions]:[text] <col5>[libretto]:[text] <col6>[composition]:[text] <col7>[premiere]:[date] <col8>[text]:[place] <col9>[theatre]:[text] }
SELECT COUNT( "title" ) FROM `<table0>` WHERE "genre" = 'oper'
what is the number of operas from the oper genre ?
<table0>[Polar_Bears_Arctic] { <col0>[INT]:[VARCHAR] <col1>[Age]:[INT] <col2>[Health]:[VARCHAR] <col3>[Gender]:[VARCHAR] <col4>[Region]:[VARCHAR] }
SELECT AVG( `<col1>` ) FROM `<table0>` WHERE `<col2>` = 'Healthy' AND `<col3>` = 'Male' AND `<col4>` != 'Svalbard';
What is the average age of healthy male polar bears in the Arctic, excluding any from the Svalbard region?
<table0>[peacekeeping_operations] { <col0>[operation_id]:[INT] <col1>[operation_name]:[VARCHAR] <col2>[country]:[VARCHAR] <col3>[start_date]:[DATE] <col4>[end_date]:[DATE] <col5>[operation_description]:[TEXT] }
UPDATE peacekeeping_operations SET country = UPPER( country ) WHERE country = 'africa';
Update the country column in the peacekeeping_operations table to uppercase for all records in Africa
<table0>[table_train_69] { <col0>[int]:[systolic_blood_pressure_sbp] <col1>[int]:[language] <col2>[string]:[valvular_dysfunction] <col3>[bool]:[heart_disease] <col4>[bool]:[temperature] <col5>[float]:[sepsis] <col6>[bool]:[heart_rate] <col7>[int]:[lipid_metabolism] <col8>[bool]:[organ_failure] <col9>[bool]:[NOUSE] }
SELECT * FROM `<table0>` WHERE language <> 'english' OR language <> 'kiswahili'
lack of basic language skills in either english or kiswahili
<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 COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN procedures ON `<table2>`.hadm_id = procedures.hadm_id WHERE `<table2>`.dob_year < "2065" AND procedures.long_title = "Prophylactic administration of vaccine against other diseases"
count the number of patients born before 2065 who had prophylactic administration of vaccine against other diseases.
<table0>[table_name_7] { <col0>[shooter]:[VARCHAR] <col1>[event]:[VARCHAR] <col2>[rank_points]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "wc rio de janeiro" AND `<col2>` = "10"
Who is the shooter at the WC Rio De Janeiro event with 10 rank points?
<table0>[Suppliers] { <col0>[supplier_id]:[INTEGER] <col1>[supplier_name]:[VARCHAR] <col2>[supplier_phone]:[VARCHAR] } <table1>[Supplier_Addresses] { <col0>[supplier_id]:[INTEGER] <col1>[address_id]:[INTEGER] <col2>[date_from]:[DATETIME] <col3>[date_to]:[DATETIME] } <table2>[Customer_Addresses] { <col0>[customer_id]:...
SELECT order_id, `<col1>` FROM `<table7>` WHERE `<col2>` = "Cancelled" ORDER BY `<col3>`
plot scatter on what are the order ids and customer ids for orders that have been Cancelled, sorted by their order dates?
<table0>[table_name_96] { <col0>[opposing_teams]:[VARCHAR] <col1>[status]:[VARCHAR] <col2>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "test match" AND `<col2>` = "25/11/2000"
What is Opposing Teams, when Status is "Test Match", and when Date is "25/11/2000"?
<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 prescriptions ON `<table3>`.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "OXYC10"
provide the number of patients whose drug code is oxyc10?
<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 `<table4>`.subject_id ) FROM `<table4>` INNER JOIN prescriptions ON `<table4>`.hadm_id = prescriptions.hadm_id WHERE `<table4>`.age < "81" AND prescriptions.formulary_drug_cd = "METD10"
how many patients of age less than 81 years have been given the drug metd10?
<table0>[table_name_28] { <col0>[capacity]:[INTEGER] <col1>[club]:[VARCHAR] }
SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "bandırma banvit"
What is the capacity of Band rma Banvit?
<table0>[city] { <col0>[city_id]:[integer] <col1>[city_name]:[text] <col2>[state]:[text] <col3>[population]:[integer] <col4>[area]:[real] } <table1>[customer] { <col0>[cust_id]:[integer] <col1>[cust_name]:[text] <col2>[annual_revenue]:[integer] <col3>[cust_type]:[text] <col4>[address]:[text] <col5>[city]:[text] <col6>...
SELECT T3.make, T4.first_name, T4.last_name FROM `<table1>` AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id INNER JOIN truck AS T3 ON T3.truck_id = T2.truck_id INNER JOIN driver AS T4 ON T4.driver_id = T2.driver_id WHERE T1.cust_name = 'Klett & Sons Repair'
Provide the brand of the truck and the name of the driver that transported goods in Klett & Sons Repair.
<table0>[table_204_765] { <col0>[number]:[year] <col1>[number]:[location] <col2>[text]:[gold] <col3>[text]:[silver] <col4>[text]:[bronze] }
SELECT "bronze" FROM `<table0>` WHERE "bronze" <> 'desideria ampon' AND "year" = ( SELECT "year" FROM `<table0>` WHERE "bronze" = 'desideria ampon' )
desideria ampon won the bronze medal the same year as who else ?
<table0>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table1>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table2>[outputevents] { <col0>[row_id]:[number]...
SELECT COUNT( DISTINCT t1.subject_id ) FROM ( SELECT admissions.subject_id, `<table11>`.charttime FROM `<table11>` JOIN admissions ON `<table11>`.hadm_id = admissions.hadm_id WHERE `<table11>`.icd9_code = ( SELECT `<table7>`.icd9_code FROM `<table7>` WHERE `<table7>`.short_title = 'asymp hiv infectn status' ) AND DATET...
count the number of patients who received a thoracentesis procedure during the same month after they were diagnosed with asymp hiv infectn status until 2 years ago.
<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 `<table4>`.subject_id ) FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id WHERE `<table4>`.insurance = "Medicaid" AND diagnoses.long_title = "Retained plastic fragments"
what is the number of patients whose insurance is medicaid and diagnoses long title is retained plastic fragments?
<table0>[table_name_86] { <col0>[game]:[VARCHAR] <col1>[location_attendance]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "amway arena"
What game number was played at amway arena?
<table0>[table_30392] { <col0>[Institution]:[text] <col1>[Location]:[text] <col2>[Founded]:[real] <col3>[Affiliation]:[text] <col4>[Enrollment]:[real] <col5>[Team]:[Nickname] <col6>[text]:[Primary] <col7>[conference]:[text] }
SELECT COUNT( "Institution" ) FROM `<table0>` WHERE "Team Nickname" = 'Gray Wolves'
When gray wolves is the team nickname how many institutions are there?
<table0>[shop] { <col0>[address]:[VARCHAR] <col1>[shop_id]:[VARCHAR] } <table1>[happy_hour] { <col0>[shop_id]:[VARCHAR] }
SELECT t1.address, t1.`<table0>`_id FROM `<table0>` AS t1 JOIN happy_hour AS t2 ON t1.`<table0>`_id = t2.`<table0>`_id WHERE MONTH = 'May'
What are the id and address of the shops which have a happy hour in May?
<table0>[table_name_54] { <col0>[show_name]:[VARCHAR] <col1>[time]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "4:00pm–5:00am"
What show has a time of 4:00pm 5:00am?
<table0>[donations] { <col0>[INT]:[donor_id] <col1>[INT]:[donation_amount] <col2>[DECIMAL]:[donation_date] <col3>[DATE]:[donor_program] <col4>[VARCHAR]:[INSERT] } <table1>[volunteers] { <col0>[INT]:[name] <col1>[VARCHAR]:[program] <col2>[VARCHAR]:[INSERT] } <table2>[programs] { <col0>[INT]:[name] <col1>[VARCHAR]:[INS...
SELECT p.name as program_name, COUNT( DISTINCT v.id ) as total_volunteers, COUNT( DISTINCT d.donor_id ) as total_donors FROM `<table2>` p LEFT JOIN volunteers v ON p.name = v.program LEFT JOIN donations d ON p.name = d.donor_program AND YEAR( d.donation_date ) = 2021 GROUP BY p.name;
What is the total number of volunteers and donors for each program in 2021?
<table0>[table_204_105] { <col0>[number]:[number] <col1>[name]:[text] <col2>[height]:[text] <col3>[weight]:[lbs] <col4>[number]:[position] <col5>[text]:[class] <col6>[text]:[hometown] <col7>[text]:[previous] <col8>[team]:[text] }
SELECT "name" FROM `<table0>` WHERE "previous team( s )" = 'sacred heart'
which player previously played for sacred heart ?
<table0>[table_name_57] { <col0>[surpassed_by]:[VARCHAR] <col1>[year]:[VARCHAR] <col2>[period]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 1925 AND `<col2>` = "6 years"
I need the surpassed for years before 1925 and period of 6 years
<table0>[space_debris] { <col0>[INT]:[name] <col1>[VARCHAR]:[type] <col2>[VARCHAR]:[mass] <col3>[FLOAT]:[orbit] <col4>[VARCHAR]:[last_update] }
SELECT SUM( `<table0>`.mass ) as total_mass FROM `<table0>` WHERE `<table0>`.orbit = 'Low Earth Orbit' AND `<table0>`.last_update = CURDATE( );
What is the total mass of space debris in Low Earth Orbit as of today?
<table0>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[first_careunit]:[text] <col5>[...
SELECT COUNT( DISTINCT `<table9>`.subject_id ) FROM `<table9>` WHERE `<table9>`.hadm_id IN ( SELECT `<table16>`.hadm_id FROM `<table16>` WHERE `<table16>`.icd9_code = ( SELECT `<table5>`.icd9_code FROM `<table5>` WHERE `<table5>`.short_title = 'staph pneumonia nec' ) AND STRFTIME( '%y', `<table16>`.charttime ) >= '2102...
count the number of patients who since 2102 had been diagnosed with staph pneumonia nec.
<table0>[table_1706942_1] { <col0>[constructor]:[VARCHAR] <col1>[q1_order]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 4
What is the constructor when the Q1 order is 4?
<table0>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } <table1>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[...
SELECT `<table16>`.short_title FROM `<table16>` WHERE `<table16>`.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, `<table6>`.charttime, admissions.hadm_id FROM `<table6>` JOIN admissions ON `<table6>`.hadm_id = adm...
what were the four most commonly ordered procedures for patients with nonrheum tricusp val dis who had previously been diagnosed in the same hospital encounter until 2103?
<table0>[rare_earth_market_trends] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[year] <col2>[INT]:[country] <col3>[VARCHAR]:[255] <col4>[element]:[VARCHAR] <col5>[255]:[price_usd] }
WITH updated_price AS ( UPDATE `<table0>` SET price_usd = 20.1 WHERE year = 2022 AND country = 'South Korea' AND `<col4>` = 'Europium' ) SELECT * FROM `<table0>` WHERE country = 'South Korea' AND `<col4>` = 'Europium';
Update the rare_earth_market_trends table to reflect the increased europium price in South Korea
<table0>[algorithm] { <col0>[algorithm_id]:[INT] <col1>[algorithm_name]:[VARCHAR] <col2>[safety_score]:[INT] <col3>[explainability_score]:[INT] }
SELECT `<table0>`_name, `<col2>` FROM `<table0>` WHERE `<col3>` > 75;
What are the names and safety scores of all algorithms with an explainability score greater than 75?
<table0>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] } <table1>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] }
SELECT Name, SUM( `<col2>` ) FROM `<table0>` GROUP BY Name ORDER BY SUM( `<col2>` )
Give me a histogram for what are the names and total prices of all products in the store?, display from low to high by the y-axis please.
<table0>[cinema] { <col0>[cinema_id]:[number] <col1>[name]:[text] <col2>[openning_year]:[number] <col3>[capacity]:[number] <col4>[location]:[text] } <table1>[film] { <col0>[film_id]:[number] <col1>[rank_in_series]:[number] <col2>[number_in_season]:[number] <col3>[title]:[text] <col4>[directed_by]:[text] <col5>[origina...
SELECT T2.directed_by FROM `<table2>` AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.directed_by ORDER BY SUM( T1.show_times_per_day ) DESC LIMIT 1
Show director with the largest number of show times in total.
<table0>[table_name_16] { <col0>[INTEGER]:[draws] }
SELECT MIN( against ) FROM `<table0>` WHERE draws > 0
What was the lowest against when the draw was at least 0?
<table0>[people] { <col0>[People_ID]:[int] <col1>[text]:[Height] <col2>[real]:[Weight] <col3>[real]:[Birth_Date] <col4>[text]:[Birth_Place] } <table1>[body_builder] { <col0>[Body_Builder_ID]:[int] <col1>[People_ID]:[int] <col2>[Snatch]:[real] <col3>[Clean_Jerk]:[real] <col4>[Total]:[real] }
SELECT People_ID, `<col3>` FROM `<table1>`
A scatter chart shows the correlation between People_ID and Clean_Jerk .