schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[table_name_11] { <col0>[result]:[VARCHAR] <col1>[opponent]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "igor samoilenco"
Opponent of igor samoilenco had what result?
<table0>[table_name_15] { }
SELECT 2008 FROM `<table0>` WHERE 2005 = "deandria hill"
Who attended the school in 2008, that Deandria Hill attended in 2005?
<table0>[table_204_100] { <col0>[number]:[date] <col1>[text]:[name] <col2>[ship]:[text] <col3>[nationality]:[text] <col4>[tonnage]:[number] <col5>[fate]:[text] }
SELECT "name of ship" FROM `<table0>` ORDER BY "tonnage" LIMIT 1
boat with the least tonnage that was attacked
<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>` WHERE `<table0>`.gender = "F" AND `<table0>`.diagnosis = "MESENTERIC ISCHEMIA"
what is the number of patients whose gender is f and primary disease is mesenteric ischemia?
<table0>[startups] { <col0>[INT]:[name] <col1>[VARCHAR]:[domain] <col2>[VARCHAR]:[location] <col3>[VARCHAR]:[INSERT] } <table1>[funding] { <col0>[INT]:[startup_id] <col1>[INT]:[DECIMAL] <col2>[purpose]:[VARCHAR] }
SELECT s.name, f.amount FROM `<table0>` s JOIN funding f ON s.id = f.startup_id;
Find biotech startups and their funding amounts
<table0>[ship] { <col0>[Ship_ID]:[int] <col1>[text]:[Type] <col2>[text]:[Nationality] <col3>[text]:[Tonnage] } <table1>[mission] { <col0>[Mission_ID]:[int] <col1>[Ship_ID]:[int] <col2>[Code]:[text] <col3>[Launched_Year]:[int] <col4>[Location]:[text] <col5>[Speed_knots]:[int] <col6>[Fate]:[text] }
SELECT Type, COUNT( Type ) FROM `<table0>` GROUP BY Nationality, Type ORDER BY COUNT( Type ) DESC
What is the total number of every ship type by categorizing by nationality?, and could you sort in desc by the the number of type please?
<table0>[table_203_229] { <col0>[number]:[pick] <col1>[number]:[nfl] <col2>[team]:[text] <col3>[player]:[text] <col4>[position]:[text] <col5>[college]:[text] }
SELECT "player" FROM `<table0>` WHERE "nfl team" = 'green bay packers' AND "pick #" = ( SELECT "pick #" FROM `<table0>` WHERE "nfl team" = 'miami dolphins' ) + 1
the green bay packers after miami dolphins chose which player ?
<table0>[table_name_27] { <col0>[grid]:[VARCHAR] <col1>[driver]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "pedro de la rosa"
What is Pedro De La Rosa's total number of Grid?
<table0>[table_67437] { <col0>[Status]:[text] <col1>[text]:[Performance] <col2>[text]:[Performance] <col3>[text]:[Style] }
SELECT "Name" FROM `<table0>` WHERE "Style" = 'ballet' AND "Status" = 'original cast'
Who had a ballet style with original cast?
<table0>[Reservations] { <col0>[Code]:[INTEGER] <col1>[Room]:[TEXT] <col2>[CheckIn]:[TEXT] <col3>[CheckOut]:[TEXT] <col4>[Rate]:[REAL] <col5>[LastName]:[TEXT] <col6>[FirstName]:[TEXT] <col7>[Adults]:[INTEGER] <col8>[Kids]:[INTEGER] } <table1>[Rooms] { <col0>[RoomId]:[TEXT] <col1>[roomName]:[TEXT] <col2>[beds]:[INTEGER...
SELECT roomName, COUNT( roomName ) FROM `<table0>` AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE `<col6>` LIKE '%ROY%' GROUP BY roomName ORDER BY roomName DESC
Find the name of rooms booked by some customers whose first name contains ROY, and count them by a bar chart, sort x-axis from high to low order.
<table0>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table1>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentim...
SELECT ( SELECT `<table6>`.systemicsystolic 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 = '018-95228' ) AND N...
is the systemicsystolic of patient 018-95228 second measured on the first icu visit less than its value first measured on the first icu visit?
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergyti...
SELECT t1.`<table5>`name FROM ( SELECT `<table5>`.`<table5>`name, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table5>` WHERE `<table5>`.`<table7>`unitstayid IN ( SELECT `<table7>`.`<table7>`unitstayid FROM `<table7>` WHERE `<table7>`.age BETWEEN 20 AND 29 ) AND STRFTIME( '%y', `<table5>`.`<table5>`time...
what is the five most commonly ordered procedure in patients aged 20s in 2104?
<table0>[table_name_30] { <col0>[pages]:[INTEGER] <col1>[vol__number]:[VARCHAR] <col2>[isbn]:[VARCHAR] }
SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 8 AND `<col2>` = "1-40122-892-5"
How many pages does the edition with a volume # smaller than 8 and an ISBM of 1-40122-892-5 have?
<table0>[table_name_68] { <col0>[Prime]:[VARCHAR] <col1>[term_in_office]:[VARCHAR] }
SELECT `<col0>` AS minister FROM `<table0>` WHERE `<col1>` = "344 days"
Which Prime Minister's served a term of 344 days?
<table0>[table_name_5] { <col0>[opponent]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "may 10, 2009"
Who was the opponent on May 10, 2009?
<table0>[Premises] { <col0>[premise_id]:[INTEGER] <col1>[premises_type]:[VARCHAR] <col2>[premise_details]:[VARCHAR] } <table1>[Customers] { <col0>[customer_id]:[INTEGER] <col1>[payment_method]:[VARCHAR] <col2>[customer_name]:[VARCHAR] <col3>[customer_phone]:[VARCHAR] <col4>[customer_email]:[VARCHAR] <col5>[customer_ad...
SELECT outcome_code, COUNT( * ) FROM `<table5>` GROUP BY `<col2>`
Show the outcome code of mailshots along with the number of mailshots in each outcome code with a pie chart.
<table0>[district] { <col0>[name]:[VARCHAR] <col1>[income]:[FLOAT] }
SELECT MAX( `<col1>` ) FROM `<table0>` WHERE `<col0>` = 'South';
What is the maximum income in the "South" district?
<table0>[Ref_Budget_Codes] { <col0>[Budget_Type_Code]:[CHAR] <col1>[Budget_Type_Description]:[VARCHAR] } <table1>[Projects] { <col0>[Project_ID]:[INTEGER] <col1>[Project_Details]:[VARCHAR] } <table2>[Ref_Document_Types] { <col0>[Document_Type_Code]:[CHAR] <col1>[Document_Type_Name]:[VARCHAR] <col2>[255]:[Document_Typ...
SELECT COUNT( * ), `<col2>` FROM `<table5>` WHERE `<col1>` = "BK" GROUP BY `<col2>`
Return a scatter chart on how many documents are with document type code BK for each product id?
<table0>[Players] { <col0>[PlayerID]:[INT] <col1>[Age]:[INT] <col2>[Gender]:[VARCHAR] <col3>[Country]:[VARCHAR] <col4>[TotalHoursPlayed]:[INT] <col5>[FavoriteGame]:[VARCHAR] }
SELECT SUM( `<col4>` ) FROM `<table0>` WHERE `<col3>` = 'Japan' AND `<col5>` = 'VR';
What is the total number of hours spent on VR games by players from Japan?
<table0>[healthcare_spending] { <col0>[patient_id]:[INT] <col1>[year]:[INT] <col2>[DECIMAL]:[INSERT] }
SELECT SUM( amount ) FROM `<table0>` WHERE `<col0>` = 1 AND `<col1>` = 2021 AND gender = 'Male' AND location = 'rural Arizona';
What is the total healthcare spending in 2021 for male patients in rural Arizona?
<table0>[table_203_442] { <col0>[number]:[number] <col1>[date]:[text] <col2>[venue]:[text] <col3>[opponent]:[text] <col4>[score]:[text] <col5>[result]:[text] <col6>[competition]:[text] }
SELECT COUNT( * ) FROM `<table0>` WHERE "opponent" = 'romania'
what are the number of times romania is listed as an opponent ?
<table0>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table1>[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...
SELECT MAX( `<table8>`.valuenum ) FROM `<table8>` WHERE `<table8>`.icustay_id IN ( SELECT `<table4>`.icustay_id FROM `<table4>` WHERE `<table4>`.hadm_id IN ( SELECT `<table1>`.hadm_id FROM `<table1>` WHERE `<table1>`.subject_id = 14211 ) ) AND `<table8>`.itemid IN ( SELECT `<table0>`.itemid FROM `<table0>` WHERE `<tabl...
indicate the daily maximum heart rate of patient 14211 since 40 months ago.
<table0>[table_203_223] { <col0>[number]:[name] <col1>[text]:[gauge] <col2>[text]:[builder] <col3>[text]:[type] <col4>[text]:[date] <col5>[number]:[works] <col6>[number]:[number] <col7>[notes]:[text] }
SELECT COUNT( * ) FROM `<table0>`
how many total locomotives are at the museum ?
<table0>[table_204_932] { <col0>[number]:[number] <col1>[title]:[text] <col2>[time]:[text] <col3>[lead]:[vocals] <col4>[text]:[notes] }
SELECT COUNT( * ) FROM `<table0>` WHERE "time" >= 5
how many tracks were over five minutes ?
<table0>[table_name_26] { <col0>[attendance]:[INTEGER] <col1>[opponent]:[VARCHAR] <col2>[date]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "brewers" AND `<col2>` = "july 25"
On July 25 what is the lowest attendance with the Brewers as the opponent?
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]...
SELECT `<table9>`.label FROM `<table9>` WHERE `<table9>`.itemid IN ( SELECT `<table2>`.itemid FROM `<table2>` WHERE `<table2>`.hadm_id IN ( SELECT `<table8>`.hadm_id FROM `<table8>` WHERE `<table8>`.subject_id = 10624 ) AND DATETIME( `<table2>`.charttime, 'start of year' ) = DATETIME( CURRENT_TIME( ), 'start of year', ...
what was the name of the lab test that patient 10624 has first received in 08/last year?
<table0>[table_14941284_1] { <col0>[game_site]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "October 18, 1981"
When it is October 18, 1981 where is the game site?
<table0>[Dishes] { <col0>[DishID]:[int] <col1>[varchar]:[Category] <col2>[varchar]:[CaloricContent] <col3>[int]:[INSERT] } <table1>[Restaurants] { <col0>[RestaurantID]:[int] <col1>[varchar]:[Location] <col2>[varchar]:[INSERT] }
UPDATE Dishes SET CaloricContent = 400 WHERE Name = 'Quinoa Salad';
Update the nutritional information of a specific dish across all restaurants serving it.
<table0>[players] { <col0>[player_id]:[INT] <col1>[name]:[VARCHAR] <col2>[age]:[INT] <col3>[position]:[VARCHAR] <col4>[team]:[VARCHAR] <col5>[assists]:[INT] }
SELECT position, AVG( `<col5>` ) FROM `<table0>` GROUP BY position;
What is the average number of assists for each position?
<table0>[SystemVulnerabilities] { <col0>[SystemName]:[VARCHAR] <col1>[255]:[Vulnerability] <col2>[VARCHAR]:[255] <col3>[Severity]:[RATING] }
SELECT SystemName, Vulnerability FROM `<table0>` WHERE `<col3>` = 'CRITICAL'
What are the names and vulnerabilities of systems with a critical severity rating?
<table0>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table1>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperatu...
SELECT t1.`<table5>`name FROM ( SELECT `<table5>`.`<table5>`name, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table5>` WHERE STRFTIME( '%y', `<table5>`.`<table5>`time ) = '2105' GROUP BY `<table5>`.`<table5>`name ) AS t1 WHERE t1.c1 <= 5
what were the top five most common procedures that were ordered in 2105?
<table0>[table_23789] { <col0>[Tournament]:[text] <col1>[currently]:[known] <col2>[text]:[City] <col3>[text]:[Country] <col4>[text]:[Court] <col5>[surface]:[text] <col6>[Tier]:[text] <col7>[Years]:[real] }
SELECT "City( s )" FROM `<table0>` WHERE "Also `<col1>` known as" = 'Medibank International Sydney'
What is the city location of the tournament currently known as the Medibank International Sydney?
<table0>[ArtPieces] { <col0>[INT]:[artist] <col1>[VARCHAR]:[255] <col2>[type]:[VARCHAR] <col3>[255]:[price] <col4>[FLOAT]:[INSERT] }
SELECT artist, AVG( price ), COUNT( * ) FROM `<table0>` GROUP BY artist;
What is the average price of traditional art pieces by artist and their total number?
<table0>[articles] { <col0>[article_id]:[INT] <col1>[author]:[VARCHAR] <col2>[title]:[VARCHAR] <col3>[100]:[category] <col4>[VARCHAR]:[publication_date] <col5>[DATE]:[author_country] }
SELECT publication_date, COUNT( `<col0>` ) AS `<table0>`_per_day FROM `<table0>` WHERE author_country = 'India' GROUP BY publication_date ORDER BY publication_date;
What is the total number of articles published per day for a journalist from India?
<table0>[table_44377] { <col0>[Solvent]:[text] <col1>[Chemical]:[Formula] <col2>[text]:[Boiling] <col3>[point]:[text] <col4>[Dielectric]:[constant] <col5>[text]:[Density] <col6>[text]:[Dipole] <col7>[moment]:[text] }
SELECT "Dipole `<col7>` ( D )" FROM `<table0>` WHERE "Solvent" = 'ethyl acetate ( etoac )'
What's the dipole moment of ethyl acetate (etoac)?
<table0>[table_36117] { <col0>[Album]:[text] <col1>[English]:[title] <col2>[text]:[Chinese] <col3>[title]:[text] <col4>[Released]:[text] <col5>[Label]:[text] }
SELECT "Chinese title" FROM `<table0>` WHERE "Album#" = '5th'
Album # of 5th is what chinese title?
<table0>[military_tech] { <col0>[INT]:[country] <col1>[VARCHAR]:[tech] <col2>[VARCHAR]:[INSERT] }
SELECT country, COUNT( * ) OVER ( PARTITION BY country ) as total_tech FROM military_tech;
What is the total number of military technologies developed by each country?
<table0>[table_name_44] { <col0>[result]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "january 26, 2006"
What is the result of the match on January 26, 2006?
<table0>[table_name_47] { <col0>[mccain_number]:[INTEGER] <col1>[obama_number]:[VARCHAR] <col2>[others_percentage]:[VARCHAR] <col3>[mccain_percentage]:[VARCHAR] }
SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col2>` = "1.6%" AND `<col3>` = "40.5%" AND `<col1>` < 256 OFFSET 299
What is the highest number of votes for McCain in a county that voted 1.6% for other, 40.5% for McCain, and fewer than 256,299 votes for Obama?
<table0>[table_train_106] { <col0>[int]:[gender] <col1>[string]:[pregnancy_or_lactation] <col2>[bool]:[mini_mental_state_examination_mmse] <col3>[int]:[uncontrolled_diabetes] <col4>[bool]:[blood_glucose] <col5>[int]:[rosen_modified_hachinski_ischemic_score] <col6>[int]:[body_mass_index_bmi] <col7>[float]:[age] <col8>[f...
SELECT * FROM `<table0>` WHERE uncontrolled_diabetes = 1 OR blood_glucose > 180
uncontrolled diabetes or blood glucose > 180 mg / dl on the day of the fdg _ pet scan
<table0>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[first_careunit]:[text] <col5>[last_careunit]:[text] <col6>[first_wardid]:[number] <col7>[last_wardid]:[number] <col8>[intime]:[time] <col9>[outtime]:[time] } <table1>[d_icd_diagnoses] { ...
SELECT `<table13>`.short_title FROM `<table13>` WHERE `<table13>`.icd9_code IN ( SELECT `<table11>`.icd9_code FROM `<table11>` WHERE `<table11>`.hadm_id IN ( SELECT `<table16>`.hadm_id FROM `<table16>` WHERE `<table16>`.subject_id = 25696 ) AND STRFTIME( '%y', `<table11>`.charttime ) = '2105' ORDER BY `<table11>`.chart...
what procedure was last taken to patient 25696 in 2105?
<table0>[transactions] { <col0>[INT]:[employee_id] <col1>[INT]:[loan_id] <col2>[INT]:[transaction_type] <col3>[TEXT]:[INT] <col4>[is_shariah_compliant]:[BOOLEAN] }
SELECT employees.salary FROM employees JOIN `<table0>` ON employees.id = `<table0>`.employee_id WHERE `<table0>`.loan_id IS NOT NULL AND `<table0>`.transaction_type = 'Disbursement' AND `<table0>`.is_shariah_compliant = FALSE AND `<table0>`.id NOT IN ( SELECT loan_id FROM `<table0>` WHERE transaction_type = 'Disburseme...
List the salaries of employees who made only socially responsible loans in Texas?
<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 `<table6>`.admissionweight FROM `<table6>` WHERE `<table6>`.`<table6>`healthsystemstayid IN ( SELECT `<table6>`.`<table6>`healthsystemstayid FROM `<table6>` WHERE `<table6>`.uniquepid = '033-32465' AND NOT `<table6>`.hospitaldischargetime IS NULL ORDER BY `<table6>`.hospitaladmittime LIMIT 1 ) AND NOT `<table6>`...
so whats the first weight of patient 033-32465 during the first hospital encounter?
<table0>[table_name_70] { <col0>[rating]:[VARCHAR] <col1>[share]:[VARCHAR] <col2>[viewers__millions]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 4 AND viewers__millions_ > 2.47
WHAT IS THE RATING THAT HAD A SHARE SMALLER THAN 4, AND 2.47 MILLION VIEWERS?
<table0>[athletes] { <col0>[athlete_id]:[INT] <col1>[name]:[VARCHAR] <col2>[sport]:[VARCHAR] } <table1>[events] { <col0>[event_id]:[INT] <col1>[event_name]:[VARCHAR] <col2>[year]:[INT] }
INSERT INTO `<table0>` ( athlete_id, name, `<col2>` ) SELECT 3, 'Ronaldo', 'Soccer' WHERE NOT EXISTS ( SELECT 1 FROM `<table0>` WHERE `<col1>` = 'Ronaldo' ); INSERT INTO `<table0>` ( athlete_id, name, sport, `<col0>` ) SELECT 4, 'Messi', 'Soccer', ( SELECT `<col0>` FROM `<table1>` WHERE `<col1>` = 'FIFA World Cup' AND ...
Insert new records of athletes who participated in the 2022 FIFA World Cup
<table0>[table_201_43] { <col0>[number]:[name] <col1>[text]:[canton] <col2>[text]:[district] <col3>[text]:[area] <col4>[km2]:[number] <col5>[population]:[2005] <col6>[number]:[date] <col7>[law]:[text] }
SELECT COUNT( "district" ) FROM `<table0>` WHERE "canton" = 'diekirch'
how many diekirch districts also have diekirch as their canton ?
<table0>[protein] { <col0>[common_name]:[text] <col1>[protein_name]:[text] <col2>[divergence_from_human_lineage]:[real] <col3>[accession_number]:[text] <col4>[sequence_length]:[real] } <table1>[building] { <col0>[building_id]:[text] <col1>[text]:[Street_address] <col2>[text]:[Years_as_tallest] <col3>[text]:[Height_fee...
SELECT Type, COUNT( * ) FROM `<table2>` GROUP BY Type
Please give me a pie chart showing institution types, along with the number of institutions for each type.
<table0>[table_name_48] { <col0>[location]:[VARCHAR] <col1>[mascot]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "kingsmen"
What location has kingsmen as the mascot?
<table0>[table_204_137] { <col0>[number]:[race] <col1>[number]:[race] <col2>[name]:[text] <col3>[pole]:[position] <col4>[text]:[fastest] <col5>[lap]:[text] <col6>[winning]:[driver] <col7>[text]:[winning] <col8>[team]:[text] <col9>[yokohama]:[winner] <col10>[text]:[jay] <col11>[winner]:[text] <col12>[report]:[text] }
SELECT COUNT( * ) FROM `<table0>` WHERE "pole position" = 'robert huff'
how many pole positions were won by robert huff ?
<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>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type...
SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` WHERE `<table4>`.diagnosis = "ACUTE SUBDURAL HEMATOMA" AND `<table4>`.dod_year <= "2186.0"
give me the number of patients whose primary disease is acute subdural hematoma and year of death is less than or equal to 2186?
<table0>[table_name_3] { <col0>[federal_state]:[VARCHAR] <col1>[representatives_of_national_average]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "6"
Which federal state has 6 representatives of national average?
<table0>[table_19359427_6] { <col0>[date_of_appointment]:[VARCHAR] <col1>[position_in_table]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "21st"
When was the new manager of the team on 21st position appointed?
<table0>[Country] { <col0>[CountryCode]:[text] <col1>[ShortName]:[text] <col2>[TableName]:[text] <col3>[LongName]:[text] <col4>[Alpha2Code]:[text] <col5>[CurrencyUnit]:[text] <col6>[SpecialNotes]:[text] <col7>[Region]:[text] <col8>[IncomeGroup]:[text] <col9>[Wb2Code]:[text] <col10>[NationalAccountsBaseYear]:[text] <col...
SELECT T1.SHORTNAME FROM `<table0>` AS T1 INNER JOIN FootNotes AS T2 ON T1.`<table0>`Code = T2.`<table0>`code WHERE T2.Description = 'Data are classified as official aid.' AND T2.Seriescode = 'DC.DAC.AUSL.CD' AND T2.Year LIKE '%2002%'
Please list the countries that got the footnote "Data are classified as official aid." on the series code DC.DAC.AUSL.CD in 2002.
<table0>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] } <table1>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] }
SELECT T1.Name, T1.Price FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Price
For those records from the products and each product's manufacturer, show me about the distribution of name and the average of price , and group by attribute name in a bar chart, list by the mean price in ascending please.
<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 COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN diagnoses ON `<table1>`.hadm_id = diagnoses.hadm_id INNER JOIN lab ON `<table1>`.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Diverticulosis of colon with hemorrhage" AND lab.flag = "abnormal"
provide the number of patients whose diagnoses long title is diverticulosis of colon with hemorrhage and lab test abnormal status is abnormal?
<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 `<table15>`.charttime FROM `<table15>` WHERE `<table15>`.icustay_id IN ( SELECT `<table14>`.icustay_id FROM `<table14>` WHERE `<table14>`.hadm_id IN ( SELECT `<table0>`.hadm_id FROM `<table0>` WHERE `<table0>`.subject_id = 26793 ) ) AND `<table15>`.itemid IN ( SELECT `<table4>`.itemid FROM `<table4>` WHERE `<tab...
when was the last time that patient 26793 has a .9% normal saline intake until 08/25/2105?
<table0>[TemperatureData] { <col0>[INT]:[Year] <col1>[INT]:[Location] <col2>[VARCHAR]:[255] <col3>[Temperature]:[INT] }
SELECT Year, MIN( `<col3>` ), MAX( `<col3>` ) FROM `<table0>` WHERE Location = 'Antarctica' GROUP BY Year;
What is the minimum and maximum temperature in Antarctica for each year since 2000?
<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 `<table3>`.subject_id ) FROM `<table3>` INNER JOIN lab ON `<table3>`.hadm_id = lab.hadm_id WHERE `<table3>`.admission_type = "ELECTIVE" AND lab.label = "Chloride"
give me the number of patients whose admission type is elective and lab test name is chloride?
<table0>[table_name_65] { <col0>[driver]:[VARCHAR] <col1>[entrant]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "scuderia ambrosiana"
Who is the drive for an Entrant of Scuderia Ambrosiana?
<table0>[courses] { <col0>[course_id]:[number] <col1>[author_id]:[number] <col2>[subject_id]:[number] <col3>[course_name]:[text] <col4>[course_description]:[text] } <table1>[subjects] { <col0>[subject_id]:[number] <col1>[subject_name]:[text] } <table2>[student_course_enrolment] { <col0>[registration_id]:[number] <col...
SELECT COUNT( `<col2>` ) FROM `<table2>`
Find the number of distinct courses that have enrolled students.
<table0>[threat_intelligence] { <col0>[threat_id]:[INT] <col1>[country]:[VARCHAR] <col2>[255]:[score] <col3>[INT]:[threat_date] <col4>[DATE]:[INSERT] }
SELECT MAX( score ) FROM `<table0>` WHERE EXTRACT( MONTH FROM threat_date ) = 12 AND `<col1>` IN ( 'France', 'Germany', 'Italy' );
What is the maximum threat intelligence score for countries in the European region in the month of December?
<table0>[Inventory] { <col0>[item_id]:[INT] <col1>[item_name]:[VARCHAR] <col2>[is_locally_sourced]:[BOOLEAN] <col3>[price]:[DECIMAL] }
SELECT MAX( `<col3>` ) FROM `<table0>` WHERE `<col2>` = TRUE;
Find the maximum price of locally sourced items in the inventory.
<table0>[table_name_80] { <col0>[events]:[VARCHAR] <col1>[top_10]:[VARCHAR] <col2>[top_5]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` > 6 AND `<col2>` < 8
How many Events have a Top-10 larger than 6, and a Top-5 smaller than 8?
<table0>[area] { <col0>[course_id]:[int] } <table1>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <table2>[course] { <col0>[course_id]:[int] <col1>[name]:[varchar] <col2>[department]:[varchar] <col3>[number]:[varchar] <col4>[credits]:[varchar] <col5>[advisory_requirement]:[varchar] <col6>[enforce...
SELECT DISTINCT course.department, course.name, course.number, semester.semester, semester.year, student_record.grade FROM course, semester, student_record WHERE student_record.course_id = course.course_id AND student_record.semester = semester.semester_id AND student_record.student_id = 1
Can I see my transcript ?
<table0>[farmers] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[age] <col3>[INT]:[gender] <col4>[VARCHAR]:[location] <col5>[VARCHAR]:[profession] <col6>[VARCHAR]:[INSERT] }
DESCRIBE farmers;
Display the structure of the 'farmers' table
<table0>[genre] { <col0>[integer]:[genre_name] } <table1>[game] { <col0>[integer]:[genre_id] <col1>[integer]:[game_name] } <table2>[platform] { <col0>[integer]:[platform_name] } <table3>[publisher] { <col0>[integer]:[publisher_name] } <table4>[game_publisher] { <col0>[integer]:[game_id] <col1>[integer]:[publisher_i...
SELECT T.game_publisher_id FROM `<table5>` AS T WHERE T.platform_id = 16
State the game publisher IDs of the games with a platform ID of 16.
<table0>[table_9170] { <col0>[Place]:[text] <col1>[Player]:[text] <col2>[Country]:[text] <col3>[Score]:[text] <col4>[par]:[text] <col5>[Money]:[real] }
SELECT "To par" FROM `<table0>` WHERE "Score" = '69-70-72-72=283'
what is the to par when the score is 69-70-72-72=283?
<table0>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[first_careunit]:[text] <col5>[last_careunit]:[text] <col6>[first_wardid]:[number] <col7>[last_wardid]:[number] <col8>[intime]:[time] <col9>[outtime]:[time] } <table1>[d_icd_procedures] {...
SELECT COUNT( * ) FROM `<table14>` WHERE `<table14>`.icd9_code = ( SELECT `<table1>`.icd9_code FROM `<table1>` WHERE `<table1>`.short_title = 'other skin & subq i & d' ) AND `<table14>`.hadm_id IN ( SELECT `<table2>`.hadm_id FROM `<table2>` WHERE `<table2>`.subject_id = 3369 AND NOT `<table2>`.dischtime IS NULL ORDER B...
count the number of times patient 3369 was given a other skin & subq i & d in the first hospital encounter.
<table0>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditor...
SELECT `<table0>`.Id, `<table0>`.Id AS "post_link" FROM `<table0>` WHERE Tags = '<homework>' AND ClosedDate IS NULL ORDER BY `<table0>`.LastEditDate
Finding Posts tagged only homework, which are not closed.
<table0>[table_204_288] { <col0>[number]:[region] <col1>[text]:[seed] <col2>[number]:[team] <col3>[text]:[coach] <col4>[text]:[finished] <col5>[text]:[final] <col6>[opponent]:[text] <col7>[score]:[text] }
SELECT COUNT( "team" ) FROM `<table0>` WHERE "region" = 'midwest' AND "final opponent" = 'southwestern louisiana'
how many midwest teams played southwestern louisiana as their final opponent ?
<table0>[table_name_5] { <col0>[class]:[VARCHAR] <col1>[weight]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 220
Weight of 220 has what class?
<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 procedures ON `<table3>`.hadm_id = procedures.hadm_id WHERE `<table3>`.dob_year < "2170" AND procedures.icd9_code = "9962"
Among patients who had icd9 code 9962, calculate the number of those born before 2170.
<table0>[table_name_55] { <col0>[rank]:[INTEGER] <col1>[time]:[VARCHAR] <col2>[lane]:[VARCHAR] }
SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "2:25.86" AND `<col2>` < 7
What was the rank of the person who swam in Lane 7 with a time of 2:25.86?
<table0>[table_17972193_1] { <col0>[record]:[VARCHAR] <col1>[opponent]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "at Los Angeles Raiders"
What was the game record when the opponent was 'at Los Angeles Raiders'?
<table0>[Ref_Detention_Type] { <col0>[detention_type_code]:[VARCHAR] <col1>[detention_type_description]:[VARCHAR] } <table1>[Assessment_Notes] { <col0>[notes_id]:[INTEGER] <col1>[student_id]:[INTEGER] <col2>[teacher_id]:[INTEGER] <col3>[date_of_notes]:[DATETIME] <col4>[text_of_notes]:[VARCHAR] <col5>[255]:[other_detai...
SELECT date_address_from, AVG( `<col4>` ) FROM `<table7>` ORDER BY `<col4>` DESC
Find date_address_from and the average of monthly_rental bin date_address_from by weekday, and visualize them by a bar chart.
<table0>[table_name_33] { <col0>[venue]:[VARCHAR] <col1>[score]:[VARCHAR] <col2>[result]:[VARCHAR] <col3>[competition]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "win" AND `<col3>` = "2002 tiger cup group stage" AND `<col1>` = "0-4"
What is the venue of the match that had a win result and a score of 0-4 in the 2002 Tiger Cup Group Stage?
<table0>[table_62812] { <col0>[Club]:[text] <col1>[Winners]:[real] <col2>[final]:[won] <col3>[text]:[Runners] <col4>[real]:[final] <col5>[lost]:[text] }
SELECT "Club" FROM `<table0>` WHERE "Runners-up" = '1' AND "Last `<col2>` won" = '1999'
what is the club when the runners-up is 1 and the last final won is 1999?
<table0>[diagnoses] { <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 `<table1>`.admittime, prescriptions.icustay_id FROM `<table1>` INNER JOIN prescriptions ON `<table1>`.hadm_id = prescriptions.hadm_id WHERE `<table1>`.name = "Marilyn Norvell"
tell me the time of admission and icu stay id for patient marilyn norvell.
<table0>[customer] { <col0>[customer_id]:[INT] <col1>[name]:[VARCHAR] <col2>[country]:[VARCHAR] } <table1>[debit_card] { <col0>[transaction_id]:[INT] <col1>[customer_id]:[INT] <col2>[value]:[DECIMAL] <col3>[timestamp]:[TIMESTAMP] <col4>[currency]:[VARCHAR] } <table2>[foreign_exchange] { <col0>[date]:[DATE] <col1>[cur...
SELECT c.country, AVG( dc.value * fx.rate ) as avg_value FROM `<table0>` c JOIN debit_card dc ON c.`<table0>`_id = dc.`<table0>`_id LEFT JOIN foreign_exchange fx ON dc.currency = fx.currency AND DATE_FORMAT( dc.timestamp, '%Y-%m' ) = '2023-05' GROUP BY c.country;
What is the average transaction value, in EUR, for each customer in the "debit_card" table, grouped by their country, for transactions that occurred in the month of May 2023?
<table0>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] } <table1>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] }
SELECT Founder, COUNT( Founder ) FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY COUNT( Founder ) DESC
For those records from the products and each product's manufacturer, show me about the distribution of founder and the amount of founder , and group by attribute founder in a bar chart, and list total number in desc order please.
<table0>[table_name_45] { <col0>[score]:[VARCHAR] <col1>[opponents]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "amanda brown brenda remilton"
What is the Score with an Opponent that is amanda brown brenda remilton?
<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 AVG( `<table3>`.age ) FROM `<table3>` WHERE `<table3>`.gender = "F" AND `<table3>`.days_stay = "23"
what is average age of patients whose gender is f and days of hospital stay is 23?
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3...
SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id WHERE `<table4>`.ethnicity = "WHITE" AND diagnoses.short_title = "Cong pulmon valve stenos"
give me the number of patients whose ethnicity is white and diagnoses short title is cong pulmon valve stenos?
<table0>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table1>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table2>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number]...
SELECT COUNT( DISTINCT `<table9>`.subject_id ) FROM `<table9>` WHERE `<table9>`.hadm_id IN ( SELECT `<table4>`.hadm_id FROM `<table4>` WHERE `<table4>`.icd9_code = ( SELECT `<table1>`.icd9_code FROM `<table1>` WHERE `<table1>`.short_title = 'acute lung edema nos' ) AND DATETIME( `<table4>`.charttime ) <= DATETIME( CURR...
how many patients were diagnosed with acute lung edema nos until 2 years ago.
<table0>[table_45798] { <col0>[Game]:[real] <col1>[Date]:[text] <col2>[Team]:[text] <col3>[Score]:[text] <col4>[Record]:[text] <col5>[Streak]:[text] }
SELECT "Date" FROM `<table0>` WHERE "Score" = '112–118'
Which Date has a Score of 112 118?
<table0>[table_name_44] { <col0>[entrant]:[VARCHAR] <col1>[engine]:[VARCHAR] <col2>[points]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "climax straight-4" AND `<col2>` > 0
Which Entrant has an Engine of climax straight-4, and Points larger than 0?
<table0>[table_53262] { <col0>[Rank]:[real] <col1>[Previous]:[Rank] <col2>[text]:[text] <col3>[Nationality]:[text] <col4>[Team]:[text] <col5>[Points]:[real] }
SELECT SUM( "Rank" ) FROM `<table0>` WHERE "Nationality" = 'australia' AND "Points" < '79'
Tell me the sum of rank for australia when points are less than 79
<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 `<table3>`.subject_id ) FROM `<table3>` INNER JOIN prescriptions ON `<table3>`.hadm_id = prescriptions.hadm_id WHERE `<table3>`.admission_type = "ELECTIVE" AND prescriptions.drug = "Sodium CITRATE 4%"
what is the number of patients whose admission type is elective and drug name is sodium citrate 4%?
<table0>[regulatory_frameworks] { <col0>[framework_id]:[INT] <col1>[country]:[VARCHAR] <col2>[100]:[framework] <col3>[VARCHAR]:[100] }
SELECT framework_id, country, framework FROM `<table0>` WHERE `<col1>` IN ( 'South Korea', 'Germany' );
Show all regulatory frameworks for digital assets in South Korea and Germany?
<table0>[dispensaries] { <col0>[INT]:[name] <col1>[TEXT]:[state] <col2>[TEXT]:[INSERT] } <table1>[sales] { <col0>[dispensary_id]:[INT] <col1>[year]:[INT] }
SELECT d.name, SUM( s.sales ) as total_sales FROM `<table0>` d INNER JOIN sales s ON d.id = s.dispensary_id WHERE d.state = 'California' AND s.year = 2021 GROUP BY d.name;
What are the total sales for each dispensary in California for the year 2021?
<table0>[Studios] { <col0>[studio]:[VARCHAR] } <table1>[Workouts] { <col0>[studio]:[VARCHAR] <col1>[workout]:[VARCHAR] }
SELECT DISTINCT studio, workout FROM Workouts;
List the unique 'Workout' types offered at each studio.
<table0>[Customers_cards] { <col0>[card_type_code]:[VARCHAR] <col1>[customer_id]:[VARCHAR] }
SELECT card_type_code, COUNT( DISTINCT `<col1>` ) FROM `<table0>` GROUP BY `<col0>`
Show all card type codes and the number of customers holding cards in each type.
<table0>[Things] { <col0>[thing_id]:[INTEGER] <col1>[organization_id]:[INTEGER] <col2>[Type_of_Thing_Code]:[CHAR] <col3>[service_type_code]:[CHAR] <col4>[service_details]:[VARCHAR] } <table1>[Timed_Status_of_Things] { <col0>[thing_id]:[INTEGER] <col1>[Date_and_Date]:[DATETIME] <col2>[Status_of_Thing_Code]:[CHAR] } <t...
SELECT date_moved_in, COUNT( `<col2>` ) FROM `<table9>` GROUP BY `<col2>` ORDER BY `<col2>` DESC
Give me a bar chart that the X-axis is the date_moved_in and the Y-axis is Count them, rank bar from high to low order.
<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>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal...
SELECT HIRE_DATE, AVG( `<col7>` ) FROM `<table4>` WHERE NOT `<col1>` LIKE '%M%'
Bin the hire date into the day of week interval, and then calculate the average salary of employees in each day for a bar chart, note that just select those employees without the letter M in their first name.
<table0>[genre] { <col0>[integer]:[genre_name] } <table1>[game] { <col0>[integer]:[genre_id] <col1>[integer]:[game_name] } <table2>[platform] { <col0>[integer]:[platform_name] } <table3>[publisher] { <col0>[integer]:[publisher_name] } <table4>[game_publisher] { <col0>[integer]:[game_id] <col1>[integer]:[publisher_i...
SELECT COUNT( T3.game_publisher_id ) FROM `<table6>` AS T1 INNER JOIN `<table6>`_sales AS T2 ON T1.id = T2.`<table6>`_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id INNER JOIN platform AS T4 ON T3.platform_id = T4.id WHERE T4.platform_name = 'X360' AND T3.release_year = 2011 AND T1.`<table6>`_name = '...
How many publishers in Japan released a game on X360 in 2011?
<table0>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[startdate]:[time] <col4>[enddate]:[time] <col5>[drug]:[text] <col6>[dose_val_rx]:[text] <col7>[dose_unit_rx]:[text] <col8>[route]:[text] } <table1>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[...
SELECT t3.drug FROM ( SELECT t2.drug, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table0>`.startdate FROM `<table0>` JOIN admissions ON `<table0>`.hadm_id = admissions.hadm_id WHERE `<table0>`.drug = 'calcium carbonate' AND DATETIME( `<table0>`.startdate, 'start of year'...
what were the three most commonly prescribed drugs for patients, who were also prescribed with calcium carbonate at the same time in the previous year?
<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 Headquarter, COUNT( DISTINCT T1.Name ) FROM `<table0>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code ORDER BY COUNT( DISTINCT T1.Name ) DESC
Draw a bar chart for how many different products are produced in each headquarter city?, and display from high to low by the name).
<table0>[table_name_58] { <col0>[date]:[VARCHAR] <col1>[visiting_team]:[VARCHAR] <col2>[year]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "los angeles rams" AND `<col2>` < 1958
What date was the visiting team of Los Angeles Rams, earlier than 1958?
<table0>[table_48169] { <col0>[Rank]:[text] <col1>[Administrative]:[Division] <col2>[text]:[Area] <col3>[u00b2]:[real] <col4>[Area]:[real] <col5>[National]:[Share] <col6>[real]:[Comparable] <col7>[Country]:[text] }
SELECT AVG( "Area ( km\u00b2 )" ) FROM `<table0>` WHERE "Area ( sq mi )" = '2,448' AND "National Share ( % )" > '0.065'
What is the average square kilometer area of the division that has a 2,448 square mile area and a national share larger than 0.065%?
<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 t2.drugname FROM ( SELECT `<table7>`.uniquepid, `<table8>`.`<table8>`time FROM `<table8>` JOIN `<table7>` ON `<table8>`.`<table7>`unitstayid = `<table7>`.`<table7>`unitstayid WHERE `<table7>`.`<table7>`healthsystemstayid IN ( SELECT `<table7>`.`<table7>`healthsystemstayid FROM `<table7>` WHERE `<table7>`.uniquep...
what was the name of the medicine that patient 030-75705 was prescribed with after having had a mannitol procedure in the previous month within the same day?