schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[users] { <col0>[userid]:[integer] <col1>[age]:[text] <col2>[u_gender]:[text] <col3>[occupation]:[text] } <table1>[directors] { <col0>[directorid]:[integer] <col1>[d_quality]:[integer] <col2>[avg_revenue]:[integer] } <table2>[actors] { <col0>[actorid]:[integer] <col1>[a_gender]:[text] <col2>[a_quality]:[integ...
SELECT T2.actorid, T1.directorid FROM `<table5>` AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid WHERE T1.genre = 'Action'
Please list down the ID of actors and directors in action movies.
<table0>[state] { <col0>[state_code]:[text] <col1>[state_name]:[text] <col2>[country_name]:[text] } <table1>[food_service] { <col0>[meal_code]:[text] <col1>[meal_number]:[int] <col2>[compartment]:[text] <col3>[meal_description]:[varchar] } <table2>[days] { <col0>[days_code]:[varchar] <col1>[day_name]:[varchar] } <ta...
SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service 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 = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.cit...
which airlines have connections between PITTSBURGH and BALTIMORE
<table0>[table_train_223] { <col0>[int]:[anemia] <col1>[bool]:[diabetic] <col2>[string]:[eye_disease] <col3>[bool]:[hgb] <col4>[int]:[retinal_pigmentation_abnormalities] <col5>[bool]:[glucose_6_phosphate_dehydrogenase_deficiency_g6pd] <col6>[int]:[age] <col7>[float]:[NOUSE] }
SELECT * FROM `<table0>` WHERE age >= 12 AND age <= 40
12 to 40 years old
<table0>[table_26460435_7] { <col0>[status]:[VARCHAR] <col1>[monarch]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Mingyinyo"
What is the status for the monarch Mingyinyo?
<table0>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heartrate]:[number] <col5>[respiration]:[number] <col6>[systemicsystolic]:[number] <col7>[systemicdiastolic]:[number] <col8>[systemicmean]:[number] <col9>[observationti...
SELECT COUNT( * ) > 0 FROM `<table4>` WHERE `<table4>`.`<table2>`unitstayid IN ( SELECT `<table2>`.`<table2>`unitstayid FROM `<table2>` WHERE `<table2>`.`<table2>`healthsystemstayid IN ( SELECT `<table2>`.`<table2>`healthsystemstayid FROM `<table2>` WHERE `<table2>`.uniquepid = '002-76990' AND NOT `<table2>`.hospitaldi...
was patient 002-76990 receiving in the last hospital visit any medication?
<table0>[table_name_41] { <col0>[score]:[VARCHAR] <col1>[player]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "vijay singh"
What is Score, when Player is 'Vijay Singh'?
<table0>[table_name_11] { <col0>[lost]:[VARCHAR] <col1>[points_for]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "257"
What is Lost, when Points For is "257"?
<table0>[lifelong_learners] { <col0>[student_id]:[INT] <col1>[age_group]:[VARCHAR] <col2>[enrolled_in_course]:[BOOLEAN] }
SELECT age_group, ( SUM( `<col2>` ) * 100.0 / COUNT( * ) ) AS percentage FROM `<table0>` GROUP BY age_group;
What is the percentage of lifelong learners by age group?
<table0>[table_name_35] { <col0>[command_set]:[VARCHAR] <col1>[number_fdd]:[VARCHAR] <col2>[fdd_capacity__each]:[VARCHAR] <col3>[sides]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE fdd_capacity__each_ = "270kb" AND `<col3>` = "ds" AND _number_fdd > 1
Tell me the command set with FDD capacity of 270kb and sides of ds with #FDD more than 1
<table0>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table1>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comment_text]:[varchar] } <table2>[student_record] { <col0>[stu...
SELECT DISTINCT student.firstname, student.lastname FROM `<table13>` INNER JOIN `<table13>`_offering ON `<table13>`.`<table13>`_id = `<table13>`_offering.`<table13>`_id INNER JOIN gsi ON gsi.`<table13>`_offering_id = `<table13>`_offering.offering_id INNER JOIN student ON student.student_id = gsi.student_id INNER JOIN s...
For AAS 211 , who were the GSIs last semester ?
<table0>[table_204_948] { <col0>[number]:[year] <col1>[number]:[award] <col2>[text]:[category] <col3>[text]:[film] <col4>[text]:[result] }
SELECT "film" FROM `<table0>` WHERE id = 1
what was the first movie that this actor received an award for starring in ?
<table0>[Farm] { <col0>[INT]:[name] } <table1>[IotDevice] { <col0>[INT]:[name] <col1>[VARCHAR]:[farm_id] <col2>[INT]:[INSERT] <col3>[Farm]:[name] <col4>[VALUES]:[Farm] <col5>[Farm]:[Farm] }
SELECT COUNT( * ) FROM `<table1>` WHERE farm_id = ( SELECT id FROM `<col3>` WHERE name = '`<table0>` G' );
What is the number of IoT devices in farm G?
<table0>[table_name_71] { <col0>[to_par]:[VARCHAR] <col1>[total]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 288
For the total of 288 what was the to par?
<table0>[recycling_rates] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[location] <col2>[VARCHAR]:[rate] }
SELECT location, rate FROM recycling_rates;
Display the recycling rate for each location
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[demogr...
SELECT `<table1>`.short_title FROM `<table1>` WHERE `<table1>`.icd9_code = "7885"
what is diagnoses short title of diagnoses icd9 code 7885?
<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 COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` WHERE `<table4>`.language = "SPAN" AND `<table4>`.age < "74"
count the number of patients whose language is span and age is less than 74?
<table0>[Household_Water_Usage] { <col0>[INT]:[City] <col1>[VARCHAR]:[Usage] }
SELECT AVG( Usage ) FROM `<table0>` WHERE City = 'Oakland';
What is the average water usage per household in the city of Oakland?
<table0>[table_name_1] { <col0>[res]:[VARCHAR] <col1>[time]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "0:20"
In the round that lasted 0:20, what was the Res?
<table0>[table_204_576] { <col0>[number]:[year] <col1>[number]:[best] <col2>[text]:[location] <col3>[text]:[date] <col4>[text]:[world] <col5>[rank]:[text] }
SELECT "year" FROM `<table0>` ORDER BY "best" LIMIT 1
in which year did bekele record his fastest 10,000 meter time from 2003-2012 ?
<table0>[table_25604014_5] { <col0>[directed_by]:[VARCHAR] <col1>[production_code]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "7D03"
Who direcred the episode with production code 7d03?
<table0>[table_name_68] { <col0>[year]:[VARCHAR] <col1>[yards]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "2,242"
What year was 2,242 yards achieved?
<table0>[Web_client_accelerator] { <col0>[int]:[name] <col1>[text]:[Operating_system] <col2>[text]:[Client] <col3>[text]:[Connection] } <table1>[browser] { <col0>[int]:[name] <col1>[text]:[market_share] } <table2>[accelerator_compatible_browser] { <col0>[accelerator_id]:[int] <col1>[browser_id]:[int] <col2>[compatibl...
SELECT name, id FROM `<table0>` AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id ORDER BY id
Display a bar chart for what are the ids and names of the web accelerators that are compatible with two or more browsers?, and I want to sort y-axis from low to high order.
<table0>[table_72866] { <col0>[Fin]:[Pos] <col1>[real]:[Car] <col2>[real]:[Driver] <col3>[text]:[Team] <col4>[text]:[Laps] <col5>[real]:[Time] <col6>[Retired]:[text] <col7>[Grid]:[real] <col8>[Laps]:[Led] <col9>[real]:[Points] }
SELECT "Team" FROM `<table0>` WHERE "Driver" = 'Darren Manning'
Name the team of darren manning
<table0>[table_25887826_17] { <col0>[total_pts]:[VARCHAR] }
SELECT MAX( 10 AS _c_pts ) FROM `<table0>` WHERE `<col0>` = 39
What is the largest number of 10 C points for a team with 39 total points?
<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 DISTINCT Posts.Id, Posts.ParentId AS parent, R.PostId, Posts.CreationDate, R.CreationDate FROM Posts, ( SELECT CreationDate, PostId FROM `<table9>` WHERE VoteTypeId = 8 AND BountyAmount > 0 ) AS R WHERE ParentId IN ( SELECT PostId FROM `<table9>` WHERE VoteTypeId = 8 AND BountyAmount > 0 ) AND PostTypeId = 2 AND...
Find all answers which are posted before a bounty is raised by the asker.
<table0>[mobile_plans] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[price]:[DECIMAL] <col3>[data_limit]:[INT] } <table1>[usage] { <col0>[customer_id]:[INT] <col1>[plan_id]:[INT] }
SELECT m.name, AVG( u.data_usage ) as avg_data_usage FROM `<table0>` m INNER JOIN usage u ON m.id = u.plan_id WHERE u.timestamp >= DATE_SUB( CURRENT_DATE, INTERVAL 1 MONTH ) GROUP BY m.name;
What is the average data usage for each mobile plan in the past month?
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric...
SELECT `<table0>`.`<table0>`resulttime FROM `<table0>` WHERE `<table0>`.`<table9>`unitstayid IN ( SELECT `<table9>`.`<table9>`unitstayid FROM `<table9>` WHERE `<table9>`.`<table9>`healthsystemstayid IN ( SELECT `<table9>`.`<table9>`healthsystemstayid FROM `<table9>` WHERE `<table9>`.uniquepid = '017-64510' ) ) AND `<ta...
when did patient 017-64510 for the last time in 08/2103 receive the bedside glucose test?
<table0>[policy_advocacy] { <col0>[INT]:[year] <col1>[INT]:[focus] <col2>[VARCHAR]:[255] <col3>[continent]:[VARCHAR] <col4>[255]:[INSERT] }
SELECT focus, continent, COUNT( id ) as total_efforts FROM `<table0>` WHERE year BETWEEN 2017 AND 2022 AND focus IN ( 'Accessibility', 'Education', 'Employment' ) GROUP BY focus, continent;
What is the distribution of policy advocacy efforts focused on accessibility, education, and employment across continents in the last five years?
<table0>[instructor] { <col0>[instructor_id]:[int] <col1>[name]:[varchar] <col2>[uniqname]:[varchar] } <table1>[jobs] { <col0>[job_id]:[int] <col1>[job_title]:[varchar] <col2>[description]:[varchar] <col3>[requirement]:[varchar] <col4>[city]:[varchar] <col5>[state]:[varchar] <col6>[country]:[varchar] <col7>[zip]:[int]...
SELECT DISTINCT `<table2>`.department, `<table2>`.name, `<table2>`.number, semester.semester FROM `<table2>` INNER JOIN area ON `<table2>`.`<table2>`_id = area.`<table2>`_id INNER JOIN `<table2>`_offering ON `<table2>`.`<table2>`_id = `<table2>`_offering.`<table2>`_id INNER JOIN semester ON semester.semester_id = `<tab...
What computing infrastructure courses are offered in Winter or Fall 2012 ?
<table0>[basketball_match] { <col0>[Team_ID]:[int] <col1>[School_ID]:[int] <col2>[Team_Name]:[text] <col3>[ACC_Regular_Season]:[text] <col4>[ACC_Percent]:[text] <col5>[ACC_Home]:[text] <col6>[ACC_Road]:[text] <col7>[All_Games]:[text] <col8>[All_Games_Percent]:[int] <col9>[All_Home]:[text] <col10>[All_Road]:[text] <col1...
SELECT Team_Name, `<col1>` FROM `<table0>` ORDER BY `<col2>` DESC
Return a bar chart about the distribution of Team_Name and School_ID , could you order from high to low by the x axis?
<table0>[vessels] { <col0>[vessel_id]:[INT] <col1>[vessel_name]:[VARCHAR] <col2>[registry]:[VARCHAR] }
SELECT COUNT( * ) FROM `<table0>` WHERE `<col2>` = 'Panama';
How many vessels are in the 'vessels' table that are registered in the 'Panama' registry?
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[tim...
SELECT COUNT( DISTINCT t1.uniquepid ) FROM ( SELECT patient.uniquepid, `<table6>`.`<table6>`time FROM `<table6>` JOIN patient ON `<table6>`.patientunitstayid = patient.patientunitstayid WHERE `<table6>`.`<table6>`name = 'normal saline administration' AND DATETIME( `<table6>`.`<table6>`time, 'start of year' ) = DATETIME...
count the number of patients who were prescribed atropine injection 0.5 mg in the same month after receiving the normal saline administration procedure in the last year.
<table0>[table_203_368] { <col0>[number]:[date] <col1>[text]:[opponent] <col2>[text]:[venue] <col3>[text]:[result] }
SELECT "date" FROM `<table0>` WHERE "result" = 2 ORDER BY id DESC LIMIT 1
on what date was the last game in which cardiff city f.c. scored 2 goals ?
<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>`.gender = "F" AND lab.itemid = "50824"
what is the number of female patients who have lab test item id 50824?
<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>`.diagnosis = "VENTRICULAR TACHYCARDIA" AND procedures.short_title = "Closed biopsy of tongue"
how many patients whose primary disease is ventricular tachycardia and procedure short title is closed biopsy of tongue?
<table0>[table_name_5] { <col0>[years]:[VARCHAR] <col1>[jersey_number_s]:[INTEGER] }
SELECT `<col0>` FROM `<table0>` WHERE jersey_number_s_ > 20
What years did the player with the jersey number bigger than 20 play?
<table0>[table_70161] { <col0>[Date]:[text] <col1>[Opponent]:[text] <col2>[Score]:[text] <col3>[Loss]:[text] <col4>[Crowd]:[text] <col5>[Record]:[text] }
SELECT "Date" FROM `<table0>` WHERE "Opponent" = '@mil' AND "Record" = '45-16'
Opponent of @mil, and a Record of 45-16 happened on what date?
<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>` INNER JOIN lab ON `<table3>`.hadm_id = lab.hadm_id WHERE `<table3>`.dod_year <= "2131.0" AND lab.label = "White Blood Cells"
give me the number of patients whose year of death is less than or equal to 2131 and lab test name is white blood cells?
<table0>[table_203_8] { <col0>[number]:[player] <col1>[text]:[rec] <col2>[number]:[yards] <col3>[number]:[avg] <col4>[number]:[number] <col5>[long]:[number] }
SELECT "player" FROM `<table0>` WHERE "player" <> 'charles frederick' ORDER BY "yards" DESC LIMIT 1
who was the next player besides charles frederick that received the most yards in 2007 ?
<table0>[climate_adaptation_projects] { <col0>[INT]:[project_name] <col1>[VARCHAR]:[100] <col2>[location]:[VARCHAR] <col3>[100]:[start_year] <col4>[INT]:[INSERT] }
SELECT project_name, start_year FROM `<table0>` WHERE `<col2>` = 'Pacific Islands';
List all climate adaptation projects in the Pacific Islands and their respective start years.
<table0>[country] { <col0>[origin]:[integer] } <table1>[price] { } <table2>[data] { <col0>[integer]:[mpg] <col1>[real]:[cylinders] <col2>[integer]:[displacement] <col3>[real]:[horsepower] <col4>[integer]:[weight] <col5>[integer]:[acceleration] <col6>[real]:[model] <col7>[integer]:[car_name] } <table3>[production] { ...
SELECT T3.country FROM `<table2>` AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T1.car_name = 'ford torino' AND T2.model_year = 1970
What was the origin country of the car model ford torino produced in 1970?
<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 COUNT( DISTINCT `<table9>`.uniquepid ) FROM `<table9>` WHERE `<table9>`.`<table9>`unitstayid IN ( SELECT `<table6>`.`<table9>`unitstayid FROM `<table6>` WHERE `<table6>`.`<table6>`name = 'bronchoscopy - with brushings' AND DATETIME( `<table6>`.`<table6>`time, 'start of year' ) = DATETIME( CURRENT_TIME( ), 'start...
the number of patients who have received a bronchoscopy - with brushings in this year.
<table0>[table_name_73] { <col0>[win__percentage]:[VARCHAR] <col1>[name]:[VARCHAR] <col2>[wins]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "tony rice" AND `<col2>` < 28
Which Win % has a Name of tony rice, and Wins smaller than 28?
<table0>[PharmaCorp_RnD] { <col0>[company]:[VARCHAR] <col1>[year]:[INT] <col2>[expenditure]:[DECIMAL] }
SELECT SUM( `<col2>` ) FROM `<table0>` WHERE `<col0>` = 'PharmaCorp' AND `<col1>` = 2020;
What was the total R&D expenditure for 'PharmaCorp' in 2020?
<table0>[routes] { <col0>[rid]:[number] <col1>[dst_apid]:[number] <col2>[dst_ap]:[text] <col3>[src_apid]:[number] <col4>[src_ap]:[text] <col5>[alid]:[number] <col6>[airline]:[text] <col7>[codeshare]:[text] } <table1>[airports] { <col0>[apid]:[number] <col1>[name]:[text] <col2>[city]:[text] <col3>[country]:[text] <col4...
SELECT `<col1>` FROM `<table1>` WHERE `<col3>` = 'Cuba' OR `<col3>` = 'Argentina'
Find the name of the airports located in Cuba or Argentina.
<table0>[Dish] { <col0>[integer]:[name] <col1>[text]:[description] <col2>[text]:[menus_appeared] <col3>[integer]:[times_appeared] <col4>[integer]:[first_appeared] <col5>[integer]:[last_appeared] <col6>[integer]:[lowest_price] <col7>[real]:[highest_price] } <table1>[Menu] { <col0>[integer]:[name] <col1>[text]:[sponsor]...
SELECT SUM( CASE WHEN T1.name = 'Paysanne Soup' THEN 1 ELSE 0 END ) FROM `<table0>` AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.highest_price IS NULL
Among the menu pages on which the dish "Paysanne Soup" had appeared, how many of them had a stable price for the dish?
<table0>[restriction] { <col0>[restriction_code]:[text] <col1>[advance_purchase]:[int] <col2>[stopovers]:[text] <col3>[saturday_stay_required]:[text] <col4>[minimum_stay]:[int] <col5>[maximum_stay]:[int] <col6>[application]:[text] <col7>[no_discounts]:[text] } <table1>[code_description] { <col0>[code]:[varchar] <col1>...
SELECT DISTINCT fare.fare_id FROM `<table18>` AS AIRPORT_SERVICE_0, `<table18>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'WASHINGTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name...
how much is a flight from WASHINGTON to MONTREAL
<table0>[country] { <col0>[origin]:[integer] } <table1>[price] { } <table2>[data] { <col0>[integer]:[mpg] <col1>[real]:[cylinders] <col2>[integer]:[displacement] <col3>[real]:[horsepower] <col4>[integer]:[weight] <col5>[integer]:[acceleration] <col6>[real]:[model] <col7>[integer]:[car_name] } <table3>[production] { ...
SELECT T1.horsepower, T2.model_year FROM `<table2>` AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'subaru dl'
What is the horsepower and model year of the car named Subaru Dl?
<table0>[table_name_29] { <col0>[interview]:[INTEGER] <col1>[evening_gown]:[VARCHAR] <col2>[state]:[VARCHAR] }
SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 8.82 AND `<col2>` = "louisiana"
What is the average interview score of a contestant from Louisiana with an evening gown smaller than 8.82?
<table0>[table_668] { <col0>[Year]:[real] <col1>[Finish]:[position] <col2>[text]:[1st] <col3>[day]:[text] <col4>[2nd]:[day] <col5>[text]:[3rd] <col6>[day]:[text] <col7>[4th]:[Day] }
SELECT COUNT( "1st day" ) FROM `<table0>` WHERE "3rd day" = 'bumped St. Catharine''s'
how many 1st day with 3rd day being bumped st. catharine's
<table0>[table_49071] { <col0>[Year]:[text] <col1>[2001]:[real] <col2>[2002]:[real] <col3>[2003]:[real] <col4>[2004]:[real] <col5>[2005]:[real] <col6>[2006]:[real] <col7>[2007]:[real] <col8>[2008]:[real] <col9>[2009]:[real] <col10>[2010]:[real] <col11>[2011]:[real] <col12>[2012]:[real] }
SELECT AVG( "2011" ) FROM `<table0>` WHERE "2012" = '65,000' AND "2010" > '75,680'
what is the average 2011 when 2012 is 65,000 and 2010 is more than 75,680?
<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 ( SELECT `<table5>`.`<table5>`result FROM `<table5>` WHERE `<table5>`.`<table6>`unitstayid IN ( SELECT `<table6>`.`<table6>`unitstayid FROM `<table6>` WHERE `<table6>`.`<table6>`healthsystemstayid IN ( SELECT `<table6>`.`<table6>`healthsystemstayid FROM `<table6>` WHERE `<table6>`.uniquepid = '027-144847' AND NO...
how much does the bedside glucose change in patient 027-144847 last measured on the first hospital visit compared to the second to last value measured on the first hospital visit?
<table0>[local_events] { <col0>[event_id]:[INT] <col1>[name]:[TEXT] <col2>[city]:[TEXT] <col3>[country]:[TEXT] <col4>[attendance]:[INT] }
CREATE TABLE local_events ( event_id INT, name TEXT, city TEXT, country TEXT, attendance INT );
Create a table for local events in New Orleans.
<table0>[Candidate_Assessments] { <col0>[candidate_id]:[INTEGER] <col1>[qualification]:[CHAR] <col2>[assessment_date]:[DATETIME] <col3>[asessment_outcome_code]:[CHAR] } <table1>[Addresses] { <col0>[address_id]:[INTEGER] <col1>[line_1]:[VARCHAR] <col2>[line_2]:[VARCHAR] <col3>[city]:[VARCHAR] <col4>[zip_postcode]:[CHAR...
SELECT course_name, COUNT( course_name ) FROM `<table3>` GROUP BY course_name ORDER BY course_name
Bar chart of the number of course name from each course name, and I want to show from low to high by the X-axis please.
<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 AVG( `<table0>`.age ) FROM `<table0>` WHERE `<table0>`.admission_type = "EMERGENCY" AND `<table0>`.insurance = "Medicare"
what is the average age of patients whose admission type is emergency and insurance is medicare?
<table0>[table_name_31] { <col0>[secr_numbers]:[VARCHAR] <col1>[year_made]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1861"
What was the SECR number of the item made in 1861?
<table0>[entree_orders] { <col0>[order_id]:[INT] <col1>[entree]:[VARCHAR] <col2>[255]:[entree_quantity] <col3>[INT]:[entree_price] <col4>[DECIMAL]:[order_date] <col5>[DATE]:[INSERT] }
SELECT entree, SUM( entree_quantity * entree_price ) FROM `<table0>` WHERE order_date >= DATEADD( month, 0, GETDATE( ) ) GROUP BY entree;
What is the total revenue for each entree in the current month?
<table0>[table_name_41] { <col0>[green_communist]:[VARCHAR] <col1>[polling_institute]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "euroteste/jn"
What's the green communist when Euroteste/JN is the polling Institute?
<table0>[table_160510_1] { <col0>[province]:[VARCHAR] <col1>[hanja]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "朔州"
The hanja 朔州 is for what province?
<table0>[Users] { <col0>[number]:[Reputation] <col1>[number]:[CreationDate] <col2>[time]:[DisplayName] <col3>[text]:[LastAccessDate] <col4>[time]:[WebsiteUrl] <col5>[text]:[Location] <col6>[text]:[AboutMe] <col7>[text]:[Views] <col8>[number]:[UpVotes] <col9>[number]:[DownVotes] <col10>[number]:[ProfileImageUrl] <col11>...
SELECT * FROM `<table3>` WHERE CreationDate >= '2014-05-01' AND CreationDate <= '2014-10-01' AND NOT UserId IS NULL ORDER BY Id
Votes between 2014-05 to 2014-10.
<table0>[PostTypes] { <col0>[number]:[text] } <table1>[PostHistoryTypes] { <col0>[number]:[text] } <table2>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivilegedUserGuidance...
SELECT p.Id, p.Title, p.Tags, t.TagName FROM `<table24>` AS p LEFT OUTER JOIN PostTags AS pt ON p.Id = pt.PostId LEFT OUTER JOIN Tags AS t ON t.Id = pt.TagId WHERE PostTypeId = 1 AND ( t.TagName = 'ruby_on_rails' OR t.TagName = 'ruby_on_rails3' )
Posts that share ruby_on_rails and ruby_on_rails3 tags.
<table0>[SustainableProducts] { <col0>[product]:[VARCHAR] <col1>[255]:[country] <col2>[VARCHAR]:[255] <col3>[price]:[DECIMAL] }
SELECT AVG( `<col3>` ) FROM `<table0>` WHERE country = 'Netherlands';
What is the average price of sustainable beauty products in the Netherlands?
<table0>[Volunteers] { <col0>[INT]:[name] <col1>[TEXT]:[country] <col2>[TEXT]:[INSERT] }
SELECT country, COUNT( DISTINCT id ) as num_volunteers FROM `<table0>` GROUP BY country ORDER BY num_volunteers DESC LIMIT 2;
Identify the top 2 countries with the highest number of unique volunteers.
<table0>[table_name_73] { <col0>[school]:[VARCHAR] <col1>[location]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "trafalgar"
Which school is located in trafalgar?
<table0>[table_204_409] { <col0>[number]:[date] <col1>[text]:[race] <col2>[name]:[text] <col3>[location]:[text] <col4>[uci]:[rating] <col5>[number]:[winner] <col6>[text]:[team] }
SELECT "date" FROM `<table0>` WHERE "race name" = 'tour of libya'
how long did the tour of libya last ?
<table0>[table_name_46] { <col0>[run_4]:[VARCHAR] <col1>[athletes]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "hubert stevens & curtis stevens"
Which Run 4 has Athletes of hubert stevens & curtis stevens?
<table0>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table1>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table2>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <table3>[offering_ins...
SELECT COUNT( * ) = 0 FROM `<table7>` INNER JOIN program_`<table7>` ON program_`<table7>`.`<table7>`_id = `<table7>`.`<table7>`_id WHERE `<table7>`.has_exams = 'N' AND program_`<table7>`.category LIKE '%ULCS%'
Does every upper-level class have exams ?
<table0>[customer_data] { <col0>[customer_id]:[INT] <col1>[retention_quarter]:[DATE] <col2>[region]:[VARCHAR] }
SELECT region, DATE_TRUNC( 'quarter', `<col1>` ) as retention_quarter, COUNT( `<col0>` ) as total_customers, COUNT( DISTINCT CASE WHEN `<col0>` IN ( SELECT `<col0>` FROM `<table0>` WHERE `<col1>` <= current_date - INTERVAL '1 year' GROUP BY `<col0>` ) THEN `<col0>` END ) as retained_customers, 100.0 * COUNT( DISTINCT C...
What is the data retention rate per quarter for customers in the 'Americas' region?
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug...
SELECT AVG( `<table4>`.age ) FROM `<table4>` WHERE `<table4>`.marital_status = "MARRIED" AND `<table4>`.admission_type = "URGENT"
what is average age of patients whose marital status is married and admission type is urgent?
<table0>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table1>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[itemid]:[number] <col5>[charttime]:[time] <col6>...
SELECT 24 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table5>`.charttime ) ) FROM `<table5>` WHERE `<table5>`.icd9_code = ( SELECT `<table3>`.icd9_code FROM `<table3>` WHERE `<table3>`.short_title = 'hpt c w/o hepat coma nos' ) AND `<table5>`.hadm_id IN ( SELECT `<table6>`.hadm_id FROM `<table6>` WHERE `<...
how many hours has it been since the last hpt c w/o hepat coma nos diagnosis for patient 9964 on the current hospital visit?
<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 `<table2>`.subject_id ) FROM `<table2>` INNER JOIN lab ON `<table2>`.hadm_id = lab.hadm_id WHERE `<table2>`.admission_type = "EMERGENCY" AND lab.itemid = "51256"
give me the number of patients whose admission type is emergency and item id is 51256?
<table0>[table_10840] { <col0>[Year]:[real] <col1>[Title]:[text] <col2>[Role]:[text] <col3>[Leading]:[Lady] <col4>[text]:[Director] }
SELECT "Leading Lady" FROM `<table0>` WHERE "Title" = 'a yank in the r.a.f.'
Who is the leading lady in a yank in the r.a.f.?
<table0>[military_bases] { <col0>[INT]:[base] <col1>[TEXT]:[region] <col2>[TEXT]:[personnel] <col3>[INT]:[INSERT] }
SELECT AVG( personnel ) FROM `<table0>` WHERE region = 'Asia-Pacific';
What is the average number of military personnel per base in the 'Asia-Pacific' region?
<table0>[military_vehicles] { <col0>[INT]:[type] <col1>[VARCHAR]:[255] <col2>[status]:[VARCHAR] <col3>[255]:[date] }
SELECT type, COUNT( * ) as count, ROUND( 100 * COUNT( * ) / ( SELECT COUNT( * ) FROM `<table0>` WHERE date > DATE_SUB( NOW( ), INTERVAL 1 MONTH ) ), 2 ) as percent FROM `<table0>` WHERE date > DATE_SUB( NOW( ), INTERVAL 1 MONTH ) GROUP BY type;
Show the number of military vehicles, by type, that were maintained in the past month and the percentage of total vehicles each type represents.
<table0>[table_name_49] { <col0>[location_attendance]:[VARCHAR] <col1>[high_rebounds]:[VARCHAR] <col2>[high_points]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "a. horford ( 10 )" AND `<col2>` = "j. johnson ( 21 )"
What is the location attendance of the game with A. Horford (10) as the highest rebounds and J. Johnson (21) as the highest points?
<table0>[daily_usage] { <col0>[usage_id]:[INT] <col1>[customer_id]:[INT] <col2>[usage_date]:[DATE] <col3>[usage_amount]:[FLOAT] }
SELECT AVG( `<col3>` ) FROM `<table0>` WHERE `<col1>` = 1 AND `<col2>` BETWEEN '2022-01-01' AND '2022-01-31';
What is the average daily water usage for a specific residential customer in a given month?
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table2>[chartevents] { <col0>...
SELECT `<table8>`.charttime FROM `<table8>` WHERE `<table8>`.hadm_id IN ( SELECT `<table10>`.hadm_id FROM `<table10>` WHERE `<table10>`.subject_id = 83894 AND NOT `<table10>`.dischtime IS NULL ORDER BY `<table10>`.admittime DESC LIMIT 1 ) ORDER BY `<table8>`.charttime LIMIT 1
when they came to the hospital last time, when did patient 83894 get a first lab test?
<table0>[field] { <col0>[fieldid]:[int] } <table1>[paperfield] { <col0>[fieldid]:[int] <col1>[paperid]:[int] } <table2>[journal] { <col0>[journalid]:[int] <col1>[journalname]:[varchar] } <table3>[paperkeyphrase] { <col0>[paperid]:[int] <col1>[keyphraseid]:[int] } <table4>[keyphrase] { <col0>[keyphraseid]:[int] <col...
SELECT DISTINCT COUNT( paper.paperid ) FROM author, paper, venue, writes WHERE author.authorname = 'jeffrey heer' AND venue.venueid = paper.venueid AND venue.venuename = 'chi' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid
How many papers does jeffrey heer have in chi ?
<table0>[table_23248940_10] { <col0>[high_rebounds]:[VARCHAR] <col1>[record]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "34-32"
How many people had high rebounds during the game with a record of 34-32?
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[te...
SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN lab ON `<table3>`.hadm_id = lab.hadm_id WHERE `<table3>`.admission_type = "ELECTIVE" AND lab.fluid = "Blood"
what is the number of patients whose admission type is elective and blood as their lab test fluid?
<table0>[sustainability_fact] { <col0>[sustainability_id]:[INT] <col1>[menu_item_id]:[INT] <col2>[sustainability_rating]:[DECIMAL] <col3>[sustainability_certified]:[BOOLEAN] }
SELECT s.supplier_name, SUM( sf.sale_quantity * sf.sale_price ) as total_sales FROM sales_fact sf JOIN order_fact o ON sf.sale_id = o.sale_id JOIN supplier_dim s ON o.supplier_id = s.supplier_id GROUP BY s.supplier_name ORDER BY total_sales DESC;
List the suppliers and their total sales, from the order_fact and sales_fact tables, ordered by total sales in descending order.
<table0>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[i...
SELECT ( SELECT `<table11>`.valuenum FROM `<table11>` WHERE `<table11>`.icustay_id IN ( SELECT `<table2>`.icustay_id FROM `<table2>` WHERE `<table2>`.hadm_id IN ( SELECT `<table13>`.hadm_id FROM `<table13>` WHERE `<table13>`.subject_id = 30826 AND `<table13>`.dischtime IS NULL ) ) AND `<table11>`.itemid IN ( SELECT `<t...
how much do patient 30826's weight shifts second measured on the current hospital visit compared to the first value measured on the current hospital visit?
<table0>[follows] { } <table1>[user_profiles] { <col0>[name]:[VARCHAR] <col1>[uid]:[VARCHAR] }
SELECT T1.name FROM `<table1>` AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 GROUP BY T2.f1 HAVING COUNT( * ) > ( SELECT COUNT( * ) FROM `<table1>` AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 WHERE T1.name = 'Tyler Swift' )
Find the names of the users whose number of followers is greater than that of the user named 'Tyler Swift'.
<table0>[date_day] { <col0>[month_number]:[int] <col1>[day_number]:[int] <col2>[year]:[int] <col3>[day_name]:[varchar] } <table1>[code_description] { <col0>[code]:[varchar] <col1>[description]:[text] } <table2>[equipment_sequence] { <col0>[aircraft_code_sequence]:[varchar] <col1>[aircraft_code]:[varchar] } <table3>[...
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 ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND date_day.day_number = 23 AND date_day.month_number = 11 AND date_day...
okay just on 11 23 i want to fly from ATLANTA to DENVER and i need to know what flights are available
<table0>[buildings] { <col0>[INT]:[name] <col1>[VARCHAR]:[state] <col2>[VARCHAR]:[rating] <col3>[FLOAT]:[upgrade_year] }
SELECT MIN( rating ) FROM `<table0>` WHERE state = 'Colorado' AND upgrade_year >= 2010;
What is the minimum energy efficiency rating of buildings in Colorado that have received energy efficiency upgrades since 2010?
<table0>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table1>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table2>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[EMAIL]:[va...
SELECT HIRE_DATE, COUNT( `<col5>` ) FROM `<table2>` WHERE `<col5>` < '2002-06-21' ORDER BY COUNT( `<col5>` ) DESC
For those employees who was hired before 2002-06-21, show me about the distribution of hire_date and the amount of hire_date bin hire_date by weekday in a bar chart, and could you display the number of hire date in desc order?
<table0>[table_name_47] { <col0>[top_25]:[INTEGER] <col1>[events]:[VARCHAR] <col2>[top_5]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 17 AND `<col2>` > 0
what is the lowest top-25 when the events is less than 17 and top-5 is more than 0?
<table0>[table_15887683_6] { <col0>[television_service]:[VARCHAR] <col1>[content]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Primafila Hot Club"
Name the television service when primafila hot club
<table0>[county] { <col0>[County_Id]:[int] <col1>[County_name]:[text] <col2>[Population]:[real] <col3>[Zip_code]:[text] } <table1>[party] { <col0>[Party_ID]:[int] <col1>[Year]:[real] <col2>[Party]:[text] <col3>[Governor]:[text] <col4>[Lieutenant_Governor]:[text] <col5>[Comptroller]:[text] <col6>[Attorney_General]:[tex...
SELECT Governor, COUNT( Governor ) FROM `<table2>` AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 GROUP BY Governor ORDER BY COUNT( Governor ) DESC
Find the parties associated with the delegates from district 1 Who served as governors of the parties, and count them by a bar chart, order the number of governor in descending order.
<table0>[discrimination_complaints] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[complaint_type] <col2>[VARCHAR]:[255] <col3>[university]:[VARCHAR] <col4>[255]:[date] }
INSERT INTO discrimination_complaints ( complaint_type, university, date ) VALUES ( 'ableism', 'University of California, Los Angeles', '2022-03-15' );
Insert a new record of a discrimination complaint of ableism at a university on March 15, 2022.
<table0>[security_incidents] { <col0>[incident_id]:[INT] <col1>[incident_date]:[DATE] }
SELECT DATE_FORMAT( incident_date, '%Y-%m' ) AS month, COUNT( * ) AS incident_count FROM `<table0>` WHERE `<col1>` >= DATE_SUB( NOW( ), INTERVAL 1 YEAR ) GROUP BY month;
How many security incidents occurred by month in the past year?
<table0>[table_name_4] { <col0>[budget]:[VARCHAR] <col1>[year]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 2005
What is 2005's budget figure?
<table0>[table_35782] { <col0>[Rank]:[real] <col1>[Airport]:[text] <col2>[Metropolitan]:[area] <col3>[text]:[Passengers] <col4>[real]:[Carriers] }
SELECT "Metropolitan area" FROM `<table0>` WHERE "Passengers" > '130,903' AND "Rank" = '4'
Which Metropolitan area has Passengers larger than 130,903, and a Rank of 4?
<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 `<col3>`
What is the relationship between School_ID and All_Games_Percent , and group by attribute ACC_Regular_Season?
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[te...
SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id INNER JOIN lab ON `<table3>`.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Ventricular fibrillation" AND lab.fluid = "Pleural"
how many patients with ventricular fibrillation had a lab test for pleural fluid?
<table0>[table_41391] { <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" = '11'
What was the kickoff time for week 11's game?
<table0>[wastewater_treatment] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[region] <col2>[VARCHAR]:[treatment_efficiency] }
UPDATE wastewater_treatment SET treatment_efficiency = treatment_efficiency * 1.15 WHERE region = 'West';
Update the 'wastewater_treatment' table to reflect a 15% increase in the 'treatment_efficiency' for the 'West' region
<table0>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] } <table1>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] }
SELECT Founder, AVG( `<col2>` ) FROM `<table0>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder
For those records from the products and each product's manufacturer, find founder and the average of price , and group by attribute founder, and visualize them by a bar chart, and could you rank by the Founder in asc?
<table0>[explainable_ai] { <col0>[algorithm]:[VARCHAR] <col1>[255]:[technique] <col2>[VARCHAR]:[255] <col3>[interpretability_score]:[FLOAT] }
SELECT algorithm, AVG( `<col3>` ) as avg_interpretability, COUNT( technique ) as num_techniques FROM `<table0>` GROUP BY algorithm;
What is the average interpretability score and the number of techniques for each algorithm in the 'explainable_ai' table?
<table0>[marine_species] { <col0>[INT]:[species_name] <col1>[VARCHAR]:[255] <col2>[ocean]:[VARCHAR] <col3>[255]:[depth] <col4>[INT]:[INSERT] }
SELECT MIN( depth ) FROM `<table0>` WHERE `<col2>` = 'Southern';
What is the minimum depth of all marine species observed in the Southern ocean?