schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[Categories] { <col0>[CategoryID]:[integer] <col1>[CategoryName]:[text] <col2>[Description]:[text] } <table1>[Customers] { <col0>[CustomerID]:[integer] <col1>[CustomerName]:[text] <col2>[ContactName]:[text] <col3>[Address]:[text] <col4>[City]:[text] <col5>[PostalCode]:[text] <col6>[Country]:[text] } <table2>[...
SELECT COUNT( TerritoryDescription ) FROM Territories WHERE RegionID IN ( 1, 2, 3, 4 ) GROUP BY RegionID
What are the the total number of territory in each region?
<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 `<table8>`.admissionheight FROM `<table8>` WHERE `<table8>`.`<table8>`healthsystemstayid IN ( SELECT `<table8>`.`<table8>`healthsystemstayid FROM `<table8>` WHERE `<table8>`.uniquepid = '030-75705' ) AND NOT `<table8>`.admissionheight IS NULL ORDER BY `<table8>`.unitadmittime DESC LIMIT 1
what was the last height of patient 030-75705.
<table0>[table_67373] { <col0>[Language]:[text] <col1>[Number]:[text] <col2>[percentage]:[text] <col3>[males]:[text] <col4>[females]:[text] }
SELECT "females" FROM `<table0>` WHERE "Language" = 'ukrainian'
How many females speak Ukrainian?
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_...
SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.diagnosis = "PNEUMONIA" AND `<table3>`.age < "49"
how many patients whose primary disease is pneumonia and age is less than 49?
<table0>[table_53807] { <col0>[Track]:[real] <col1>[Title]:[text] <col2>[Translation]:[text] <col3>[Composer]:[text] <col4>[Recorded]:[text] }
SELECT "Title" FROM `<table0>` WHERE "Recorded" = '1959-09-15' AND "Track" = '7'
Which track 7 title was recorded in 1959-09-15?
<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 1 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table7>`.unitadmittime ) ) FROM `<table7>` WHERE `<table7>`.uniquepid = '027-149724' AND `<table7>`.unitdischargetime IS NULL
how many days is it since patient 027-149724 was admitted to the icu?
<table0>[shipment_items] { <col0>[shipment_id]:[number] <col1>[order_item_id]:[number] } <table1>[invoices] { <col0>[invoice_number]:[number] <col1>[invoice_date]:[time] <col2>[invoice_details]:[text] } <table2>[customers] { <col0>[customer_id]:[number] <col1>[customer_name]:[text] <col2>[customer_details]:[text] } ...
SELECT T2.order_id, T2.order_status FROM `<table2>` AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = "Jeramie"
Which orders are made by the customer named 'Jeramie'? Give me the order ids and status.
<table0>[table_27654] { <col0>[Rank]:[average] <col1>[real]:[Place] <col2>[real]:[Couple] <col3>[text]:[Total] <col4>[points]:[real] <col5>[Number]:[dances] <col6>[real]:[Average] }
SELECT "Couple" FROM `<table0>` WHERE "Average" = '15.5'
What couple averaged 15.5?
<table0>[retailers] { <col0>[INT]:[name] <col1>[TEXT]:[country] <col2>[TEXT]:[INSERT] } <table1>[products] { <col0>[INT]:[name] <col1>[TEXT]:[is_fair_trade] <col2>[BOOLEAN]:[INSERT] } <table2>[retailer_products] { <col0>[retailer_id]:[INT] <col1>[product]:[TEXT] <col2>[quantity]:[INT] }
SELECT `<table0>`.name FROM `<table0>` LEFT JOIN retailer_products ON `<table0>`.id = retailer_products.retailer_id LEFT JOIN products ON retailer_products.product = products.name WHERE products.is_fair_trade IS NULL AND `<table0>`.country = 'Africa';
Which retailers in Africa do not carry any fair trade products?
<table0>[table_76629] { <col0>[Player]:[text] <col1>[Nationality]:[text] <col2>[Jersey]:[Number] <col3>[text]:[Position] <col4>[text]:[Years] <col5>[text]:[text] }
SELECT "Nationality" FROM `<table0>` WHERE "From" = 'oregon state'
What nationality is the player from Oregon State?
<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 q.Id AS "post_link", q.Score AS "Question Score", MAX( a.Score ) AS "Top Answer Score", CAST( q.Score AS FLOAT ) / CAST( CASE WHEN MAX( a.Score ) = 0 THEN 1 ELSE MAX( a.Score ) END AS FLOAT ) AS Ratio FROM `<table25>` AS q INNER JOIN `<table25>` AS a ON q.PostTypeId = 1 AND a.ParentId = q.Id GROUP BY q.Id, q.Sco...
Good Question Without Good Answer: High Question / Top Answer Score Ratio. Divide the question score by the score of the top answer and sort in decreasing order. Shows questions for which no good solution exist: most of those are either good feature requests or mathematical impossibilities.
<table0>[table_name_53] { <col0>[unit]:[VARCHAR] <col1>[location]:[VARCHAR] <col2>[authors]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "china" AND `<col2>` = "zhou zhang"
What unit is located in China and has Zhou Zhang as an author?
<table0>[WorkshopAttendance] { <col0>[INT]:[visitor_id] <col1>[INT]:[date] <col2>[DATE]:[INSERT] }
SELECT COUNT( DISTINCT visitor_id ) FROM `<table0>` WHERE date BETWEEN DATE_SUB( CURRENT_DATE, INTERVAL 30 DAY ) AND CURRENT_DATE;
Get the number of unique visitors who attended workshops in the last month
<table0>[conservation_initiatives] { <col0>[INT]:[initiative] <col1>[VARCHAR]:[255] <col2>[species]:[VARCHAR] <col3>[255]:[INSERT] }
SELECT `<col2>` FROM `<table0>` GROUP BY `<col2>` HAVING COUNT( * ) > 1;
Identify marine species that are involved in more than one conservation initiative.
<table0>[table_25179] { <col0>[Version]:[text] <col1>[Release]:[date] <col2>[text]:[Distribution] <col3>[mechanism]:[text] <col4>[Features]:[text] <col5>[Security]:[issues] }
SELECT "Distribution mechanism" FROM `<table0>` WHERE "Version" = '1.5b'
If the version is 1.5b, what is the distribution mechanism?
<table0>[semester] { <col0>[semester_id]:[int] } <table1>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comment_text]:[varchar] } <table2>[program] { <col0>[program_id]:[int] <col1>[name]:[varchar] <col2>[college]:[varchar] <col3>[introduction]:[varchar] } <tab...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND course.department = 'ALA' AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'Spring-...
Kindly give me a list of the upper level ALA classes offered this Spring-Summer .
<table0>[autonomous_vehicles] { <col0>[INT]:[vehicle_model] <col1>[VARCHAR]:[price] <col2>[FLOAT]:[INSERT] }
SELECT COUNT( DISTINCT vehicle_model ) AS unique_models, AVG( price ) AS average_price FROM autonomous_vehicles;
List the number of unique autonomous vehicle models and their average price in the vehicle_sales table.
<table0>[Cuisines] { <col0>[CuisineID]:[INT] <col1>[CuisineType]:[VARCHAR] } <table1>[Meals] { <col0>[MealID]:[INT] <col1>[CuisineID]:[INT] <col2>[MealName]:[VARCHAR] <col3>[CalorieCount]:[INT] <col4>[IsVegetarian]:[BIT] <col5>[INSERT]:[Cuisines] <col6>[CuisineID]:[CuisineType] <col7>[VALUES]:[American] <col8>[Italian...
SELECT CuisineType, AVG( CalorieCount ) as avg_calories FROM `<table0>` C JOIN Meals M ON C.CuisineID = M.CuisineID WHERE IsVegetarian = 1 GROUP BY CuisineType;
What is the average calorie count per meal for vegetarian dishes?
<table0>[vr_game] { <col0>[game_id]:[name] <col1>[genre]:[release_year] <col2>[platform]:[hardware_requirements] }
INSERT INTO vr_game ( name, genre, release_year, platform, hardware_requirements ) VALUES ( 'QuantumDefender', 'Action', 2023, 'PC', 'NVIDIA RTX 3080' )
Add new VR game 'QuantumDefender' with genre 'Action'
<table0>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table1>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table2>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NA...
SELECT HIRE_DATE, COUNT( `<col5>` ) FROM `<table5>` WHERE NOT `<col0>` IN ( SELECT `<col0>` FROM `<table4>` ) ORDER BY COUNT( `<col5>` ) DESC
For those employees who did not have any job in the past, visualize a bar chart about the distribution of hire_date and the amount of hire_date bin hire_date by weekday, and rank in desc by the how many hire date please.
<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, SUM( Revenue ) FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of founder and the sum of revenue , and group by attribute founder.
<table0>[table_name_50] { <col0>[score]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "13 april 1997"
Which Score has a Date of 13 april 1997?
<table0>[table_4860] { <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 "Home `<col2>` score" FROM `<table0>` WHERE "Crowd" > '12,000' AND "Venue" = 'victoria park'
What was the home teams score at Victoria Park when attendance was more than 12,000?
<table0>[audits] { <col0>[audit_id]:[INT] <col1>[location_id]:[INT] <col2>[audit_date]:[DATE] }
SELECT COUNT( * ) FROM `<table0>` WHERE `<col1>` = 301;
How many sustainable sourcing audits have been conducted for location 301?
<table0>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table2>[d_icd_procedures] ...
SELECT SUM( `<table6>`.dose_val_rx ) FROM `<table6>` WHERE `<table6>`.hadm_id IN ( SELECT `<table9>`.hadm_id FROM `<table9>` WHERE `<table9>`.subject_id = 83901 ) AND `<table6>`.drug = 'furosemide' AND DATETIME( `<table6>`.startdate, 'start of month' ) = DATETIME( CURRENT_TIME( ), 'start of month', '-1 month' )
how much furosemide were prescribed to patient 83901 in total during the previous month?
<table0>[table_name_43] { <col0>[cover_model]:[VARCHAR] <col1>[centerfold_model]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "marketa janska"
Who was the Cover model when the Centerfold Model was Marketa Janska?
<table0>[table_train_102] { <col0>[int]:[autoimmune_disease] <col1>[bool]:[stroke] <col2>[bool]:[renal_disease] <col3>[bool]:[hepatic_disease] <col4>[bool]:[liver_disease] <col5>[bool]:[serum_creatinine] <col6>[float]:[seizure_disorder] <col7>[bool]:[NOUSE] }
SELECT * FROM `<table0>` WHERE serum_creatinine >= 1.6
serum creatinine >= 1.6 mg / dl
<table0>[table_204_835] { <col0>[number]:[rank] <col1>[number]:[lane] <col2>[number]:[name] <col3>[text]:[nationality] <col4>[text]:[time] <col5>[text]:[notes] }
SELECT "name" FROM `<table0>` ORDER BY "rank" DESC LIMIT 1
which competitor was the last to place ?
<table0>[table_name_17] { <col0>[VARCHAR]:[winnings] <col1>[VARCHAR]:[car__number] <col2>[VARCHAR]:[points] }
SELECT make FROM `<table0>` WHERE car__number < 40 AND points < 151 AND winnings = "$84,400"
Which driver has a # smaller than 40, less than 151 points, and Winnings of $84,400?
<table0>[sales_in_weather] { <col0>[date]:[date] <col1>[store_nbr]:[integer] <col2>[item_nbr]:[integer] <col3>[units]:[integer] } <table1>[weather] { <col0>[station_nbr]:[integer] <col1>[date]:[date] <col2>[tmax]:[integer] <col3>[tmin]:[integer] <col4>[tavg]:[integer] <col5>[depart]:[integer] <col6>[dewpoint]:[integer...
SELECT CAST( ( SUM( CASE WHEN T1.`date` = '2012-02-03' THEN T1.tavg * 1 ELSE 0 END ) - SUM( CASE WHEN T1.`date` = '2012-02-02' THEN T1.tavg * 1 ELSE 0 END ) ) AS REAL ) * 100 / SUM( CASE WHEN T1.`date` = '2012-02-02' THEN T1.tavg * 1 ELSE 0 END ) FROM `<table1>` AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.st...
For the weather station has store no.9, what was the increased percentage of the average temperature from 2012/2/2 to 2012/2/3?
<table0>[table_name_63] { <col0>[copa_del_rey]:[INTEGER] <col1>[name]:[VARCHAR] <col2>[fifa_club_world_championship]:[VARCHAR] }
SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "guti" AND `<col2>` < 0
Which Copa del Rey has a Name of guti, and a FIFA Club World Championship smaller than 0?
<table0>[PostHistoryTypes] { <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]...
SELECT COUNT( `<table19>`.Id ) FROM `<table19>` INNER JOIN Users ON `<table19>`.OwnerUserId = Users.Id WHERE `<table19>`.CreationDate < DATEADD( Day, 2, Users.CreationDate ) AND YEAR( Users.CreationDate ) = 2019 GROUP BY Users.Id
Average number of posts created within two days of user creation date in 2019.
<table0>[table_19774] { <col0>[Administrative]:[division] <col1>[text]:[Area] <col2>[u00b2]:[text] <col3>[Population]:[2000] <col4>[Census]:[real] <col5>[Population]:[2010] <col6>[Census]:[real] <col7>[Population]:[density] <col8>[2010]:[u00b2] }
SELECT "Population ( `<col8>` `<col4>` )" FROM `<table0>` WHERE "Population 2000 Census" = '920599'
Name the population 2010 census for population 2000 census of 920599
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[te...
SELECT COUNT( DISTINCT `<table9>`.uniquepid ) FROM `<table9>` WHERE `<table9>`.`<table9>`unitstayid IN ( SELECT `<table0>`.`<table9>`unitstayid FROM `<table0>` WHERE `<table0>`.`<table0>`name = 'mode' )
count the number of patients who had taken a mode test.
<table0>[threat_actors] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[country] <col3>[VARCHAR]:[type] }
INSERT INTO threat_actors ( id, name, country, type ) VALUES ( 1, 'Lazarus Group', 'North Korea', 'state-sponsored' ), ( 2, 'Carbanak Group', 'Russia', 'cybercrime' ), ( 3, 'APT29', 'United Kingdom', 'state-sponsored' );
Insert new records of threat actors with the following details: [(1, 'Lazarus Group', 'North Korea', 'state-sponsored'), (2, 'Carbanak Group', 'Russia', 'cybercrime'), (3, 'APT29', 'United Kingdom', 'state-sponsored')] into the "threat_actors" table
<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>` WHERE `<table3>`.admission_location = "EMERGENCY ROOM ADMIT" AND `<table3>`.diagnosis = "TRANSIENT ISCHEMIC ATTACK"
how many patients are admitted in emergency room and diagnosed primarily for transient ischemic attack?
<table0>[table_name_68] { <col0>[order]:[VARCHAR] <col1>[nationality]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "ese milan"
Which Order has a Nationality of ese milan?
<table0>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>...
SELECT COUNT( DISTINCT `<table8>`.subject_id ) FROM `<table8>` WHERE `<table8>`.hadm_id IN ( SELECT `<table13>`.hadm_id FROM `<table13>` WHERE `<table13>`.icd9_code = ( SELECT `<table7>`.icd9_code FROM `<table7>` WHERE `<table7>`.short_title = 'oliguria & anuria' ) AND STRFTIME( '%y', `<table13>`.charttime ) <= '2104' ...
count the number of patients who until 2104 were diagnosed with oliguria & anuria.
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:...
SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id WHERE `<table4>`.discharge_location = "SNF" AND diagnoses.long_title = "Schizoaffective disorder, unspecified"
What is the number of patients diagnosed with unspecified schizoaffective disorder and were discharged to snf?
<table0>[table_name_38] { <col0>[season]:[VARCHAR] <col1>[away]:[VARCHAR] <col2>[league]:[VARCHAR] <col3>[home]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "regionalliga süd" AND `<col3>` = "1-0" AND `<col1>` = "2-3"
What season has a regionalliga s d league, a 1-0 home, and an away of 2-3?
<table0>[table_23922] { <col0>[Country]:[Region] <col1>[text]:[Title] <col2>[text]:[Television] <col3>[network]:[text] <col4>[Winners]:[text] <col5>[Presenters]:[text] <col6>[Trainers]:[text] }
SELECT "Country/Region" FROM `<table0>` WHERE "Title" = 'Marele câștigător The Big Winner'
What country uses the title Marele C tig tor The Big Winner?
<table0>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table1>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <tab...
SELECT FIRST_NAME, `<col7>` FROM `<table5>` ORDER BY `<col1>` DESC
Bar chart x axis first name y axis salary, I want to rank names in descending order.
<table0>[table_67055] { <col0>[real]:[text] <col1>[Builder]:[text] <col2>[Whenbuilt]:[text] <col3>[Withdrawn]:[text] }
SELECT "Withdrawn" FROM `<table0>` WHERE "Name" = 'charles dickens'
Name the withdrawn for charles dickens
<table0>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table1>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[Dupl...
SELECT answer.OwnerUserId AS "user_link", COUNT( * ) AS `<col0>` FROM `<table27>` AS question INNER JOIN `<table27>` AS answer ON question.PostTypeId = 1 AND answer.PostTypeId = 2 AND question.OwnerUserId = '##userid##' AND answer.ParentId = question.Id GROUP BY answer.OwnerUserId ORDER BY `<col0>` DESC
Whose questions have you answered.
<table0>[music_festival] { <col0>[int]:[Music_Festival] <col1>[text]:[Date_of_ceremony] <col2>[text]:[Category] <col3>[text]:[Volume] <col4>[int]:[Result] } <table1>[volume] { <col0>[Volume_ID]:[int] <col1>[Volume_Issue]:[text] <col2>[Issue_Date]:[text] <col3>[Weeks_on_Top]:[real] <col4>[Song]:[text] <col5>[Artist_ID]...
SELECT Category, COUNT( * ) FROM `<table0>` GROUP BY Category ORDER BY Category
Show me the total number by category in a histogram, and order in asc by the names please.
<table0>[table_name_24] { <col0>[long]:[INTEGER] <col1>[avg]:[VARCHAR] <col2>[rec]:[VARCHAR] }
SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 6 AND `<col2>` < 2
Name the sum of long for avg less than 6 and rec less than 2
<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>[prescr...
SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.diagnosis = "BLADDER CANCER/SDA" AND `<table3>`.age < "85"
count the number of patients whose primary disease is bladder cancer/sda and age is less than 85?
<table0>[table_name_58] { <col0>[total]:[VARCHAR] <col1>[set_2]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "21:12"
What is the Total of Set 2 of 21:12?
<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 `<table0>`.dob, prescriptions.drug_type FROM `<table0>` INNER JOIN prescriptions ON `<table0>`.hadm_id = prescriptions.hadm_id WHERE `<table0>`.name = "Jerry Deberry"
what is date of birth and drug type of subject name jerry deberry?
<table0>[table_name_78] { <col0>[fleet_number_s]:[VARCHAR] <col1>[quantity_made]:[VARCHAR] }
SELECT fleet_number_s_ FROM `<table0>` WHERE `<col1>` = "1"
Which fleet numbers has quantity of 1?
<table0>[table_26801821_1] { <col0>[production_code]:[VARCHAR] <col1>[no_in_series]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 5
What is the production code for the number 5 series ?
<table0>[table_name_12] { <col0>[city___state]:[VARCHAR] <col1>[winner]:[VARCHAR] <col2>[circuit]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "john bowe" AND `<col2>` = "phillip island grand prix circuit"
In what City/State did John Bowe win at Phillip Island Grand Prix Circuit?
<table0>[europium_production] { <col0>[country]:[VARCHAR] <col1>[quantity]:[INT] }
SELECT DISTINCT country, quantity FROM europium_production;
List all the distinct europium production quantities and countries.
<table0>[table_name_85] { <col0>[award]:[VARCHAR] <col1>[title]:[VARCHAR] <col2>[category]:[VARCHAR] <col3>[year]:[VARCHAR] <col4>[type]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col3>` < 1998 AND `<col4>` = "won" AND `<col2>` = "best sound" AND `<col1>` = "the exorcist"
What award was won in the best sound category for the exorcist before 1998?
<table0>[marine_species] { <col0>[INT]:[species_name] <col1>[TEXT]:[ocean_basin] }
SELECT species_name, ocean_basin, COUNT( * ) FROM `<table0>` GROUP BY ocean_basin;
How many marine species are present in each ocean basin?
<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>[Users] { <col0>[num...
SELECT ROW_NUMBER( ) OVER ( ORDER BY Reputation DESC ) AS "#", Id AS "user_link", Reputation, Location FROM `<table1>` WHERE LOWER( Location ) LIKE '%helsinki%' ORDER BY Reputation DESC
Top users in Tampere, Finland.
<table0>[CommunityDevelopment] { <col0>[ProjectID]:[INT] <col1>[Country]:[VARCHAR] <col2>[100]:[InitiativeType] <col3>[VARCHAR]:[100] <col4>[Budget]:[DECIMAL] }
SELECT Country, InitiativeType, AVG( `<col4>` ) AS AvgBudget FROM `<table0>` GROUP BY Country, InitiativeType;
What is the average budget for community development initiatives, partitioned by country and initiative type?
<table0>[returns] { <col0>[INT]:[return_weight] <col1>[FLOAT]:[return_from] <col2>[VARCHAR]:[return_to] <col3>[VARCHAR]:[return_date] <col4>[DATE]:[INSERT] }
SELECT COUNT( * ) FROM `<table0>` WHERE return_from = 'California' AND return_to = 'New York' AND return_date >= '2021-07-01' AND return_date < '2021-10-01';
How many returns were made from California to New York in Q3 2021?
<table0>[CREATE] { <col0>[SCHEMA]:[fitness] <col1>[USE]:[fitness] } <table1>[members] { <col0>[member_id]:[INT] <col1>[PRIMARY]:[KEY] <col2>[name]:[VARCHAR] <col3>[age]:[INT] <col4>[membership]:[VARCHAR] }
SELECT `<col2>` FROM `<table1>` WHERE `<table1>`hip IS NOT NULL;
What are the names of all members who have a membership?
<table0>[marine_species] { <col0>[name]:[VARCHAR] <col1>[common_name]:[VARCHAR] <col2>[location]:[VARCHAR] }
SELECT COUNT( * ) FROM `<table0>` WHERE `<col2>` = 'Arctic Ocean';
How many marine species are found in the Arctic Ocean?
<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 lab ON `<table2>`.hadm_id = lab.hadm_id WHERE `<table2>`.admityear < "2120" AND lab.label = "Albumin, Urine"
give me the number of patients admitted before 2120 who were ordered urine albumin lab test.
<table0>[table_name_61] { <col0>[high_assists]:[VARCHAR] <col1>[game]:[INTEGER] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 46
What high assists have a game greater than 46?
<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 DISTINCT u.Id AS "user_link", u.Reputation FROM `<table1>` AS u INNER JOIN Badges AS b ON b.UserId = u.Id WHERE LOWER( Location ) LIKE LOWER( '%##CityOrSuburbName##%' ) AND LOWER( AboutMe ) LIKE '%github%' OR LOWER( AboutMe ) LIKE '%bitbucket%' OR LOWER( AboutMe ) LIKE '%sourceforge%' OR LOWER( AboutMe ) LIKE '%...
Find Developers with Open Source projects in City.
<table0>[athlete_wellbeing] { <col0>[athlete_id]:[INT] <col1>[program_date]:[DATE] }
SELECT a1.athlete_id, a1.program_date FROM `<table0>` a1 JOIN `<table0>` a2 ON a1.program_date = a2.program_date AND a1.athlete_id != a2.athlete_id;
List the athletes who have participated in wellbeing programs on the same day as another athlete?
<table0>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table1>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table2>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[...
SELECT STATE_PROVINCE, COUNT( `<col4>` ) FROM `<table2>` GROUP BY `<col4>` ORDER BY `<col4>` DESC
Group and count the state province attribute of the location table to visualize a bar chart, list STATE_PROVINCE in desc order.
<table0>[table_1971074_1] { <col0>[enrollment]:[VARCHAR] <col1>[nickname]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Barons"
How many different enrollment numbers are there for the school whose students are nicknamed Barons?
<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 diagnoses ON `<table1>`.hadm_id = diagnoses.hadm_id WHERE `<table1>`.admission_type = "ELECTIVE" AND diagnoses.icd9_code = "4373"
give me the number of patients who have elective hospital admissions along with diagnosis icd9 code 4373.
<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>[prescriptions] { <c...
SELECT `<table8>`.charttime FROM `<table8>` WHERE `<table8>`.icustay_id IN ( SELECT `<table0>`.icustay_id FROM `<table0>` WHERE `<table0>`.hadm_id IN ( SELECT `<table4>`.hadm_id FROM `<table4>` WHERE `<table4>`.subject_id = 28443 ) ) AND DATETIME( `<table8>`.charttime, 'start of month' ) = DATETIME( CURRENT_TIME( ), 's...
when was the first time patient 28443's intake time on this month/23?
<table0>[teachers] { <col0>[teacher_id]:[INT] <col1>[teacher_name]:[VARCHAR] } <table1>[professional_development_courses] { <col0>[course_id]:[INT] <col1>[course_name]:[VARCHAR] <col2>[completion_date]:[DATE] }
SELECT COUNT( DISTINCT `<table0>`.teacher_id ) as num_`<table0>` FROM `<table0>` JOIN professional_development_courses ON `<table0>`.teacher_id = professional_development_courses.teacher_id WHERE professional_development_courses.completion_date >= DATEADD( month, -6, GETDATE( ) );
How many teachers have completed professional development courses in the last 6 months?
<table0>[table_name_63] { <col0>[player]:[VARCHAR] <col1>[team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1970s"
Who is the player on a team from the 1970s?
<table0>[table_name_48] { <col0>[player_name]:[VARCHAR] <col1>[year]:[VARCHAR] <col2>[college]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 1989 AND `<col2>` = "washington state"
What is the name of the player from after 1989 from Washington State?
<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 `<table3>`.icd9_code, `<table3>`.short_title FROM `<table3>` WHERE `<table3>`.subject_id = "4333"
Bring me the procedure icd9 code and short title of the procedure for the patient with patient id 4333.
<table0>[attorneys] { <col0>[attorney_id]:[INT] <col1>[name]:[TEXT] } <table1>[cases] { <col0>[case_id]:[INT] <col1>[attorney_id]:[INT] <col2>[billing_amount]:[DECIMAL] }
SELECT `<table0>`.name, SUM( cases.billing_amount ) AS total_billing_amount FROM `<table0>` INNER JOIN cases ON `<table0>`.attorney_id = cases.attorney_id GROUP BY `<table0>`.name ORDER BY total_billing_amount DESC LIMIT 5;
Who are the top 5 attorneys with the highest billing amounts?
<table0>[total_consumption] { <col0>[consumption_id]:[INT] <col1>[customer_id]:[INT] <col2>[location]:[VARCHAR] <col3>[255]:[consumption_amount] <col4>[FLOAT]:[INSERT] }
SELECT location, SUM( consumption_amount ) FROM `<table0>` GROUP BY location;
What is the total water consumption by all customers in a specific location?
<table0>[table_62713] { <col0>[Year]:[real] <col1>[Class]:[text] <col2>[Team]:[text] <col3>[Machine]:[text] <col4>[Points]:[real] <col5>[Rank]:[text] <col6>[Wins]:[real] }
SELECT "Machine" FROM `<table0>` WHERE "Rank" = '4th' AND "Wins" = '2'
What is the name of the machine that ranked 4th and has 2 wins?
<table0>[table_42324] { <col0>[Team]:[text] <col1>[Match]:[real] <col2>[Points]:[real] <col3>[Draw]:[real] <col4>[Lost]:[real] }
SELECT SUM( "Match" ) FROM `<table0>` WHERE "Points" > '22'
How many matches ended with more than 22 points?
<table0>[condition_records] { <col0>[patient_id]:[INT] <col1>[condition]:[VARCHAR] } <table1>[patient_location] { <col0>[patient_id]:[INT] <col1>[location]:[VARCHAR] }
SELECT COUNT( DISTINCT `<col0>` ) FROM `<table0>` JOIN patient_location ON `<table0>`.patient_id = patient_location.patient_id WHERE `<col1>` = 'Depression' AND location = 'Utah';
How many patients have been treated for depression in Utah?
<table0>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[PostTypes] { <col0>[number]:[text] } <table2>[PostHistoryTypes] { <col0>[number]:[text] } <table3>[SuggestedEdits] { <col0>[number]:[PostId] <col1>[number]:[CreationDate] <col2>[time]:[ApprovalDate] <col3>[time]:[RejectionDate] <...
SELECT MONTH( CreationDate ) AS CreationDateMonth, COUNT( * ) AS PostsThisMonth FROM dbo.Users GROUP BY MONTH( CreationDate ) ORDER BY MONTH( CreationDate )
GROUP BY - Jon Skeet's posts by year.
<table0>[microbiologyevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[charttime]:[time] <col4>[spec_type_desc]:[text] <col5>[org_name]:[text] } <table1>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number...
SELECT `<table0>`.org_name FROM `<table0>` WHERE `<table0>`.hadm_id IN ( SELECT `<table9>`.hadm_id FROM `<table9>` WHERE `<table9>`.subject_id = 97395 ) AND `<table0>`.spec_type_desc = 'bronchoalveolar lavage' AND NOT `<table0>`.org_name IS NULL AND DATETIME( `<table0>`.charttime, 'start of month' ) = DATETIME( CURRENT...
what was the organism found in the last bronchoalveolar lavage test of patient 97395 in this month?
<table0>[initiative] { <col0>[initiative_id]:[INT] <col1>[initiative_start_date]:[DATE] <col2>[initiative_end_date]:[DATE] <col3>[budget]:[FLOAT] <col4>[region]:[VARCHAR] <col5>[status]:[VARCHAR] }
SELECT EXTRACT( YEAR FROM `<table0>`_end_date ) - EXTRACT( YEAR FROM `<table0>`_start_date ) AS years_diff, region, status, project_type, COUNT( * ) AS num_`<table0>`s FROM `<table0>` WHERE `<table0>`_end_date >= ( CURRENT_DATE - INTERVAL '2 years' ) AND `<col3>` > 50000 GROUP BY region, status, project_type, years_dif...
How many community development initiatives were completed in the last 2 years, categorized by project type, region, and status, with a budget over 50000?
<table0>[table_66528] { <col0>[Airing]:[date] <col1>[text]:[English] <col2>[title]:[Chinese] <col3>[title]:[text] <col4>[Number]:[episodes] <col5>[real]:[Theme] <col6>[song]:[Sub] <col7>[theme]:[song] <col8>[text]:[Genre] }
SELECT "Genre" FROM `<table0>` WHERE "English `<col2>` ( Chinese `<col2>` )" = 'the romance of the white hair maiden 白髮魔女傳'
Which Genre has an English title (Chinese title) of the romance of the white hair maiden ?
<table0>[feedback] { <col0>[citizen_id]:[INT] <col1>[service_id]:[INT] <col2>[rating]:[INT] }
SELECT ( COUNT( * ) * 100.0 / ( SELECT COUNT( * ) FROM `<table0>` WHERE `<col1>` = 123 ) ) as percentage FROM `<table0>` WHERE `<col1>` = 123 AND `<col2>` = 5;
Calculate the percentage of citizens who rated service 123 a 5
<table0>[savings_data] { <col0>[region]:[VARCHAR] <col1>[date]:[DATE] <col2>[savings]:[FLOAT] }
SELECT AVG( `<col2>` ) FROM `<table0>` WHERE `<col0>` = 'Tokyo' AND `<col1>` BETWEEN '2018-01-01' AND '2018-12-31';
Determine the average water savings in liters achieved by the implemented water conservation initiatives in 'Tokyo' for the year 2018
<table0>[books] { <col0>[INT]:[title] <col1>[TEXT]:[genre] }
SELECT DISTINCT genre FROM `<table0>` WHERE genre != 'children';
Identify the unique genres in the books table, excluding the children genre.
<table0>[Behavior_Incident] { <col0>[incident_id]:[INTEGER] <col1>[incident_type_code]:[VARCHAR] <col2>[student_id]:[INTEGER] <col3>[date_incident_start]:[DATETIME] <col4>[date_incident_end]:[DATETIME] <col5>[incident_summary]:[VARCHAR] <col6>[255]:[recommendations] <col7>[VARCHAR]:[255] <col8>[other_details]:[VARCHAR]...
SELECT date_address_from, `<col4>` FROM `<table6>` ORDER BY `<col4>` DESC
A line chart shows the change of monthly_rental over date_address_from
<table0>[university] { <col0>[School_ID]:[int] <col1>[School]:[text] <col2>[Location]:[text] <col3>[Founded]:[real] <col4>[Affiliation]:[text] <col5>[Enrollment]:[real] <col6>[Nickname]:[text] <col7>[Primary_conference]:[text] } <table1>[basketball_match] { <col0>[Team_ID]:[int] <col1>[School_ID]:[int] <col2>[Team_Nam...
SELECT School_ID, `<col8>` FROM `<table1>` GROUP BY `<col10>`
Draw a scatterplot of school id vs all_games_percent where school id is on the x-axis and points are colored by All_Road
<table0>[table_name_96] { <col0>[attendance]:[INTEGER] <col1>[leading_scorer]:[VARCHAR] <col2>[home]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "tim duncan ( 24 )" AND `<col2>` = "spurs"
How many people attended the game where the leading scorer was Tim Duncan (24), and the home team was the Spurs?
<table0>[table_13399573_4] { <col0>[points_for]:[VARCHAR] <col1>[losing_bonus]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1"
In the 2008/2009 season one team had 1 losing bonus, How many points did that team score that year?
<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 `<table2>`.subject_id ) FROM `<table2>` WHERE `<table2>`.diagnosis = "GUILLAIN BARRE SYNDROME" AND `<table2>`.age < "59"
count the number of patients whose primary disease is guillain barre syndrome and age is less than 59?
<table0>[table_27666856_3] { <col0>[team]:[VARCHAR] <col1>[position_in_table]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "19th"
Name the number of team for 19th position
<table0>[table_name_53] { <col0>[weight__kg]:[INTEGER] <col1>[height__cm]:[VARCHAR] <col2>[position]:[VARCHAR] }
SELECT AVG( weight__kg_ ) FROM `<table0>` WHERE height__cm_ = 180 AND `<col2>` = "d"
What is the average weight of the player with a height of 180 cm and plays the d position?
<table0>[orders] { <col0>[order_id]:[INT] <col1>[appetizer]:[VARCHAR] <col2>[255]:[appetizer_quantity] <col3>[INT]:[INSERT] }
SELECT appetizer, MAX( appetizer_quantity ) FROM `<table0>` WHERE `<col1>` IS NOT NULL GROUP BY appetizer;
What is the most popular appetizer and its quantity sold?
<table0>[AwardsMisc] { <col0>[name]:[text] <col1>[text]:[award] <col2>[text]:[year] <col3>[integer]:[lgID] <col4>[text]:[note] } <table1>[HOF] { <col0>[year]:[integer] <col1>[hofID]:[text] <col2>[name]:[text] <col3>[category]:[text] } <table2>[Teams] { <col0>[year]:[integer] <col1>[lgID]:[text] <col2>[tmID]:[text] <c...
SELECT T2.shootCatch, T2.firstName, T2.lastName FROM `<table8>` AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID AND T1.year = 1973 WHERE T1.tmID = 'QUN' AND T1.GP = 32
Which was the dominant hand for the goaltender who played 32 games for QUN in 1973? Give the full name.
<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 `<table0>`.name, `<table0>`.expire_flag FROM `<table0>` WHERE `<table0>`.subject_id = "2560"
what is subject name and death status of subject id 2560?
<table0>[rural_clinics] { <col0>[patient_id]:[INT] <col1>[age]:[INT] <col2>[gender]:[VARCHAR] <col3>[country]:[VARCHAR] }
SELECT MIN( `<col1>` ) FROM `<table0>` WHERE `<col3>` = 'Mexico';
What is the minimum age of patients in rural_clinics from Mexico?
<table0>[table_30120547_1] { <col0>[civil_parish]:[VARCHAR] <col1>[area__acres]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE area__acres__ = 119
What are the civil parishes of the townlands with an area of 119 acres?
<table0>[company] { <col0>[INT]:[name] <col1>[TEXT]:[founding_year] <col2>[INT]:[founding_location] <col3>[TEXT]:[INSERT] }
SELECT founding_location, COUNT( * ) FROM `<table0>` GROUP BY founding_year, founding_location HAVING founding_location LIKE 'Oceania%';
How many startups were founded in Oceania each year?
<table0>[actors] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[gender]:[VARCHAR] } <table1>[movies] { <col0>[INT]:[title] <col1>[VARCHAR]:[255] <col2>[country]:[VARCHAR] <col3>[actor_id]:[INT] <col4>[INSERT]:[actors] <col5>[VALUES]:[Actor] <col6>[Male]:[INSERT] <col7>[actors]:[VALUES] <col8>[Actor]:[Female] }
SELECT a.name, COUNT( m.id ) as appearances FROM `<table0>` a JOIN movies m ON a.id = m.actor_id WHERE m.country = 'France' GROUP BY a.name ORDER BY appearances DESC LIMIT 3;
Find the top 3 actors with the highest number of appearances in French movies.
<table0>[table_name_43] { <col0>[date]:[VARCHAR] <col1>[away]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "high park demons"
What is Date, when Away is High Park Demons?
<table0>[table_17881033_1] { <col0>[division_southwest]:[VARCHAR] <col1>[division_south]:[VARCHAR] <col2>[division_east]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Kožuf" AND `<col2>` = "Osogovo"
what is the division southwest when division south was kožuf and division east was osogovo