schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[table_22582] { <col0>[Year]:[real] <col1>[Starts]:[real] <col2>[Wins]:[real] <col3>[real]:[real] <col4>[Poles]:[real] <col5>[Avg]:[Start] <col6>[text]:[Avg] <col7>[Finish]:[text] <col8>[Winnings]:[text] <col9>[Position]:[text] <col10>[Team]:[text] }
SELECT "Avg. Finish" FROM `<table0>` WHERE "Winnings" = '$1,400'
What is the average finish for winnings of $1,400?
<table0>[writes] { <col0>[paperid]:[int] <col1>[authorid]:[int] } <table1>[dataset] { <col0>[datasetid]:[int] <col1>[datasetname]:[varchar] } <table2>[journal] { <col0>[journalid]:[int] <col1>[journalname]:[varchar] } <table3>[paper] { <col0>[paperid]:[int] <col1>[title]:[varchar] <col2>[venueid]:[int] <col3>[year]:...
SELECT DISTINCT writes.paperid FROM author, writes WHERE author.authorname = 'Mark Guzdial' AND writes.authorid = author.authorid
what did Mark Guzdial write ?
<table0>[table_78820] { <col0>[Week]:[real] <col1>[Date]:[text] <col2>[Opponent]:[text] <col3>[Result]:[text] <col4>[Kickoff]:[Time] <col5>[text]:[Attendance] }
SELECT "Kickoff Time" FROM `<table0>` WHERE "Week" = '17'
What is the kickoff time for the game in week of 17?
<table0>[region_stats_2] { <col0>[region]:[TEXT] <col1>[year]:[INT] <col2>[visitors]:[INT] }
SELECT 100.0 * SUM( CASE WHEN `<col0>` = 'Oceania' THEN `<col2>` ELSE 0 END ) / SUM( `<col2>` ) as percentage FROM `<table0>` WHERE `<col1>` = 2021;
Determine the percentage of international visitors to New Zealand that are from the Oceania region.
<table0>[table_28836] { <col0>[series]:[real] <col1>[season]:[real] <col2>[Title]:[text] <col3>[Directed]:[text] <col4>[Written]:[text] <col5>[Original]:[air] <col6>[date]:[text] <col7>[Prod]:[code] }
SELECT "Original air date" FROM `<table0>` WHERE "No. in series" = '32'
What date did series number 32 premiere?
<table0>[Lanthanum_Production] { <col0>[year]:[INT] <col1>[production]:[FLOAT] } <table1>[Cerium_Production] { <col0>[year]:[INT] <col1>[production]:[FLOAT] }
SELECT production[year=2019]/( SELECT `<col1>` FROM `<table1>` WHERE `<col0>` = 2019 ) FROM `<table0>` WHERE `<col0>` = 2019;
What is the ratio of Lanthanum to Cerium production in 2019?
<table0>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } <t...
SELECT `<table10>`.admission_type FROM `<table10>` WHERE `<table10>`.subject_id = 67687 AND STRFTIME( '%y', `<table10>`.admittime ) <= '2104' ORDER BY `<table10>`.admittime DESC LIMIT 1
how did patient 67687 last entered hospital until 2104?
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[tim...
SELECT COUNT( DISTINCT t1.uniquepid ) FROM ( SELECT patient.uniquepid, `<table3>`.`<table3>`time FROM `<table3>` JOIN patient ON `<table3>`.patientunitstayid = patient.patientunitstayid WHERE `<table3>`.`<table3>`name = 'acute respiratory failure' AND STRFTIME( '%y', `<table3>`.`<table3>`time ) <= '2104' ) AS t1 JOIN (...
until 2104 how many people were diagnosed with acute respiratory failure within 2 months after being diagnosed with neutropenia?
<table0>[military_innovation] { <col0>[INT]:[year] <col1>[INT]:[quarter] <col2>[INT]:[projects] <col3>[INT]:[INSERT] }
INSERT INTO military_innovation ( id, year, quarter, projects ) VALUES ( 7, 2021, 4, 50 ); SELECT * FROM military_innovation;
Insert a new military innovation project initiated in the fourth quarter of 2021 with 50 projects.
<table0>[table_38119] { <col0>[Date]:[text] <col1>[Visitor]:[text] <col2>[Score]:[text] <col3>[Home]:[text] <col4>[Leading]:[scorer] <col5>[text]:[Record] }
SELECT "Home" FROM `<table0>` WHERE "Score" = '136-134'
What home has 136-134 as the score?
<table0>[ArtistRevenue] { <col0>[Artist]:[VARCHAR] <col1>[Revenue]:[FLOAT] }
SELECT Artist, SUM( `<col1>` ) FROM `<table0>` GROUP BY Artist;
What is the total revenue generated by each artist from digital sales?
<table0>[eos_accounts] { <col0>[account_name]:[VARCHAR] <col1>[token_balance]:[INTEGER] } <table1>[eosbet_token_contract] { <col0>[contract_name]:[VARCHAR] <col1>[token_holder]:[VARCHAR] <col2>[token_balance]:[INTEGER] }
SELECT `<table0>`.account_name FROM `<table0>` JOIN eosbet_token_contract ON `<table0>`.account_name = eosbet_token_contract.token_holder WHERE eosbet_token_contract.contract_name = 'EOSBET' AND `<table0>`.token_balance > 1000;
List all EOS accounts with more than 1000 tokens in the EOSBET token contract.
<table0>[event] { <col0>[int]:[text] <col1>[Stadium_ID]:[int] <col2>[Year]:[text] } <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]:[meter...
SELECT name, ID FROM `<table1>` ORDER BY name DESC
Plot id by grouped by name as a bar graph, show by the x-axis in descending please.
<table0>[fires] { <col0>[fire_year]:[number] <col1>[discovery_date]:[number] <col2>[discovery_doy]:[number] <col3>[discovery_time]:[text] <col4>[stat_cause_code]:[number] <col5>[stat_cause_descr]:[text] <col6>[cont_date]:[text] <col7>[cont_doy]:[text] <col8>[cont_time]:[text] <col9>[fire_size]:[number] <col10>[fire_siz...
SELECT `<col15>` FROM `<table0>` WHERE `<col0>` = 2001 GROUP BY `<col15>` ORDER BY COUNT( * ) DESC LIMIT 1
Which states had the largest number of fires in 2001?
<table0>[PostTypes] { <col0>[number]:[text] } <table1>[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]:[DownV...
SELECT v.Id, v.PostId, v.VoteTypeId, v.UserId, v.CreationDate, p.CreationDate, p.Score, p.ViewCount, p.OwnerUserId, p.Title, p.FavoriteCount, u.Reputation, u.CreationDate, u.DisplayName, u.Up`<table28>`, u.Down`<table28>` FROM `<table28>` AS v INNER JOIN Posts AS p ON p.Id = v.PostId INNER JOIN Users AS u ON u.Id = v.U...
Which users do have a post as favorite.
<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 MIN( `<table1>`.age ) FROM `<table1>` WHERE `<table1>`.marital_status = "MARRIED" AND `<table1>`.discharge_location = "DEAD/EXPIRED"
what is the minimum age of patients who are married and discharged due to death/expired?
<table0>[table_42495] { <col0>[Ballarat]:[text] <col1>[Wins]:[real] <col2>[Byes]:[real] <col3>[Losses]:[real] <col4>[Draws]:[real] }
SELECT MIN( "Draws" ) FROM `<table0>` WHERE "Losses" > '0' AND "Against" > '1353' AND "Wins" = '2' AND "Ballarat FL" = 'ballarat'
What is the lowest draws that have losses less than 0, an against greater than 1353, 2 as the wins, and ballarat as ballarat fl?
<table0>[Exhibition] { <col0>[INT]:[VARCHAR] } <table1>[Visitor] { <col0>[INT]:[ExhibitionId] <col1>[INT]:[Age] <col2>[INT]:[Gender] }
SELECT `<table0>`Id, Name, COUNT( * ) as VisitorCount, AVG( Age ) as AverageAge, Gender, COUNT( DISTINCT Gender ) as GenderCount FROM `<table0>` e JOIN Visitor v ON e.Id = e.`<table0>`Id GROUP BY `<table0>`Id, Name, Gender ORDER BY VisitorCount DESC;
Identify the top exhibitions with the highest visitor count and their respective visitor demographics, sorted by visitor count in descending order.
<table0>[CountryRegion] { <col0>[CountryRegionCode]:[text] <col1>[text]:[ModifiedDate] } <table1>[Culture] { <col0>[CultureID]:[text] <col1>[text]:[ModifiedDate] } <table2>[Currency] { <col0>[CurrencyCode]:[text] <col1>[text]:[ModifiedDate] } <table3>[CountryRegionCurrency] { <col0>[CountryRegionCode]:[text] <col1>[...
SELECT T1.Name, T3.Name FROM `<table60>` AS T1 INNER JOIN `<table60>`Vendor AS T2 ON T1.`<table60>`ID = T2.`<table60>`ID INNER JOIN Vendor AS T3 ON T2.BusinessEntityID = T3.BusinessEntityID WHERE STRFTIME( '%Y', T1.SellStartDate ) = '2013'
Name all products that started selling in 2013. State its respective vendor's name.
<table0>[businesses] { <col0>[business_id]:[integer] <col1>[name]:[text] <col2>[address]:[text] <col3>[city]:[text] <col4>[postal_code]:[text] <col5>[latitude]:[real] <col6>[longitude]:[real] <col7>[phone_number]:[integer] <col8>[tax_code]:[text] <col9>[business_certificate]:[integer] <col10>[application_date]:[date] <...
SELECT DISTINCT T4.name FROM ( SELECT T3.name, T3.years, row_number( ) OVER ( PARTITION BY T3.name ORDER BY T3.years ) AS rowNumber FROM ( SELECT DISTINCT name, STRFTIME( '%Y', `date` ) AS years FROM `<table1>` AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.score = 100 ) AS T3 ) AS T4 GRO...
What are the names of the establishments that met all the required standards for 4 consecutive years?
<table0>[table_name_75] { <col0>[away_team]:[VARCHAR] <col1>[score]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "139-119"
Who was the away team for the game with a score of 139-119?
<table0>[table_806] { <col0>[Rank]:[average] <col1>[real]:[Competition] <col2>[finish]:[real] <col3>[Couple]:[text] <col4>[Total]:[real] <col5>[Number]:[dances] <col6>[real]:[Average] }
SELECT MIN( "Number of dances" ) FROM `<table0>` WHERE "Average" = '34.1'
The minimum average number of dancers is 34.1 how many times
<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 lab ON `<table1>`.hadm_id = lab.hadm_id WHERE `<table1>`.admission_location = "CLINIC REFERRAL/PREMATURE" AND lab.label = "Reticulocyte Count, Manual"
Provide the number of office admission patients who were ordered a manual reticulocyte count lab test.
<table0>[table_name_84] { <col0>[cuts_made]:[INTEGER] <col1>[events]:[INTEGER] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 4
What are the lowest cuts made that have events less than 4?
<table0>[transactions] { <col0>[customer_id]:[INT] <col1>[transaction_amount]:[DECIMAL] <col2>[country]:[VARCHAR] }
SELECT AVG( `<col1>` ) FROM `<table0>` WHERE `<col2>` IN ( 'US', 'CA' );
What is the average transaction amount for all customers from the United States and Canada?
<table0>[table_name_83] { <col0>[home]:[VARCHAR] <col1>[score]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "13-19"
Who was at Home when the Score was 13-19?
<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 AVG( `<table1>`.days_stay ) FROM `<table1>` WHERE `<table1>`.diagnosis = "AORTIC INSUFFICIENCY\RE-DO STERNOTOMY; AORTIC VALVE REPLACEMENT "
what is the average days of hospital stay of patients whose primary disease is aortic insufficiency\re-do sternotomy; aortic valve replacement?
<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 prescriptions ON `<table0>`.hadm_id = prescriptions.hadm_id WHERE `<table0>`.diagnosis = "FEMORAL ARTERY THROMBOSIS" AND prescriptions.drug = "Sodium Chloride 0.9% Flush"
give me the number of patients whose primary disease is femoral artery thrombosis and drug name is sodium chloride 0.9% flush?
<table0>[table_21321804_3] { <col0>[cfl_team]:[VARCHAR] <col1>[college]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Nebraska"
What team does the player who went to Nebraska play for?
<table0>[VRPlatforms] { <col0>[PlatformID]:[INT] <col1>[PlatformName]:[VARCHAR] <col2>[ReleaseDate]:[DATE] <col3>[Price]:[DECIMAL] }
SELECT PlatformName, ROW_NUMBER( ) OVER ( ORDER BY Price DESC ) AS Rank FROM VRPlatforms;
What is the ranking of VR platforms based on price, with the cheapest having the lowest rank and the most expensive having the highest rank?
<table0>[table_12275654_1] { <col0>[year]:[VARCHAR] <col1>[mens_singles]:[VARCHAR] <col2>[womens_singles]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Niels Christian Kaldau" AND `<col2>` = "Pi Hongyan"
How many times did Niels Christian Kaldau win the men's single and Pi Hongyan win the women's single in the same year?
<table0>[Bookings_Services] { <col0>[Order_ID]:[INTEGER] <col1>[Product_ID]:[INTEGER] } <table1>[Services] { <col0>[Service_ID]:[INTEGER] <col1>[Service_Type_Code]:[CHAR] <col2>[Workshop_Group_ID]:[INTEGER] <col3>[Product_Description]:[VARCHAR] <col4>[255]:[Product_Name] <col5>[VARCHAR]:[255] <col6>[Product_Price]:[DE...
SELECT Order_Date, COUNT( Order_Date ) FROM `<table11>`
Bar graph to show how many order date from different order date
<table0>[CoOwnershipProperties] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[city] <col2>[VARCHAR]:[state] <col3>[VARCHAR]:[property_type] }
DROP TABLE CoOwnershipProperties;
Drop the CoOwnershipProperties table
<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 `<table9>`.drugstarttime FROM `<table9>` WHERE `<table9>`.`<table5>`unitstayid IN ( SELECT `<table5>`.`<table5>`unitstayid FROM `<table5>` WHERE `<table5>`.`<table5>`healthsystemstayid IN ( SELECT `<table5>`.`<table5>`healthsystemstayid FROM `<table5>` WHERE `<table5>`.uniquepid = '028-23341' ) ) AND DATETIME( `...
last time until 20 months ago when did patient 028-23341 get a prescription?
<table0>[table_55304] { <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 COUNT( "Crowd" ) FROM `<table0>` WHERE "Venue" = 'mcg'
What is the crowd total at mcg?
<table0>[table_name_66] { <col0>[runner_up]:[VARCHAR] <col1>[year]:[VARCHAR] <col2>[champion]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 2006 AND `<col2>` = "elon"
Which runner-up placed in a year prior to 2006 and whose Champion was Elon?
<table0>[table_test_14] { <col0>[int]:[bleeding] <col1>[int]:[intra_aortic_balloon_pump_iabp] <col2>[bool]:[systolic_blood_pressure_sbp] <col3>[int]:[haemoglobin] <col4>[float]:[severe_hypertension] <col5>[bool]:[platelets] <col6>[int]:[neutrophil_count] <col7>[int]:[renal_disease] <col8>[bool]:[severe_thrombocytopenia...
SELECT * FROM `<table0>` WHERE severe_hypertension = 1 OR ( systolic_blood_pressure_sbp > 200 OR diastolic_blood_pressure_dbp > 110 )
severe hypertension ( systolic bp > 200 mm hg or diastolic bp > 110 mm hg ) not controlled on antihypertensive therapy
<table0>[table_name_9] { }
SELECT 2011 FROM `<table0>` WHERE 2002 = "1r" AND 2009 = "a"
Name the 2011 with 2002 of 1r and 2009 of a
<table0>[people] { <col0>[People_ID]:[int] <col1>[text]:[Height] <col2>[real]:[Weight] <col3>[real]:[Date_of_Birth] } <table1>[entrepreneur] { <col0>[Entrepreneur_ID]:[int] <col1>[People_ID]:[int] <col2>[Company]:[text] <col3>[Money_Requested]:[real] <col4>[Investor]:[text] }
SELECT Date_of_Birth, COUNT( Date_of_Birth ) FROM `<table1>` AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor = "Simon Woodroffe" OR T1.Investor = "Peter Jones" ORDER BY COUNT( Date_of_Birth ) DESC
What are the dates of birth of entrepreneurs with investor 'Simon Woodroffe' or 'Peter Jones', and count them by a bar chart, order by the Y in desc.
<table0>[player] { <col0>[Player_ID]:[int] <col1>[name]:[text] <col2>[Position]:[text] <col3>[Club_ID]:[int] <col4>[Apps]:[real] <col5>[Tries]:[real] <col6>[Goals]:[text] <col7>[Points]:[real] } <table1>[club_rank] { <col0>[Rank]:[real] <col1>[Club_ID]:[int] <col2>[Gold]:[real] <col3>[Silver]:[real] <col4>[Bronze]:[re...
SELECT Country, COUNT( `<col3>` ) FROM `<table4>` GROUP BY `<col3>`
A bar chart for how many competitions for each country.
<table0>[table_16751596_12] { <col0>[democrat]:[VARCHAR] <col1>[lead_margin]:[VARCHAR] }
SELECT `<col0>` AS :_vivian_davis_figures FROM `<table0>` WHERE `<col1>` = 35
When the lead margin was 35, what were the Democrat: Vivian Davis Figures?
<table0>[table_name_21] { <col0>[score]:[VARCHAR] <col1>[venue]:[VARCHAR] <col2>[champion]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "royal liverpool golf club" AND `<col2>` = "willie hunter"
What is the score of the match won by Willie Hunter at the Royal Liverpool Golf Club?
<table0>[table_44283] { <col0>[College]:[code] <col1>[text]:[Faculty] <col2>[name]:[text] <col3>[Designation]:[text] <col4>[Qualification]:[text] <col5>[Department]:[text] <col6>[Experience]:[text] }
SELECT "Designation" FROM `<table0>` WHERE "Qualification" = 'm.tech ( e.c.e )'
What is the designation for the m.tech (e.c.e) qualification?
<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 `<table3>`.icd9_code, `<table3>`.long_title FROM `<table3>` WHERE `<table3>`.subject_id = "53707"
what is diagnoses icd9 code and diagnoses long title of subject id 53707?
<table0>[company_sales] { <col0>[sale_id]:[INT] <col1>[company_id]:[INT] <col2>[product_type]:[VARCHAR] <col3>[sale_date]:[DATE] <col4>[price_per_gram]:[DECIMAL] }
SELECT company_id, AVG( `<col4>` ) as avg_price_per_gram FROM `<table0>` WHERE `<col2>` = 'Flower' AND `<col3>` >= '2022-07-01' AND `<col3>` < '2022-10-01' GROUP BY company_id;
What was the average price per gram of cannabis flower sold by each company in Q3 2022?
<table0>[regulatory_violations] { <col0>[platform]:[VARCHAR] <col1>[255]:[violation_count] <col2>[INT]:[INSERT] }
SELECT SUM( violation_count ) FROM `<table0>` WHERE `<col0>` IN ( 'Binance', 'Kraken' );
How many regulatory violations have been committed by Binance and Kraken combined?
<table0>[Players] { <col0>[PlayerID]:[INT] <col1>[VARCHAR]:[100] <col2>[Age]:[INT] <col3>[Country]:[VARCHAR] } <table1>[Countries] { <col0>[Country]:[VARCHAR] <col1>[Continent]:[VARCHAR] } <table2>[EsportsEvents] { <col0>[PlayerID]:[INT] <col1>[EventName]:[VARCHAR] <col2>[100]:[INSERT] }
SELECT C.Continent, MIN( P.Age ) as MinAge, AVG( P.Age ) as AvgAge, MAX( P.Age ) as MaxAge FROM `<table0>` P JOIN Countries C ON P.Country = C.Country JOIN EsportsEvents E ON P.PlayerID = E.PlayerID GROUP BY C.Continent;
Show the minimum, average, and maximum age of players who have participated in esports events, grouped by continent.
<table0>[CommunityPolicing] { <col0>[INT]:[city] <col1>[VARCHAR]:[month] <col2>[INT]:[event_count] }
SELECT MIN( event_count ) FROM `<table0>` WHERE city = 'Miami';
What is the minimum number of community policing events held in the city of Miami in a single month?
<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 procedures ON `<table1>`.hadm_id = procedures.hadm_id WHERE `<table1>`.insurance = "Private" AND procedures.icd9_code = "4105"
give the number of patients whose insurance is private and procedure icd9 code is 4105.
<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>` WHERE `<table3>`.diagnosis = "ATRIAL SEPTAL DEFECT\MITRAL VALVE REPLACEMENT;REPAIR ATRIAL-SEPTAL DEFECT/SDA" AND `<table3>`.dob_year < "2129"
how many patients born before the year 2129 were diagosed with atrial septal defect\mitral valve replacement;repair atrial-septal defect/sda ?
<table0>[table_203_773] { <col0>[number]:[season] <col1>[number]:[network] <col2>[text]:[play] <col3>[play]:[text] <col4>[color]:[commentator] <col5>[text]:[sideline] <col6>[reporter]:[text] }
SELECT "play-by-play" FROM `<table0>` WHERE id = ( SELECT id FROM `<table0>` WHERE "play-by-play" = 'ray scott' ) - 1
who did play by play before ray scott ?
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table2>[labevents] { <col0>[row_id]:[number] <co...
SELECT SUM( `<table3>`.`<table3>` ) FROM `<table3>` WHERE `<table3>`.hadm_id IN ( SELECT `<table12>`.hadm_id FROM `<table12>` WHERE `<table12>`.subject_id = 21079 ) AND DATETIME( `<table3>`.chargetime, 'start of year' ) = DATETIME( CURRENT_TIME( ), 'start of year', '-0 year' )
how much did it cost patient 21079 for the hospital stay this year?
<table0>[Members] { <col0>[MemberID]:[INT] <col1>[Age]:[INT] <col2>[Gender]:[VARCHAR] <col3>[MembershipType]:[VARCHAR] } <table1>[Workouts] { <col0>[WorkoutID]:[INT] <col1>[MemberID]:[INT] <col2>[Duration]:[INT] <col3>[WorkoutType]:[VARCHAR] <col4>[Calories]:[INT] }
SELECT m.MemberID, SUM( w.Calories ) AS TotalCalories FROM `<table0>` m JOIN Workouts w ON m.MemberID = w.MemberID WHERE w.WorkoutType = 'Running' GROUP BY m.MemberID ORDER BY TotalCalories DESC LIMIT 5;
List the top 5 members who have burned the most calories from running workouts.
<table0>[Visits_Restaurant] { <col0>[StuID]:[INTEGER] <col1>[ResID]:[INTEGER] <col2>[Time]:[TIMESTAMP] <col3>[Spent]:[FLOAT] } <table1>[Type_Of_Restaurant] { <col0>[ResID]:[INTEGER] <col1>[ResTypeID]:[INTEGER] } <table2>[Student] { <col0>[StuID]:[INTEGER] <col1>[LName]:[VARCHAR] <col2>[Fname]:[VARCHAR] <col3>[Age]:[I...
SELECT Fname, COUNT( `<col2>` ) FROM `<table2>` WHERE `<col3>` > 18 AND `<col5>` <> 600 AND `<col4>` = 'F' GROUP BY `<col2>` ORDER BY COUNT( `<col2>` ) DESC
For those female students with age is older than 18 who are not majoring in 600, tell me how many students of different first names using a bar chart, rank by the how many fname in desc please.
<table0>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table2>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]...
SELECT `<table1>`.label FROM `<table1>` WHERE `<table1>`.itemid IN ( SELECT t3.itemid FROM ( SELECT t2.itemid, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table8>`.charttime, admissions.hadm_id FROM `<table8>` JOIN admissions ON `<table8>`.hadm_id = admissions.hadm_id WH...
in a year before, what are the top four most frequent lab tests given to patients within the same hospital visit after being diagnosed with poisoning-methadone?
<table0>[table_name_99] { <col0>[decile]:[INTEGER] <col1>[area]:[VARCHAR] <col2>[roll]:[VARCHAR] }
SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "normanby" AND `<col2>` < 157
What is the total decile in the area of Normanby with a roller smaller than 157?
<table0>[table_78146] { <col0>[Date]:[text] <col1>[Tournament]:[text] <col2>[Location]:[text] <col3>[Purse]:[real] <col4>[Winner]:[text] <col5>[Score]:[text] <col6>[1st]:[Prize] }
SELECT MIN( "Purse( $ )" ) FROM `<table0>` WHERE "Score" = '212 ( -4 )' AND "1st Prize( $ )" < '105,000'
What is the purse for the tournament with a winning score of 212 (-4), and a 1st prize of under $105,000?
<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 COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN procedures ON `<table1>`.hadm_id = procedures.hadm_id WHERE `<table1>`.admityear < "2151" AND procedures.icd9_code = "8841"
how many patients whose admission year is less than 2151 and procedure icd9 code is 8841?
<table0>[t_kc24] { <col0>[ACCOUNT_DASH_DATE]:[time] <col1>[ACCOUNT_DASH_FLG]:[number] <col2>[CASH_PAY]:[number] <col3>[CIVIL_SUBSIDY]:[number] <col4>[CKC102]:[number] <col5>[CLINIC_ID]:[text] <col6>[CLINIC_SLT_DATE]:[time] <col7>[COMP_ID]:[text] <col8>[COM_ACC_PAY]:[number] <col9>[COM_PAY]:[number] <col10>[DATA_ID]:[te...
SELECT `<table3>`.MED_CLINIC_ID FROM `<table3>` WHERE `<table3>`.PERSON_ID = '95153262' AND NOT `<table3>`.MED_CLINIC_ID IN ( SELECT `<table3>`_`<table2>`.MED_CLINIC_ID FROM `<table2>` WHERE `<table2>`.AMOUNT <= 3127.09 )
患者95153262在哪几次医疗记录中药品金额高于3127.09元?医疗就诊编号是多少
<table0>[Policy] { <col0>[PolicyID]:[int] <col1>[PolicyType]:[varchar] <col2>[EffectiveDate]:[date] <col3>[RiskScore]:[int] } <table1>[Claim] { <col0>[ClaimID]:[int] <col1>[PolicyID]:[int] <col2>[ClaimDate]:[date] <col3>[ClaimAmount]:[int] <col4>[State]:[varchar] <col5>[INSERT]:[Policy] <col6>[PolicyID]:[PolicyType] <...
SELECT `<table0>`.`<table0>`Type, `<table0>`.EffectiveDate FROM `<table0>` INNER JOIN Claim ON `<table0>`.`<table0>`ID = Claim.`<table0>`ID WHERE `<table0>`.RiskScore < 700 AND Claim.ClaimDate BETWEEN '2021-01-01' AND '2021-12-31';
What is the policy type and effective date of policies with a risk score less than 700 and that have a claim in 2021?
<table0>[table_name_56] { <col0>[total]:[INTEGER] <col1>[gold]:[VARCHAR] <col2>[bronze]:[VARCHAR] }
SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 1 AND `<col2>` = 3
Name the sum of total for gold less than 1 and bronze of 3
<table0>[Ref_Incident_Type] { <col0>[incident_type_code]:[VARCHAR] <col1>[incident_type_description]:[VARCHAR] } <table1>[Teachers] { <col0>[teacher_id]:[INTEGER] <col1>[address_id]:[INTEGER] <col2>[first_name]:[VARCHAR] <col3>[middle_name]:[VARCHAR] <col4>[last_name]:[VARCHAR] <col5>[gender]:[VARCHAR] <col6>[cell_mob...
SELECT date_address_from, COUNT( `<col2>` ) FROM `<table6>` GROUP BY `<col5>` ORDER BY `<col4>` DESC
Show me about the distribution of date_address_from and the amount of date_address_from , and group by attribute other_details and bin date_address_from by time in a bar chart.
<table0>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table1>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[EMAIL]:[varchar] <col4>[PHONE_NUMBER]:[v...
SELECT HIRE_DATE, AVG( `<col9>` ) FROM `<table1>` WHERE `<col5>` < '2002-06-21' ORDER BY AVG( `<col9>` ) DESC
For those employees who was hired before 2002-06-21, visualize a bar chart about the distribution of hire_date and the average of manager_id bin hire_date by weekday, sort the average of manager id in desc order.
<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>` WHERE `<table2>`.language = "RUSS" AND `<table2>`.discharge_location = "SNF"
how many patients whose language is russ and discharge location is snf?
<table0>[table_58526] { <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 COUNT( "Crowd" ) FROM `<table0>` WHERE "Home team" = 'melbourne'
What was the crowd attendance when the home team was Melbourne?
<table0>[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] } <table1>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <tab...
SELECT `<table15>`.short_title FROM `<table15>` WHERE `<table15>`.icd9_code IN ( SELECT t1.icd9_code FROM ( SELECT `<table8>`.icd9_code, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table8>` WHERE `<table8>`.hadm_id IN ( SELECT `<table14>`.hadm_id FROM `<table14>` WHERE `<table14>`.age BETWEEN 30 AND 39...
what were the top five most frequent diagnoses among the patients in the age 30s in 2104?
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>...
SELECT t4.`<table1>`name FROM ( SELECT t3.`<table1>`name, DENSE_RANK( ) OVER ( ORDER BY t3.c1 DESC ) AS c2 FROM ( SELECT t2.`<table1>`name, 100 - SUM( CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME( '%j', patient.hospitaldischargetime ) - STRFTIME( '%j', t2.`<table1>`time ) > 3 * 365 THEN 1 EL...
provide me with the top three diagnoses that had the highest three year mortality rate.
<table0>[green_building_projects] { <col0>[project_id]:[INT] <col1>[project_name]:[VARCHAR] <col2>[255]:[city] <col3>[VARCHAR]:[255] <col4>[country]:[VARCHAR] <col5>[255]:[INSERT] }
SELECT `<col1>` FROM `<table0>` WHERE city = 'Toronto';
What are the names of all green building projects in the city of Toronto?
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[c...
SELECT SUM( CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME( '%j', patient.hospitaldischargetime ) - STRFTIME( '%j', t2.`<table0>`time ) > 1 * 365 THEN 1 ELSE 0 END ) * 100 / COUNT( * ) FROM ( SELECT t1.uniquepid, t1.`<table0>`time FROM ( SELECT patient.uniquepid, `<table0>`.`<table0>`time FROM...
what is the one year survival rate for a patient with facial bone fracture - maxillary fracture?
<table0>[table_1353096_1] { <col0>[channel_tv___dt]:[VARCHAR] <col1>[station]:[VARCHAR] }
SELECT channel_tv___dt__ FROM `<table0>` WHERE `<col1>` = "KDFW ++"
What channel has station kdfw ++?
<table0>[table_1134091_4] { <col0>[vacator]:[VARCHAR] <col1>[date_successor_seated]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "August 21, 1973"
Who was the vacator when the date successor seated was august 21, 1973?
<table0>[table_2668243_22] { <col0>[party]:[VARCHAR] <col1>[result]:[VARCHAR] <col2>[district]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Re-elected" AND `<col2>` = "South Carolina 7"
What 'party' was re-elected in district South Carolina 7?
<table0>[table_name_50] { <col0>[first_party]:[VARCHAR] <col1>[second_member]:[VARCHAR] <col2>[second_party]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "charles robert colvile" AND `<col2>` = "liberal"
Which of the first parties has second member as Charles Robert Colvile, and a liberal second party?
<table0>[mediatype] { <col0>[mediatypeid]:[number] <col1>[name]:[text] } <table1>[invoiceline] { <col0>[invoicelineid]:[number] <col1>[invoiceid]:[number] <col2>[trackid]:[number] <col3>[unitprice]:[number] <col4>[quantity]:[number] } <table2>[customer] { <col0>[customerid]:[number] <col1>[firstname]:[text] <col2>[la...
SELECT AVG( `<col8>` ) FROM `<table7>`
Find the average unit price for a track.
<table0>[content_creators] { <col0>[INT]:[name] <col1>[TEXT]:[country] <col2>[TEXT]:[media_literacy_score] <col3>[INT]:[INSERT] }
SELECT name, media_literacy_score FROM `<table0>` WHERE country IN ( 'Brazil', 'Argentina', 'Colombia', 'Chile', 'Mexico' ) ORDER BY media_literacy_score DESC LIMIT 5;
Who are the top 5 content creators with the highest media literacy scores in Latin American countries?
<table0>[table_name_89] { <col0>[attendance]:[VARCHAR] <col1>[opponent]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "washington redskins"
What attendance has Washington redskins as the opponent?
<table0>[Parts] { <col0>[part_id]:[INTEGER] <col1>[part_name]:[VARCHAR] <col2>[255]:[chargeable_yn] <col3>[VARCHAR]:[chargeable_amount] <col4>[VARCHAR]:[other_part_details] <col5>[VARCHAR]:[255] } <table1>[Fault_Log_Parts] { <col0>[fault_log_entry_id]:[INTEGER] <col1>[part_fault_id]:[INTEGER] <col2>[fault_status]:[VAR...
SELECT staff_name, COUNT( * ) FROM `<table11>` AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id GROUP BY T1.staff_name ORDER BY `<col1>` DESC
Return a bar chart on how many engineers did each staff contact? List both the contact staff name and number of engineers contacted, and show in descending by the X.
<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 < "2168" AND procedures.long_title = "Endoscopic excision or destruction of lesion or tissue of stomach"
Tell me the number of patients admitted before 2168 who had an endoscopic excision or destruction of lesion or tissue of stomach.
<table0>[store] { <col0>[store_id]:[number] <col1>[store_name]:[text] <col2>[type]:[text] <col3>[area_size]:[number] <col4>[number_of_product_category]:[number] <col5>[ranking]:[number] } <table1>[store_product] { <col0>[store_id]:[number] <col1>[product_id]:[number] } <table2>[district] { <col0>[district_id]:[number...
SELECT t3.headquartered_city FROM `<table0>` AS t1 JOIN `<table0>`_district AS t2 ON t1.`<table0>`_id = t2.`<table0>`_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY COUNT( * ) DESC LIMIT 1
What is the city with the most number of flagship stores?
<table0>[table_name_19] { <col0>[rank]:[INTEGER] <col1>[nation]:[VARCHAR] <col2>[gold]:[VARCHAR] }
SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "italy" AND `<col2>` > 1
what is the highest rank for italy when gold is more than 1?
<table0>[table_204_481] { <col0>[number]:[poll] <col1>[source]:[text] <col2>[date]:[nadministered] <col3>[text]:[sample] <col4>[nsize]:[number] <col5>[margin]:[nerror] <col6>[text]:[andrew] <col7>[ncuomo]:[text] <col8>[rob]:[nastorino] <col9>[text]:[text] <col10>[undecided]:[text] }
SELECT "date( s )\nadministered" FROM `<table0>` WHERE "rob\nastorino ( r )" > 25
dates of only poll in which astorino polled better than 25 %
<table0>[person_info] { <col0>[RYBH]:[text] <col1>[XBDM]:[number] <col2>[XBMC]:[text] <col3>[text]:[CSRQ] <col4>[time]:[CSD] <col5>[text]:[MZDM] <col6>[text]:[MZMC] <col7>[text]:[GJDM] <col8>[text]:[GJMC] <col9>[text]:[JGDM] <col10>[text]:[JGMC] <col11>[text]:[XLDM] <col12>[text]:[XLMC] <col13>[text]:[ZYLBDM] <col14>[t...
SELECT SQKS, `<col20>` FROM `<table5>` WHERE `<col3>` = '89851265565'
知不知道申请检验报告单89851265565的科室名称是啥?编码呢
<table0>[semester] { <col0>[semester_id]:[int] } <table1>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table2>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <table3>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comme...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program, program_course, semester WHERE course.course_id = course_offering.course_id AND program_course.category LIKE '%PreMajor%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.prog...
What are the classes that can be taken as PreMajor next semester ?
<table0>[table_name_84] { <col0>[forfeits]:[VARCHAR] <col1>[wins]:[VARCHAR] <col2>[losses]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 8 AND `<col2>` > 16
How many Forfeits have Wins smaller than 8, and Losses larger than 16?
<table0>[table_name_18] { <col0>[new_entries_this_round]:[VARCHAR] <col1>[round]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "semi-finals"
What is the New entries this round when the round is the semi-finals?
<table0>[table_77989] { <col0>[Date]:[text] <col1>[Ship]:[text] <col2>[Type]:[text] <col3>[Nationality]:[text] <col4>[Tonnage]:[GRT] }
SELECT MAX( "Tonnage GRT" ) FROM `<table0>` WHERE "Date" = '16 jan 16'
what is the most tonnage grt of any ship sunk or captured on 16 jan 16?
<table0>[table_69204] { <col0>[2003]:[text] <col1>[2004]:[text] <col2>[2007]:[text] <col3>[2009]:[text] <col4>[2010]:[text] <col5>[2011]:[text] <col6>[2012]:[text] }
SELECT "2003/ 04" FROM `<table0>` WHERE "2012/ 13" = '3r'
What was held in 2003/04 when 3R was in 2012?
<table0>[table_name_22] { <col0>[power]:[VARCHAR] <col1>[model]:[VARCHAR] <col2>[displacement]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1500" AND `<col2>` = "1490cc"
How much power does the 1500 model have with a displacement of 1490cc?
<table0>[table_24212608_1] { <col0>[viewers__millions]:[VARCHAR] <col1>[broadcast_date]:[VARCHAR] }
SELECT viewers__millions_ FROM `<table0>` WHERE `<col1>` = 2010
What was the number of viewers in millions for the broadcast from 2010?
<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 prescriptions ON `<table2>`.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "NEO*IV*AMPicillin Sodium"
find out the number of patients who have been prescribed neo*iv*ampicillin sodium.
<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 MAX( `<table3>`.age ) FROM `<table3>` WHERE `<table3>`.insurance = "Self Pay" AND `<table3>`.diagnosis = "STEMI"
what is maximum age of patients whose insurance is self pay and primary disease is stemi?
<table0>[airline] { <col0>[airline_code]:[varchar] <col1>[airline_name]:[text] <col2>[note]:[text] } <table1>[aircraft] { <col0>[aircraft_code]:[varchar] <col1>[aircraft_description]:[varchar] <col2>[manufacturer]:[varchar] <col3>[basic_type]:[varchar] <col4>[engines]:[int] <col5>[propulsion]:[varchar] <col6>[wide_bod...
SELECT DISTINCT flight.flight_id FROM `<table11>` AS AIRPORT_SERVICE_0, `<table11>` 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 = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'HOUSTON' AND fl...
list flights from DALLAS to HOUSTON
<table0>[table_28478] { <col0>[Institution]:[text] <col1>[Location]:[text] <col2>[Founded]:[real] <col3>[Type]:[text] <col4>[Enrollment]:[real] <col5>[Joined]:[text] <col6>[Nickname]:[text] <col7>[Primary]:[Conference] <col8>[joining]:[CSFL] }
SELECT "Primary Conference when `<col8>` the CSFL" FROM `<table0>` WHERE "Joined" = '2004-05'
what was the primary conference when joining the csfl for the institution that joined in 2004-05?
<table0>[time_zone] { <col0>[time_zone_code]:[text] <col1>[time_zone_name]:[text] <col2>[hours_from_gmt]:[int] } <table1>[code_description] { <col0>[code]:[varchar] <col1>[description]:[text] } <table2>[fare] { <col0>[fare_id]:[int] <col1>[from_airport]:[varchar] <col2>[to_airport]:[varchar] <col3>[fare_basis_code]:[...
SELECT DISTINCT flight.flight_id FROM `<table13>` AS AIRPORT_SERVICE_0, `<table13>` 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 = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILAD...
list all UA flights from PHILADELPHIA to SAN FRANCISCO
<table0>[EsportsEvents] { <col0>[EventID]:[INT] <col1>[Players]:[INT] <col2>[UsesVR]:[BOOLEAN] }
SELECT SUM( `<col1>` ) FROM `<table0>` WHERE `<col2>` = TRUE;
How many players use VR technology in esports events?
<table0>[table_name_76] { <col0>[total]:[VARCHAR] <col1>[nation]:[VARCHAR] <col2>[rank]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "austria" AND `<col2>` > 4
What is the total medals Austria and those with larger than rank 4 have?
<table0>[actors] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[gender]:[VARCHAR] } <table1>[movies_actors] { <col0>[movie_id]:[INT] <col1>[actor_id]:[INT] <col2>[INSERT]:[actors] <col3>[name]:[gender] <col4>[VALUES]:[Actor1] <col5>[Male]:[Actor2] <col6>[Male]:[Actor3] <col7>[Female]:[Actor4] <col8>[Male]:[INSERT] ...
SELECT name, COUNT( * ) as appearances FROM `<table0>` INNER JOIN movies_`<table0>` ON `<table0>`.id = movies_`<table0>`.actor_id GROUP BY name ORDER BY appearances DESC LIMIT 3;
Who are the top 3 actors with the highest number of appearances in movies?
<table0>[region] { <col0>[Region_ID]:[int] <col1>[Region_name]:[text] <col2>[Date]:[text] <col3>[Label]:[text] <col4>[Format]:[text] <col5>[Catalogue]:[text] } <table1>[party_events] { <col0>[Event_ID]:[int] <col1>[Event_Name]:[text] <col2>[Party_ID]:[int] <col3>[Member_in_charge_ID]:[int] } <table2>[party] { <col0>[...
SELECT Party_name, COUNT( * ) FROM `<table1>` AS T1 JOIN party AS T2 ON T1.Party_ID = T2.Party_ID GROUP BY T1.Party_ID ORDER BY COUNT( * )
Return a bar chart on how many events are there for each party?, could you display by the Y-axis in asc?
<table0>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <col7>[number]:[ApprovedByUserId] <col8>[number]:[ApprovalDate] } <table1>[ReviewTaskStates] {...
SELECT PostId AS "post_link", SUM( CASE WHEN `<table4>`TypeId = 10 THEN 1 ELSE 0 END ) AS closed, SUM( CASE WHEN `<table4>`TypeId = 11 THEN 1 ELSE 0 END ) AS reopened, SUM( CASE WHEN `<table4>`TypeId = 10 THEN 1 ELSE 0 END ) - SUM( CASE WHEN `<table4>`TypeId = 11 THEN 1 ELSE 0 END ) AS currentlyclosed FROM `<table4>` W...
What question has the most cycles of Close/Reopen?. http://meta.stackexchange.com/questions/277175/what-question-has-the-most-cycles-of-close-reopen
<table0>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoticeTypeId] <col2>[number]:[CreationDate] <col3>[time]:[DeletionDate] <col4>[time]:[Expir...
SELECT t.TagName, YEAR( p.CreationDate ), MONTH( p.CreationDate ), COUNT( t.TagName ) AS d FROM `<table12>` AS t INNER JOIN Post`<table12>` AS pt ON t.Id = pt.TagId INNER JOIN Posts AS P ON p.Id = pt.PostId WHERE t.TagName = '##TagNam##' AND NOT p.ClosedDate IS NULL GROUP BY YEAR( p.CreationDate ), MONTH( p.CreationDat...
Asked Questions per month for a given Tag.