schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[Projects] { <col0>[Project_ID]:[INTEGER] <col1>[Project_Details]:[VARCHAR] } <table1>[Documents_with_Expenses] { <col0>[Document_ID]:[INTEGER] <col1>[Budget_Type_Code]:[CHAR] <col2>[Document_Details]:[VARCHAR] } <table2>[Accounts] { <col0>[Account_ID]:[INTEGER] <col1>[Statement_ID]:[INTEGER] <col2>[Account_D...
SELECT Statement_Details, SUM( `<col2>` ) FROM `<table2>` AS T1 JOIN Statements AS T2 ON T1.Statement_ID = T2.Statement_ID GROUP BY Statement_Details ORDER BY Statement_Details DESC
Show the sum of account details for different statement details in a bar chart, and I want to list by the bar in desc.
<table0>[flight_fare] { <col0>[flight_id]:[int] <col1>[fare_id]:[int] } <table1>[flight_leg] { <col0>[flight_id]:[int] <col1>[leg_number]:[int] <col2>[leg_flight]:[int] } <table2>[state] { <col0>[state_code]:[text] <col1>[state_name]:[text] <col2>[country_name]:[text] } <table3>[code_description] { <col0>[code]:[var...
SELECT DISTINCT flight.flight_id FROM `<table10>` AS AIRPORT_SERVICE_0, `<table10>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ( ( ( flight.departure_time BETWEEN 1200 AND 1800 ) AND date_day.day_number = 26 AND date_day.month_number = 7 AND date_day.year = 1991 AND days.day_name...
flight from DENVER to PHILADELPHIA saturday afternoon
<table0>[competition] { <col0>[YEAR]:[VARCHAR] <col1>[Competition_type]:[VARCHAR] }
SELECT DISTINCT `<col0>` FROM `<table0>` WHERE `<col1>` <> "Tournament"
What are the distinct years in which the competitions type is not "Tournament"?
<table0>[chapters] { <col0>[integer]:[Act] <col1>[integer]:[Scene] <col2>[integer]:[Description] <col3>[text]:[work_id] } <table1>[characters] { <col0>[integer]:[CharName] <col1>[text]:[Abbrev] <col2>[text]:[Description] } <table2>[paragraphs] { <col0>[integer]:[ParagraphNum] <col1>[integer]:[PlainText] <col2>[text]:...
SELECT SUM( IIF( GenreType = 'Comedy', 1, 0 ) ) - SUM( IIF( GenreType = 'History', 1, 0 ) ) FROM `<table3>` WHERE Date > 1593
From 1593 onwards, what is the difference between the number of comedy works and history works?
<table0>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table1>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[...
SELECT DISTINCT `<table8>`.`<table8>` FROM `<table8>` WHERE `<table8>`.eventtype = '`<table5>`' AND `<table8>`.eventid IN ( SELECT `<table5>`.`<table5>`id FROM `<table5>` WHERE `<table5>`.`<table5>`name = 'valve replacement < 7days' )
how much is the cost for diagnosis of valve replacement < 7days?
<table0>[table_27844] { <col0>[Institution]:[text] <col1>[Location]:[text] <col2>[Type]:[text] <col3>[Joined]:[real] <col4>[Enrollment]:[real] <col5>[Nickname]:[text] }
SELECT MIN( "Enrollment" ) FROM `<table0>` WHERE "Joined" = '1987'
What is the enrollment for the institution that joined in 1987?
<table0>[table_name_74] { <col0>[week]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "november 24, 1957"
What week of the season was November 24, 1957?
<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>`.admission_location = "PHYS REFERRAL/NORMAL DELI" AND procedures.icd9_code = "9955"
what is the number of patients whose admission location is phys referral/normal deli and procedure icd9 code is 9955?
<table0>[table_name_27] { <col0>[crowd]:[INTEGER] <col1>[away_team]:[VARCHAR] }
SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "north melbourne"
How many people were in the crowd when the away team was north melbourne?
<table0>[table_name_11] { <col0>[tournament]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "july 23, 2006"
what is the tournament on july 23, 2006?
<table0>[events] { <col0>[event_id]:[INT] <col1>[event_name]:[VARCHAR] <col2>[event_type]:[VARCHAR] <col3>[state]:[VARCHAR] } <table1>[attendees] { <col0>[attendee_id]:[INT] <col1>[event_id]:[INT] <col2>[state]:[VARCHAR] }
SELECT e.state, COUNT( e.event_id ) as event_count FROM `<table0>` e JOIN attendees a ON e.event_id = a.event_id WHERE e.event_type = 'Theater' GROUP BY e.state ORDER BY event_count DESC LIMIT 3;
Find the top 3 states with the highest number of theater performances.
<table0>[party] { <col0>[minister]:[VARCHAR] <col1>[left_office]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` ORDER BY `<col1>` DESC LIMIT 1
Return the minister who left office at the latest time.
<table0>[eco_hotels] { <col0>[hotel_id]:[INT] <col1>[hotel_name]:[VARCHAR] <col2>[rating]:[DECIMAL] <col3>[country]:[VARCHAR] }
SELECT hotel_name, `<col2>` FROM `<table0>` WHERE `<col3>` = 'Germany';
List the names and ratings of eco-friendly hotels in Germany.
<table0>[lutetium_production] { <col0>[year]:[INT] <col1>[country]:[TEXT] <col2>[production_quantity]:[INT] }
SELECT AVG( `<col2>` ) FROM `<table0>` WHERE `<col1>` IN ( 'Canada', 'Australia' ) AND `<col0>` BETWEEN 2019 AND 2021;
What is the average production quantity of lutetium in Canada and Australia over the last 3 years?
<table0>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table1>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVI...
SELECT HIRE_DATE, SUM( `<col7>` ) FROM `<table5>` WHERE `<col1>` LIKE '%D%' OR `<col1>` LIKE '%S%' ORDER BY SUM( `<col7>` ) DESC
For all employees who have the letters D or S in their first name, visualize a bar chart about the distribution of hire_date and the sum of salary bin hire_date by time, I want to show total number from high to low order.
<table0>[counseling] { <col0>[session_id]:[INT] <col1>[student_id]:[INT] <col2>[region]:[VARCHAR] <col3>[session_date]:[DATE] }
SELECT COUNT( * ) FROM `<table0>` WHERE `<col2>` = 'North';
What is the total number of mental health counseling sessions provided to students in the "North" region?
<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 lab.flag = "delta" AND lab.label = "Parathyroid Hormone"
provide the number of patients whose lab test name is parathyroid hormone and lab test result is delta.
<table0>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <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] } ...
SELECT COUNT( * ) > 0 FROM `<table2>` WHERE `<table2>`.hadm_id IN ( SELECT `<table14>`.hadm_id FROM `<table14>` WHERE `<table14>`.subject_id = 98517 ) AND `<table2>`.drug = 'atorvastatin'
was patient 98517 prescribed atorvastatin?
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[...
SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN procedures ON `<table1>`.hadm_id = procedures.hadm_id WHERE `<table1>`.marital_status = "DIVORCED" AND procedures.short_title = "Closed biopsy of tongue"
give me the number of patients whose marital status is divorced and procedure short title is closed biopsy of tongue?
<table0>[customer] { <col0>[c_custkey]:[integer] <col1>[c_mktsegment]:[text] <col2>[c_nationkey]:[integer] <col3>[c_name]:[text] <col4>[c_address]:[text] <col5>[c_phone]:[text] <col6>[c_acctbal]:[real] <col7>[c_comment]:[text] } <table1>[lineitem] { <col0>[l_shipdate]:[date] <col1>[l_orderkey]:[integer] <col2>[l_disco...
SELECT COUNT( `<col13>` ) FROM `<table1>` WHERE `<col5>` < 30 AND `<col12>` = 'RAIL'
How many of the line items have been shipped by rail with a quantity less than 30?
<table0>[procedures] { <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>[la...
SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id WHERE `<table4>`.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND diagnoses.long_title = "Closed fracture of base of skull with subarachnoid, subdural, and extradural hemorrhage, with loss of co...
how many patients whose ethnicity is hispanic/latino - puerto rican and diagnoses long title is closed fracture of base of skull with subarachnoid, subdural, and extradural hemorrhage, with loss of consciousness of unspecified duration?
<table0>[paperkeyphrase] { <col0>[paperid]:[int] <col1>[keyphraseid]:[int] } <table1>[cite] { <col0>[citingpaperid]:[int] <col1>[citedpaperid]:[int] } <table2>[paperfield] { <col0>[fieldid]:[int] <col1>[paperid]:[int] } <table3>[paper] { <col0>[paperid]:[int] <col1>[title]:[varchar] <col2>[venueid]:[int] <col3>[year...
SELECT DISTINCT author.authorname, paper.paperid FROM author, keyphrase, paper, paperkeyphrase, writes WHERE author.authorname <> 'chris dyer' AND keyphrase.keyphrasename = 'syntactic parsing' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author....
what are some syntactic parsing papers that chris dyer did not write ?
<table0>[table_name_49] { <col0>[kaz_hayashi]:[VARCHAR] <col1>[bushi]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "yang ( 9:43 )"
Name the Kaz Hayashi which has BUSHI of yang (9:43)
<table0>[table_name_21] { <col0>[runner_s__up]:[VARCHAR] <col1>[winning_score]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = –10( 66 - 71 - 62 - 71 = 270 )
Who has the Winning score of 10 (66-71-62-71=270) ?
<table0>[products] { <col0>[product_id]:[VARCHAR] <col1>[product_details]:[VARCHAR] } <table1>[customer_orders] { <col0>[customer_id]:[VARCHAR] <col1>[order_id]:[VARCHAR] } <table2>[customers] { <col0>[customer_name]:[VARCHAR] <col1>[customer_id]:[VARCHAR] } <table3>[order_items] { <col0>[order_id]:[VARCHAR] <col1>[...
SELECT t1.customer_name FROM `<table2>` AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte' INTERSECT SELECT t1.customer_name FROM `<table2>` AS t1 JOIN customer_or...
Find the names of customers who ordered both products Latte and Americano.
<table0>[table_37888] { <col0>[Auction]:[House] <col1>[text]:[Year] <col2>[real]:[Event] <col3>[text]:[Price] <col4>[real]:[GBP] <col5>[Price]:[real] }
SELECT AVG( "GBP Price" ) FROM `<table0>` WHERE "Event" = 'monterey' AND "Auction House" = 'rm' AND "Price" = '154,000' AND "Year" > '2003'
What is the average GBP Price with an event in Monterey, a RM auction house, and a price of $154,000 later than 2003?
<table0>[table_44282] { <col0>[College]:[code] <col1>[text]:[Faculty] <col2>[name]:[text] <col3>[Designation]:[text] <col4>[Qualification]:[text] <col5>[Department]:[text] <col6>[Experience]:[text] }
SELECT "Department" FROM `<table0>` WHERE "Experience" = '6 years'
What department as 6 years experience?
<table0>[table_203_536] { <col0>[number]:[number] <col1>[date]:[text] <col2>[opponent]:[text] <col3>[score]:[text] <col4>[win]:[text] <col5>[loss]:[text] <col6>[save]:[text] <col7>[crowd]:[number] <col8>[record]:[text] }
SELECT COUNT( * ) FROM `<table0>` WHERE "date" < ( SELECT "date" FROM `<table0>` WHERE "date" = 'apr 7' ) AND "win" = 'morris'
before april 7 , how many times had morris won ?
<table0>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table1>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table2>[Tags] { <col0>[number]:[TagName] <col1>[t...
SELECT PostId, COUNT( * ) FROM dbo.PostHistory AS PH JOIN dbo.Posts AS P ON PH.PostId = P.Id WHERE P.PostTypeId IN ( 1, 2 ) GROUP BY PostId ORDER BY 2 DESC LIMIT 1000
Top 1000 Most Revised Answers on StackOverflow.
<table0>[keyphrase] { <col0>[keyphraseid]:[int] <col1>[keyphrasename]:[varchar] } <table1>[cite] { <col0>[citingpaperid]:[int] <col1>[citedpaperid]:[int] } <table2>[paperfield] { <col0>[fieldid]:[int] <col1>[paperid]:[int] } <table3>[author] { <col0>[authorid]:[int] <col1>[authorname]:[varchar] } <table4>[writes] {...
SELECT DISTINCT COUNT( paper.paperid ) FROM keyphrase, paper, paperkeyphrase, venue WHERE keyphrase.keyphrasename = 'parsing' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year = 2014 AND venue.venueid = paper.venueid AND venue.venuename = 'ACL'
how many parsing papers appeared in the proceeeding of ACL 2014 ?
<table0>[address_status] { <col0>[status_id]:[integer] } <table1>[author] { <col0>[author_id]:[integer] <col1>[author_name]:[text] } <table2>[book_language] { <col0>[language_id]:[integer] <col1>[language_code]:[text] <col2>[language_name]:[text] } <table3>[country] { <col0>[country_id]:[integer] <col1>[country_name...
SELECT CAST( SUM( CASE WHEN T1.status_value = 'Returned' THEN 1 ELSE 0 END ) AS REAL ) * 100 / COUNT( * ) FROM `<table7>` AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id WHERE STRFTIME( '%Y', T2.status_date ) = '2022'
Among all orders updated in 2022, identify the percentage that has been returned.
<table0>[mining_site_environmental_scores] { <col0>[site_id]:[INT] <col1>[score]:[FLOAT] <col2>[score_date]:[DATE] }
SELECT site_id, AVG( `<col1>` ) FROM `<table0>` WHERE `<col2>` >= '2022-01-01' AND `<col2>` < '2023-01-01' GROUP BY site_id;
What is the average environmental impact score for each mining site in the past 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>[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>`.admission_type = "URGENT" AND procedures.long_title = "Enteral infusion of concentrated nutritional substances"
count the number of urgent hospital admission patients who had enteral infusion of concentrated nutritional substances.
<table0>[table_name_51] { <col0>[record_company]:[VARCHAR] <col1>[pianist]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "solomon cutner"
What record company did pianist Solomon Cutner record for?
<table0>[table_42191] { <col0>[text]:[Start] <col1>[Reign]:[real] <col2>[End]:[Reign] <col3>[text]:[Birth] <col4>[text]:[Title] }
SELECT "End of Reign" FROM `<table0>` WHERE "Birth Name" = 'dimitar stojkovski'
What is the end of reign for Dimitar Stojkovski?
<table0>[table_name_86] { <col0>[published]:[VARCHAR] <col1>[in_order_of_publication]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "first"
How many total publications were the first of the series?
<table0>[class_of_service] { <col0>[booking_class]:[varchar] <col1>[rank]:[int] <col2>[class_description]:[text] } <table1>[fare] { <col0>[fare_id]:[int] <col1>[from_airport]:[varchar] <col2>[to_airport]:[varchar] <col3>[fare_basis_code]:[text] <col4>[fare_airline]:[text] <col5>[restriction_code]:[text] <col6>[one_dir...
SELECT DISTINCT flight.flight_id FROM `<table23>` AS AIRPORT_SERVICE_0, `<table23>` 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 = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA...
i would like to see the flights from BALTIMORE to PHILADELPHIA please
<table0>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[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] ...
SELECT `<table0>`.short_title FROM `<table0>` WHERE `<table0>`.icd9_code IN ( SELECT t3.icd9_code FROM ( SELECT t2.icd9_code, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table11>`.charttime FROM `<table11>` JOIN admissions ON `<table11>`.hadm_id = admissions.hadm_id WHER...
what are the five most common diagnoses for patients who were previously diagnosed with primary apnea of newborn within 2 months, until 2104?
<table0>[factories] { <col0>[name]:[TEXT] <col1>[INTEGER]:[waste_generation] <col2>[FLOAT]:[INSERT] } <table1>[landfill_capacity] { <col0>[factory_id]:[INTEGER] <col1>[capacity]:[INTEGER] }
SELECT f.name, f.waste_generation FROM `<table0>` f ORDER BY f.waste_generation DESC LIMIT 1;
What are the names of the factories with the highest waste generation?
<table0>[table_1532779_1] { <col0>[muslim___percentage_of_total_population]:[VARCHAR] <col1>[registered_mosques]:[VARCHAR] }
SELECT muslim___percentage_of_total_population_ FROM `<table0>` WHERE `<col1>` = 614
What was the percentage of muslims during a time where there were 614 registered mosques?
<table0>[Loans] { <col0>[LoanID]:[INT] <col1>[Type]:[VARCHAR] <col2>[255]:[DECIMAL] <col3>[Date]:[DATE] <col4>[Gender]:[VARCHAR] <col5>[255]:[INSERT] }
SELECT SUM( Amount ) FROM `<table0>` WHERE `<col1>` = 'Socially Responsible' AND `<col3>` >= '2022-04-01' AND `<col3>` < '2022-07-01' AND `<col4>` = 'Female';
What is the total amount of socially responsible loans issued to female entrepreneurs in Q2?
<table0>[grants] { <col0>[INT]:[faculty_id] <col1>[INT]:[department] <col2>[VARCHAR]:[year] <col3>[INT]:[FLOAT] }
SELECT MAX( amount ) FROM `<table0>` WHERE faculty_id IN ( SELECT faculty_id FROM `<table0>` GROUP BY faculty_id HAVING COUNT( DISTINCT year ) > 1 AND department = 'Engineering' );
What is the maximum number of research grants awarded to a single faculty member in the Engineering department?
<table0>[Charging_Stations] { <col0>[INT]:[station_name] <col1>[VARCHAR]:[location] <col2>[VARCHAR]:[num_chargers] <col3>[INT]:[last_inspection_date] <col4>[DATE]:[INSERT] }
SELECT COUNT( * ) as total_stations FROM `<table0>` WHERE location LIKE '%CA%';
How many charging stations are there in California?
<table0>[area] { <col0>[course_id]:[int] } <table1>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table2>[semester] { <col0>[semester_id]:[int] } <table3>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <table4>[program_course] { <col0>[program_id]:[int] <col1>[cou...
SELECT DISTINCT description, `<col1>` FROM `<table9>` WHERE `<col2>` = 'BIOMATLS' AND `<col3>` = 990
BIOMATLS 990 is what ?
<table0>[table_41207] { <col0>[text]:[Height] <col1>[text]:[Weight] <col2>[text]:[Spike] <col3>[text]:[2012] <col4>[club]:[text] }
SELECT "Name" FROM `<table0>` WHERE "2012 club" = 'deportivo nacional'
Which name's 2012 club was deportivo nacional?
<table0>[table_25342713_5] { <col0>[blocks]:[INTEGER] <col1>[steals]:[VARCHAR] }
SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 20
If the Steals are 20, what are the blocks?
<table0>[Parks] { <col0>[Year]:[INT] <col1>[Action]:[TEXT] }
SELECT Year, COUNT( * ) FROM `<table0>` WHERE `<col1>` = 'Renovated' GROUP BY Year;
How many public parks were renovated each year from 2018 to 2021?
<table0>[organizations] { <col0>[INT]:[name] <col1>[VARCHAR]:[region] <col2>[VARCHAR]:[social_impact_score] <col3>[INT]:[year] <col4>[INT]:[INSERT] }
SELECT region, AVG( social_impact_score ) as avg_score FROM `<table0>` WHERE region = 'East' AND year = 2022 GROUP BY region;
What was the average social impact score of organizations in the East region in 2022?
<table0>[workforce_training] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[employee_name] <col2>[VARCHAR]:[255] <col3>[training_topic]:[VARCHAR] <col4>[255]:[training_hours] <col5>[INT]:[training_completion_date] }
INSERT INTO workforce_training ( id, employee_name, training_topic, training_hours, training_completion_date ) VALUES ( 1, 'Aaliyah Jackson', 'ethics', 10, '2022-06-15' );
Insert data into workforce_training for employee 'Aaliyah Jackson' who completed 10 hours of ethics training on '2022-06-15'
<table0>[table_name_27] { <col0>[score]:[VARCHAR] <col1>[tournament]:[VARCHAR] <col2>[opponent_in_the_final]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "alcobaça" AND `<col2>` = "xinyun han"
What was the score for alcoba a when the opponent was in the final of xinyun han?
<table0>[table_204_979] { <col0>[number]:[place] <col1>[number]:[nation] <col2>[text]:[hoops] <col3>[text]:[balls] <col4>[ribbons]:[text] <col5>[total]:[number] }
SELECT ABS( ( SELECT "5 hoops" FROM `<table0>` WHERE "nation" = 'bulgaria' ) - ( SELECT "5 hoops" FROM `<table0>` WHERE "nation" = 'belarus' ) )
what was the difference in the 5 hoops between bulgaria and belarus ?
<table0>[Employees] { <col0>[EmployeeID]:[INT] <col1>[FirstName]:[VARCHAR] <col2>[LastName]:[VARCHAR] <col3>[Department]:[VARCHAR] <col4>[Position]:[VARCHAR] <col5>[Salary]:[FLOAT] <col6>[Age]:[INT] }
SELECT e.Age, AVG( e.Salary ) FROM `<table0>` e INNER JOIN ( SELECT EmployeeID, 'Software Engineer' AS `<col4>` FROM TalentAcquisition WHERE `<col4>` = 'Software Engineer' ) ta ON e.EmployeeID = ta.EmployeeID WHERE e.Department = 'Technology' GROUP BY e.Age;
What is the average salary of software engineers in the Technology department, grouped by age?
<table0>[table_27721131_2] { <col0>[team]:[VARCHAR] <col1>[high_assists]:[VARCHAR] <col2>[score]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "John Wall ( 9 )" AND `<col2>` = "W 97–83 ( OT )"
What's the team number with John Wall (9) in high assists and a w 97–83 (ot) score?
<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 T2.Name, COUNT( * ) FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name
How many products are there for each manufacturer. Visualize by bar chart.
<table0>[table_name_22] { <col0>[studio_s]:[VARCHAR] <col1>[year]:[VARCHAR] <col2>[movie]:[VARCHAR] }
SELECT studio_s_ FROM `<table0>` WHERE `<col1>` = 2012 AND `<col2>` = "dabangg"
Which Studio has the Year of 2012 listed and the Movie, Dabangg?
<table0>[news_report] { <col0>[journalist_ID]:[int] <col1>[Event_ID]:[int] <col2>[Work_Type]:[text] } <table1>[journalist] { <col0>[journalist_ID]:[int] <col1>[text]:[Nationality] <col2>[text]:[Age] <col3>[text]:[Years_working] } <table2>[event] { <col0>[Event_ID]:[int] <col1>[Date]:[text] <col2>[Venue]:[text] <col3>...
SELECT Nationality, SUM( Age ) FROM `<table1>` GROUP BY Nationality
Bar chart of sum age from each nationality
<table0>[table_17176509_4] { <col0>[bike_no]:[INTEGER] <col1>[position]:[VARCHAR] }
SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 30
Name the max bike number of position for 30
<table0>[Student_Course_Registrations] { <col0>[student_id]:[INTEGER] <col1>[course_id]:[INTEGER] <col2>[registration_date]:[DATETIME] } <table1>[Candidates] { <col0>[candidate_id]:[INTEGER] <col1>[candidate_details]:[VARCHAR] } <table2>[Courses] { <col0>[course_id]:[VARCHAR] <col1>[100]:[course_name] <col2>[VARCHAR]...
SELECT last_name, COUNT( `<col4>` ) FROM `<table6>` GROUP BY `<col4>` ORDER BY `<col4>`
Give me a bar graph for what is the total number of last names of all candidates?, sort in asc by the x axis.
<table0>[virtual_tours] { <col0>[tour_id]:[INT] <col1>[hotel_name]:[VARCHAR] <col2>[255]:[city] <col3>[VARCHAR]:[255] <col4>[country]:[VARCHAR] <col5>[255]:[duration] <col6>[INT]:[INSERT] }
SELECT MAX( duration ) FROM `<table0>` WHERE city = 'Tokyo' AND `<col4>` = 'Japan';
What is the maximum virtual tour engagement duration in Tokyo, Japan?
<table0>[table_1997759_1] { <col0>[registration]:[VARCHAR] <col1>[first_flew]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "31 January 1975"
what is the registration located on 31 january 1975 where first flew?
<table0>[table_14698] { <col0>[Rank]:[real] <col1>[Heat]:[real] <col2>[Lane]:[real] <col3>[text]:[Nationality] <col4>[text]:[Time] }
SELECT "Name" FROM `<table0>` WHERE "Lane" < '7' AND "Time" = '2:19.86'
Who had a lane number smaller than 7 and a time of 2:19.86?
<table0>[table_name_84] { <col0>[award]:[VARCHAR] <col1>[result]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "#100"
What's the award for #100?
<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>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <tab...
SELECT JOB_ID, COUNT( `<col6>` ) FROM `<table4>` WHERE `<col7>` > ( SELECT MAX( `<col7>` ) FROM `<table4>` WHERE `<col6>` = 'PU_MAN' ) GROUP BY `<col6>`
Compute the number of each type of job ids for employees who make more than the highest-earning employee with title PU_MAN, with a bar chart.
<table0>[table_name_50] { <col0>[score]:[VARCHAR] <col1>[home_team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "manchester united"
What is Score, when Home Team is 'Manchester United'?
<table0>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[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]:[text] <col7>[disc...
SELECT COUNT( * ) > 0 FROM `<table15>` WHERE `<table15>`.icustay_id IN ( SELECT `<table12>`.icustay_id FROM `<table12>` WHERE `<table12>`.hadm_id IN ( SELECT `<table1>`.hadm_id FROM `<table1>` WHERE `<table1>`.subject_id = 1114 ) ) AND `<table15>`.itemid IN ( SELECT `<table10>`.itemid FROM `<table10>` WHERE `<table10>`...
had patient 1114 ever had chest tube #1 output on this month/23?
<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>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varc...
SELECT JOB_ID, AVG( `<col10>` ) FROM `<table2>` WHERE `<col7>` BETWEEN 8000 AND 12000 AND `<col8>` <> "null" OR `<col10>` <> 40 GROUP BY `<col6>`
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the average of department_id over the job_id , and group by attribute job_id.
<table0>[fare_basis] { <col0>[fare_basis_code]:[text] <col1>[booking_class]:[text] <col2>[class_type]:[text] <col3>[premium]:[text] <col4>[economy]:[text] <col5>[discounted]:[text] <col6>[night]:[text] <col7>[season]:[text] <col8>[basis_days]:[text] } <table1>[flight_leg] { <col0>[flight_id]:[int] <col1>[leg_number]:[...
SELECT DISTINCT flight.flight_id FROM `<table9>` AS AIRPORT_SERVICE_0, `<table9>` 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND fligh...
give me a flight between BOSTON and DENVER
<table0>[table_name_30] { <col0>[attendance]:[INTEGER] <col1>[round]:[VARCHAR] <col2>[home]:[VARCHAR] <col3>[date]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col2>` = "linköpings hc" AND `<col3>` = "monday, november 10" AND `<col1>` > 18
What is the lowest attendance on Monday, November 10 when link pings hc was the home team and there were more than 18 rounds?
<table0>[vessel_voyage] { <col0>[voyage_id]:[cargo_weight] }
UPDATE vessel_voyage SET cargo_weight = 15000 WHERE voyage_id = 'V002';
Update the cargo weight of voyage V002 to 15000 tons
<table0>[course_tags_count] { <col0>[course_id]:[int] <col1>[clear_grading]:[int] <col2>[pop_quiz]:[int] <col3>[group_projects]:[int] <col4>[inspirational]:[int] <col5>[long_lectures]:[int] <col6>[extra_credit]:[int] <col7>[few_tests]:[int] <col8>[good_feedback]:[int] <col9>[tough_tests]:[int] <col10>[heavy_papers]:[in...
SELECT COUNT( * ) > 0 FROM ( SELECT `<col1>` FROM `<table1>` WHERE earn_credit = 'Y' AND `<col0>` = 1 ) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, `<col2>` AS SEMESTERalias0 WHERE COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND NOT COURSEalias0.course_id IN ( ...
DUTCH 339 , is it available for me to take in Spring-Summer 2018 ?
<table0>[characters] { <col0>[movie_title]:[text] <col1>[release_date]:[text] <col2>[hero]:[text] <col3>[villian]:[text] <col4>[song]:[text] } <table1>[director] { <col0>[name]:[text] } <table2>[movies_total_gross] { <col0>[movie_title]:[text] <col1>[release_date]:[text] <col2>[genre]:[text] <col3>[MPAA_rating]:[text...
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE SUBSTR( release_date, LENGTH( `<col1>` ) - 1, LENGTH( `<col1>` ) ) BETWEEN '37' AND '50'
How many movies were released between 1937 and 1950?
<table0>[table_45212] { <col0>[English]:[text] <col1>[Pali]:[text] <col2>[Sanskrit]:[text] <col3>[Chinese]:[text] <col4>[Tibetan]:[text] }
SELECT "English" FROM `<table0>` WHERE "Sanskrit" = 'samādhi'
Which English has a Sanskrit of sam dhi?
<table0>[Ref_Payment_Methods] { <col0>[payment_method_code]:[CHAR] <col1>[payment_method_description]:[VARCHAR] } <table1>[Marketing_Regions] { <col0>[Marketing_Region_Code]:[CHAR] <col1>[Marketing_Region_Name]:[VARCHAR] <col2>[255]:[Marketing_Region_Descriptrion] <col3>[VARCHAR]:[255] <col4>[Other_Details]:[VARCHAR] ...
SELECT City_Town, COUNT( * ) FROM `<table10>` AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T1.City_Town
Show all cities along with the number of drama workshop groups in each city. Visualize by bar chart.
<table0>[Coral_Distribution] { <col0>[coral_species]:[text] <col1>[point_longitude]:[numeric] <col2>[point_latitude]:[numeric] <col3>[point_depth]:[numeric] }
SELECT MIN( `<col3>` ) FROM `<table0>` WHERE `<col0>` = 'Any Coral Species' AND `<col1>` BETWEEN -90 AND -10 AND `<col2>` BETWEEN 0 AND 60;
Find the minimum depth at which corals are found in the Atlantic Ocean.
<table0>[programs] { <col0>[INT]:[name] } <table1>[volunteers] { <col0>[INT]:[program_id] <col1>[INT]:[number] <col2>[INTEGER]:[INSERT] <col3>[programs]:[name] <col4>[VALUES]:[Program] <col5>[Program]:[Program] <col6>[Program]:[INSERT] }
SELECT `<table0>`.name, MIN( volunteers.number ) FROM `<table0>` INNER JOIN volunteers ON `<table0>`.id = volunteers.program_id GROUP BY `<table0>`.id HAVING MIN( volunteers.number ) > 0;
What is the minimum number of volunteers per program, for programs with at least one volunteer?
<table0>[course] { <col0>[course_id]:[integer] <col1>[name]:[text] <col2>[credit]:[integer] <col3>[diff]:[integer] } <table1>[prof] { <col0>[prof_id]:[integer] <col1>[gender]:[text] <col2>[first_name]:[text] <col3>[last_name]:[text] <col4>[email]:[text] <col5>[popularity]:[integer] <col6>[teachingability]:[integer] <c...
SELECT CAST( COUNT( T1.student_id ) AS REAL ) / COUNT( DISTINCT T2.course_id ) FROM `<table3>` AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.diff = 4
What is the average number of students who registered for the courses with a difficulty of 4?
<table0>[table_45247] { <col0>[text]:[Pinnacle] <col1>[height]:[text] <col2>[Structure]:[type] <col3>[text]:[Main] <col4>[use]:[text] <col5>[Country]:[text] <col6>[Town]:[text] }
SELECT "Country" FROM `<table0>` WHERE "Name" = 'sba towers tower hayneville'
What country has the SBA Towers Tower Hayneville?
<table0>[Student] { <col0>[StuID]:[INTEGER] <col1>[LName]:[VARCHAR] <col2>[Fname]:[VARCHAR] <col3>[Age]:[INTEGER] <col4>[Sex]:[VARCHAR] <col5>[Major]:[INTEGER] <col6>[Advisor]:[INTEGER] <col7>[city_code]:[VARCHAR] } <table1>[Lives_in] { <col0>[stuid]:[INTEGER] <col1>[dormid]:[INTEGER] <col2>[room_number]:[INTEGER] } ...
SELECT city_code, AVG( `<col3>` ) FROM `<table0>` GROUP BY `<col7>` ORDER BY `<col7>` DESC
A bar chart about what is the average age for each city and what are those cities?, and order from high to low by the x axis.
<table0>[table_2562113_1] { <col0>[location]:[VARCHAR] <col1>[nickname]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Lions"
What is the location of the institution nicknamed Lions?
<table0>[table_name_94] { <col0>[money]:[INTEGER] <col1>[place]:[VARCHAR] <col2>[player]:[VARCHAR] }
SELECT AVG( money___ ) AS $__ FROM `<table0>` WHERE `<col1>` = "t10" AND `<col2>` = "andy north"
How much was paid to Andy North when he placed t10?
<table0>[table_54091] { <col0>[Date]:[text] <col1>[Visitor]:[text] <col2>[Score]:[text] <col3>[Home]:[text] <col4>[Leading]:[scorer] <col5>[text]:[Attendance] <col6>[real]:[Record] }
SELECT "Score" FROM `<table0>` WHERE "Attendance" > '16,494' AND "Visitor" = 'nets'
What was the score when the nets were the visitors and attendance was over 16,494?
<table0>[table_13758243_1] { <col0>[draft_year]:[INTEGER] <col1>[player]:[VARCHAR] }
SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Jerry Marion"
What year was jerry marion drafted?
<table0>[table_name_56] { <col0>[home_team]:[VARCHAR] <col1>[venue]:[VARCHAR] }
SELECT `<col0>` AS score FROM `<table0>` WHERE `<col1>` = "lake oval"
When the venue was lake oval what did the home team score?
<table0>[table_202_158] { <col0>[number]:[number] <col1>[element]:[text] <col2>[observed]:[predicted] <col3>[text]:[isolated] <col4>[widely]:[known] <col5>[number]:[observer] <col6>[text]:[isolator] <col7>[text]:[notes] }
SELECT "element" FROM `<table0>` WHERE "observed or predicted" = 1771 AND "observer" = 'w. scheele'
which element was observed or predicted in 1771 by w.scheele ?
<table0>[Accounts] { <col0>[Account_ID]:[INTEGER] <col1>[Statement_ID]:[INTEGER] <col2>[Account_Details]:[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]:[...
SELECT Statement_Details, COUNT( Statement_Details ) FROM `<table0>` AS T1 JOIN Statements AS T2 ON T1.Statement_ID = T2.Statement_ID GROUP BY Statement_Details
How many accounts for different statement details? Plot a pie chart.
<table0>[table_42129] { <col0>[Player]:[text] <col1>[Club]:[text] <col2>[League]:[real] <col3>[Cup]:[real] <col4>[Trophy]:[real] <col5>[League]:[Cup] <col6>[real]:[Total] }
SELECT MAX( "League" ) FROM `<table0>` WHERE "League Cup" > '1' AND "FA Cup" = '1'
What is the highest league for the league cup more than 1, and a FA cup of 1?
<table0>[table_17919342_1] { <col0>[director]:[VARCHAR] <col1>[original_title]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "The Moises Padilla Story"
How many directors were there for the film with the original title of The Moises Padilla Story?
<table0>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>[number]:[PostId] <col2>[number]:[RevisionGUID] <col3>[CreationDate]:[time] <col4>[UserId]:[number] <col5>[UserDisplayName]:[text] <col6>[Comment]:[text] <col7>[Text]:[text] <col8>[ContentLicense]:[text] } <table1>[PostTypes] { <col0>[number]:[text] } <...
SELECT MAX( pt.Name ), COUNT( pt.Name ) FROM `<table1>` AS pt JOIN Posts AS p ON pt.Id = p.PostTypeId GROUP BY pt.Id
Totals of the various types of posts.
<table0>[table_name_91] { <col0>[date]:[VARCHAR] <col1>[race]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "swiss grand prix"
When was the swiss grand prix?
<table0>[table_name_62] { <col0>[total]:[INTEGER] <col1>[silver]:[VARCHAR] <col2>[gold]:[VARCHAR] }
SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 1 AND `<col2>` < 0
What is the highest total medals when there were 0 gold medals and 1 silver?
<table0>[table_204_721] { <col0>[number]:[rank] <col1>[number]:[wrestler] <col2>[text]:[reigns] <col3>[number]:[combined] <col4>[ndefenses]:[number] <col5>[combined]:[ndays] }
SELECT ABS( ( SELECT "combined\ndays" FROM `<table0>` WHERE "wrestler" = 'kevin steen' ) - ( SELECT "combined\ndays" FROM `<table0>` WHERE "wrestler" = 'davey richards' ) )
what is the difference in the number of combined days between kevin steen and davey richards ?
<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 `<table4>`.route FROM `<table4>` WHERE `<table4>`.subject_id = "3343"
what is drug route of subject id 3343?
<table0>[table_27685921_1] { <col0>[visitors__total]:[VARCHAR] <col1>[exhibitors__total]:[VARCHAR] }
SELECT COUNT( visitors__total_ ) FROM `<table0>` WHERE exhibitors__total_ = 1654
how many people come to visit when the 1654 exhibitions
<table0>[table_42382] { <col0>[Year]:[real] <col1>[Competition]:[text] <col2>[Venue]:[text] <col3>[Position]:[text] <col4>[Event]:[text] }
SELECT COUNT( "Year" ) FROM `<table0>` WHERE "Competition" = 'olympic games' AND "Event" = '400 m'
How many years was the 400 m event in the olympic games?
<table0>[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_700] <col9>[text]:[Time] } <table1>[event] { <col0>[int]:[text] <col1>[Stadium_ID]:...
SELECT name, meter_100 FROM `<table0>` ORDER BY meter_100 DESC
Return a bar chart about the distribution of name and meter_100 , and order by the total number in desc.
<table0>[table_name_96] { <col0>[years_for_grizzlies]:[VARCHAR] <col1>[position]:[VARCHAR] <col2>[school_club_team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "small forward" AND `<col2>` = "providence"
Which years did the player from Providence play for the Grizzlies as small forward?
<table0>[Policies] { <col0>[Year]:[INT] <col1>[Policy]:[VARCHAR] <col2>[255]:[INT] }
SELECT Policy, MAX( Amount ) FROM `<table0>` WHERE `<col0>` = 2019 GROUP BY Policy;
Which policy had the highest budget allocation in the year 2019?
<table0>[Products] { <col0>[product_id]:[INTEGER] <col1>[product_type_code]:[VARCHAR] <col2>[product_name]:[VARCHAR] <col3>[product_price]:[DOUBLE] } <table1>[Contacts] { <col0>[contact_id]:[INTEGER] <col1>[customer_id]:[INTEGER] <col2>[gender]:[VARCHAR] <col3>[first_name]:[VARCHAR] <col4>[last_name]:[VARCHAR] <col5>[...
SELECT product_name, COUNT( `<col2>` ) FROM `<table0>` WHERE `<col3>` > 1000 OR `<col3>` < 500 GROUP BY `<col2>` ORDER BY `<col2>`
Show the number of products with price higher than 1000 or lower than 500 for each product name in a bar chart, order x axis from low to high order please.
<table0>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table1>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table2>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] ...
SELECT COUNT( DISTINCT `<table10>`.subject_id ) FROM `<table10>` WHERE `<table10>`.hadm_id IN ( SELECT `<table6>`.hadm_id FROM `<table6>` WHERE `<table6>`.icd9_code = ( SELECT `<table3>`.icd9_code FROM `<table3>` WHERE `<table3>`.short_title = 'ftng autmtc dfibrillator' ) AND DATETIME( `<table6>`.charttime ) <= DATETIM...
calculate the number of patients with ftng autmtc dfibrillator diagnosed until 4 years ago.
<table0>[table_204_651] { <col0>[number]:[date] <col1>[text]:[championship] <col2>[text]:[location] <col3>[text]:[category] <col4>[text]:[surface] <col5>[text]:[prev] <col6>[result]:[text] <col7>[prev]:[points] <col8>[number]:[new] <col9>[points]:[number] <col10>[outcome]:[text] }
SELECT COUNT( "championship" ) FROM `<table0>`
how many total championships are included ?